NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXIT STATUS | BACKWARD COMPATIBILITY | SEE ALSO | COLOPHON |
|
|
PCAP-CONFIG(1) General Commands Manual PCAP-CONFIG(1)
pcap-config - write libpcap compiler and linker flags to standard output
pcap-config [ --help ] [ --version ] [ --cflags ] [ --libs | --additional-libs ] [ --static | --static-pcap-only ]
pcap-config writes to the standard output various compiler and linker flags required to build a user program with libpcap. By default, it writes flags appropriate for building with a dynamically-linked version of libpcap; see below for static linking. Depending on the manner of libpcap installation, some options or their combinations may produce empty output - this is by design.
--help Produce a help message and exit. --version Produce libpcap version and exit. The version is the contents of VERSION file in libpcap source tree rather than the result of pcap_lib_version(3PCAP). --cflags Produce the -I compiler flag required to include libpcap's header files. --libs Produce the -L and -l linker flags required to link with libpcap, including -l flags for libraries required by libpcap. --additional-libs Produce the -L and -l linker flags for libraries required by libpcap, but not the -l flag to link with libpcap itself. --static This option causes --libs and --additional-libs to produce linker flags appropriate for static linking with libpcap. --static-pcap-only This option causes --libs and --additional-libs to produce linker flags appropriate for static linking with libpcap and dynamic linking with all other libraries, including libraries required by libpcap.
pcap-config exits with a non-zero status when invoked with an invalid command-line option, and with status 0 otherwise.
The --version flag became available in libpcap release 1.10.3. Before libpcap release 1.10.2 pcap-config did not treat invalid command-line options as an error. The --static-pcap-only flag became available in libpcap release 1.10.2. The --static flag became available in libpcap release 1.1.0.
pkg-config(1), pcap(3PCAP)
This page is part of the libpcap (packet capture library) project.
Information about the project can be found at
⟨http://www.tcpdump.org/⟩. If you have a bug report for this
manual page, see ⟨http://www.tcpdump.org/#patches⟩. This page was
obtained from the project's upstream Git repository
⟨https://github.com/the-tcpdump-group/libpcap.git⟩ on 2025-08-11.
(At that time, the date of the most recent commit that was found
in the repository was 2025-08-10.) If you discover any rendering
problems in this HTML version of the page, or you believe there is
a better or more up-to-date source for the page, or you have
corrections or improvements to the information in this COLOPHON
(which is not part of the original manual page), send a mail to
man-pages@man7.org
22 December 2024 PCAP-CONFIG(1)
Pages that refer to this page: pcap_lib_version(3pcap)