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.
23 ###########################################################################
26 exec_prefix=@exec_prefix@
27 includedir=@includedir@
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]*=//'` ;;
68 echo "@CURL_CA_BUNDLE@"
80 for feature in @SUPPORT_FEATURES@ ""; do
81 test -n "$feature" && echo "$feature"
86 for protocol in @SUPPORT_PROTOCOLS@; do
91 echo libcurl @VERSION@
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 @VERSIONNUM@ | 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 @VERSION@"
125 if test "X@includedir@" = "X/usr/include"; then
128 echo "-I@includedir@"
133 if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
134 CURLLIBDIR="-L@libdir@ "
138 if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
139 echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
141 echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
146 echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
150 echo "unknown option: $1"