summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Chow Loong Jin2014-03-29 03:02:00 +0800
committerGravatar Nikias Bassen2014-03-29 16:08:47 +0100
commitbd73598e02a1402a582c73e04fa6d515d6b56ae1 (patch)
tree94bf0fb5ce98902aef4efc24f1bb093c33b49c8c /configure.ac
parentc44a2566aec583eed33af9b1a3b15a0c564725e4 (diff)
downloadlibplist-bd73598e02a1402a582c73e04fa6d515d6b56ae1.tar.gz
libplist-bd73598e02a1402a582c73e04fa6d515d6b56ae1.tar.bz2
Fix endian detection in configure.ac
On debian-mips, neither __LITTLE_ENDIAN__ nor __BIG_ENDIAN__ are defined anywhere, so PLIST_BYTE_ORDER defaults to PLIST_LITTLE_ENDIAN when it should really be PLIST_BIG_ENDIAN on this architecture. This fixes issue #13.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 3 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
AC_CHECK_FUNCS([asprintf strcasecmp strdup strerror strndup stpcpy vasprintf])
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
+AC_C_BIGENDIAN([AC_DEFINE([__BIG_ENDIAN__], [1], [big endian])],
+ [AC_DEFINE([__LITTLE_ENDIAN__], [1], [little endian])])
+
# Check for operating system
AC_MSG_CHECKING([whether to enable WIN32 build settings])