diff options
| author | 2021-09-11 01:38:44 +0200 | |
|---|---|---|
| committer | 2021-09-11 01:38:44 +0200 | |
| commit | b6e60a33d3e68ecbcb36708cdc68e18a538ba26a (patch) | |
| tree | 554054d4c4871cf4695d51ad4d53f08c3cf71d68 /configure.ac | |
| parent | feb0bcd102ff0abc34ffa04e8cabf26706ffdb38 (diff) | |
| download | libplist-b6e60a33d3e68ecbcb36708cdc68e18a538ba26a.tar.gz libplist-b6e60a33d3e68ecbcb36708cdc68e18a538ba26a.tar.bz2 | |
Update deprecated autoconf macros and update m4 files
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index f84a8ca..9300f31 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # -*- Autoconf -*- | 1 | # -*- Autoconf -*- |
| 2 | # Process this file with autoconf to produce a configure script. | 2 | # Process this file with autoconf to produce a configure script. |
| 3 | 3 | ||
| 4 | AC_PREREQ(2.64) | 4 | AC_PREREQ(2.68) |
| 5 | AC_INIT([libplist], [2.2.1], [https://github.com/libimobiledevice/libplist/issues],, [https://libimobiledevice.org]) | 5 | AC_INIT([libplist], [2.2.1], [https://github.com/libimobiledevice/libplist/issues],, [https://libimobiledevice.org]) |
| 6 | AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip check-news]) | 6 | AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip check-news]) |
| 7 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) | 7 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) |
| @@ -33,10 +33,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], | |||
| 33 | AC_LANG_POP | 33 | AC_LANG_POP |
| 34 | 34 | ||
| 35 | AM_PROG_CC_C_O | 35 | AM_PROG_CC_C_O |
| 36 | AC_PROG_LIBTOOL | 36 | LT_INIT |
| 37 | 37 | ||
| 38 | # Checks for header files. | 38 | # Checks for header files. |
| 39 | AC_HEADER_STDC | ||
| 40 | AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) | 39 | AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) |
| 41 | 40 | ||
| 42 | # Checks for typedefs, structures, and compiler characteristics. | 41 | # Checks for typedefs, structures, and compiler characteristics. |
| @@ -77,25 +76,33 @@ AC_SEARCH_LIBS([fmin],[m]) | |||
| 77 | 76 | ||
| 78 | # Check if struct tm has a tm_gmtoff member | 77 | # Check if struct tm has a tm_gmtoff member |
| 79 | AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, | 78 | AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, |
| 80 | AC_TRY_COMPILE([ | 79 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
| 81 | #include <time.h> | 80 | #include <time.h> |
| 82 | ], [ | 81 | ], [ |
| 83 | struct tm tm; | 82 | struct tm tm; |
| 84 | tm.tm_gmtoff = 1; | 83 | tm.tm_gmtoff = 1; |
| 85 | ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)) | 84 | ])], |
| 85 | [ac_cv_struct_tm_gmtoff=yes], | ||
| 86 | [ac_cv_struct_tm_gmtoff=no] | ||
| 87 | ) | ||
| 88 | ) | ||
| 86 | 89 | ||
| 87 | if (test "$ac_cv_struct_tm_gmtoff" = "yes"); then | 90 | if (test "$ac_cv_struct_tm_gmtoff" = "yes"); then |
| 88 | AC_DEFINE(HAVE_TM_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member]) | 91 | AC_DEFINE(HAVE_TM_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member]) |
| 89 | fi | 92 | fi |
| 90 | 93 | ||
| 91 | # Check if struct tm has a tm_zone member | 94 | # Check if struct tm has a tm_zone member |
| 92 | AC_CACHE_CHECK(for tm_zone in struct tm, ac_cv_struct_tm_zone, | 95 | AC_CACHE_CHECK(for tm_zone in struct tm, ac_cv_struct_tm_zone, |
| 93 | AC_TRY_COMPILE([ | 96 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
| 94 | #include <time.h> | 97 | #include <time.h> |
| 95 | ], [ | 98 | ], [ |
| 96 | struct tm tm; | 99 | struct tm tm; |
| 97 | tm.tm_zone = 1; | 100 | tm.tm_zone = 1; |
| 98 | ], ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)) | 101 | ])], |
| 102 | [ac_cv_struct_tm_zone=yes], | ||
| 103 | [ac_cv_struct_tm_zone=no] | ||
| 104 | ) | ||
| 105 | ) | ||
| 99 | 106 | ||
| 100 | if (test "$ac_cv_struct_tm_zone" = "yes"); then | 107 | if (test "$ac_cv_struct_tm_zone" = "yes"); then |
| 101 | AC_DEFINE(HAVE_TM_TM_ZONE, 1, [Define if struct tm has a tm_zone member]) | 108 | AC_DEFINE(HAVE_TM_TM_ZONE, 1, [Define if struct tm has a tm_zone member]) |
| @@ -260,7 +267,7 @@ fi | |||
| 260 | 267 | ||
| 261 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | 268 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
| 262 | 269 | ||
| 263 | AC_OUTPUT([ | 270 | AC_CONFIG_FILES([ |
| 264 | Makefile | 271 | Makefile |
| 265 | libcnary/Makefile | 272 | libcnary/Makefile |
| 266 | src/Makefile | 273 | src/Makefile |
| @@ -274,6 +281,7 @@ test/Makefile | |||
| 274 | fuzz/Makefile | 281 | fuzz/Makefile |
| 275 | doxygen.cfg | 282 | doxygen.cfg |
| 276 | ]) | 283 | ]) |
| 284 | AC_OUTPUT | ||
| 277 | 285 | ||
| 278 | echo " | 286 | echo " |
| 279 | Configuration for $PACKAGE $VERSION: | 287 | Configuration for $PACKAGE $VERSION: |
