From 05e3eeef1103cf8b0b7c4b4709175e0d978a28dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim Rühsen?= Date: Tue, 16 Dec 2014 14:38:50 +0100 Subject: [PATCH] configure.ac: Let --with-libssl-prefix work with pkg-config --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index 7b4e2ad..8c9e440 100644 --- a/configure.ac +++ b/configure.ac @@ -334,6 +334,9 @@ AS_IF([test x"$with_zlib" != xno], [ ]) AS_IF([test x"$with_ssl" = xopenssl], [ + if [test x"$with_libssl_prefix" != x]; then + export PKG_CONFIG_PATH=$with_libssl_prefix/lib/pkgconfig + fi PKG_CHECK_MODULES([OPENSSL], [openssl], [ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL]) AC_LIBOBJ([openssl]) @@ -398,12 +401,19 @@ AS_IF([test x"$with_ssl" = xopenssl], [ fi ]) ]) + if [test x"$with_libssl_prefix" != x]; then + unset PKG_CONFIG_PATH + fi ], [ # --with-ssl is not openssl: check if it's no AS_IF([test x"$with_ssl" != xno], [ dnl default is -lgnutls with_ssl=gnutls + if [test x"$with_libgnutls_prefix" != x]; then + export PKG_CONFIG_PATH=$with_libgnutls_prefix/lib/pkgconfig + fi + dnl Now actually check for -lgnutls PKG_CHECK_MODULES([GNUTLS], [gnutls], [ AC_MSG_NOTICE([compiling in support for SSL via GnuTLS]) @@ -425,6 +435,9 @@ AS_IF([test x"$with_ssl" = xopenssl], [ AC_MSG_ERROR([GnuTLS has not been found. Use --with-ssl=openssl if you explicitly want OpenSSL.]) fi ]) + if [test x"$with_libgnutls_prefix" != x]; then + unset PKG_CONFIG_PATH + fi AC_CHECK_FUNCS(gnutls_priority_set_direct) ]) # endif: --with-ssl != no? -- 2.1.3