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