usr/src/lib/curl/Solaris/curl-config
changeset 54 c8df60226931
parent 46 9c200dad5ecc
equal deleted inserted replaced
53:9e14a282afba 54:c8df60226931
    17 # furnished to do so, under the terms of the COPYING file.
    17 # furnished to do so, under the terms of the COPYING file.
    18 #
    18 #
    19 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
    19 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
    20 # KIND, either express or implied.
    20 # KIND, either express or implied.
    21 #
    21 #
    22 # $Id: curl-config.in,v 1.25 2006-05-02 22:48:22 bagder Exp $
    22 # Modified to conform to Solaris standards.
       
    23 #
       
    24 # ident	"@(#)curl-config	1.8	10/10/18 SMI"
       
    25 #
    23 ###########################################################################
    26 ###########################################################################
    24 #
    27 
    25 # The idea to this kind of setup info script was stolen from numerous
       
    26 # other packages, such as neon, libxml and gnome.
       
    27 #
       
    28 # Modified to conform to Solaris installation paths conventions.
       
    29 #
       
    30 # ident	"@(#)curl-config	1.7	10/08/18 SMI"
       
    31 #
       
    32 prefix=/usr
    28 prefix=/usr
    33 exec_prefix=${prefix}
    29 exec_prefix=${prefix}
    34 includedir=${prefix}/include/curl
    30 includedir=${prefix}/include
    35 
    31 
    36 usage()
    32 usage()
    37 {
    33 {
    38     cat <<EOF
    34     cat <<EOF
    39 Usage: curl-config [OPTION]
    35 Usage: curl-config [OPTION]
    40 
    36 
    41 Available values for OPTION include:
    37 Available values for OPTION include:
    42 
    38 
       
    39   --built-shared says 'yes' if libcurl was built shared
    43   --ca        ca bundle install path
    40   --ca        ca bundle install path
    44   --cc        compiler
    41   --cc        compiler
    45   --cflags    pre-processor and compiler flags
    42   --cflags    pre-processor and compiler flags
    46   --checkfor [version] check for (lib)curl of the specified version
    43   --checkfor [version] check for (lib)curl of the specified version
       
    44   --configure the arguments given to configure when building curl
    47   --features  newline separated list of enabled features
    45   --features  newline separated list of enabled features
    48   --protocols newline separated list of enabled protocols
       
    49   --help      display this help and exit
    46   --help      display this help and exit
    50   --libs      library linking information
    47   --libs      library linking information
    51   --prefix    curl install prefix
    48   --prefix    curl install prefix
       
    49   --protocols newline separated list of enabled protocols
       
    50   --static-libs static libcurl library linking information
    52   --version   output version information
    51   --version   output version information
    53   --vernum    output the version information as a number (hexadecimal)
    52   --vernum    output the version information as a number (hexadecimal)
    54 EOF
    53 EOF
    55 
    54 
    56     exit $1
    55     exit $1
    68     -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    67     -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    69     *) value= ;;
    68     *) value= ;;
    70     esac
    69     esac
    71 
    70 
    72     case "$1" in
    71     case "$1" in
       
    72     --built-shared)
       
    73         echo yes
       
    74         ;;
       
    75 
    73     --ca)
    76     --ca)
    74 	echo ""/etc/curl/curlCA""
    77 	echo ""/etc/curl/curlCA""
    75 	;;
    78 	;;
    76 
    79 
    77     --cc)
    80     --cc)
    78 	echo "/ws/onnv-tools/SUNWspro/SS12/bin/cc"
    81 	echo "${CC}"
    79 	;;
    82 	;;
    80 
    83 
    81     --prefix)
    84     --prefix)
    82 	echo "$prefix"
    85 	echo "$prefix"
    83 	;;
    86 	;;
    84 
    87 
    85     --feature|--features)
    88     --feature|--features)
    86 	for feature in SSL IPv6 libz IDN NTLM "" ; do
    89         for feature in SSL IPv6 libz IDN NTLM ""; do
    87 	    test -n "$feature" && echo "$feature"
    90             test -n "$feature" && echo "$feature"
    88 	done
    91         done
    89 	;;
    92 	;;
    90 
    93 
    91     --protocols)
    94     --protocols)
    92 	for protocol in DICT FILE FTP FTPS HTTP HTTPS IMAP IMAPS LDAP POP3 POP3S RTSP SMTP SMTPS TELNET TFTP ; do
    95         for protocol in DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP POP3 POP3S RTSP SMTP SMTPS TELNET TFTP; do
    93 	    echo "$protocol"
    96             echo "$protocol"
    94 	done
    97         done
    95 	;;
    98 	;;
       
    99 
    96     --version)
   100     --version)
    97 	echo libcurl 7.21.1
   101 	echo libcurl 7.21.2
    98 	exit 0
   102 	exit 0
    99 	;;
   103 	;;
   100 
   104 
   101     --checkfor)
   105     --checkfor)
   102         checkfor=$2
   106         checkfor=$2
   104         cminor=`echo $checkfor | cut -d. -f2`
   108         cminor=`echo $checkfor | cut -d. -f2`
   105         # when extracting the patch part we strip off everything after a
   109         # when extracting the patch part we strip off everything after a
   106 	# dash as that's used for things like version 1.2.3-CVS
   110 	# dash as that's used for things like version 1.2.3-CVS
   107 	cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
   111 	cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
   108         checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
   112         checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
   109         numuppercase=`echo 071401 | tr 'a-f' 'A-F'`
   113         numuppercase=`echo 071502 | tr 'a-f' 'A-F'`
   110         nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
   114         nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
   111 
   115 
   112 	if test "$nownum" -ge "$checknum"; then
   116 	if test "$nownum" -ge "$checknum"; then
   113 	  # silent success
   117 	  # silent success
   114 	  exit 0
   118 	  exit 0
   115 	else
   119 	else
   116 	  echo "requested version $checkfor is newer than existing 7.21.1"
   120 	  echo "requested version $checkfor is newer than existing 7.21.2"
   117 	  exit 1
   121 	  exit 1
   118 	fi
   122 	fi
   119 	;;
   123 	;;
   120 
   124 
   121     --vernum)
   125     --vernum)
   122 	echo 071501
   126 	echo 071502
   123 	exit 0
   127 	exit 0
   124 	;;
   128 	;;
   125 
   129 
   126     --help)
   130     --help)
   127 	usage 0
   131 	usage 0
   128 	;;
   132 	;;
   129 
   133 
   130     --cflags)
   134     --cflags)
   131         echo "-I${prefix}/include/curl"
   135        	if test "X${prefix}/include" = "X/usr/include"; then
       
   136           echo ""
       
   137         else
       
   138           echo "-I${prefix}/include"
       
   139         fi
   132        	;;
   140        	;;
   133 
   141 
   134     --libs)
   142     --libs)
   135        	echo -L/usr/lib -lc -lcurl -lgss -lidn -lsldap -lldap -lsocket -lnsl -lz -lssl -lcrypto
   143 	CURLLIBDIR="-L/usr/lib "
   136        	;;
   144 	echo ${CURLLIBDIR} -R/usr/lib -lcurl -lgss -lidn -lssl -lcrypto -lsldap -lldap -lgss -lssl -lcrypto -lsocket -lnsl -lc -lz 
       
   145 	;;
       
   146 
       
   147     --static-libs)
       
   148 	echo "Static libcurl 7.21.2 is not available."
       
   149 	;;
       
   150 
       
   151     --configure)
       
   152       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' '--with-lber-lib=sldap' '--with-gssapi-includes=/usr/include/gssapi' '--with-gssapi-libs=/usr/lib' '--with-gssapi=/usr' '--with-ca-bundle=/etc/curl/curlCA' '--with-zlib=/usr' '--with-libidn=/usr' '--with-pic' 'curl_disallow_getifaddrs=yes'"
       
   153     ;;
   137 
   154 
   138     *)
   155     *)
   139         echo "unknown option: $1"
   156         echo "unknown option: $1"
   140 	usage 1
   157 	usage 1
   141 	;;
   158 	;;
   142     esac
   159     esac
   143     shift
   160     shift
   144 done
   161 done
   145 
   162 
   146 exit 0
   163 exit 0
   147