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
18# Checks for libraries. 18# Checks for libraries.
19PKG_CHECK_MODULES(libusb, libusb-1.0 >= 1.0.3) 19PKG_CHECK_MODULES(libusb, libusb-1.0 >= 1.0.3)
20PKG_CHECK_MODULES(libplist, libplist >= 1.9, have_plist=yes, have_plist=no) 20PKG_CHECK_MODULES(libplist, libplist >= 1.9, have_plist=yes, have_plist=no)
21PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 1.1.6, have_limd=yes, have_limd=no)
22AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [AC_SUBST(libpthread_LIBS,[-lpthread])], [AC_MSG_ERROR([libpthread is required to build usbmuxd])])
21 23
22AC_ARG_WITH([protov1], 24AC_ARG_WITH([protov1],
23 [AS_HELP_STRING([--without-protov1], 25 [AS_HELP_STRING([--without-protov1],
@@ -40,6 +42,27 @@ else
40 fi 42 fi
41fi 43fi
42 44
45AC_ARG_WITH([preflight],
46 [AS_HELP_STRING([--without-preflight],
47 [do not build with preflight worker support (default is yes)])],
48 [with_preflight=no],
49 [with_preflight=yes])
50
51if test "x$have_limd" = "xyes"; then
52 if test "x$with_preflight" != "xyes"; then
53 have_limd=no
54 echo "*** Note: preflight worker support has been disabled ***"
55 else
56 AC_DEFINE(HAVE_LIBIMOBILEDEVICE, 1, [Define if you have libimobiledevice support])
57 AC_SUBST(libimobiledevice_CFLAGS)
58 AC_SUBST(libimobiledevice_LIBS)
59 fi
60else
61 if test "x$with_preflight" == "xyes"; then
62 AC_MSG_ERROR([preflight worker support requested but libimobiledevice could not befound])
63 fi
64fi
65
43# Checks for header files. 66# Checks for header files.
44AC_HEADER_STDC 67AC_HEADER_STDC
45AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) 68AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
@@ -73,7 +96,7 @@ case ${host_os} in
73esac 96esac
74AM_CONDITIONAL(WIN32, test x$win32 = xtrue) 97AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
75 98
76AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter") 99AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-g -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter")
77AC_SUBST(GLOBAL_CFLAGS) 100AC_SUBST(GLOBAL_CFLAGS)
78 101
79m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) 102m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@@ -88,8 +111,9 @@ echo "
88Configuration for $PACKAGE $VERSION: 111Configuration for $PACKAGE $VERSION:
89------------------------------------------- 112-------------------------------------------
90 113
91 Install prefix: .........: $prefix 114 Install prefix: ...........: $prefix
92 Protocol v1 support: ....: $have_plist 115 Protocol v1 support: ......: $have_plist
116 Preflight worker support ..: $have_limd
93 117
94 Now type 'make' to build $PACKAGE $VERSION, 118 Now type 'make' to build $PACKAGE $VERSION,
95 and then 'make install' for installation. 119 and then 'make install' for installation.