]> The Tcpdump Group git mirrors - libpcap/blob - pcap-config.1
ATM: Simplify protocol and message type handling.
[libpcap] / pcap-config.1
1 .\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997
2 .\" The Regents of the University of California. All rights reserved.
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that: (1) source code distributions
7 .\" retain the above copyright notice and this paragraph in its entirety, (2)
8 .\" distributions including binary code include the above copyright notice and
9 .\" this paragraph in its entirety in the documentation or other materials
10 .\" provided with the distribution, and (3) all advertising materials mentioning
11 .\" features or use of this software display the following acknowledgement:
12 .\" ``This product includes software developed by the University of California,
13 .\" Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 .\" the University nor the names of its contributors may be used to endorse
15 .\" or promote products derived from this software without specific prior
16 .\" written permission.
17 .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 .\"
21 .TH PCAP\-CONFIG 1 "22 December 2024"
22 .SH NAME
23 pcap-config \- write libpcap compiler and linker flags to standard output
24 .SH SYNOPSIS
25 .na
26 .B pcap-config
27 [
28 .B \-\-help
29 ]
30 [
31 .B \-\-version
32 ]
33 [
34 .B \-\-cflags
35 ]
36 .ti +12
37 [
38 .B \-\-libs
39 |
40 .B \-\-additional\-libs
41 ]
42 .ti +12
43 [
44 .B \-\-static
45 |
46 .B \-\-static\-pcap\-only
47 ]
48 .ad
49
50 .SH DESCRIPTION
51 .LP
52 .I pcap\-config
53 writes to the standard output various compiler and linker flags required to
54 build a user program with libpcap. By default, it writes flags appropriate
55 for building with a dynamically\-linked version of libpcap; see below
56 for static linking. Depending on the manner of libpcap installation, some
57 options or their combinations may produce empty output \- this is by design.
58
59 .SH OPTIONS
60 .TP
61 .B \-\-help
62 Produce a help message and exit.
63
64 .TP
65 .B \-\-version
66 Produce libpcap version and exit. The version is the contents of
67 .I VERSION
68 file in libpcap source tree rather than the result of
69 .BR \%pcap_lib_version (3PCAP).
70
71 .TP
72 .B \-\-cflags
73 Produce the
74 .B \-I
75 compiler flag required to include libpcap's header files.
76
77 .TP
78 .B \-\-libs
79 Produce the
80 .B \-L
81 and
82 .B \-l
83 linker flags required to link with libpcap, including
84 .B \-l
85 flags for libraries required by libpcap.
86
87 .TP
88 .B \-\-additional\-libs
89 Produce the
90 .B \-L
91 and
92 .B \-l
93 linker flags for libraries required by libpcap, but not the
94 .B \-l
95 flag to link with libpcap itself.
96
97 .TP
98 .B \-\-static
99 This option causes
100 .B \-\-libs
101 and
102 .B \-\-additional\-libs
103 to produce linker flags appropriate for static linking with libpcap.
104
105 .TP
106 .B \-\-static\-pcap\-only
107 This option causes
108 .B \-\-libs
109 and
110 .B \-\-additional\-libs
111 to produce linker flags appropriate for static linking with libpcap and
112 dynamic linking with all other libraries, including libraries required by
113 libpcap.
114
115 .SH EXIT STATUS
116 .I pcap\-config
117 exits with a non-zero status when invoked with an invalid command\-line
118 option, and with status 0 otherwise.
119
120 .SH BACKWARD COMPATIBILITY
121 .PP
122 The
123 .B \-\-version
124 flag became available in libpcap release 1.10.3.
125 .PP
126 Before libpcap release 1.10.2
127 .I pcap\-config
128 did not treat invalid command\-line options as an error. The
129 .B \-\-static\-pcap\-only
130 flag became available in libpcap release 1.10.2.
131 .PP
132 The
133 .B \-\-static
134 flag became available in libpcap release 1.1.0.
135
136 .SH SEE ALSO
137 .BR pkg\-config (1),
138 .BR pcap (3PCAP)