components/curl/Solaris/curl-config-64
changeset 174 187aa0541610
child 1681 716fa74ddec1
equal deleted inserted replaced
173:69315e61a221 174:187aa0541610
       
     1 #! /bin/sh
       
     2 #***************************************************************************
       
     3 #                                  _   _ ____  _
       
     4 #  Project                     ___| | | |  _ \| |
       
     5 #                             / __| | | | |_) | |
       
     6 #                            | (__| |_| |  _ <| |___
       
     7 #                             \___|\___/|_| \_\_____|
       
     8 #
       
     9 # Copyright (C) 2001 - 2010, Daniel Stenberg, <[email protected]>, et al.
       
    10 #
       
    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.
       
    14 #
       
    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.
       
    18 #
       
    19 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
       
    20 # KIND, either express or implied.
       
    21 #
       
    22 # Modified to conform to Solaris standards.
       
    23 #
       
    24 # ident	"@(#)curl-config-64	1.8	10/10/18 SMI"
       
    25 #
       
    26 ###########################################################################
       
    27 
       
    28 prefix=/usr
       
    29 exec_prefix=${prefix}
       
    30 includedir=${prefix}/include
       
    31 
       
    32 usage()
       
    33 {
       
    34     cat <<EOF
       
    35 Usage: curl-config [OPTION]
       
    36 
       
    37 Available values for OPTION include:
       
    38 
       
    39   --built-shared says 'yes' if libcurl was built shared
       
    40   --ca        ca bundle install path
       
    41   --cc        compiler
       
    42   --cflags    pre-processor and compiler flags
       
    43   --checkfor [version] check for (lib)curl of the specified version
       
    44   --configure the arguments given to configure when building curl
       
    45   --features  newline separated list of enabled features
       
    46   --help      display this help and exit
       
    47   --libs      library linking information
       
    48   --prefix    curl install prefix
       
    49   --protocols newline separated list of enabled protocols
       
    50   --static-libs static libcurl library linking information
       
    51   --version   output version information
       
    52   --vernum    output the version information as a number (hexadecimal)
       
    53 EOF
       
    54 
       
    55     exit $1
       
    56 }
       
    57 
       
    58 if test $# -eq 0; then
       
    59     usage 1
       
    60 fi
       
    61 
       
    62 while test $# -gt 0; do
       
    63     case "$1" in
       
    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]*=//'` ;;
       
    68     *) value= ;;
       
    69     esac
       
    70 
       
    71     case "$1" in
       
    72     --built-shared)
       
    73         echo yes
       
    74         ;;
       
    75 
       
    76     --ca)
       
    77 	echo ""
       
    78 	;;
       
    79 
       
    80     --cc)
       
    81 	echo "${CC}"
       
    82 	;;
       
    83 
       
    84     --prefix)
       
    85 	echo "$prefix"
       
    86 	;;
       
    87 
       
    88     --feature|--features)
       
    89         for feature in SSL IPv6 libz IDN NTLM ""; do
       
    90             test -n "$feature" && echo "$feature"
       
    91         done
       
    92 	;;
       
    93 
       
    94     --protocols)
       
    95         for protocol in DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP POP3 POP3S RTSP SMTP SMTPS TELNET TFTP; do
       
    96             echo "$protocol"
       
    97         done
       
    98 	;;
       
    99 
       
   100     --version)
       
   101 	echo libcurl 7.21.2
       
   102 	exit 0
       
   103 	;;
       
   104 
       
   105     --checkfor)
       
   106         checkfor=$2
       
   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`
       
   112         checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
       
   113         numuppercase=`echo 071502 | tr 'a-f' 'A-F'`
       
   114         nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
       
   115 
       
   116 	if test "$nownum" -ge "$checknum"; then
       
   117 	  # silent success
       
   118 	  exit 0
       
   119 	else
       
   120 	  echo "requested version $checkfor is newer than existing 7.21.2"
       
   121 	  exit 1
       
   122 	fi
       
   123 	;;
       
   124 
       
   125     --vernum)
       
   126 	echo 071502
       
   127 	exit 0
       
   128 	;;
       
   129 
       
   130     --help)
       
   131 	usage 0
       
   132 	;;
       
   133 
       
   134     --cflags)
       
   135 	echo "-I${prefix}/include/curl"
       
   136        	;;
       
   137 
       
   138     --libs)
       
   139 	CURLLIBDIR="-L/usr/lib/MACH64 "
       
   140 	echo ${CURLLIBDIR} -R/usr/lib/MACH64 -lcurl -lgss -lidn -lssl -lcrypto -lsldap -lldap -lgss -lssl -lcrypto -lsocket -lnsl -lc -lz 
       
   141 	;;
       
   142 
       
   143     --static-libs)
       
   144 	echo "Static libcurl 7.21.2 is not available."
       
   145 	;;
       
   146 
       
   147     --configure)
       
   148       echo " '--prefix=/usr' '--bindir=/usr/bin/MACH64' '--sbindir=/usr/sbin/MACH64' '--libdir=/usr/lib/MACH64' '--libexecdir=/usr/libexec/MACH64' '--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' '--with-lber-lib=sldap' '--with-gssapi-includes=/usr/include/gssapi' '--with-gssapi-libs=/usr/lib/MACH64' '--with-gssapi=/usr' '--with-ca-bundle=/etc/certs/CA' '--with-zlib=/usr' '--with-libidn=/usr' '--with-pic' 'curl_disallow_getifaddrs=yes'"
       
   149     ;;
       
   150 
       
   151     *)
       
   152         echo "unknown option: $1"
       
   153 	usage 1
       
   154 	;;
       
   155     esac
       
   156     shift
       
   157 done
       
   158 
       
   159 exit 0