Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / curl-config.in
blobb585fb9beb8d85bb70e8a8cd14d76e4e7046172d
1 #! /bin/sh
2 #***************************************************************************
3 # _ _ ____ _
4 # Project ___| | | | _ \| |
5 # / __| | | | |_) | |
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.
28 prefix=@prefix@
29 exec_prefix=@exec_prefix@
30 includedir=@includedir@
32 usage()
34 cat <<EOF
35 Usage: curl-config [OPTION]
37 Available values for OPTION include:
39 --ca ca bundle install path
40 --cc compiler
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)
51 EOF
53 exit $1
56 if test $# -eq 0; then
57 usage 1
60 while test $# -gt 0; do
61 case "$1" in
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]*=//'` ;;
66 *) value= ;;
67 esac
69 case "$1" in
70 --ca)
71 echo "@CURL_CA_BUNDLE@"
74 --cc)
75 echo "@CC@"
78 --prefix)
79 echo "$prefix"
82 --feature|--features)
83 if test "@USE_SSLEAY@" = "1"; then
84 echo "SSL"
85 NTLM=1 # OpenSSL implies NTLM
86 elif test -n "@SSL_ENABLED@"; then
87 echo "SSL"
89 if test "@KRB4_ENABLED@" = "1"; then
90 echo "KRB4"
92 if test "@IPV6_ENABLED@" = "1"; then
93 echo "IPv6"
95 if test "@HAVE_LIBZ@" = "1"; then
96 echo "libz"
98 if test "@HAVE_ARES@" = "1"; then
99 echo "AsynchDNS"
101 if test "@IDN_ENABLED@" = "1"; then
102 echo "IDN"
104 if test "@USE_WINDOWS_SSPI@" = "1"; then
105 echo "SSPI"
106 NTLM=1
108 if test "$NTLM" = "1"; then
109 echo "NTLM"
113 --protocols)
114 if test "@CURL_DISABLE_HTTP@" != "1"; then
115 echo "HTTP"
116 if test "@SSL_ENABLED@" = "1"; then
117 echo "HTTPS"
120 if test "@CURL_DISABLE_FTP@" != "1"; then
121 echo "FTP"
122 if test "@SSL_ENABLED@" = "1"; then
123 echo "FTPS"
126 if test "@CURL_DISABLE_FILE@" != "1"; then
127 echo "FILE"
129 if test "@CURL_DISABLE_TELNET@" != "1"; then
130 echo "TELNET"
132 if test "@CURL_DISABLE_LDAP@" != "1"; then
133 echo "LDAP"
135 if test "@CURL_DISABLE_LDAPS@" != "1"; then
136 echo "LDAPS"
138 if test "@CURL_DISABLE_DICT@" != "1"; then
139 echo "DICT"
141 if test "@CURL_DISABLE_TFTP@" != "1"; then
142 echo "TFTP"
144 if test "@USE_LIBSSH2@" = "1"; then
145 echo "SCP"
146 echo "SFTP"
149 --version)
150 echo libcurl @VERSION@
151 exit 0
154 --checkfor)
155 checkfor=$2
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
166 # silent success
167 exit 0
168 else
169 echo "requested version $checkfor is newer than existing @VERSION@"
170 exit 1
174 --vernum)
175 echo @VERSIONNUM@
176 exit 0
179 --help)
180 usage 0
183 --cflags)
184 if test "X@includedir@" = "X/usr/include"; then
185 echo ""
186 else
187 echo "-I@includedir@"
191 --libs)
192 if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
193 CURLLIBDIR="-L@libdir@ "
194 else
195 CURLLIBDIR=""
197 if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
198 echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
199 else
200 echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
204 --static-libs)
205 echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
209 echo "unknown option: $1"
210 usage 1
212 esac
213 shift
214 done
216 exit 0