Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 134 lines (116 sloc) 2.536 kb
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
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$
7 #
8 prefix=@prefix@
9 exec_prefix=@exec_prefix@
10 includedir=@includedir@
11
12 usage()
13 {
14 cat <<EOF
15 Usage: curl-config [OPTION]
16
1ee7f92 @bagder configure sets variables that curl-config uses to display what features
authored
17 Available values for OPTION include:
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
18
98e1605 @bagder --ca shows ca bundle path
authored
19 --ca ca bundle install path
6e9d161 @bagder added support for --cc to output the compiler name. This makes it possib...
authored
20 --cc compiler
1ee7f92 @bagder configure sets variables that curl-config uses to display what features
authored
21 --cflags pre-processor and compiler flags
22 --feature newline separated list of enabled features
23 --help display this help and exit
24 --libs library linking information
25 --prefix curl install prefix
26 --version output version information
2688673 Add documentation for the --vernum attribute
Sterling Hughes authored
27 --vernum output the version information as a number (hexadecimal)
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
28 EOF
29
30 exit $1
31 }
32
33 if test $# -eq 0; then
34 usage 1
35 fi
36
37 while test $# -gt 0; do
38 case "$1" in
28a9108 @bagder more intial fixes
authored
39 # this deals with options in the style
40 # --option=value and extracts the value part
41 # [not currently used]
42 -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
43 *) value= ;;
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
44 esac
45
46 case "$1" in
98e1605 @bagder --ca shows ca bundle path
authored
47 --ca)
df3ca59 @bagder Dan Fandrich:
authored
48 echo "@CURL_CA_BUNDLE@"
98e1605 @bagder --ca shows ca bundle path
authored
49 ;;
50
6e9d161 @bagder added support for --cc to output the compiler name. This makes it possib...
authored
51 --cc)
df3ca59 @bagder Dan Fandrich:
authored
52 echo "@CC@"
6e9d161 @bagder added support for --cc to output the compiler name. This makes it possib...
authored
53 ;;
54
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
55 --prefix)
df3ca59 @bagder Dan Fandrich:
authored
56 echo "$prefix"
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
57 ;;
58
1ee7f92 @bagder configure sets variables that curl-config uses to display what features
authored
59 --feature)
df3ca59 @bagder Dan Fandrich:
authored
60 if test "@USE_SSLEAY@" = "1"; then
1ee7f92 @bagder configure sets variables that curl-config uses to display what features
authored
61 echo "SSL"
62 fi
63 if test "@KRB4_ENABLED@" = "1"; then
64 echo "KRB4"
65 fi
66 if test "@IPV6_ENABLED@" = "1"; then
67 echo "IPv6"
68 fi
f8e0b18 @bagder AC_SUBST HAVE_LIBZ for curl-config.in
authored
69 if test "@HAVE_LIBZ@" = "1"; then
70 echo "libz"
71 fi
fd3881e @bagder added --disable-[protocol] support
authored
72 if test "@CURL_DISABLE_HTTP@" = "1"; then
73 echo "HTTP-disabled"
74 fi
75 if test "@CURL_DISABLE_FTP@" = "1"; then
76 echo "FTP-disabled"
77 fi
78 if test "@CURL_DISABLE_GOPHER@" = "1"; then
79 echo "GOPHER-disabled"
80 fi
81 if test "@CURL_DISABLE_FILE@" = "1"; then
82 echo "FILE-disabled"
83 fi
84 if test "@CURL_DISABLE_TELNET@" = "1"; then
85 echo "TELNET-disabled"
86 fi
87 if test "@CURL_DISABLE_LDAP@" = "1"; then
88 echo "LDAP-disabled"
89 fi
90 if test "@CURL_DISABLE_DICT@" = "1"; then
91 echo "DICT-disabled"
92 fi
437afe0 @bagder curl-config now shows asyncdns if built with ares enabled
authored
93 if test "@HAVE_ARES@" = "1"; then
94 echo "AsynchDNS"
95 fi
1ee7f92 @bagder configure sets variables that curl-config uses to display what features
authored
96 ;;
97
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
98 --version)
cc7fc20 @bagder libcurl version, not curl version
authored
99 echo libcurl @VERSION@
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
100 exit 0
101 ;;
102
1e5e0f9 @bagder added 'curl-config --vernum' for hardcore hex version output
authored
103 --vernum)
104 echo @VERSIONNUM@
105 exit 0
106 ;;
107
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
108 --help)
109 usage 0
110 ;;
111
112 --cflags)
b0fbb98 @bagder Markus Oberhumer fixed the -cflags option
authored
113 if test "X@includedir@" = "X/usr/include"; then
114 echo ""
115 else
116 echo "-I@includedir@"
117 fi
d9e54a3 @bagder Added --include to set the compiler include flag for libcurl
authored
118 ;;
119
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
120 --libs)
32eaf9e @bagder Added -lcurl for --libs so that single option should now suffice to use
authored
121 echo -L@libdir@ -lcurl @LDFLAGS@ @LIBS@
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
122 ;;
123
124 *)
861ca06 @bagder removed --include again and stuffed the libcurl's include path in --cfla...
authored
125 echo "unknown option: $1"
fb1ce5f @bagder tiny tool for outputting curl config variables
authored
126 usage
127 exit 1
128 ;;
129 esac
130 shift
131 done
132
133 exit 0
Something went wrong with that request. Please try again.