summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-02-04 04:21:28 +0100
committerGravatar Nikias Bassen2022-02-04 04:21:28 +0100
commit90fc3833203192ff5a6009d339454b0265b4efc1 (patch)
tree36d43304d2849063b4549441eab38f53043cb5b9 /configure.ac
parentb5ccf24362f65cacc96f529c33bd2dcf2a50cf1b (diff)
downloadlibimobiledevice-glue-90fc3833203192ff5a6009d339454b0265b4efc1.tar.gz
libimobiledevice-glue-90fc3833203192ff5a6009d339454b0265b4efc1.tar.bz2
Add support for Apple's OPACK encoding and TLV format
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
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