2 #***************************************************************************
4 # Project ___| | | | _ \| |
6 # | (__| |_| | _ <| |___
7 # \___|\___/|_| \_\_____|
9 # Copyright (C) 2001 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11 # This software is licensed as described in the file COPYING, which
12 # you should have received as part of this distribution. The terms
13 # are also available at https://curl.haxx.se/docs/copyright.html.
15 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
16 # copies of the Software, and permit persons to whom the Software is
17 # furnished to do so, under the terms of the COPYING file.
19 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 # KIND, either express or implied.
22 ###########################################################################
25 exec_prefix=@exec_prefix@
26 includedir=@includedir@
27 cppflag_curl_staticlib=@CPPFLAG_CURL_STATICLIB@
32 Usage: curl-config [OPTION]
34 Available values for OPTION include:
36 --built-shared says 'yes' if libcurl was built shared
37 --ca ca bundle install path
39 --cflags pre-processor and compiler flags
40 --checkfor [version] check for (lib)curl of the specified version
41 --configure the arguments given to configure when building curl
42 --features newline separated list of enabled features
43 --help display this help and exit
44 --libs library linking information
45 --prefix curl install prefix
46 --protocols newline separated list of enabled protocols
47 --ssl-backends output the SSL backends libcurl was built to support
48 --static-libs static libcurl library linking information
49 --version output version information
50 --vernum output the version information as a number (hexadecimal)
56 if test $# -eq 0; then
60 while test $# -gt 0; do
62 # this deals with options in the style
63 # --option=value and extracts the value part
64 # [not currently used]
65 -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
87 for feature in @SUPPORT_FEATURES@ ""; do
88 test -n "$feature" && echo "$feature"
93 for protocol in @SUPPORT_PROTOCOLS@; do
99 echo libcurl @CURLVERSION@
105 cmajor=`echo $checkfor | cut -d. -f1`
106 cminor=`echo $checkfor | cut -d. -f2`
107 # when extracting the patch part we strip off everything after a
108 # dash as that's used for things like version 1.2.3-CVS
109 cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
110 checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
111 numuppercase=`echo @VERSIONNUM@ | tr 'a-f' 'A-F'`
112 nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
114 if test "$nownum" -ge "$checknum"; then
118 echo "requested version $checkfor is newer than existing @CURLVERSION@"
133 if test "X$cppflag_curl_staticlib" = "X-DCURL_STATICLIB"; then
134 CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB "
136 CPPFLAG_CURL_STATICLIB=""
138 if test "X@includedir@" = "X/usr/include"; then
139 echo "$CPPFLAG_CURL_STATICLIB"
141 echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@"
146 if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
147 CURLLIBDIR="-L@libdir@ "
151 if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
152 echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
154 echo ${CURLLIBDIR}-lcurl
158 echo "@SSL_BACKENDS@"
162 if test "X@ENABLE_STATIC@" != "Xno" ; then
163 echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@
165 echo "curl was built with static libraries disabled" >&2
171 echo @CONFIGURE_OPTIONS@
175 echo "unknown option: $1"