diff options
author | Daniel Stenberg <daniel@haxx.se> | 2009-07-09 18:10:25 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2009-07-09 18:10:25 +0000 |
commit | 966cc10fcc4943878852b49e766e4d0108f4ab83 (patch) | |
tree | cfcc0072170c5b7dc9ae3cf724784744e200296c | |
parent | 0c7087c41f1ac3c9e8e68d57dc09da2c7497ce18 (diff) |
bring back the libgnutls-config use for checking for GnuTLS if pkg-config
doesn't work, to better fine older gnutls installs
-rw-r--r-- | configure.ac | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 97c5d73b5..a7e446446 100644 --- a/configure.ac +++ b/configure.ac @@ -1548,6 +1548,7 @@ if test "$OPENSSL_ENABLED" != "1"; then addld="" if test "x$OPT_GNUTLS" = "xyes"; then + dnl this is with no partiular path given CURL_CHECK_PKGCONFIG(gnutls) if test "$PKGCONFIG" != "no" ; then @@ -1556,14 +1557,34 @@ if test "$OPENSSL_ENABLED" != "1"; then addcflags=`$PKGCONFIG --cflags-only-I gnutls` version=`$PKGCONFIG --modversion gnutls` gtlslib=`echo $addld | $SED -e 's/-L//'` + else + dnl without pkg-config, we try libgnutls-config as that was how it + dnl used to be done + check=`libgnutls-config --version 2>/dev/null` + if test -n "$check"; then + addlib=`libgnutls-config --libs` + addcflags=`libgnutls-config --cflags` + version=`libgnutls-config --version` + gtlslib=`libgnutls-config --prefix`/lib$libsuff + fi fi else - dnl without pkg-config, we guess a lot! - addlib=-lgnutls - addld=-L$OPT_GNUTLS/lib$libsuff - addcflags=-I$OPT_GNUTLS/include - version="" # we just don't know - gtlslib=$OPT_GNUTLS/lib$libsuff + dnl this is with a given path, first check if there's a libgnutls-config + dnl there and if not, make an educated guess + check=`$OPT_GNUTLS/libgnutls-config --version 2>/dev/null` + if test -n "$check"; then + addlib=`$OPT_GNUTLS/libgnutls-config --libs` + addcflags=`$OPT_GNUTLS/libgnutls-config --cflags` + version=`$OPT_GNUTLS/libgnutls-config --version` + gtlslib=`$OPT_GNUTLS/libgnutls-config --prefix`/lib$libsuff + else + dnl without pkg-config and libgnutls-config, we guess a lot! + addlib=-lgnutls + addld=-L$OPT_GNUTLS/lib$libsuff + addcflags=-I$OPT_GNUTLS/include + version="" # we just don't know + gtlslib=$OPT_GNUTLS/lib$libsuff + fi fi if test -z "$version"; then @@ -2384,7 +2405,7 @@ AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibi dnl ************************************************************ dnl enforce SONAME bump -dnl +dnl AC_MSG_CHECKING([whether to enforce SONAME bump]) AC_ARG_ENABLE(soname-bump, @@ -2573,7 +2594,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl: ca cert bundle: ${ca} ca cert path: ${capath} LDAP support: ${curl_ldap_msg} - LDAPS support: ${curl_ldaps_msg} + LDAPS support: ${curl_ldaps_msg} ]) if test "x$soname_bump" = "xyes"; then |