gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r29437 - libmicrohttpd/m4


From: gnunet
Subject: [GNUnet-SVN] r29437 - libmicrohttpd/m4
Date: Fri, 20 Sep 2013 17:01:16 +0200

Author: grothoff
Date: 2013-09-20 17:01:15 +0200 (Fri, 20 Sep 2013)
New Revision: 29437

Modified:
   libmicrohttpd/m4/libcurl.m4
Log:
-update curl checks

Modified: libmicrohttpd/m4/libcurl.m4
===================================================================
--- libmicrohttpd/m4/libcurl.m4 2013-09-20 14:40:31 UTC (rev 29436)
+++ libmicrohttpd/m4/libcurl.m4 2013-09-20 15:01:15 UTC (rev 29437)
@@ -55,9 +55,13 @@
   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])
+  AH_TEMPLATE([LIBCURL_PROTOCOL_RTSP],[Defined if libcurl supports RTSP])
+  AH_TEMPLATE([LIBCURL_PROTOCOL_POP3],[Defined if libcurl supports POP3])
+  AH_TEMPLATE([LIBCURL_PROTOCOL_IMAP],[Defined if libcurl supports IMAP])
+  AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP])
 
   AC_ARG_WITH(libcurl,
-     AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
+     AC_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in 
PREFIX/lib and headers in PREFIX/include]),
      [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
 
   if test "$_libcurl_with" != "no" ; then
@@ -71,32 +75,33 @@
      if test -d "$_libcurl_with" ; then
         LIBCURL_CPPFLAGS="-I$withval/include"
         _libcurl_ldflags="-L$withval/lib"
-        AC_PATH_PROG([_libcurl_config],["$withval/bin/curl-config"])
+        AC_PATH_PROG([_libcurl_config],[curl-config],[],
+                     ["$withval/bin"])
      else
-       AC_PATH_PROG([_libcurl_config],[curl-config])
+        AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH])
      fi
 
      if test x$_libcurl_config != "x" ; then
         AC_CACHE_CHECK([for the version of libcurl],
-          [libcurl_cv_lib_curl_version],
+           [libcurl_cv_lib_curl_version],
            [libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK 
'{print $[]2}'`])
 
-       _libcurl_version=`echo $libcurl_cv_lib_curl_version | 
$_libcurl_version_parse`
-       _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
+        _libcurl_version=`echo $libcurl_cv_lib_curl_version | 
$_libcurl_version_parse`
+        _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
 
         if test $_libcurl_wanted -gt 0 ; then
-          AC_CACHE_CHECK([for libcurl >= version $2],
-             [libcurl_cv_lib_version_ok],
+           AC_CACHE_CHECK([for libcurl >= version $2],
+              [libcurl_cv_lib_version_ok],
               [
-             if test $_libcurl_version -ge $_libcurl_wanted ; then
-                libcurl_cv_lib_version_ok=yes
-             else
-                libcurl_cv_lib_version_ok=no
-             fi
+              if test $_libcurl_version -ge $_libcurl_wanted ; then
+                 libcurl_cv_lib_version_ok=yes
+              else
+                 libcurl_cv_lib_version_ok=no
+              fi
               ])
         fi
 
-       if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = 
xyes ; then
+        if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = 
xyes ; then
            if test x"$LIBCURL_CPPFLAGS" = "x" ; then
               LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
            fi
@@ -104,8 +109,8 @@
               LIBCURL=`$_libcurl_config --libs`
 
               # This is so silly, but Apple actually has a bug in their
-             # curl-config script.  Fixed in Tiger, but there are still
-             # lots of Panther installs around.
+              # curl-config script.  Fixed in Tiger, but there are still
+              # lots of Panther installs around.
               case "${host}" in
                  powerpc-apple-darwin7*)
                     LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
@@ -113,18 +118,18 @@
               esac
            fi
 
-          # All curl-config scripts support --feature
-          _libcurl_features=`$_libcurl_config --feature`
+           # All curl-config scripts support --feature
+           _libcurl_features=`$_libcurl_config --feature`
 
            # Is it modern enough to have --protocols? (7.12.4)
-          if test $_libcurl_version -ge 461828 ; then
+           if test $_libcurl_version -ge 461828 ; then
               _libcurl_protocols=`$_libcurl_config --protocols`
            fi
-       else
+        else
            _libcurl_try_link=no
-       fi
+        fi
 
-       unset _libcurl_wanted
+        unset _libcurl_wanted
      fi
 
      if test $_libcurl_try_link = yes ; then
@@ -141,7 +146,7 @@
            _libcurl_save_libs=$LIBS
            LIBS="$LIBCURL $LIBS"
 
-           AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
+           AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <curl/curl.h>],[
 /* Try and use a few common options to force a failure if we are
    missing symbols or can't link. */
 int x;
@@ -152,7 +157,7 @@
 x=CURLOPT_ERRORBUFFER;
 x=CURLOPT_STDERR;
 x=CURLOPT_VERBOSE;
-]),libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
+])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
 
            CPPFLAGS=$_libcurl_save_cppflags
            LIBS=$_libcurl_save_libs
@@ -162,8 +167,8 @@
 
         if test $libcurl_cv_lib_curl_usable = yes ; then
 
-          # Does curl_free() exist in this version of libcurl?
-          # If not, fake it with free()
+           # Does curl_free() exist in this version of libcurl?
+           # If not, fake it with free()
 
            _libcurl_save_cppflags=$CPPFLAGS
            CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
@@ -171,8 +176,8 @@
            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.]))
+              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
@@ -185,34 +190,40 @@
            AC_SUBST(LIBCURL)
 
            for _libcurl_feature in $_libcurl_features ; do
-             
AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
-             eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
+              
AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
+              eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
            done
 
-          if test "x$_libcurl_protocols" = "x" ; then
+           if test "x$_libcurl_protocols" = "x" ; then
 
-             # We don't have --protocols, so just assume that all
-             # protocols are available
-             _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
+              # We don't have --protocols, so just assume that all
+              # protocols are available
+              _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
 
-             if test x$libcurl_feature_SSL = xyes ; then
-                _libcurl_protocols="$_libcurl_protocols HTTPS"
+              if test x$libcurl_feature_SSL = xyes ; then
+                 _libcurl_protocols="$_libcurl_protocols HTTPS"
 
-                # FTPS wasn't standards-compliant until version
-                # 7.11.0
-                if test $_libcurl_version -ge 461568; then
-                   _libcurl_protocols="$_libcurl_protocols FTPS"
-                fi
-             fi
-          fi
+                 # FTPS wasn't standards-compliant until version
+                 # 7.11.0 (0x070b00 == 461568)
+                 if test $_libcurl_version -ge 461568; then
+                    _libcurl_protocols="$_libcurl_protocols FTPS"
+                 fi
+              fi
 
-          for _libcurl_protocol in $_libcurl_protocols ; do
-             
AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
-             eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
+              # RTSP, IMAP, POP3 and SMTP were added in
+              # 7.20.0 (0x071400 == 463872)
+              if test $_libcurl_version -ge 463872; then
+                 _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
+              fi
+           fi
+
+           for _libcurl_protocol in $_libcurl_protocols ; do
+              
AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
+              eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
            done
-       else
-          unset LIBCURL
-          unset LIBCURL_CPPFLAGS
+        else
+           unset LIBCURL
+           unset LIBCURL_CPPFLAGS
         fi
      fi
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]