From: Daniel Stenberg Date: Tue, 19 Apr 2005 22:12:34 +0000 (+0000) Subject: when --with-gnutls is used, we assume a bin/libgnutls-config file in the X-Git-Tag: curl-7_14_0~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=313f1a1e8359cc0893e77c9f400063608818ae82;p=thirdparty%2Fcurl.git when --with-gnutls is used, we assume a bin/libgnutls-config file in the given prefix. Building something with gnutls without it just is too error- prone. --- diff --git a/configure.ac b/configure.ac index 81f06059c1..8b531f8800 100644 --- a/configure.ac +++ b/configure.ac @@ -1006,46 +1006,50 @@ if test "$OPENSSL_ENABLED" != "1"; then gtlsprefix=`libgnutls-config --prefix` fi else - addlib="-L$OPT_GNUTLS/lib -lgnutls" - addcflags="-I$OPT_GNUTLS/include" + addlib=`$OPT_GNUTLS/bin/libgnutls-config --libs` + addcflags=`$OPT_GNUTLS/bin/libgnutls-config --cflags` version=`$OPT_GNUTLS/bin/libgnutls-config --version 2>/dev/null` gtlsprefix=$OPT_GNUTLS if test -z "$version"; then version="unknown" fi fi + if test -n "$addlib"; then - CLEANLDFLAGS="$LDFLAGS" - CLEANCPPFLAGS="$CPPFLAGS" + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" - LDFLAGS="$LDFLAGS $addlib" - if test "$addcflags" != "-I/usr/include"; then - CPPFLAGS="$CPPFLAGS $addcflags" - fi + LDFLAGS="$LDFLAGS $addlib" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi - AC_CHECK_LIB(gnutls, gnutls_check_version, + AC_CHECK_LIB(gnutls, gnutls_check_version, [ AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled]) AC_SUBST(USE_GNUTLS, [1]) USE_GNUTLS="yes" - curl_ssl_msg="enabled (GnuTLS)" + curl_ssl_msg="enabled (GnuTLS)" ], [ LDFLAGS="$CLEANLDFLAGS" CPPFLAGS="$CLEANCPPFLAGS" ]) - if test "x$USE_GNUTLS" = "xyes"; then - AC_MSG_NOTICE([detected GnuTLS version $version]) + if test "x$USE_GNUTLS" = "xyes"; then + AC_MSG_NOTICE([detected GnuTLS version $version]) - dnl when shared libs were found in a path that the run-time - dnl linker doesn't search through, we need to add it to - dnl LD_LIBRARY_PATH to prevent further configure tests to fail - dnl due to this + dnl when shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to + dnl LD_LIBRARY_PATH to prevent further configure tests to fail + dnl due to this + + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff" + export LD_LIBRARY_PATH + fi - LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff" - export LD_LIBRARY_PATH fi + fi dnl GNUTLS not disabled if test X"$USE_GNUTLS" != "Xyes"; then