[svn] GnuPG - r4404 - branches/STABLE-BRANCH-1-4/m4
svn author dshaw
cvs at cvs.gnupg.org
Tue Jan 16 07:10:32 CET 2007
Author: dshaw
Date: 2007-01-16 07:10:31 +0100 (Tue, 16 Jan 2007)
New Revision: 4404
Modified:
branches/STABLE-BRANCH-1-4/m4/ChangeLog
branches/STABLE-BRANCH-1-4/m4/libcurl.m4
Log:
* libcurl.m4: Check for curl_easy_escape() and curl_easy_unescape().
Replace with curl_escape() and curl_unescape() if libcurl doesn't have
it.
Modified: branches/STABLE-BRANCH-1-4/m4/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/m4/ChangeLog 2007-01-16 05:20:06 UTC (rev 4403)
+++ branches/STABLE-BRANCH-1-4/m4/ChangeLog 2007-01-16 06:10:31 UTC (rev 4404)
@@ -1,3 +1,9 @@
+2007-01-16 David Shaw <dshaw at jabberwocky.com>
+
+ * libcurl.m4: Check for curl_easy_escape() and
+ curl_easy_unescape(). Replace with curl_escape() and
+ curl_unescape() if libcurl doesn't have it.
+
2006-10-02 Werner Koch <wk at g10code.com>
* autobuild.m4: New.
Modified: branches/STABLE-BRANCH-1-4/m4/libcurl.m4
===================================================================
--- branches/STABLE-BRANCH-1-4/m4/libcurl.m4 2007-01-16 05:20:06 UTC (rev 4403)
+++ branches/STABLE-BRANCH-1-4/m4/libcurl.m4 2007-01-16 06:10:31 UTC (rev 4404)
@@ -1,7 +1,7 @@
# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
# [ACTION-IF-YES], [ACTION-IF-NO])
# ----------------------------------------------------------
-# David Shaw <dshaw at jabberwocky.com> May-09-2006
+# David Shaw <dshaw at jabberwocky.com> Jan-16-2007
#
# Checks for libcurl. DEFAULT-ACTION is the string yes or no to
# specify whether to default to --with-libcurl or --without-libcurl.
@@ -162,18 +162,40 @@
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.]))
+ # Check for some libcurl functions that aren't in all
+ # versions.
+ AC_CHECK_FUNCS([curl_free curl_easy_escape curl_easy_unescape])
+
+ AH_BOTTOM([
+#ifdef HAVE_LIBCURL
+
+/* Define curl_free() via free() if our version of curl lacks
+ curl_free() */
+#if !defined(curl_free) && !defined(HAVE_CURL_FREE)
+#define curl_free(a) free((a))
+#endif
+
+/* Define curl_easy_escape() via curl_escape() if our version of curl
+ lacks curl_easy_escape() */
+#if !defined(curl_easy_escape) && !defined(HAVE_CURL_EASY_ESCAPE)
+#define curl_easy_escape(a,b,c) curl_escape((b),(c))
+#endif
+
+/* Define curl_easy_unescape() via curl_unescape() if our version of
+ curl lacks curl_easy_unescape() */
+#if !defined(curl_easy_unescape) && !defined(HAVE_CURL_EASY_UNESCAPE)
+#define curl_easy_unescape(a,b,c) curl_unescape((b),(c))
+#endif
+
+#endif /* HAVE_LIBCURL */
+])
+
CPPFLAGS=$_libcurl_save_cppflags
LIBS=$_libcurl_save_libs
unset _libcurl_save_cppflags
More information about the Gnupg-commits
mailing list