diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-04-19 22:12:34 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-04-19 22:12:34 +0000 |
commit | 313f1a1e8359cc0893e77c9f400063608818ae82 (patch) | |
tree | e42337f4d73f42b0bb90482fedf7c4afbfeab229 | |
parent | 21337f4776d9944f774cef075d90d7d739ed608b (diff) |
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.
-rw-r--r-- | configure.ac | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index 81f06059c..8b531f880 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 |