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