diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 30 |
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. |
| 19 | PKG_CHECK_MODULES(libusb, libusb-1.0 >= 1.0.3) | 19 | PKG_CHECK_MODULES(libusb, libusb-1.0 >= 1.0.3) |
| 20 | PKG_CHECK_MODULES(libplist, libplist >= 1.9, have_plist=yes, have_plist=no) | 20 | PKG_CHECK_MODULES(libplist, libplist >= 1.9, have_plist=yes, have_plist=no) |
| 21 | PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 1.1.6, have_limd=yes, have_limd=no) | ||
| 22 | AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [AC_SUBST(libpthread_LIBS,[-lpthread])], [AC_MSG_ERROR([libpthread is required to build usbmuxd])]) | ||
| 21 | 23 | ||
| 22 | AC_ARG_WITH([protov1], | 24 | AC_ARG_WITH([protov1], |
| 23 | [AS_HELP_STRING([--without-protov1], | 25 | [AS_HELP_STRING([--without-protov1], |
| @@ -40,6 +42,27 @@ else | |||
| 40 | fi | 42 | fi |
| 41 | fi | 43 | fi |
| 42 | 44 | ||
| 45 | AC_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 | |||
| 51 | if 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 | ||
| 60 | else | ||
| 61 | if test "x$with_preflight" == "xyes"; then | ||
| 62 | AC_MSG_ERROR([preflight worker support requested but libimobiledevice could not befound]) | ||
| 63 | fi | ||
| 64 | fi | ||
| 65 | |||
| 43 | # Checks for header files. | 66 | # Checks for header files. |
| 44 | AC_HEADER_STDC | 67 | AC_HEADER_STDC |
| 45 | AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) | 68 | AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) |
| @@ -73,7 +96,7 @@ case ${host_os} in | |||
| 73 | esac | 96 | esac |
| 74 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) | 97 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) |
| 75 | 98 | ||
| 76 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter") | 99 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-g -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter") |
| 77 | AC_SUBST(GLOBAL_CFLAGS) | 100 | AC_SUBST(GLOBAL_CFLAGS) |
| 78 | 101 | ||
| 79 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | 102 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
| @@ -88,8 +111,9 @@ echo " | |||
| 88 | Configuration for $PACKAGE $VERSION: | 111 | Configuration 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. |
