diff options
author | 2025-05-16 11:38:20 +0200 | |
---|---|---|
committer | 2025-05-16 11:38:20 +0200 | |
commit | cd095eb9b66bb3925c7a55b763cbe81bba5d55d9 (patch) | |
tree | e69f10786f1a453f85285c22e1d804dc8c958fd5 /configure.ac | |
parent | c915351cb322d041afabc04f780eb35142cdaea5 (diff) | |
download | libimobiledevice-glue-cd095eb9b66bb3925c7a55b763cbe81bba5d55d9.tar.gz libimobiledevice-glue-cd095eb9b66bb3925c7a55b763cbe81bba5d55d9.tar.bz2 |
Use plist_new_unix_date API when available
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0c26ea6..013b093 100644 --- a/configure.ac +++ b/configure.ac @@ -93,6 +93,23 @@ AM_CONDITIONAL(WIN32, test x$win32 = xtrue) AC_CHECK_MEMBER(struct dirent.d_type, AC_DEFINE(HAVE_DIRENT_D_TYPE, 1, [define if struct dirent has member d_type]),, [#include <dirent.h>]) +CACHED_CFLAGS="$CFLAGS" +CFLAGS+=" $libplist_CFLAGS" + +# 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> + ]], [[ + plist_new_unix_date(0); + return 0; + ]])],[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" + AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char -fvisibility=hidden") if test "x$enable_static" = "xyes" -a "x$enable_shared" = "xno"; then |