diff options
| -rw-r--r-- | configure.ac | 13 | ||||
| -rw-r--r-- | libimobiledevice-1.0.pc.in | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 2236a5f..01fd702 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -124,7 +124,8 @@ AC_ARG_ENABLE([openssl], | |||
| 124 | [use_openssl=no], | 124 | [use_openssl=no], |
| 125 | [use_openssl=yes]) | 125 | [use_openssl=yes]) |
| 126 | 126 | ||
| 127 | PKG_CHECK_MODULES(openssl, openssl >= 0.9.8, have_openssl=yes, have_openssl=no) | 127 | pkg_req_openssl="openssl >= 0.9.8" |
| 128 | PKG_CHECK_MODULES(openssl, $pkg_req_openssl, have_openssl=yes, have_openssl=no) | ||
| 128 | if test "x$have_openssl" = "xyes"; then | 129 | if test "x$have_openssl" = "xyes"; then |
| 129 | if test "x$use_openssl" != "xyes"; then | 130 | if test "x$use_openssl" != "xyes"; then |
| 130 | enable_openssl=no | 131 | enable_openssl=no |
| @@ -143,11 +144,17 @@ if test "x$enable_openssl" = "xyes"; then | |||
| 143 | AC_SUBST(openssl_CFLAGS) | 144 | AC_SUBST(openssl_CFLAGS) |
| 144 | AC_SUBST(openssl_LIBS) | 145 | AC_SUBST(openssl_LIBS) |
| 145 | ssl_provider="OpenSSL"; | 146 | ssl_provider="OpenSSL"; |
| 147 | ssl_requires="$pkg_req_openssl" | ||
| 148 | AC_SUBST(ssl_requires) | ||
| 146 | else | 149 | else |
| 147 | PKG_CHECK_MODULES(libgnutls, gnutls >= 2.2.0) | 150 | pkg_req_gnutls="gnutls >= 2.2.0" |
| 151 | pkg_req_libtasn1="libtasn1 >= 1.1" | ||
| 152 | PKG_CHECK_MODULES(libgnutls, $pkg_req_gnutls) | ||
| 148 | AC_CHECK_LIB(gcrypt, gcry_control, [AC_SUBST(libgcrypt_LIBS,[-lgcrypt])], [AC_MSG_ERROR([libgcrypt is required to build libimobiledevice with GnuTLS])]) | 153 | AC_CHECK_LIB(gcrypt, gcry_control, [AC_SUBST(libgcrypt_LIBS,[-lgcrypt])], [AC_MSG_ERROR([libgcrypt is required to build libimobiledevice with GnuTLS])]) |
| 149 | PKG_CHECK_MODULES(libtasn1, libtasn1 >= 1.1) | 154 | PKG_CHECK_MODULES(libtasn1, $pkg_req_libtasn1) |
| 150 | ssl_provider="GnuTLS" | 155 | ssl_provider="GnuTLS" |
| 156 | ssl_requires="$pkg_req_gnutls $pkg_req_libtasn1" | ||
| 157 | AC_SUBST(ssl_requires) | ||
| 151 | fi | 158 | fi |
| 152 | 159 | ||
| 153 | AC_ARG_ENABLE([dev-tools], | 160 | AC_ARG_ENABLE([dev-tools], |
diff --git a/libimobiledevice-1.0.pc.in b/libimobiledevice-1.0.pc.in index 04b5bf6..c21cc1d 100644 --- a/libimobiledevice-1.0.pc.in +++ b/libimobiledevice-1.0.pc.in | |||
| @@ -6,7 +6,7 @@ includedir=@includedir@ | |||
| 6 | Name: libimobiledevice | 6 | Name: libimobiledevice |
| 7 | Description: A library to communicate with services running on Apple iPhone/iPod Touch devices. | 7 | Description: A library to communicate with services running on Apple iPhone/iPod Touch devices. |
| 8 | Version: @VERSION@ | 8 | Version: @VERSION@ |
| 9 | Requires: libplist >= 0.12 libusbmuxd >= 0.1.0 gnutls >= 1.6.3 libtasn1 >= 1.1 | 9 | Requires: libplist >= 0.12 libusbmuxd >= 0.1.0 @ssl_requires@ |
| 10 | Libs: -L${libdir} -limobiledevice | 10 | Libs: -L${libdir} -limobiledevice |
| 11 | Cflags: -I${includedir} | 11 | Cflags: -I${includedir} |
| 12 | 12 | ||
