2 #***************************************************************************
4 # Project ___| | | | _ \| |
6 # | (__| |_| | _ <| |___
7 # \___|\___/|_| \_\_____|
9 # Copyright (C) 2001 - 2010, 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 http://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@
31 Usage: curl-config [OPTION]
33 Available values for OPTION include:
35 --built-shared says 'yes' if libcurl was built shared
36 --ca ca bundle install path
38 --cflags pre-processor and compiler flags
39 --checkfor [version] check for (lib)curl of the specified version
40 --configure the arguments given to configure when building curl
41 --features newline separated list of enabled features
42 --help display this help and exit
43 --libs library linking information
44 --prefix curl install prefix
45 --protocols newline separated list of enabled protocols
46 --static-libs static libcurl library linking information
47 --version output version information
48 --vernum output the version information as a number (hexadecimal)
54 if test $# -eq 0; then
58 while test $# -gt 0; do
60 # this deals with options in the style
61 # --option=value and extracts the value part
62 # [not currently used]
63 -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
73 echo "@CURL_CA_BUNDLE@"
85 for feature in @SUPPORT_FEATURES@ ""; do
86 test -n "$feature" && echo "$feature"
91 for protocol in @SUPPORT_PROTOCOLS@; do
97 echo libcurl @VERSION@
103 cmajor=`echo $checkfor | cut -d. -f1`
104 cminor=`echo $checkfor | cut -d. -f2`
105 # when extracting the patch part we strip off everything after a
106 # dash as that's used for things like version 1.2.3-CVS
107 cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
108 checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
109 numuppercase=`echo @VERSIONNUM@ | tr 'a-f' 'A-F'`
110 nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
112 if test "$nownum" -ge "$checknum"; then
116 echo "requested version $checkfor is newer than existing @VERSION@"
131 if test "X@includedir@" = "X/usr/include"; then
134 echo "-I@includedir@"
139 if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
140 CURLLIBDIR="-L@libdir@ "
144 if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
145 echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
147 echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
152 echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
156 echo @CONFIGURE_OPTIONS@
160 echo "unknown option: $1"