diff options
author | Nikias Bassen | 2021-08-31 23:51:52 +0200 |
---|---|---|
committer | Nikias Bassen | 2021-08-31 23:51:52 +0200 |
commit | 90355270862eb89269feb967da16e61828901284 (patch) | |
tree | 76dfa32934f75e0388df7d1b3d5cf3791ef4f61e | |
parent | 0c91d155aa4d7b53717e546776d87d8427e59de4 (diff) | |
download | libimobiledevice-glue-90355270862eb89269feb967da16e61828901284.tar.gz libimobiledevice-glue-90355270862eb89269feb967da16e61828901284.tar.bz2 |
configure: Make sure to check properly for pthread_once and pthread_cancel
-rw-r--r-- | configure.ac | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index a9dc0e6..2b5c430 100644 --- a/configure.ac +++ b/configure.ac @@ -56,11 +56,18 @@ case ${host_os} in ;; darwin*) AC_MSG_RESULT([${host_os}]) + AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build $PACKAGE])]) + AC_CHECK_FUNCS([pthread_once pthread_cancel]) ;; *) AC_MSG_RESULT([${host_os}]) AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build $PACKAGE_NAME])]) - AC_CHECK_LIB(pthread, [pthread_once], [], [AC_MSG_ERROR([pthread with pthread_once required to build $PACKAGE_NAME])]) + AC_CHECK_FUNC(pthread_cancel, [AC_DEFINE(HAVE_PTHREAD_CANCEL)], [ + AC_CHECK_LIB(pthread, [pthread_cancel],[AC_DEFINE(HAVE_PTHREAD_CANCEL)]) + ]) + AC_CHECK_FUNC(pthread_once, [AC_DEFINE(HAVE_PTHREAD_ONCE)], [ + AC_CHECK_LIB(pthread, [pthread_once], [], [AC_MSG_ERROR([pthread with pthread_once required to build $PACKAGE_NAME])]) + ]) ;; esac AM_CONDITIONAL(WIN32, test x$win32 = xtrue) |