summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 11 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 8ffb4cb..0a405e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,27 +67,27 @@ AC_FUNC_REALLOC
AC_CHECK_FUNCS([strcasecmp strdup strerror strndup])
# 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 libusbmuxd])])
+ AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [], [AC_MSG_ERROR([pthread is required to build libusbmuxd])])
+ ;;
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 libusbmuxd])])
-fi
-
-AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden")
+AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden $PTHREAD_CFLAGS")
+GLOBAL_LDFLAGS="$PTHREAD_LIBS"
AC_SUBST(GLOBAL_CFLAGS)
+AC_SUBST(GLOBAL_LDFLAGS)
case "$GLOBAL_CFLAGS" in
*-fvisibility=hidden*)