2 #***************************************************************************
4 # Project ___| | | | _ \| |
6 # | (__| |_| | _ <| |___
7 # \___|\___/|_| \_\_____|
9 # Copyright (C) 2001 - 2009, 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.36 2009-03-20 12:42:29 bagder Exp $
23 ###########################################################################
27 includedir
=${prefix}/include
32 Usage: curl-config [OPTION]
34 Available values for OPTION include:
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 --features newline separated list of enabled features
41 --help display this help and exit
42 --libs library linking information
43 --prefix curl install prefix
44 --protocols newline separated list of enabled protocols
45 --static-libs static libcurl library linking information
46 --version output version information
47 --vernum output the version information as a number (hexadecimal)
53 if test $# -eq 0; then
57 while test $# -gt 0; do
59 # this deals with options in the style
60 # --option=value and extracts the value part
61 # [not currently used]
62 -*=*) value
=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
80 for feature
in SSL libz NTLM
""; do
81 test -n "$feature" && echo "$feature"
86 for protocol
in HTTP HTTPS FTP FTPS FILE TELNET LDAP DICT TFTP
; do
97 cmajor
=`echo $checkfor | cut -d. -f1`
98 cminor
=`echo $checkfor | cut -d. -f2`
99 # when extracting the patch part we strip off everything after a
100 # dash as that's used for things like version 1.2.3-CVS
101 cpatch
=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
102 checknum
=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
103 numuppercase
=`echo 071305 | tr 'a-f' 'A-F'`
104 nownum
=`echo "obase=10; ibase=16; $numuppercase" | bc`
106 if test "$nownum" -ge "$checknum"; then
110 echo "requested version $checkfor is newer than existing 7.19.5"
125 if test "X${prefix}/include" = "X/usr/include"; then
128 echo "-I${prefix}/include"
133 if test "X${exec_prefix}/lib" != "X/usr/lib" -a "X${exec_prefix}/lib" != "X/usr/lib64"; then
134 CURLLIBDIR
="-L${exec_prefix}/lib "
138 if test "Xyes" = "Xyes"; then
139 echo ${CURLLIBDIR}-lcurl -L/mingw
/lib
-lssl -lcrypto -lgdi32 -lwldap32 -lws2_32 -lz -lws2_32
141 echo ${CURLLIBDIR}-lcurl -L/mingw
/lib
146 echo ${exec_prefix}/lib
/libcurl.a
-L/mingw
/lib
-lssl -lcrypto -lgdi32 -lwldap32 -lws2_32 -lz -lws2_32
150 echo "unknown option: $1"