2 #***************************************************************************
4 # Project ___| | | | _ \| |
6 # | (__| |_| | _ <| |___
7 # \___|\___/|_| \_\_____|
9 # Copyright (C) 2001 - 2008, 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 # $Id: curl-config.in,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
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 --help display this help and exit
45 --libs library linking information
46 --prefix curl install prefix
47 --protocols newline separated list of enabled protocols
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]*=//'` ;;
71 echo "@CURL_CA_BUNDLE@"
83 if test "@USE_SSLEAY@" = "1"; then
85 NTLM
=1 # OpenSSL implies NTLM
86 elif test -n "@SSL_ENABLED@"; then
89 if test "@KRB4_ENABLED@" = "1"; then
92 if test "@IPV6_ENABLED@" = "1"; then
95 if test "@HAVE_LIBZ@" = "1"; then
98 if test "@HAVE_ARES@" = "1"; then
101 if test "@IDN_ENABLED@" = "1"; then
104 if test "@USE_WINDOWS_SSPI@" = "1"; then
108 if test "$NTLM" = "1"; then
114 if test "@CURL_DISABLE_HTTP@" != "1"; then
116 if test "@SSL_ENABLED@" = "1"; then
120 if test "@CURL_DISABLE_FTP@" != "1"; then
122 if test "@SSL_ENABLED@" = "1"; then
126 if test "@CURL_DISABLE_FILE@" != "1"; then
129 if test "@CURL_DISABLE_TELNET@" != "1"; then
132 if test "@CURL_DISABLE_LDAP@" != "1"; then
135 if test "@CURL_DISABLE_LDAPS@" != "1"; then
138 if test "@CURL_DISABLE_DICT@" != "1"; then
141 if test "@CURL_DISABLE_TFTP@" != "1"; then
144 if test "@USE_LIBSSH2@" = "1"; then
150 echo libcurl @VERSION@
156 cmajor
=`echo $checkfor | cut -d. -f1`
157 cminor
=`echo $checkfor | cut -d. -f2`
158 # when extracting the patch part we strip off everything after a
159 # dash as that's used for things like version 1.2.3-CVS
160 cpatch
=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
161 checknum
=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
162 numuppercase
=`echo @VERSIONNUM@ | tr 'a-f' 'A-F'`
163 nownum
=`echo "obase=10; ibase=16; $numuppercase" | bc`
165 if test "$nownum" -ge "$checknum"; then
169 echo "requested version $checkfor is newer than existing @VERSION@"
184 if test "X@includedir@" = "X/usr/include"; then
187 echo "-I@includedir@"
192 if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
193 CURLLIBDIR
="-L@libdir@ "
197 if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
198 echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
200 echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
205 echo @libdir@
/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
209 echo "unknown option: $1"