summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 22 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 9300f31..0d13e04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,17 +55,17 @@ AC_C_BIGENDIAN([AC_DEFINE([__BIG_ENDIAN__], [1], [big endian])],
55 55
56 56
57# Check for operating system 57# Check for operating system
58AC_MSG_CHECKING([wether we need platform-specific build settings for ${host_os}]) 58AC_MSG_CHECKING([for platform-specific build settings])
59case ${host_os} in 59case ${host_os} in
60 *mingw32*|*cygwin*) 60 *mingw32*|*cygwin*)
61 AC_MSG_RESULT([yes]) 61 AC_MSG_RESULT([${host_os}])
62 win32=true 62 win32=true
63 ;; 63 ;;
64 darwin*|*android*) 64 darwin*|*android*)
65 AC_MSG_RESULT([no]) 65 AC_MSG_RESULT([${host_os}])
66 ;; 66 ;;
67 *) 67 *)
68 AC_MSG_RESULT([yes]) 68 AC_MSG_RESULT([${host_os}])
69 AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build libplist])]) 69 AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build libplist])])
70 AC_CHECK_LIB(pthread, [pthread_once], [], [AC_MSG_ERROR([pthread with pthread_once required to build libplist])]) 70 AC_CHECK_LIB(pthread, [pthread_once], [], [AC_MSG_ERROR([pthread with pthread_once required to build libplist])])
71 ;; 71 ;;
@@ -74,6 +74,24 @@ AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
74 74
75AC_SEARCH_LIBS([fmin],[m]) 75AC_SEARCH_LIBS([fmin],[m])
76 76
77# Check if the C compiler supports __attribute__((constructor))
78AC_CACHE_CHECK([wether the C compiler supports constructor/destructor attributes],
79 ac_cv_attribute_constructor, [
80 ac_cv_attribute_constructor=no
81 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
82 [[
83 static void __attribute__((constructor)) test_constructor(void) {
84 }
85 static void __attribute__((destructor)) test_destructor(void) {
86 }
87 ]], [])],
88 [ac_cv_attribute_constructor=yes]
89 )]
90)
91if test "$ac_cv_attribute_constructor" = "yes"; then
92 AC_DEFINE(HAVE_ATTRIBUTE_CONSTRUCTOR, 1, [Define if the C compiler supports constructor/destructor attributes])
93fi
94
77# Check if struct tm has a tm_gmtoff member 95# Check if struct tm has a tm_gmtoff member
78AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, 96AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
79 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ 97 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([