xref: /curl/docs/curl-config.md (revision 8d67c61c)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: curl-config
5Section: 1
6Source: curl-config
7See-also:
8  - curl (1)
9---
10
11# NAME
12
13curl-config - Get information about a libcurl installation
14
15# SYNOPSIS
16
17**curl-config [options]**
18
19# DESCRIPTION
20
21**curl-config**
22displays information about the curl and libcurl installation.
23
24# OPTIONS
25
26## --ca
27
28Displays the built-in path to the CA cert bundle this libcurl uses.
29
30## --cc
31
32Displays the compiler used to build libcurl.
33
34## --cflags
35
36Set of compiler options (CFLAGS) to use when compiling files that use
37libcurl. Currently that is only the include path to the curl include files.
38
39## --checkfor [version]
40
41Specify the oldest possible libcurl version string you want, and this script
42returns 0 if the current installation is new enough or it returns 1 and
43outputs a text saying that the current version is not new enough. (Added in
447.15.4)
45
46## --configure
47
48Displays the arguments given to configure when building curl.
49
50## --feature
51
52Lists what particular main features the installed libcurl was built with. At
53the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume
54any particular order. The keywords are separated by newlines. There may be
55none, one, or several keywords in the list.
56
57## --help
58
59Displays the available options.
60
61## --libs
62
63Shows the complete set of libs and other linker options you need in order to
64link your application with libcurl.
65
66## --prefix
67
68This is the prefix used when libcurl was installed. Libcurl is then installed
69in $prefix/lib and its header files are installed in $prefix/include and so
70on. The prefix is set with "configure --prefix".
71
72## --protocols
73
74Lists what particular protocols the installed libcurl was built to support. At
75the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE,
76TELNET, LDAP, DICT and many more. Do not assume any particular order. The
77protocols are listed using uppercase and are separated by newlines. There may
78be none, one, or several protocols in the list. (Added in 7.13.0)
79
80## --ssl-backends
81
82Lists the SSL backends that were enabled when libcurl was built. It might be
83no, one or several names. If more than one name, they appear comma-separated.
84(Added in 7.58.0)
85
86## --static-libs
87
88Shows the complete set of libs and other linker options you need in order to
89link your application with libcurl statically. (Added in 7.17.1)
90
91## --version
92
93Outputs version information about the installed libcurl.
94
95## --vernum
96
97Outputs version information about the installed libcurl, in numerical mode.
98This shows the version number, in hexadecimal, using 8 bits for each part:
99major, minor, and patch numbers. This makes libcurl 7.7.4 appear as 070704 and
100libcurl 12.13.14 appear as 0c0d0e... Note that the initial zero might be
101omitted. (This option was broken in the 7.15.0 release.)
102
103# EXAMPLES
104
105What linker options do I need when I link with libcurl?
106~~~
107  $ curl-config --libs
108~~~
109What compiler options do I need when I compile using libcurl functions?
110~~~
111  $ curl-config --cflags
112~~~
113How do I know if libcurl was built with SSL support?
114~~~
115  $ curl-config --feature | grep SSL
116~~~
117What's the installed libcurl version?
118~~~
119  $ curl-config --version
120~~~
121How do I build a single file with a one-line command?
122~~~
123  $ `curl-config --cc --cflags` -o example source.c `curl-config --libs`
124~~~
125