2024-01-17 18:32:44 +08:00
|
|
|
---
|
2024-02-28 18:28:10 +08:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2024-01-17 18:32:44 +08:00
|
|
|
SPDX-License-Identifier: curl
|
|
|
|
Title: curl-config
|
|
|
|
Section: 1
|
|
|
|
Source: curl-config
|
|
|
|
See-also:
|
|
|
|
- curl (1)
|
|
|
|
---
|
|
|
|
|
|
|
|
# NAME
|
|
|
|
|
|
|
|
curl-config - Get information about a libcurl installation
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
**curl-config [options]**
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
**curl-config**
|
2008-12-22 21:07:13 +08:00
|
|
|
displays information about the curl and libcurl installation.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
## --ca
|
|
|
|
|
2002-10-08 21:30:15 +08:00
|
|
|
Displays the built-in path to the CA cert bundle this libcurl uses.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --cc
|
|
|
|
|
2002-01-21 22:57:07 +08:00
|
|
|
Displays the compiler used to build libcurl.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --cflags
|
|
|
|
|
2001-08-16 21:11:29 +08:00
|
|
|
Set of compiler options (CFLAGS) to use when compiling files that use
|
2008-12-22 21:07:13 +08:00
|
|
|
libcurl. Currently that is only the include path to the curl include files.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --checkfor [version]
|
|
|
|
|
2024-02-27 14:48:10 +08:00
|
|
|
Specify the oldest possible libcurl version string you want, and this script
|
|
|
|
returns 0 if the current installation is new enough or it returns 1 and
|
|
|
|
outputs a text saying that the current version is not new enough. (Added in
|
|
|
|
7.15.4)
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --configure
|
|
|
|
|
2009-11-15 03:23:26 +08:00
|
|
|
Displays the arguments given to configure when building curl.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --feature
|
|
|
|
|
2001-04-18 21:16:34 +08:00
|
|
|
Lists what particular main features the installed libcurl was built with. At
|
|
|
|
the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume
|
2024-02-27 14:48:10 +08:00
|
|
|
any particular order. The keywords are separated by newlines. There may be
|
2008-12-22 21:07:13 +08:00
|
|
|
none, one, or several keywords in the list.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --help
|
|
|
|
|
2001-04-18 21:16:34 +08:00
|
|
|
Displays the available options.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --libs
|
|
|
|
|
2024-02-27 14:48:10 +08:00
|
|
|
Shows the complete set of libs and other linker options you need in order to
|
|
|
|
link your application with libcurl.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --prefix
|
|
|
|
|
2001-04-18 21:16:34 +08:00
|
|
|
This is the prefix used when libcurl was installed. Libcurl is then installed
|
2001-04-19 19:19:54 +08:00
|
|
|
in $prefix/lib and its header files are installed in $prefix/include and so
|
2001-04-18 21:16:34 +08:00
|
|
|
on. The prefix is set with "configure --prefix".
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --protocols
|
|
|
|
|
2004-12-24 17:02:23 +08:00
|
|
|
Lists what particular protocols the installed libcurl was built to support. At
|
2006-01-17 06:14:37 +08:00
|
|
|
the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE,
|
2022-09-09 21:11:13 +08:00
|
|
|
TELNET, LDAP, DICT and many more. Do not assume any particular order. The
|
2024-02-27 14:48:10 +08:00
|
|
|
protocols are listed using uppercase and are separated by newlines. There may
|
|
|
|
be none, one, or several protocols in the list. (Added in 7.13.0)
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --ssl-backends
|
|
|
|
|
2017-11-30 15:57:36 +08:00
|
|
|
Lists the SSL backends that were enabled when libcurl was built. It might be
|
2024-02-27 14:48:10 +08:00
|
|
|
no, one or several names. If more than one name, they appear comma-separated.
|
|
|
|
(Added in 7.58.0)
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --static-libs
|
|
|
|
|
2024-02-27 14:48:10 +08:00
|
|
|
Shows the complete set of libs and other linker options you need in order to
|
|
|
|
link your application with libcurl statically. (Added in 7.17.1)
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --version
|
|
|
|
|
2001-04-18 21:16:34 +08:00
|
|
|
Outputs version information about the installed libcurl.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## --vernum
|
|
|
|
|
2001-05-28 22:58:07 +08:00
|
|
|
Outputs version information about the installed libcurl, in numerical mode.
|
2024-01-23 22:12:09 +08:00
|
|
|
This shows the version number, in hexadecimal, using 8 bits for each part:
|
|
|
|
major, minor, and patch numbers. This makes libcurl 7.7.4 appear as 070704 and
|
|
|
|
libcurl 12.13.14 appear as 0c0d0e... Note that the initial zero might be
|
2005-10-28 20:59:37 +08:00
|
|
|
omitted. (This option was broken in the 7.15.0 release.)
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
# EXAMPLES
|
|
|
|
|
2001-08-16 21:11:29 +08:00
|
|
|
What linker options do I need when I link with libcurl?
|
2024-01-17 18:32:44 +08:00
|
|
|
~~~
|
2002-01-21 22:57:07 +08:00
|
|
|
$ curl-config --libs
|
2024-01-17 18:32:44 +08:00
|
|
|
~~~
|
2001-08-16 21:11:29 +08:00
|
|
|
What compiler options do I need when I compile using libcurl functions?
|
2024-01-17 18:32:44 +08:00
|
|
|
~~~
|
2002-01-21 22:57:07 +08:00
|
|
|
$ curl-config --cflags
|
2024-01-17 18:32:44 +08:00
|
|
|
~~~
|
2001-04-20 22:45:15 +08:00
|
|
|
How do I know if libcurl was built with SSL support?
|
2024-01-17 18:32:44 +08:00
|
|
|
~~~
|
2002-01-21 22:57:07 +08:00
|
|
|
$ curl-config --feature | grep SSL
|
2024-01-17 18:32:44 +08:00
|
|
|
~~~
|
2001-04-20 22:45:15 +08:00
|
|
|
What's the installed libcurl version?
|
2024-01-17 18:32:44 +08:00
|
|
|
~~~
|
2002-01-21 22:57:07 +08:00
|
|
|
$ curl-config --version
|
2024-01-17 18:32:44 +08:00
|
|
|
~~~
|
2002-01-21 22:57:07 +08:00
|
|
|
How do I build a single file with a one-line command?
|
2024-01-17 18:32:44 +08:00
|
|
|
~~~
|
|
|
|
$ `curl-config --cc --cflags` -o example source.c `curl-config --libs`
|
|
|
|
~~~
|