diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index cdd388b..8fb032d 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -39,7 +39,7 @@ PKG_CHECK_MODULES(libplist, libplist-2.0 >= $LIBPLIST_VERSION) | |||
39 | PKG_CHECK_MODULES(limd_glue, libimobiledevice-glue-1.0 >= $LIMD_GLUE_VERSION) | 39 | PKG_CHECK_MODULES(limd_glue, libimobiledevice-glue-1.0 >= $LIMD_GLUE_VERSION) |
40 | 40 | ||
41 | # Checks for header files. | 41 | # Checks for header files. |
42 | AC_CHECK_HEADERS([stdint.h stdlib.h string.h gcrypt.h]) | 42 | AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/time.h]) |
43 | 43 | ||
44 | # Checks for typedefs, structures, and compiler characteristics. | 44 | # Checks for typedefs, structures, and compiler characteristics. |
45 | AC_C_CONST | 45 | AC_C_CONST |
@@ -64,6 +64,8 @@ if test "x$ac_cv_have_endian_h" = "xno"; then | |||
64 | fi | 64 | fi |
65 | fi | 65 | fi |
66 | 66 | ||
67 | AC_CHECK_DECL([plist_from_json], [AC_DEFINE([HAVE_PLIST_JSON], [1], [Define if libplist has JSON support])], [], [[#include <plist/plist.h>]]) | ||
68 | |||
67 | # Check for operating system | 69 | # Check for operating system |
68 | AC_MSG_CHECKING([for platform-specific build settings]) | 70 | AC_MSG_CHECKING([for platform-specific build settings]) |
69 | case ${host_os} in | 71 | case ${host_os} in |
@@ -74,6 +76,7 @@ case ${host_os} in | |||
74 | ;; | 76 | ;; |
75 | darwin*) | 77 | darwin*) |
76 | AC_MSG_RESULT([${host_os}]) | 78 | AC_MSG_RESULT([${host_os}]) |
79 | darwin=true | ||
77 | ;; | 80 | ;; |
78 | *) | 81 | *) |
79 | AC_MSG_RESULT([${host_os}]) | 82 | AC_MSG_RESULT([${host_os}]) |
@@ -82,6 +85,7 @@ case ${host_os} in | |||
82 | ;; | 85 | ;; |
83 | esac | 86 | esac |
84 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) | 87 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) |
88 | AM_CONDITIONAL(DARWIN, test x$darwin = xtrue) | ||
85 | 89 | ||
86 | # Check if the C compiler supports __attribute__((constructor)) | 90 | # Check if the C compiler supports __attribute__((constructor)) |
87 | AC_CACHE_CHECK([wether the C compiler supports constructor/destructor attributes], | 91 | AC_CACHE_CHECK([wether the C compiler supports constructor/destructor attributes], |
@@ -219,9 +223,10 @@ else | |||
219 | pkg_req_gnutls="gnutls >= 2.2.0" | 223 | pkg_req_gnutls="gnutls >= 2.2.0" |
220 | pkg_req_libtasn1="libtasn1 >= 1.1" | 224 | pkg_req_libtasn1="libtasn1 >= 1.1" |
221 | PKG_CHECK_MODULES(libgnutls, $pkg_req_gnutls) | 225 | PKG_CHECK_MODULES(libgnutls, $pkg_req_gnutls) |
226 | AC_CHECK_HEADERS([gcrypt.h]) | ||
222 | AC_CHECK_LIB(gcrypt, gcry_control, [AC_SUBST(libgcrypt_LIBS,[-lgcrypt])], [AC_MSG_ERROR([libgcrypt is required to build libimobiledevice with GnuTLS])]) | 227 | AC_CHECK_LIB(gcrypt, gcry_control, [AC_SUBST(libgcrypt_LIBS,[-lgcrypt])], [AC_MSG_ERROR([libgcrypt is required to build libimobiledevice with GnuTLS])]) |
223 | PKG_CHECK_MODULES(libtasn1, $pkg_req_libtasn1) | 228 | PKG_CHECK_MODULES(libtasn1, $pkg_req_libtasn1) |
224 | 229 | AC_DEFINE(HAVE_GCRYPT, 1, [Define if you have libgcrypt support]) | |
225 | AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS support]) | 230 | AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS support]) |
226 | ssl_lib_CFLAGS="$libgnutls_CFLAGS $libtasn1_CFLAGS $libgcrypt_CFLAGS" | 231 | ssl_lib_CFLAGS="$libgnutls_CFLAGS $libtasn1_CFLAGS $libgcrypt_CFLAGS" |
227 | ssl_lib_LIBS="$libgnutls_LIBS $libtasn1_LIBS $libgcrypt_LIBS" | 232 | ssl_lib_LIBS="$libgnutls_LIBS $libtasn1_LIBS $libgcrypt_LIBS" |
@@ -235,6 +240,17 @@ else | |||
235 | fi | 240 | fi |
236 | fi | 241 | fi |
237 | fi | 242 | fi |
243 | AM_CONDITIONAL(HAVE_MBEDTLS, test "x$use_mbedtls" == "xyes") | ||
244 | AM_CONDITIONAL(HAVE_OPENSSL, test "x$use_openssl" == "xyes") | ||
245 | AM_CONDITIONAL(HAVE_GCRYPT, test "x$use_gnutls" == "xyes") | ||
246 | |||
247 | AC_ARG_ENABLE([wireless-pairing], | ||
248 | [AS_HELP_STRING([--disable-wireless-pairing], | ||
249 | [Do not build with wirless pairing support (default is yes)])]) | ||
250 | if test "$enable_wireless_pairing" != "no"; then | ||
251 | AC_DEFINE(HAVE_WIRELESS_PAIRING,1,[Define if building with wireless pairing support]) | ||
252 | fi | ||
253 | AM_CONDITIONAL(HAVE_WIRELESS_PAIRING, test "$enable_wireless_pairing" != "no") | ||
238 | 254 | ||
239 | AC_ARG_ENABLE([debug], | 255 | AC_ARG_ENABLE([debug], |
240 | [AS_HELP_STRING([--enable-debug], | 256 | [AS_HELP_STRING([--enable-debug], |
@@ -263,6 +279,9 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | |||
263 | 279 | ||
264 | AC_CONFIG_FILES([ | 280 | AC_CONFIG_FILES([ |
265 | Makefile | 281 | Makefile |
282 | 3rd_party/Makefile | ||
283 | 3rd_party/ed25519/Makefile | ||
284 | 3rd_party/libsrp6a-sha512/Makefile | ||
266 | common/Makefile | 285 | common/Makefile |
267 | src/Makefile | 286 | src/Makefile |
268 | src/libimobiledevice-1.0.pc | 287 | src/libimobiledevice-1.0.pc |