equal
deleted
inserted
replaced
|
1 # Source: Internal |
|
2 # Info: Written internally so this component can be built on Solaris. |
|
3 # Status: This patch is offered at https://bugs.launchpad.net/ubuntu/+source/sbsigntool/+bug/1588548 |
|
4 |
|
5 --- ORIGINAL/configure.ac 2016-06-13 16:45:35.871026417 -0700 |
|
6 +++ sbsigntool-0.6/configure.ac 2016-06-14 15:53:07.450239957 -0700 |
|
7 @@ -27,25 +27,46 @@ |
|
8 HELP2MAN=: |
|
9 fi |
|
10 |
|
11 +OS=$(uname -s) |
|
12 +AM_CONDITIONAL([SUN_OS], [test "$OS" = "SunOS"]) |
|
13 AC_MSG_CHECKING([build system endianness]) |
|
14 -AC_PREPROC_IFELSE( |
|
15 - [AC_LANG_PROGRAM([[#include <endian.h>]], |
|
16 - [[#if __BYTE_ORDER != __LITTLE_ENDIAN]] |
|
17 - [[#error]] |
|
18 - [[#endif]])], |
|
19 - endian=little |
|
20 - little_endian=1 |
|
21 - big_endian=0) |
|
22 +if test "$OS" = "SunOS"; then |
|
23 + AC_PREPROC_IFELSE( |
|
24 + [AC_LANG_PROGRAM([[#include <sys/isa_defs.h>]], |
|
25 + [[#if __BYTE_ORDER != __LITTLE_ENDIAN]] |
|
26 + [[#error]] |
|
27 + [[#endif]])], |
|
28 + endian=little |
|
29 + little_endian=1 |
|
30 + big_endian=0) |
|
31 |
|
32 -AC_PREPROC_IFELSE( |
|
33 - [AC_LANG_PROGRAM([[#include <endian.h>]], |
|
34 - [[#if __BYTE_ORDER != __BIG_ENDIAN]] |
|
35 - [[#error]] |
|
36 - [[#endif]])], |
|
37 - endian=big |
|
38 - little_endian=0 |
|
39 - big_endian=1) |
|
40 + AC_PREPROC_IFELSE( |
|
41 + [AC_LANG_PROGRAM([[#include <sys/isa_defs.h>]], |
|
42 + [[#if __BYTE_ORDER != __BIG_ENDIAN]] |
|
43 + [[#error]] |
|
44 + [[#endif]])], |
|
45 + endian=big |
|
46 + little_endian=0 |
|
47 + big_endian=1) |
|
48 +else |
|
49 + AC_PREPROC_IFELSE( |
|
50 + [AC_LANG_PROGRAM([[#include <endian.h>]], |
|
51 + [[#if __BYTE_ORDER != __LITTLE_ENDIAN]] |
|
52 + [[#error]] |
|
53 + [[#endif]])], |
|
54 + endian=little |
|
55 + little_endian=1 |
|
56 + big_endian=0) |
|
57 |
|
58 + AC_PREPROC_IFELSE( |
|
59 + [AC_LANG_PROGRAM([[#include <endian.h>]], |
|
60 + [[#if __BYTE_ORDER != __BIG_ENDIAN]] |
|
61 + [[#error]] |
|
62 + [[#endif]])], |
|
63 + endian=big |
|
64 + little_endian=0 |
|
65 + big_endian=1) |
|
66 +fi |
|
67 |
|
68 if test x"$endian" != "xbig" -a x"$endian" != "xlittle"; then |
|
69 AC_MSG_ERROR([Can't determine endianness; is endian.h present?]) |