diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 10c7f9d..d100b81 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -70,6 +70,12 @@ case ${host_os} in | |||
| 70 | esac | 70 | esac |
| 71 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) | 71 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) |
| 72 | 72 | ||
| 73 | # if we are not on win32, check for pthread | ||
| 74 | if test x"$win32" != x"true"; then | ||
| 75 | AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build libplist])]) | ||
| 76 | AC_CHECK_LIB(pthread, [pthread_once], [], [AC_MSG_ERROR([pthread with pthread_once required to build libplist])]) | ||
| 77 | fi | ||
| 78 | |||
| 73 | # Check if struct tm has a tm_gmtoff member | 79 | # Check if struct tm has a tm_gmtoff member |
| 74 | AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, | 80 | AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, |
| 75 | AC_TRY_COMPILE([ | 81 | AC_TRY_COMPILE([ |
| @@ -130,7 +136,8 @@ fi | |||
| 130 | AM_CONDITIONAL([HAVE_CYTHON],[test "x$CYTHON_SUB" = "xcython"]) | 136 | AM_CONDITIONAL([HAVE_CYTHON],[test "x$CYTHON_SUB" = "xcython"]) |
| 131 | AC_SUBST([CYTHON_SUB]) | 137 | AC_SUBST([CYTHON_SUB]) |
| 132 | 138 | ||
| 133 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden") | 139 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden $PTHREAD_CFLAGS") |
| 140 | GLOBAL_LDFLAGS="$PTHREAD_LIBS" | ||
| 134 | 141 | ||
| 135 | AC_ARG_ENABLE(debug, | 142 | AC_ARG_ENABLE(debug, |
| 136 | AS_HELP_STRING([--enable-debug], | 143 | AS_HELP_STRING([--enable-debug], |
| @@ -148,6 +155,7 @@ if (test "x$debug" = "xyes"); then | |||
| 148 | fi | 155 | fi |
| 149 | 156 | ||
| 150 | AC_SUBST(GLOBAL_CFLAGS) | 157 | AC_SUBST(GLOBAL_CFLAGS) |
| 158 | AC_SUBST(GLOBAL_LDFLAGS) | ||
| 151 | 159 | ||
| 152 | case "$GLOBAL_CFLAGS" in | 160 | case "$GLOBAL_CFLAGS" in |
| 153 | *-fvisibility=hidden*) | 161 | *-fvisibility=hidden*) |
