diff options
| -rw-r--r-- | configure.ac | 13 | ||||
| -rw-r--r-- | src/common.h | 4 |
2 files changed, 7 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index 8fd466c..e0d1705 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -49,16 +49,9 @@ AC_TYPE_UINT8_T | |||
| 49 | AC_CHECK_FUNCS([asprintf strcasecmp strdup strerror strndup stpcpy vasprintf]) | 49 | AC_CHECK_FUNCS([asprintf strcasecmp strdup strerror strndup stpcpy vasprintf]) |
| 50 | 50 | ||
| 51 | AC_CHECK_HEADER(endian.h, [ac_cv_have_endian_h="yes"], [ac_cv_have_endian_h="no"]) | 51 | AC_CHECK_HEADER(endian.h, [ac_cv_have_endian_h="yes"], [ac_cv_have_endian_h="no"]) |
| 52 | if test "x$ac_cv_have_endian_h" = "xno"; then | 52 | AC_C_BIGENDIAN([AC_DEFINE([__BIG_ENDIAN__], [1], [big endian])], |
| 53 | AC_DEFINE(__LITTLE_ENDIAN,1234,[little endian]) | 53 | [AC_DEFINE([__LITTLE_ENDIAN__], [1], [little endian])]) |
| 54 | AC_DEFINE(__BIG_ENDIAN,4321,[big endian]) | 54 | |
| 55 | AC_C_BIGENDIAN([ac_cv_c_bigendian="yes"], [ac_cv_c_bigendian="no"], [], []) | ||
| 56 | if test "x$ac_cv_c_bigendian" = "xyes"; then | ||
| 57 | AC_DEFINE(__BYTE_ORDER,4321,[big endian byte order]) | ||
| 58 | else | ||
| 59 | AC_DEFINE(__BYTE_ORDER,1234,[little endian byte order]) | ||
| 60 | fi | ||
| 61 | fi | ||
| 62 | 55 | ||
| 63 | # Check for operating system | 56 | # Check for operating system |
| 64 | AC_MSG_CHECKING([whether to enable WIN32 build settings]) | 57 | AC_MSG_CHECKING([whether to enable WIN32 build settings]) |
diff --git a/src/common.h b/src/common.h index beb4a2b..c71ef4a 100644 --- a/src/common.h +++ b/src/common.h | |||
| @@ -1,6 +1,10 @@ | |||
| 1 | #ifndef COMMON_H | 1 | #ifndef COMMON_H |
| 2 | #define COMMON_H | 2 | #define COMMON_H |
| 3 | 3 | ||
| 4 | #ifdef HAVE_CONFIG_H | ||
| 5 | #include <config.h> | ||
| 6 | #endif | ||
| 7 | |||
| 4 | #define PLIST_LITTLE_ENDIAN 0 | 8 | #define PLIST_LITTLE_ENDIAN 0 |
| 5 | #define PLIST_BIG_ENDIAN 1 | 9 | #define PLIST_BIG_ENDIAN 1 |
| 6 | 10 | ||
