From 038bb5902fcc4e981fb349fbba629eab2bdf93ff Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 31 Dec 2016 02:59:36 +0100 Subject: Add ax_pthread.m4 for proper pthread cflags/ldflags --- configure.ac | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 26fe819..e41baa3 100644 --- a/configure.ac +++ b/configure.ac @@ -66,25 +66,23 @@ if test "x$ac_cv_have_endian_h" = "xno"; then fi # Check for operating system -AC_MSG_CHECKING([whether to enable WIN32 build settings]) +AC_MSG_CHECKING([whether we need platform-specific build settings]) case ${host_os} in *mingw32*|*cygwin*) - win32=true AC_MSG_RESULT([yes]) - AC_CHECK_TOOL([WINDRES], [windres], AC_MSG_ERROR([windres not found])) - AC_SUBST(WINDRES) + win32=true ;; - *) - win32=false + darwin*) AC_MSG_RESULT([no]) ;; + *) + AC_MSG_RESULT([yes]) + 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])]) + ;; esac AM_CONDITIONAL(WIN32, test x$win32 = xtrue) -if test "x$win32" != xtrue; then - AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [AC_SUBST(libpthread_LIBS,[-lpthread])], [AC_MSG_ERROR([libpthread is required to build libimobiledevice])]) -fi - # Cython Python Bindings AC_ARG_WITH([cython], [AS_HELP_STRING([--without-cython], -- cgit v1.1-32-gdbae