- Triggered by bug report #2798852 and the patch in there, I fixed configure
authorDaniel Stenberg <daniel@haxx.se>
Mon, 8 Jun 2009 21:12:59 +0000 (21:12 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 Jun 2009 21:12:59 +0000 (21:12 +0000)
  to detect gnutls build options with pkg-config only and not libgnutls-config
  anymore since GnuTLS has stopped distributing that tool. If an explicit path
  is given to configure, we will instead guess on how to link and use that
  lib. I did not use the patch from the bug report.

CHANGES
RELEASE-NOTES
configure.ac

diff --git a/CHANGES b/CHANGES
index e579f3c..43af818 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,13 @@
 
                                   Changelog
 
+Daniel Stenberg (8 Jun 2009)
+- Triggered by bug report #2798852 and the patch in there, I fixed configure
+  to detect gnutls build options with pkg-config only and not libgnutls-config
+  anymore since GnuTLS has stopped distributing that tool. If an explicit path
+  is given to configure, we will instead guess on how to link and use that
+  lib. I did not use the patch from the bug report.
+
 Yang Tse (8 Jun 2009)
 - Igor Novoseltsev adjusted Makefile.vxworks to get sources and headers
   included from Makefile.inc, and provided docs\INSTALL VxWorks section.
@@ -13,11 +20,11 @@ Yang Tse (8 Jun 2009)
   I removed buildconf.bat from release and daily snapshot archives. This
   file is only for CVS tree checkout builds.
 
-Daniel Stenberg (8 June 2009)
+Daniel Stenberg (8 Jun 2009)
 - Eric Wong fixed --no-buffer to actually switch off output buffering. Been
   broken since 7.19.0
 
-Bill Hoffman (6 June 2009)
+Bill Hoffman (6 Jun 2009)
 - Added some cmake docs and fixed socklen_t in the build.
 
 Yang Tse (5 Jun 2009)
index ca493db..ff8d300 100644 (file)
@@ -25,6 +25,7 @@ This release includes the following bugfixes:
  o curl tool exit codes fixed for VMS
  o --no-buffer treated correctly
  o djgpp build fix
+ o configure detection of GnuTLS now based on pkg-config
 
 This release includes the following known bugs:
 
index c710828..049df24 100644 (file)
@@ -1554,25 +1554,8 @@ if test "$OPENSSL_ENABLED" != "1"; then
 
   if test X"$OPT_GNUTLS" != Xno; then
 
-    AC_MSG_NOTICE([OPT_GNUTLS is $OPT_GNUTLS])
-
     addld=""
     if test "x$OPT_GNUTLS" = "xyes"; then
-      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
-    else
-      addlib=`$OPT_GNUTLS/bin/libgnutls-config --libs`
-      addcflags=`$OPT_GNUTLS/bin/libgnutls-config --cflags`
-      version=`$OPT_GNUTLS/bin/libgnutls-config --version 2>/dev/null`
-      gtlslib=$OPT_GNUTLS/lib$libsuff
-    fi
-
-    if test -z "$version"; then
       CURL_CHECK_PKGCONFIG(gnutls)
 
       if test "$PKGCONFIG" != "no" ; then
@@ -1582,7 +1565,13 @@ if test "$OPENSSL_ENABLED" != "1"; then
         version=`$PKGCONFIG --modversion gnutls`
         gtlslib=`echo $addld | $SED -e 's/-L//'`
       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
     fi
 
     if test -z "$version"; then