- Keith Mok added supported_protocols and supported_features to the pkg-config
authorDaniel Stenberg <daniel@haxx.se>
Tue, 2 Sep 2008 12:07:08 +0000 (12:07 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 2 Sep 2008 12:07:08 +0000 (12:07 +0000)
  file for libcurl, and while doing that fix he unified with curl-config.in
  how the supported protocols and features are extracted and used, so both those
  tools should now always be synced.

CHANGES
RELEASE-NOTES
configure.ac
curl-config.in
libcurl.pc.in

diff --git a/CHANGES b/CHANGES
index 219c205..06e2c8b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,12 @@
 
                                   Changelog
 
+Daniel Stenberg (2 Sep 2008)
+- Keith Mok added supported_protocols and supported_features to the pkg-config
+  file for libcurl, and while doing that fix he unified with curl-config.in
+  how the supported protocols and features are extracted and used, so both those
+  tools should now always be synced.
+
 Version 7.19.0 (1 September 2008)
 
 Daniel Fandrich (29 Aug 2008)
index d10871c..9da3290 100644 (file)
@@ -9,7 +9,7 @@ Curl and libcurl 7.19.1
 
 This release includes the following changes:
 
- o 
+ o pkg-config can now show supported_protocols and supported_features
 
 This release includes the following bugfixes:
 
@@ -26,6 +26,6 @@ Other curl-related news:
 This release would not have looked like this without help, code, reports and
 advice from friends like these:
 
+ Keith Mok, Yang Tse
 
         Thanks! (and sorry if I forgot to mention someone)
index 18ab1f6..17f7c1c 100644 (file)
@@ -2546,6 +2546,78 @@ LIBS=$ALL_LIBS  dnl LIBS is a magic variable that's used for every link
 
 AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
 
+dnl
+dnl For keeping supported features and protocols also in pkg-config file
+dnl since it is more cross-compile frient than curl-config
+dnl
+
+if test "x$USE_SSLEAY" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
+elif test -n "$SSL_ENABLED"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
+fi
+if test "@KRB4_ENABLED@" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4"
+fi
+if test "x$IPV6_ENABLED" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
+fi
+if test "x$HAVE_LIBZ" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
+fi
+if test "x$HAVE_ARES" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
+fi
+if test "x$IDN_ENABLED" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
+fi
+if test "x$USE_WINDOWS_SSPI" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
+fi
+if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
+fi
+
+AC_SUBST(SUPPORT_FEATURES)
+
+dnl For supported protocols in pkg-config file
+if test "x$CURL_DISABLE_HTTP" != "x1"; then
+  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
+  if test "x$SSL_ENABLED" = "x1"; then
+    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
+  fi
+fi
+if test "x$CURL_DISABLE_FTP" != "x1"; then
+  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
+  if test "x$SSL_ENABLED" = "x1"; then
+    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
+  fi
+fi
+if test "x$CURL_DISABLE_FILE" != "x1"; then
+  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
+fi
+if test "x$CURL_DISABLE_TELNET" != "x1"; then
+  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
+fi
+if test "x$CURL_DISABLE_LDAP" != "x1"; then
+  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
+fi
+if test "x$CURL_DISABLE_LDAPS" != "x1"; then
+  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
+fi
+if test "x$CURL_DISABLE_DICT" != "x1"; then
+  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
+fi
+if test "x$CURL_DISABLE_TFTP" != "x1"; then
+  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
+fi
+if test "x$USE_LIBSSH2" = "x1"; then
+  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
+  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
+fi
+
+AC_SUBST(SUPPORT_PROTOCOLS)
+
 AC_CONFIG_FILES([Makefile \
            docs/Makefile \
            docs/examples/Makefile \
index 107fa2c..3753180 100644 (file)
@@ -80,71 +80,15 @@ while test $# -gt 0; do
        ;;
 
     --feature|--features)
-       if test "@USE_SSLEAY@" = "1"; then
-          echo "SSL"
-          NTLM=1 # OpenSSL implies NTLM
-        elif test -n "@SSL_ENABLED@"; then
-          echo "SSL"
-        fi
-       if test "@KRB4_ENABLED@" = "1"; then
-          echo "KRB4"
-        fi
-       if test "@IPV6_ENABLED@" = "1"; then
-          echo "IPv6"
-        fi
-       if test "@HAVE_LIBZ@" = "1"; then
-          echo "libz"
-        fi
-       if test "@HAVE_ARES@" = "1"; then
-          echo "AsynchDNS"
-        fi
-       if test "@IDN_ENABLED@" = "1"; then
-          echo "IDN"
-        fi
-       if test "@USE_WINDOWS_SSPI@" = "1"; then
-          echo "SSPI"
-          NTLM=1
-        fi
-       if test "$NTLM" = "1"; then
-          echo "NTLM"
-        fi
+        for feature in @SUPPORT_FEATURES@; do
+            echo $feature;
+        done
        ;;
 
     --protocols)
-       if test "@CURL_DISABLE_HTTP@" != "1"; then
-          echo "HTTP"
-         if test "@SSL_ENABLED@" = "1"; then
-            echo "HTTPS"
-          fi
-        fi
-       if test "@CURL_DISABLE_FTP@" != "1"; then
-          echo "FTP"
-         if test "@SSL_ENABLED@" = "1"; then
-            echo "FTPS"
-          fi
-        fi
-       if test "@CURL_DISABLE_FILE@" != "1"; then
-          echo "FILE"
-        fi
-       if test "@CURL_DISABLE_TELNET@" != "1"; then
-          echo "TELNET"
-        fi
-       if test "@CURL_DISABLE_LDAP@" != "1"; then
-          echo "LDAP"
-        fi
-       if test "@CURL_DISABLE_LDAPS@" != "1"; then
-          echo "LDAPS"
-        fi
-       if test "@CURL_DISABLE_DICT@" != "1"; then
-          echo "DICT"
-        fi
-       if test "@CURL_DISABLE_TFTP@" != "1"; then
-          echo "TFTP"
-        fi
-       if test "@USE_LIBSSH2@" = "1"; then
-          echo "SCP"
-          echo "SFTP"
-        fi
+        for protocol in @SUPPORT_PROTOCOLS@; do
+            echo $protocol;
+        done
        ;;
     --version)
        echo libcurl @VERSION@
index 7e5ffab..eaf8537 100644 (file)
@@ -28,6 +28,8 @@ prefix=@prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
+supported_protocols="@SUPPORT_PROTOCOLS@"
+supported_features="@SUPPORT_FEATURES@"
 
 Name: libcurl
 URL: http://curl.haxx.se/