summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac13
-rw-r--r--libimobiledevice-1.0.pc.in2
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],
[use_openssl=no],
[use_openssl=yes])
-PKG_CHECK_MODULES(openssl, openssl >= 0.9.8, have_openssl=yes, have_openssl=no)
+pkg_req_openssl="openssl >= 0.9.8"
+PKG_CHECK_MODULES(openssl, $pkg_req_openssl, have_openssl=yes, have_openssl=no)
if test "x$have_openssl" = "xyes"; then
if test "x$use_openssl" != "xyes"; then
enable_openssl=no
@@ -143,11 +144,17 @@ if test "x$enable_openssl" = "xyes"; then
AC_SUBST(openssl_CFLAGS)
AC_SUBST(openssl_LIBS)
ssl_provider="OpenSSL";
+ ssl_requires="$pkg_req_openssl"
+ AC_SUBST(ssl_requires)
else
- PKG_CHECK_MODULES(libgnutls, gnutls >= 2.2.0)
+ pkg_req_gnutls="gnutls >= 2.2.0"
+ pkg_req_libtasn1="libtasn1 >= 1.1"
+ PKG_CHECK_MODULES(libgnutls, $pkg_req_gnutls)
AC_CHECK_LIB(gcrypt, gcry_control, [AC_SUBST(libgcrypt_LIBS,[-lgcrypt])], [AC_MSG_ERROR([libgcrypt is required to build libimobiledevice with GnuTLS])])
- PKG_CHECK_MODULES(libtasn1, libtasn1 >= 1.1)
+ PKG_CHECK_MODULES(libtasn1, $pkg_req_libtasn1)
ssl_provider="GnuTLS"
+ ssl_requires="$pkg_req_gnutls $pkg_req_libtasn1"
+ AC_SUBST(ssl_requires)
fi
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@
Name: libimobiledevice
Description: A library to communicate with services running on Apple iPhone/iPod Touch devices.
Version: @VERSION@
-Requires: libplist >= 0.12 libusbmuxd >= 0.1.0 gnutls >= 1.6.3 libtasn1 >= 1.1
+Requires: libplist >= 0.12 libusbmuxd >= 0.1.0 @ssl_requires@
Libs: -L${libdir} -limobiledevice
Cflags: -I${includedir}