diff options
| author | 2011-09-14 18:55:59 +0200 | |
|---|---|---|
| committer | 2012-03-19 01:43:29 +0100 | |
| commit | 8b1af4cf80eff619d3465925dce7fe572fc09224 (patch) | |
| tree | 1fc167114f574c2ff3470c97d6ce74938778f9db /configure.ac | |
| parent | 294cf69b256419e407b1eac04634752412ee7756 (diff) | |
| download | libimobiledevice-8b1af4cf80eff619d3465925dce7fe572fc09224.tar.gz libimobiledevice-8b1af4cf80eff619d3465925dce7fe572fc09224.tar.bz2 | |
Add OpenSSL support
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 37 |
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. |
| 29 | PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4) | 29 | PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4) |
| 30 | PKG_CHECK_MODULES(libgnutls, gnutls >= 2.2.0) | ||
| 31 | PKG_CHECK_MODULES(libtasn1, libtasn1 >= 1.1) | ||
| 32 | PKG_CHECK_MODULES(libplist, libplist >= 0.15) | 30 | PKG_CHECK_MODULES(libplist, libplist >= 0.15) |
| 33 | PKG_CHECK_MODULES(libplistmm, libplist++ >= 0.15) | 31 | PKG_CHECK_MODULES(libplistmm, libplist++ >= 0.15) |
| 34 | AC_CHECK_LIB(gcrypt, gcry_control, [AC_SUBST(libgcrypt_LIBS,[-lgcrypt])], [AC_MSG_ERROR([libgcrypt is required to build libimobiledevice])]) | ||
| 35 | AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [AC_SUBST(libpthread_LIBS,[-lpthread])], [AC_MSG_ERROR([libpthread is required to build libimobiledevice])]) | 32 | AC_CHECK_LIB(pthread, [pthread_create, pthread_mutex_lock], [AC_SUBST(libpthread_LIBS,[-lpthread])], [AC_MSG_ERROR([libpthread is required to build libimobiledevice])]) |
| 36 | 33 | ||
| 37 | PKG_CHECK_MODULES(libglib2, glib-2.0 >= 2.14.1, enable_glib2=yes, enable_glib2=no) | 34 | PKG_CHECK_MODULES(libglib2, glib-2.0 >= 2.14.1, enable_glib2=yes, enable_glib2=no) |
| @@ -98,6 +95,39 @@ fi | |||
| 98 | 95 | ||
| 99 | AM_CONDITIONAL([HAVE_SWIG],[test "x$SWIG" != "xfalse"]) | 96 | AM_CONDITIONAL([HAVE_SWIG],[test "x$SWIG" != "xfalse"]) |
| 100 | 97 | ||
| 98 | AC_ARG_ENABLE([openssl], | ||
| 99 | [AS_HELP_STRING([--disable-openssl], | ||
| 100 | [Do not look for OpenSSL])], | ||
| 101 | [use_openssl=no], | ||
| 102 | [use_openssl=yes]) | ||
| 103 | |||
| 104 | PKG_CHECK_MODULES(openssl, openssl >= 0.9.8, have_openssl=yes, have_openssl=no) | ||
| 105 | if 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 | ||
| 112 | else | ||
| 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 | ||
| 116 | fi | ||
| 117 | |||
| 118 | if 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"; | ||
| 123 | else | ||
| 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" | ||
| 128 | fi | ||
| 129 | |||
| 130 | |||
| 101 | AC_SUBST([DEV_SUB]) | 131 | AC_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. |
