diff --git a/ChangeLog b/ChangeLog index 37abd9f35..d6dc2086f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-07-02 Matthias Clasen + + * configure.in: Better endianness fix. From Tomas Mraz. + 2008-07-02 Matthias Clasen * NEWS: Updates diff --git a/configure.in b/configure.in index 749555578..348d5125b 100644 --- a/configure.in +++ b/configure.in @@ -821,6 +821,20 @@ AM_CONDITIONAL(HAVE_SUNSTUDIO_VISIBILITY, [test x$g_have_sunstudio_visibility = # check for bytesex stuff AC_C_BIGENDIAN +if test x$ac_cv_c_bigendian = xuniversal ; then +AC_TRY_COMPILE([#include ], [#if __BYTE_ORDER == __BIG_ENDIAN +#else +#error Not a big endian. +#endif], + ac_cv_c_bigendian=yes + ,AC_TRY_COMPILE([#include ], [#if __BYTE_ORDER == __LITTLE_ENDIAN +#else +#error Not a little endian. +#endif], + ac_cv_c_bigendian=no + ,AC_MSG_WARN([Could not determine endianness.]))) +fi + # check for header files AC_CHECK_HEADERS([dirent.h float.h limits.h pwd.h grp.h sys/param.h sys/poll.h sys/resource.h])