]>
git.ipfire.org Git - thirdparty/curl.git/blob - curl-config.in
2 #***************************************************************************
4 # Project ___| | | | _ \| |
6 # | (__| |_| | _ <| |___
7 # \___|\___/|_| \_\_____|
9 # Copyright (C) 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 https://curl.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 # SPDX-License-Identifier: curl
24 ###########################################################################
27 exec_prefix
=@exec_prefix@
28 includedir
=@includedir@
29 cppflag_curl_staticlib
=@CPPFLAG_CURL_STATICLIB@
34 Usage: curl-config [OPTION]
36 Available values for OPTION include:
38 --built-shared says 'yes' if libcurl was built shared
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 --configure the arguments given to configure when building curl
44 --features newline separated list of enabled features
45 --help display this help and exit
46 --libs library linking information
47 --prefix curl install prefix
48 --protocols newline separated list of enabled protocols
49 --ssl-backends output the SSL backends libcurl was built to support
50 --static-libs static libcurl library linking information
51 --version output version information
52 --vernum output the version information as a number (hexadecimal)
58 if test $# -eq 0; then
62 while test $# -gt 0; do
64 # this deals with options in the style
65 # --option=value and extracts the value part
66 # [not currently used]
67 -*=*) value
=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
89 for feature
in @SUPPORT_FEATURES@
""; do
90 test -n "$feature" && echo "$feature"
95 for protocol
in @SUPPORT_PROTOCOLS@
; do
101 echo libcurl @CURLVERSION@
107 cmajor
=`echo $checkfor | cut -d. -f1`
108 cminor
=`echo $checkfor | cut -d. -f2`
109 # when extracting the patch part we strip off everything after a
110 # dash as that's used for things like version 1.2.3-CVS
111 cpatch
=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
113 vmajor
=`echo @CURLVERSION@ | cut -d. -f1`
114 vminor
=`echo @CURLVERSION@ | cut -d. -f2`
115 # when extracting the patch part we strip off everything after a
116 # dash as that's used for things like version 1.2.3-CVS
117 vpatch
=`echo @CURLVERSION@ | cut -d. -f3 | cut -d- -f1`
119 if test "$vmajor" -gt "$cmajor"; then
122 if test "$vmajor" -eq "$cmajor"; then
123 if test "$vminor" -gt "$cminor"; then
126 if test "$vminor" -eq "$cminor"; then
127 if test "$cpatch" -le "$vpatch"; then
133 echo "requested version $checkfor is newer than existing @CURLVERSION@"
147 if test "X$cppflag_curl_staticlib" = "X-DCURL_STATICLIB"; then
148 CPPFLAG_CURL_STATICLIB
="-DCURL_STATICLIB "
150 CPPFLAG_CURL_STATICLIB
=""
152 if test "X@includedir@" = "X/usr/include"; then
153 echo "$CPPFLAG_CURL_STATICLIB"
155 echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@"
160 if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
161 CURLLIBDIR
="-L@libdir@ "
165 if test "X@ENABLE_SHARED@" = "Xno"; then
166 echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
168 echo ${CURLLIBDIR}-lcurl
172 echo "@SSL_BACKENDS@"
176 if test "X@ENABLE_STATIC@" != "Xno" ; then
177 echo "@libdir@/libcurl.@libext@" @LDFLAGS@ @LIBCURL_LIBS@
179 echo "curl was built with static libraries disabled" >&2
185 echo @CONFIGURE_OPTIONS@
189 echo "unknown option: $1"