diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index bfc443e..4e40db1 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,18 @@ AC_TYPE_UINT8_T # Checks for library functions. AC_CHECK_FUNCS([asprintf strcasecmp strdup strerror strndup stpcpy vasprintf getifaddrs]) +AC_CHECK_HEADER(endian.h, [ac_cv_have_endian_h="yes"], [ac_cv_have_endian_h="no"]) +if test "x$ac_cv_have_endian_h" = "xno"; then + AC_DEFINE(__LITTLE_ENDIAN,1234,[little endian]) + AC_DEFINE(__BIG_ENDIAN,4321,[big endian]) + AC_C_BIGENDIAN([ac_cv_c_bigendian="yes"], [ac_cv_c_bigendian="no"], [], []) + if test "x$ac_cv_c_bigendian" = "xyes"; then + AC_DEFINE(__BYTE_ORDER,4321,[big endian byte order]) + else + AC_DEFINE(__BYTE_ORDER,1234,[little endian byte order]) + fi +fi + # Check for operating system AC_MSG_CHECKING([for platform-specific build settings]) case ${host_os} in |