aboutsummaryrefslogtreecommitdiff
path: root/docs/libcurl/libcurl.m4
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-01-17 17:39:39 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-01-17 17:39:39 +0000
commit8971f656b4bb1a178b59aa730da67a8e5aeabaee (patch)
tree51610184e00028ea130bbb69b4cbd1d49778c34e /docs/libcurl/libcurl.m4
parent394ce9ee39919173486345e7f64a1ca3f0b3df4e (diff)
David Shaw: Here is the latest libcurl.m4 autoconf tests. It is updated with
the latest features and protocols that libcurl supports and has a minor fix to better deal with the obscure case where someone has more than one libcurl installed at the same time.
Diffstat (limited to 'docs/libcurl/libcurl.m4')
-rw-r--r--docs/libcurl/libcurl.m433
1 files changed, 20 insertions, 13 deletions
diff --git a/docs/libcurl/libcurl.m4 b/docs/libcurl/libcurl.m4
index c6fba644e..798427c14 100644
--- a/docs/libcurl/libcurl.m4
+++ b/docs/libcurl/libcurl.m4
@@ -1,7 +1,7 @@
# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
# [ACTION-IF-YES], [ACTION-IF-NO])
# ----------------------------------------------------------
-# David Shaw <dshaw@jabberwocky.com> Jun-21-2005
+# David Shaw <dshaw@jabberwocky.com> Jan-17-2006
#
# Checks for libcurl. DEFAULT-ACTION is the string yes or no to
# specify whether to default to --with-libcurl or --without-libcurl.
@@ -13,10 +13,10 @@
# ACTION-IF-NO is a list of shell commands that are run otherwise.
# Note that using --without-libcurl does run ACTION-IF-NO.
#
-# This macro defines HAVE_LIBCURL if a working libcurl setup is found,
-# and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary values.
-# Other useful defines are LIBCURL_FEATURE_xxx where xxx are the
-# various features supported by libcurl, and LIBCURL_PROTOCOL_yyy
+# This macro #defines HAVE_LIBCURL if a working libcurl setup is
+# found, and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary
+# values. Other useful defines are LIBCURL_FEATURE_xxx where xxx are
+# the various features supported by libcurl, and LIBCURL_PROTOCOL_yyy
# where yyy are the various protocols supported by libcurl. Both xxx
# and yyy are capitalized. See the list of AH_TEMPLATEs at the top of
# the macro for the complete list of possible defines. Shell
@@ -32,7 +32,8 @@
# found is after version 7.7.2, the first version that included the
# curl-config script. Note that it is very important for people
# packaging binary versions of libcurl to include this script!
-# Without curl-config, we can only guess what protocols are available.
+# Without curl-config, we can only guess what protocols are available,
+# or use curl_version_info to figure it out at runtime.
AC_DEFUN([LIBCURL_CHECK_CONFIG],
[
@@ -41,6 +42,9 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
AH_TEMPLATE([LIBCURL_FEATURE_IPV6],[Defined if libcurl supports IPv6])
AH_TEMPLATE([LIBCURL_FEATURE_LIBZ],[Defined if libcurl supports libz])
AH_TEMPLATE([LIBCURL_FEATURE_ASYNCHDNS],[Defined if libcurl supports AsynchDNS])
+ AH_TEMPLATE([LIBCURL_FEATURE_IDN],[Defined if libcurl supports IDN])
+ AH_TEMPLATE([LIBCURL_FEATURE_SSPI],[Defined if libcurl supports SSPI])
+ AH_TEMPLATE([LIBCURL_FEATURE_NTLM],[Defined if libcurl supports NTLM])
AH_TEMPLATE([LIBCURL_PROTOCOL_HTTP],[Defined if libcurl supports HTTP])
AH_TEMPLATE([LIBCURL_PROTOCOL_HTTPS],[Defined if libcurl supports HTTPS])
@@ -50,6 +54,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
AH_TEMPLATE([LIBCURL_PROTOCOL_TELNET],[Defined if libcurl supports TELNET])
AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
AC_ARG_WITH(libcurl,
AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
@@ -64,12 +69,13 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
_libcurl_try_link=yes
if test -d "$_libcurl_with" ; then
- CPPFLAGS="${CPPFLAGS} -I$withval/include"
- LDFLAGS="${LDFLAGS} -L$withval/lib"
+ LIBCURL_CPPFLAGS="-I$withval/include"
+ _libcurl_ldflags="-L$withval/lib"
+ AC_PATH_PROG([_libcurl_config],["$withval/bin/curl-config"])
+ else
+ AC_PATH_PROG([_libcurl_config],[curl-config])
fi
- AC_PATH_PROG([_libcurl_config],[curl-config])
-
if test x$_libcurl_config != "x" ; then
AC_CACHE_CHECK([for the version of libcurl],
[libcurl_cv_lib_curl_version],
@@ -125,15 +131,15 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
# we didn't find curl-config, so let's see if the user-supplied
# link line (or failing that, "-lcurl") is enough.
- LIBCURL=${LIBCURL-"-lcurl"}
+ LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
AC_CACHE_CHECK([whether libcurl is usable],
[libcurl_cv_lib_curl_usable],
[
_libcurl_save_cppflags=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
+ CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
_libcurl_save_libs=$LIBS
- LIBS="$LIBS $LIBCURL"
+ LIBS="$LIBCURL $LIBS"
AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
/* Try and use a few common options to force a failure if we are
@@ -215,6 +221,7 @@ x=CURLOPT_VERBOSE;
unset _libcurl_protocol
unset _libcurl_protocols
unset _libcurl_version
+ unset _libcurl_ldflags
fi
if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then