summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac42
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
4AC_PREREQ(2.64) 4AC_PREREQ(2.68)
5AC_INIT([libplist], [2.2.1], [https://github.com/libimobiledevice/libplist/issues],, [https://libimobiledevice.org]) 5AC_INIT([libplist], [2.2.1], [https://github.com/libimobiledevice/libplist/issues],, [https://libimobiledevice.org])
6AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip check-news]) 6AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip check-news])
7m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) 7m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
@@ -33,10 +33,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
33AC_LANG_POP 33AC_LANG_POP
34 34
35AM_PROG_CC_C_O 35AM_PROG_CC_C_O
36AC_PROG_LIBTOOL 36LT_INIT
37 37
38# Checks for header files. 38# Checks for header files.
39AC_HEADER_STDC
40AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) 39AC_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
79AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, 78AC_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
87if (test "$ac_cv_struct_tm_gmtoff" = "yes"); then 90if (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])
89fi 92fi
90 93
91# Check if struct tm has a tm_zone member 94# Check if struct tm has a tm_zone member
92AC_CACHE_CHECK(for tm_zone in struct tm, ac_cv_struct_tm_zone, 95AC_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
100if (test "$ac_cv_struct_tm_zone" = "yes"); then 107if (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
261m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) 268m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
262 269
263AC_OUTPUT([ 270AC_CONFIG_FILES([
264Makefile 271Makefile
265libcnary/Makefile 272libcnary/Makefile
266src/Makefile 273src/Makefile
@@ -274,6 +281,7 @@ test/Makefile
274fuzz/Makefile 281fuzz/Makefile
275doxygen.cfg 282doxygen.cfg
276]) 283])
284AC_OUTPUT
277 285
278echo " 286echo "
279Configuration for $PACKAGE $VERSION: 287Configuration for $PACKAGE $VERSION: