curl-config revision 2379
172N/A#! /bin/sh
172N/A#***************************************************************************
172N/A# _ _ ____ _
172N/A# Project ___| | | | _ \| |
172N/A# / __| | | | |_) | |
172N/A# | (__| |_| | _ <| |___
172N/A# \___|\___/|_| \_\_____|
172N/A#
172N/A# Copyright (C) 2001 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
172N/A#
172N/A# This software is licensed as described in the file COPYING, which
172N/A# you should have received as part of this distribution. The terms
172N/A# are also available at http://curl.haxx.se/docs/copyright.html.
172N/A#
172N/A# You may opt to use, copy, modify, merge, publish, distribute and/or sell
172N/A# copies of the Software, and permit persons to whom the Software is
172N/A# furnished to do so, under the terms of the COPYING file.
172N/A#
172N/A# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
172N/A# KIND, either express or implied.
5005N/A#
172N/A# Modified to conform to Solaris standards.
5005N/A#
172N/A###########################################################################
172N/A
172N/Aprefix=/usr
172N/Aexec_prefix=${prefix}
172N/Aincludedir=${prefix}/include/curl
172N/A
172N/Ausage()
172N/A{
172N/A cat <<EOF
172N/AUsage: curl-config [OPTION]
172N/A
172N/AAvailable values for OPTION include:
172N/A
172N/A --built-shared says 'yes' if libcurl was built shared
172N/A --ca ca bundle install path
172N/A --cc compiler
172N/A --cflags pre-processor and compiler flags
172N/A --checkfor [version] check for (lib)curl of the specified version
172N/A --configure the arguments given to configure when building curl
172N/A --features newline separated list of enabled features
172N/A --help display this help and exit
172N/A --libs library linking information
172N/A --prefix curl install prefix
172N/A --protocols newline separated list of enabled protocols
172N/A --static-libs static libcurl library linking information
172N/A --version output version information
172N/A --vernum output the version information as a number (hexadecimal)
172N/AEOF
172N/A
172N/A exit $1
172N/A}
172N/A
172N/Aif test $# -eq 0; then
172N/A usage 1
172N/Afi
172N/A
172N/Awhile test $# -gt 0; do
172N/A case "$1" in
172N/A # this deals with options in the style
172N/A # --option=value and extracts the value part
172N/A # [not currently used]
172N/A -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
172N/A *) value= ;;
172N/A esac
172N/A
172N/A case "$1" in
172N/A --built-shared)
172N/A echo yes
172N/A ;;
172N/A
172N/A --ca)
172N/A echo ""
172N/A ;;
172N/A
172N/A --cc)
172N/A echo "${CC}"
172N/A ;;
172N/A
172N/A --prefix)
172N/A echo "$prefix"
172N/A ;;
172N/A
172N/A --feature|--features)
172N/A for feature in SSL IPv6 libz IDN NTLM ""; do
172N/A test -n "$feature" && echo "$feature"
172N/A done
172N/A ;;
172N/A
172N/A --protocols)
172N/A for protocol in DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP POP3 POP3S RTSP SMTP SMTPS TELNET TFTP; do
172N/A echo "$protocol"
172N/A done
172N/A ;;
172N/A
172N/A --version)
172N/A echo libcurl 7.21.2
172N/A exit 0
172N/A ;;
172N/A
172N/A --checkfor)
172N/A checkfor=$2
172N/A cmajor=`echo $checkfor | cut -d. -f1`
172N/A cminor=`echo $checkfor | cut -d. -f2`
172N/A # when extracting the patch part we strip off everything after a
172N/A # dash as that's used for things like version 1.2.3-CVS
172N/A cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
172N/A checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
172N/A numuppercase=`echo 071502 | tr 'a-f' 'A-F'`
172N/A nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
172N/A
172N/A if test "$nownum" -ge "$checknum"; then
5005N/A # silent success
172N/A exit 0
else
echo "requested version $checkfor is newer than existing 7.21.2"
exit 1
fi
;;
--vernum)
echo 071502
exit 0
;;
--help)
usage 0
;;
--cflags)
echo "-I${prefix}/include/curl"
;;
--libs)
CURLLIBDIR="-L/usr/lib "
echo ${CURLLIBDIR} -R/usr/lib -lcurl -lgss -lidn -lssl -lcrypto -llber-2.4 -lldap_r-2.4 -lgss -lssl -lcrypto -lsocket -lnsl -lc -lz
;;
--static-libs)
echo "Static libcurl 7.21.2 is not available."
;;
--configure)
echo " '--prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--enable-shared' '--disable-static' '--enable-http' '--enable-ftp' '--enable-file' '--enable-dict' '--enable-manual' '--disable-libgcc' '--enable-rtsp' '--enable-proxy' '--enable-telnet' '--enable-tftp' '--enable-pop3' '--enable-imap' '--enable-smtp' '--enable-ipv6' '--enable-nonblocking' '--enable-thread' '--enable-verbose' '--disable-sspi' '--enable-crypto-auth' '--enable-cookies' '--disable-hidden-symbols' '--disable-soname-bump' '--enable-ldap' '--with-random=/dev/urandom' '--with-ssl' '--with-ldap-lib=ldap_r-2.4' '--with-lber-lib=lber-2.4' '--with-gssapi-includes=/usr/include/gssapi' '--with-gssapi-libs=/usr/lib' '--with-gssapi=/usr' '--with-ca-bundle=/etc/certs/CA' '--with-zlib=/usr' '--with-libidn=/usr' '--with-pic' 'curl_disallow_getifaddrs=yes'"
;;
*)
echo "unknown option: $1"
usage 1
;;
esac
shift
done
exit 0