aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog4
-rw-r--r--m4/libcurl.m441
2 files changed, 45 insertions, 0 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 9095322a5..0bf09be9f 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,7 @@
+2004-12-21 David Shaw <[email protected]>
+
+ * libcurl.m4: New.
+
2004-12-18 David Shaw <[email protected]>
* readline.m4: New.
diff --git a/m4/libcurl.m4 b/m4/libcurl.m4
new file mode 100644
index 000000000..e02455671
--- /dev/null
+++ b/m4/libcurl.m4
@@ -0,0 +1,41 @@
+dnl Check for libcurl and dependencies
+dnl Copyright (C) 2004 Free Software Foundation, Inc.
+dnl
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl Defines HAVE_LIBCURL to 1 if a working curl setup is found, and sets
+dnl @LIBCURL@ and @LIBCURL_INCLUDES@ to the necessary values.
+dnl $have_libcurl is set to yes or no so other things in configure can
+dnl make use of it.
+
+AC_DEFUN([GNUPG_CHECK_LIBCURL],
+[
+ AC_ARG_WITH(libcurl,
+ AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
+ [_do_libcurl=$withval],[_do_libcurl=yes])
+
+ if test "$_do_libcurl" != "no" ; then
+ if test -d "$withval" ; then
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LDFLAGS="${LDFLAGS} -L$withval/lib"
+ fi
+
+ AC_MSG_CHECKING([for libcurl])
+
+ if eval curl-config --version 2>/dev/null >/dev/null; then
+ AC_SUBST([LIBCURL_INCLUDES],[`curl-config --cflags`])
+ AC_SUBST([LIBCURL],[`curl-config --libs`])
+ have_libcurl=yes
+ else
+ have_libcurl=no
+ fi
+
+ AC_MSG_RESULT([$have_libcurl])
+
+ unset _do_libcurl
+ fi
+])dnl