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 | |||
| 84 | fi | 84 | fi |
| 85 | fi | 85 | fi |
| 86 | 86 | ||
| 87 | CACHED_CFLAGS="$CFLAGS" | ||
| 88 | CFLAGS+=" $libplist_CFLAGS -Werror" | ||
| 89 | |||
| 87 | AC_CHECK_DECL([plist_from_json], [AC_DEFINE([HAVE_PLIST_JSON], [1], [Define if libplist has JSON support])], [], [[#include <plist/plist.h>]]) | 90 | AC_CHECK_DECL([plist_from_json], [AC_DEFINE([HAVE_PLIST_JSON], [1], [Define if libplist has JSON support])], [], [[#include <plist/plist.h>]]) |
| 88 | 91 | ||
| 92 | # check if libplist has plist_new_unix_date() | ||
| 93 | AC_CACHE_CHECK(for plist_new_unix_date, ac_cv_plist_unix_date, | ||
| 94 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
| 95 | #include <plist/plist.h> | ||
| 96 | ]], [[ | ||
| 97 | return plist_new_unix_date(0) ? 0 : 1 | ||
| 98 | ]])],[ac_cv_plist_unix_date=yes],[ac_cv_plist_unix_date=no])) | ||
| 99 | if test "$ac_cv_plist_unix_date" = "yes"; then | ||
| 100 | AC_DEFINE(HAVE_PLIST_UNIX_DATE, 1, [Define if libplist has new unix date API (>= 2.7.0)]) | ||
| 101 | fi | ||
| 102 | |||
| 103 | CFLAGS="$CACHED_CFLAGS" | ||
| 104 | |||
| 89 | # Check for operating system | 105 | # Check for operating system |
| 90 | AC_MSG_CHECKING([for platform-specific build settings]) | 106 | AC_MSG_CHECKING([for platform-specific build settings]) |
| 91 | case ${host_os} in | 107 | case ${host_os} in |
