first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / production / 3rdparty / curl / bin / curl-config
1 #! /bin/sh
2 #
3 # The idea to this kind of setup info script was stolen from numerous
4 # other packages, such as neon, libxml and gnome.
5 #
6 # $Id: curl-config,v 1.1 2006/07/09 22:41:13 fred_t_hamster Exp $
7 #
8 prefix=/usr/local
9 exec_prefix=${prefix}
10 includedir=${prefix}/include
11
12 usage()
13 {
14     cat <<EOF
15 Usage: curl-config [OPTION]
16
17 Available values for OPTION include:
18
19   --ca        ca bundle install path
20   --cc        compiler
21   --cflags    pre-processor and compiler flags
22   --features  newline separated list of enabled features
23   --protocols newline separated list of enabled protocols
24   --help      display this help and exit
25   --libs      library linking information
26   --prefix    curl install prefix
27   --version   output version information
28   --vernum    output the version information as a number (hexadecimal)
29 EOF
30
31     exit $1
32 }
33
34 if test $# -eq 0; then
35     usage 1
36 fi
37
38 while test $# -gt 0; do
39     case "$1" in
40     # this deals with options in the style
41     # --option=value and extracts the value part
42     # [not currently used]
43     -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
44     *) value= ;;
45     esac
46
47     case "$1" in
48     --ca)
49         echo ""/usr/local/share/curl/curl-ca-bundle.crt""
50         ;;
51
52     --cc)
53         echo "i586-mingw32msvc-gcc"
54         ;;
55
56     --prefix)
57         echo "$prefix"
58         ;;
59
60     --feature|--features)
61         if test "1" = "1"; then
62           echo "SSL"
63           NTLM=1 # OpenSSL implies NTLM
64         elif test -n ""; then
65           echo "SSL"
66         fi
67         if test "" = "1"; then
68           echo "KRB4"
69         fi
70         if test "" = "1"; then
71           echo "IPv6"
72         fi
73         if test "1" = "1"; then
74           echo "libz"
75         fi
76         if test "" = "1"; then
77           echo "AsynchDNS"
78         fi
79         if test "" = "1"; then
80           echo "IDN"
81         fi
82         if test "" = "1"; then
83           echo "SSPI"
84           NTLM=1
85         fi
86         if test "$NTLM" = "1"; then
87           echo "NTLM"
88         fi
89         ;;
90
91     --protocols)
92         if test "" != "1"; then
93           echo "HTTP"
94           if test "1" = "1"; then
95             echo "HTTPS"
96           fi
97         fi
98         if test "" != "1"; then
99           echo "FTP"
100           if test "1" = "1"; then
101             echo "FTPS"
102           fi
103         fi
104         if test "" != "1"; then
105           echo "GOPHER"
106         fi
107         if test "" != "1"; then
108           echo "FILE"
109         fi
110         if test "" != "1"; then
111           echo "TELNET"
112         fi
113         if test "" != "1"; then
114           echo "LDAP"
115         fi
116         if test "" != "1"; then
117           echo "DICT"
118         fi
119         if test "" != "1"; then
120           echo "TFTP"
121         fi
122         ;;
123     --version)
124         echo libcurl 7.15.1
125         exit 0
126         ;;
127
128     --vernum)
129         echo 070f01
130         exit 0
131         ;;
132
133     --help)
134         usage 0
135         ;;
136
137     --cflags)
138         if test "X${prefix}/include" = "X/usr/include"; then
139           echo ""
140         else
141           echo "-I${prefix}/include"
142         fi
143         ;;
144
145     --libs)
146         echo -L${exec_prefix}/lib -lcurl -L/home/dast/src/win32 -lssl -lcrypto -lgdi32 -lwinmm -lws2_32  -lz -lws2_32
147         ;;
148
149     *)
150         echo "unknown option: $1"
151         usage 1
152         ;;
153     esac
154     shift
155 done
156
157 exit 0