diff options
author | 2025-06-09 11:05:05 +0200 | |
---|---|---|
committer | 2025-06-09 11:05:05 +0200 | |
commit | b9ff67fbd70074964e09c043206e19d2f5af4f41 (patch) | |
tree | 5ea06fb2481f1ee0befdd0e5b1b63a7c915423f6 /configure.ac | |
parent | 4c50979bdf20d8d17281463cef7cd4c848f6d79d (diff) | |
download | libimobiledevice-b9ff67fbd70074964e09c043206e19d2f5af4f41.tar.gz libimobiledevice-b9ff67fbd70074964e09c043206e19d2f5af4f41.tar.bz2 |
Use updated libplist API if available
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 66f6b4b..5a976c9 100644 --- a/configure.ac +++ b/configure.ac @@ -84,8 +84,24 @@ if test "x$ac_cv_have_endian_h" = "xno"; then fi fi +CACHED_CFLAGS="$CFLAGS" +CFLAGS+=" $libplist_CFLAGS -Werror" + AC_CHECK_DECL([plist_from_json], [AC_DEFINE([HAVE_PLIST_JSON], [1], [Define if libplist has JSON support])], [], [[#include <plist/plist.h>]]) +# check if libplist has plist_new_unix_date() +AC_CACHE_CHECK(for plist_new_unix_date, ac_cv_plist_unix_date, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include <plist/plist.h> + ]], [[ + return plist_new_unix_date(0) ? 0 : 1 + ]])],[ac_cv_plist_unix_date=yes],[ac_cv_plist_unix_date=no])) +if test "$ac_cv_plist_unix_date" = "yes"; then + AC_DEFINE(HAVE_PLIST_UNIX_DATE, 1, [Define if libplist has new unix date API (>= 2.7.0)]) +fi + +CFLAGS="$CACHED_CFLAGS" + # Check for operating system AC_MSG_CHECKING([for platform-specific build settings]) case ${host_os} in |