diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-07-02 19:21:53 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-07-02 19:21:53 +0000 |
commit | df97d2cc0e50068b5a9174c3b2c336c1f0b51057 (patch) | |
tree | 75d9eb3f19278515082e6b6344cc315d0489172b /configure.in | |
parent | 76565e9d8d55d8466d485e9c8b045d5b6caa9d2b (diff) | |
download | glib-df97d2cc0e50068b5a9174c3b2c336c1f0b51057.tar.gz |
Better endianness fix
svn path=/trunk/; revision=7149
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 14 |
1 files changed, 14 insertions, 0 deletions
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 <endian.h>], [#if __BYTE_ORDER == __BIG_ENDIAN +#else +#error Not a big endian. +#endif], + ac_cv_c_bigendian=yes + ,AC_TRY_COMPILE([#include <endian.h>], [#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]) |