2 #***************************************************************************
4 # Project ___| | | | _ \| |
6 # | (__| |_| | _ <| |___
7 # \___|\___/|_| \_\_____|
9 # Copyright (C) 2001 - 2007, 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.
23 ###########################################################################
25 # The idea to this kind of setup info script was stolen from numerous
26 # other packages, such as neon, libxml and gnome.
29 exec_prefix=@exec_prefix@
30 includedir=@includedir@
35 Usage: curl-config [OPTION]
37 Available values for OPTION include:
39 --ca ca bundle install path
41 --cflags pre-processor and compiler flags
42 --checkfor [version] check for (lib)curl of the specified version
43 --features newline separated list of enabled features
44 --protocols newline separated list of enabled protocols
45 --help display this help and exit
46 --libs library linking information
47 --prefix curl install prefix
48 --version output version information
49 --vernum output the version information as a number (hexadecimal)
55 if test $# -eq 0; then
59 while test $# -gt 0; do
61 # this deals with options in the style
62 # --option=value and extracts the value part
63 # [not currently used]
64 -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
70 echo "@CURL_CA_BUNDLE@"
82 if test "@USE_SSLEAY@" = "1"; then
84 NTLM=1 # OpenSSL implies NTLM
85 elif test -n "@USE_GNUTLS@"; then
88 if test "@KRB4_ENABLED@" = "1"; then
91 if test "@IPV6_ENABLED@" = "1"; then
94 if test "@HAVE_LIBZ@" = "1"; then
97 if test "@HAVE_ARES@" = "1"; then
100 if test "@IDN_ENABLED@" = "1"; then
103 if test "@USE_WINDOWS_SSPI@" = "1"; then
107 if test "$NTLM" = "1"; then
113 if test "@CURL_DISABLE_HTTP@" != "1"; then
115 if test "@USE_SSLEAY@" = "1"; then
119 if test "@CURL_DISABLE_FTP@" != "1"; then
121 if test "@USE_SSLEAY@" = "1"; then
125 if test "@CURL_DISABLE_FILE@" != "1"; then
128 if test "@CURL_DISABLE_TELNET@" != "1"; then
131 if test "@CURL_DISABLE_LDAP@" != "1"; then
134 if test "@CURL_DISABLE_DICT@" != "1"; then
137 if test "@CURL_DISABLE_TFTP@" != "1"; then
142 echo libcurl @VERSION@
148 cmajor=`echo $checkfor | cut -d. -f1`
149 cminor=`echo $checkfor | cut -d. -f2`
150 # when extracting the patch part we strip off everything after a
151 # dash as that's used for things like version 1.2.3-CVS
152 cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
153 checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
154 numuppercase=`echo @VERSIONNUM@ | tr 'a-f' 'A-F'`
155 nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
157 if test "$nownum" -ge "$checknum"; then
161 echo "requested version $checkfor is newer than existing @VERSION@"
176 if test "X@includedir@" = "X/usr/include"; then
179 echo "-I@includedir@"
184 if test "X@libdir@" != "X/usr/lib"; then
185 CURLLIBDIR="-L@libdir@ "
189 if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
190 echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
192 echo ${CURLLIBDIR}-lcurl @LDFLAGS@
197 echo "unknown option: $1"