summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
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)
39PKG_CHECK_MODULES(limd_glue, libimobiledevice-glue-1.0 >= $LIMD_GLUE_VERSION) 39PKG_CHECK_MODULES(limd_glue, libimobiledevice-glue-1.0 >= $LIMD_GLUE_VERSION)
40 40
41# Checks for header files. 41# Checks for header files.
42AC_CHECK_HEADERS([stdint.h stdlib.h string.h gcrypt.h]) 42AC_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.
45AC_C_CONST 45AC_C_CONST
@@ -64,6 +64,8 @@ if test "x$ac_cv_have_endian_h" = "xno"; then
64 fi 64 fi
65fi 65fi
66 66
67AC_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
68AC_MSG_CHECKING([for platform-specific build settings]) 70AC_MSG_CHECKING([for platform-specific build settings])
69case ${host_os} in 71case ${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 ;;
83esac 86esac
84AM_CONDITIONAL(WIN32, test x$win32 = xtrue) 87AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
88AM_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))
87AC_CACHE_CHECK([wether the C compiler supports constructor/destructor attributes], 91AC_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
237fi 242fi
243AM_CONDITIONAL(HAVE_MBEDTLS, test "x$use_mbedtls" == "xyes")
244AM_CONDITIONAL(HAVE_OPENSSL, test "x$use_openssl" == "xyes")
245AM_CONDITIONAL(HAVE_GCRYPT, test "x$use_gnutls" == "xyes")
246
247AC_ARG_ENABLE([wireless-pairing],
248 [AS_HELP_STRING([--disable-wireless-pairing],
249 [Do not build with wirless pairing support (default is yes)])])
250if test "$enable_wireless_pairing" != "no"; then
251 AC_DEFINE(HAVE_WIRELESS_PAIRING,1,[Define if building with wireless pairing support])
252fi
253AM_CONDITIONAL(HAVE_WIRELESS_PAIRING, test "$enable_wireless_pairing" != "no")
238 254
239AC_ARG_ENABLE([debug], 255AC_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
264AC_CONFIG_FILES([ 280AC_CONFIG_FILES([
265Makefile 281Makefile
2823rd_party/Makefile
2833rd_party/ed25519/Makefile
2843rd_party/libsrp6a-sha512/Makefile
266common/Makefile 285common/Makefile
267src/Makefile 286src/Makefile
268src/libimobiledevice-1.0.pc 287src/libimobiledevice-1.0.pc