bring back the libgnutls-config use for checking for GnuTLS if pkg-config
doesn't work, to better fine older gnutls installs
This commit is contained in:
parent
0c7087c41f
commit
966cc10fcc
33
configure.ac
33
configure.ac
@ -1548,6 +1548,7 @@ if test "$OPENSSL_ENABLED" != "1"; then
|
|||||||
|
|
||||||
addld=""
|
addld=""
|
||||||
if test "x$OPT_GNUTLS" = "xyes"; then
|
if test "x$OPT_GNUTLS" = "xyes"; then
|
||||||
|
dnl this is with no partiular path given
|
||||||
CURL_CHECK_PKGCONFIG(gnutls)
|
CURL_CHECK_PKGCONFIG(gnutls)
|
||||||
|
|
||||||
if test "$PKGCONFIG" != "no" ; then
|
if test "$PKGCONFIG" != "no" ; then
|
||||||
@ -1556,14 +1557,34 @@ if test "$OPENSSL_ENABLED" != "1"; then
|
|||||||
addcflags=`$PKGCONFIG --cflags-only-I gnutls`
|
addcflags=`$PKGCONFIG --cflags-only-I gnutls`
|
||||||
version=`$PKGCONFIG --modversion gnutls`
|
version=`$PKGCONFIG --modversion gnutls`
|
||||||
gtlslib=`echo $addld | $SED -e 's/-L//'`
|
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
|
fi
|
||||||
else
|
else
|
||||||
dnl without pkg-config, we guess a lot!
|
dnl this is with a given path, first check if there's a libgnutls-config
|
||||||
addlib=-lgnutls
|
dnl there and if not, make an educated guess
|
||||||
addld=-L$OPT_GNUTLS/lib$libsuff
|
check=`$OPT_GNUTLS/libgnutls-config --version 2>/dev/null`
|
||||||
addcflags=-I$OPT_GNUTLS/include
|
if test -n "$check"; then
|
||||||
version="" # we just don't know
|
addlib=`$OPT_GNUTLS/libgnutls-config --libs`
|
||||||
gtlslib=$OPT_GNUTLS/lib$libsuff
|
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
|
fi
|
||||||
|
|
||||||
if test -z "$version"; then
|
if test -z "$version"; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user