gnupg/m4 (ChangeLog libcurl.m4)

cvs user dshaw cvs at cvs.gnupg.org
Wed Dec 22 17:58:25 CET 2004


    Date: Wednesday, December 22, 2004 @ 18:03:27
  Author: dshaw
    Path: /cvs/gnupg/gnupg/m4

Modified: ChangeLog libcurl.m4

* libcurl.m4: Be much more strict with libcurl by trying to compile and
link a test program that uses the features that we need.


------------+
 ChangeLog  |    6 ++++++
 libcurl.m4 |   33 ++++++++++++++++++++++++++++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)


Index: gnupg/m4/ChangeLog
diff -u gnupg/m4/ChangeLog:1.5 gnupg/m4/ChangeLog:1.6
--- gnupg/m4/ChangeLog:1.5	Wed Dec 22 00:39:57 2004
+++ gnupg/m4/ChangeLog	Wed Dec 22 18:03:27 2004
@@ -1,3 +1,9 @@
+2004-12-22  David Shaw  <dshaw at jabberwocky.com>
+
+	* libcurl.m4: Be much more strict with libcurl by trying to
+	compile and link a test program that uses the features that we
+	need.
+
 2004-12-21  David Shaw  <dshaw at jabberwocky.com>
 
 	* libcurl.m4: New.
Index: gnupg/m4/libcurl.m4
diff -u gnupg/m4/libcurl.m4:1.1 gnupg/m4/libcurl.m4:1.2
--- gnupg/m4/libcurl.m4:1.1	Wed Dec 22 00:39:57 2004
+++ gnupg/m4/libcurl.m4	Wed Dec 22 18:03:27 2004
@@ -16,7 +16,7 @@
 [
   AC_ARG_WITH(libcurl,
      AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
-     [_do_libcurl=$withval],[_do_libcurl=yes])
+     [_do_libcurl=$withval],[_do_libcurl=no])
 
   if test "$_do_libcurl" != "no" ; then
      if test -d "$withval" ; then
@@ -36,6 +36,37 @@
 
      AC_MSG_RESULT([$have_libcurl])
 
+     AC_MSG_CHECKING([whether libcurl is modern enough])
+
+     _libcurl_save_cppflags=$CPPFLAGS
+     CPPFLAGS="$CPPFLAGS $LIBCURL_INCLUDES"
+     _libcurl_save_ldflags=$LDFLAGS
+     LDFLAGS="$LDFLAGS $LIBCURL"
+
+     AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
+int x;
+x=CURL_ERROR_SIZE;
+curl_easy_setopt(NULL,CURLOPT_URL,NULL);
+x=CURLOPT_WRITEFUNCTION;
+x=CURLOPT_FILE;
+/* x=CURLOPT_WRITEDATA; */
+x=CURLOPT_ERRORBUFFER;
+x=CURLOPT_STDERR;
+x=CURLOPT_VERBOSE;
+]),,have_libcurl=no)
+
+     CPPFLAGS=$_libcurl_save_cppflags
+     LDFLAGS=$_libcurl_save_ldflags
+
+     AC_MSG_RESULT([$have_libcurl])
+
+     if test $have_libcurl = yes ; then
+        AC_DEFINE(HAVE_LIBCURL,1,
+          [Define to 1 if you have a fully functional curl library.])
+     fi
+
      unset _do_libcurl
+     unset _libcurl_save_cppflags
+     unset _libcurl_save_ldflags
   fi
 ])dnl




More information about the Gnupg-commits mailing list