summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-09-17 12:06:05 +0200
committerGravatar Nikias Bassen2013-09-17 12:06:05 +0200
commit48e18c703071170af8f0723ab24426eec0a39251 (patch)
tree41f9cf7b7021ce2f7480cd5318e756c9bb4b9b42
parentc45ae1f6b6f53995a5bc99591688102d11ad2148 (diff)
downloadlibusbmuxd-48e18c703071170af8f0723ab24426eec0a39251.tar.gz
libusbmuxd-48e18c703071170af8f0723ab24426eec0a39251.tar.bz2
added libpthread_LIBS to fix build in tools
-rw-r--r--configure.ac4
-rw-r--r--src/Makefile.am2
-rw-r--r--tools/Makefile.am2
3 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 6948d18..8cbe7a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,6 +98,10 @@ case ${host_os} in
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")
AC_SUBST(GLOBAL_CFLAGS)
diff --git a/src/Makefile.am b/src/Makefile.am
index bf9198f..6c21d2c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,7 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = $(GLOBAL_CFLAGS) $(libplist_CFLAGS)
-AM_LDFLAGS = $(GLOBAL_LIBS) $(libplist_LIBS)
+AM_LDFLAGS = $(GLOBAL_LIBS) $(libpthread_LIBS) $(libplist_LIBS)
lib_LTLIBRARIES = libusbmuxd.la
libusbmuxd_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBUSBMUXD_SO_VERSION) -no-undefined
diff --git a/tools/Makefile.am b/tools/Makefile.am
index f1fa2f6..d194501 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,5 +1,5 @@
AM_CFLAGS = $(GLOBAL_CFLAGS) -I$(top_srcdir)/src
-AM_LDFLAGS =
+AM_LDFLAGS = $(libpthread_LIBS)
bin_PROGRAMS = iproxy