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.
22 # $Id: curl-config.in,v 1.28 2007-02-17 17:55:19 danf 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.
30 includedir
=${prefix}/include
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]*=//'` ;;
82 if test "" = "1"; then
84 NTLM
=1 # OpenSSL implies NTLM
88 if test "" = "1"; then
91 if test "" = "1"; then
94 if test "1" = "1"; then
97 if test "" = "1"; then
100 if test "" = "1"; then
103 if test "" = "1"; then
107 if test "$NTLM" = "1"; then
113 if test "" != "1"; then
115 if test "" = "1"; then
119 if test "" != "1"; then
121 if test "" = "1"; then
125 if test "" != "1"; then
128 if test "" != "1"; then
131 if test "" != "1"; then
134 if test "" != "1"; then
137 if test "" != "1"; then
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 071004 | 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 7.16.4"
176 if test "X${prefix}/include" = "X/usr/include"; then
179 echo "-I${prefix}/include"
184 if test "X${exec_prefix}/lib" != "X/usr/lib"; then
185 CURLLIBDIR
="-L${exec_prefix}/lib "
189 if test "Xyes" = "Xyes"; then
190 echo ${CURLLIBDIR}-lcurl -lwinmm -lws2_32 -lz -lws2_32
192 echo ${CURLLIBDIR}-lcurl
197 echo "unknown option: $1"