aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2005-04-24 16:52:15 +0000
committerDavid Shaw <[email protected]>2005-04-24 16:52:15 +0000
commitbe90f3cacb15e337860baac6dfdc5ea0b1e36bcb (patch)
tree2de1e1d3e3b638a8b04824bf808766f0667ea6dc
parent* trustdb.h, keyedit.c (keyedit_menu, menu_select_uid_namehash): Allow (diff)
downloadgnupg-be90f3cacb15e337860baac6dfdc5ea0b1e36bcb.tar.gz
gnupg-be90f3cacb15e337860baac6dfdc5ea0b1e36bcb.zip
* libcurl.m4: Add a check for curl_free() since older versions of
libcurl don't have it. Substitute free() as an alternative.
-rw-r--r--m4/ChangeLog5
-rw-r--r--m4/libcurl.m420
2 files changed, 24 insertions, 1 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 39ed5d1c0..b864cb74f 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-24 David Shaw <[email protected]>
+
+ * libcurl.m4: Add a check for curl_free() since older versions of
+ libcurl don't have it. Substitute free() as an alternative.
+
2005-03-21 David Shaw <[email protected]>
* readline.m4: Check for completion functionality.
diff --git a/m4/libcurl.m4 b/m4/libcurl.m4
index edf12a8c5..8ade5445c 100644
--- a/m4/libcurl.m4
+++ b/m4/libcurl.m4
@@ -1,7 +1,7 @@
# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
# [ACTION-IF-YES], [ACTION-IF-NO])
# ----------------------------------------------------------
-# David Shaw <[email protected]> Jan-23-2005
+# David Shaw <[email protected]> Apr-21-2005
#
# Checks for libcurl. DEFAULT-ACTION is the string yes or no to
# specify whether to default to --with-libcurl or --without-libcurl.
@@ -155,6 +155,24 @@ x=CURLOPT_VERBOSE;
])
if test $libcurl_cv_lib_curl_usable = yes ; then
+
+ # Does curl_free() exist in this version of libcurl?
+ # If not, fake it with free()
+
+ _libcurl_save_cppflags=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
+ _libcurl_save_libs=$LIBS
+ LIBS="$LIBS $LIBCURL"
+
+ AC_CHECK_FUNC(curl_free,,
+ AC_DEFINE(curl_free,free,
+ [Define curl_free() as free() if our version of curl lacks curl_free.]))
+
+ CPPFLAGS=$_libcurl_save_cppflags
+ LIBS=$_libcurl_save_libs
+ unset _libcurl_save_cppflags
+ unset _libcurl_save_libs
+
AC_DEFINE(HAVE_LIBCURL,1,
[Define to 1 if you have a functional curl library.])
AC_SUBST(LIBCURL_CPPFLAGS)