summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 27 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index a874692..b7aa54b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,6 +18,8 @@ AC_PROG_LIBTOOL
# Checks for libraries.
PKG_CHECK_MODULES(libusb, libusb-1.0 >= 1.0.3)
PKG_CHECK_MODULES(libplist, libplist >= 1.9, have_plist=yes, have_plist=no)
+PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 1.1.6, have_limd=yes, have_limd=no)
+AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [AC_SUBST(libpthread_LIBS,[-lpthread])], [AC_MSG_ERROR([libpthread is required to build usbmuxd])])
AC_ARG_WITH([protov1],
[AS_HELP_STRING([--without-protov1],
@@ -40,6 +42,27 @@ else
fi
fi
+AC_ARG_WITH([preflight],
+ [AS_HELP_STRING([--without-preflight],
+ [do not build with preflight worker support (default is yes)])],
+ [with_preflight=no],
+ [with_preflight=yes])
+
+if test "x$have_limd" = "xyes"; then
+ if test "x$with_preflight" != "xyes"; then
+ have_limd=no
+ echo "*** Note: preflight worker support has been disabled ***"
+ else
+ AC_DEFINE(HAVE_LIBIMOBILEDEVICE, 1, [Define if you have libimobiledevice support])
+ AC_SUBST(libimobiledevice_CFLAGS)
+ AC_SUBST(libimobiledevice_LIBS)
+ fi
+else
+ if test "x$with_preflight" == "xyes"; then
+ AC_MSG_ERROR([preflight worker support requested but libimobiledevice could not befound])
+ fi
+fi
+
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
@@ -73,7 +96,7 @@ case ${host_os} in
esac
AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
-AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter")
+AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-g -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter")
AC_SUBST(GLOBAL_CFLAGS)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@@ -88,8 +111,9 @@ echo "
Configuration for $PACKAGE $VERSION:
-------------------------------------------
- Install prefix: .........: $prefix
- Protocol v1 support: ....: $have_plist
+ Install prefix: ...........: $prefix
+ Protocol v1 support: ......: $have_plist
+ Preflight worker support ..: $have_limd
Now type 'make' to build $PACKAGE $VERSION,
and then 'make install' for installation.