summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 34 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index feb5d11..299b6ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,11 +27,8 @@ AC_PROG_LIBTOOL
27 27
28# Checks for libraries. 28# Checks for libraries.
29PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4) 29PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4)
30PKG_CHECK_MODULES(libgnutls, gnutls >= 2.2.0)
31PKG_CHECK_MODULES(libtasn1, libtasn1 >= 1.1)
32PKG_CHECK_MODULES(libplist, libplist >= 0.15) 30PKG_CHECK_MODULES(libplist, libplist >= 0.15)
33PKG_CHECK_MODULES(libplistmm, libplist++ >= 0.15) 31PKG_CHECK_MODULES(libplistmm, libplist++ >= 0.15)
34AC_CHECK_LIB(gcrypt, gcry_control, [AC_SUBST(libgcrypt_LIBS,[-lgcrypt])], [AC_MSG_ERROR([libgcrypt is required to build libimobiledevice])])
35AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [AC_SUBST(libpthread_LIBS,[-lpthread])], [AC_MSG_ERROR([libpthread is required to build libimobiledevice])]) 32AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [AC_SUBST(libpthread_LIBS,[-lpthread])], [AC_MSG_ERROR([libpthread is required to build libimobiledevice])])
36 33
37PKG_CHECK_MODULES(libglib2, glib-2.0 >= 2.14.1, enable_glib2=yes, enable_glib2=no) 34PKG_CHECK_MODULES(libglib2, glib-2.0 >= 2.14.1, enable_glib2=yes, enable_glib2=no)
@@ -98,6 +95,39 @@ fi
98 95
99AM_CONDITIONAL([HAVE_SWIG],[test "x$SWIG" != "xfalse"]) 96AM_CONDITIONAL([HAVE_SWIG],[test "x$SWIG" != "xfalse"])
100 97
98AC_ARG_ENABLE([openssl],
99 [AS_HELP_STRING([--disable-openssl],
100 [Do not look for OpenSSL])],
101 [use_openssl=no],
102 [use_openssl=yes])
103
104PKG_CHECK_MODULES(openssl, openssl >= 0.9.8, have_openssl=yes, have_openssl=no)
105if test "x$have_openssl" = "xyes"; then
106 if test "x$use_openssl" != "xyes"; then
107 enable_openssl=no
108 echo "*** Note: OpenSSL support explicitly disabled ***"
109 else
110 enable_openssl=yes
111 fi
112else
113 if test "x$use_openssl" == "xyes" -a "x$have_openssl" != "xyes"; then
114 AC_MSG_ERROR([OpenSSL support explicitly requested but OpenSSL could not be found])
115 fi
116fi
117
118if test "x$enable_openssl" = "xyes"; then
119 AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have OpenSSL support])
120 AC_SUBST(openssl_CFLAGS)
121 AC_SUBST(openssl_LIBS)
122 ssl_provider="OpenSSL";
123else
124 PKG_CHECK_MODULES(libgnutls, gnutls >= 2.2.0)
125 AC_CHECK_LIB(gcrypt, gcry_control, [AC_SUBST(libgcrypt_LIBS,[-lgcrypt])], [AC_MSG_ERROR([libgcrypt is required to build libimobiledevice with GnuTLS])])
126 PKG_CHECK_MODULES(libtasn1, libtasn1 >= 1.1)
127 ssl_provider="GnuTLS"
128fi
129
130
101AC_SUBST([DEV_SUB]) 131AC_SUBST([DEV_SUB])
102 132
103 133
@@ -186,6 +216,7 @@ Configuration for $PACKAGE $VERSION:
186 Debug code ..............: $building_debug_code 216 Debug code ..............: $building_debug_code
187 Dev tools ...............: $building_dev_tools 217 Dev tools ...............: $building_dev_tools
188 Python bindings .........: $python_bindings 218 Python bindings .........: $python_bindings
219 SSL support .............: $ssl_provider
189 220
190 Now type 'make' to build $PACKAGE $VERSION, 221 Now type 'make' to build $PACKAGE $VERSION,
191 and then 'make install' for installation. 222 and then 'make install' for installation.