dect
/
libpcap
Archived
1
0
Fork 0

Add a --additional-libs flag to pcap-config, to write out any additional

libraries needed to link with libpcap; this is to be used by tcpdump
when it's linking with ../libpcap/libpcap.a.
master
Guy Harris 14 years ago
parent 6cbbcee6b6
commit 4da1fd6159
  1. 15
      pcap-config.1
  2. 13
      pcap-config.in

@ -30,7 +30,7 @@ pcap-config \- write libpcap compiler and linker flags to standard output
.B \-\-static
]
[
.B \-\-cflags | \-\-libs
.B \-\-cflags | \-\-libs | \-\-additional-libs
]
.ad
.SH DESCRIPTION
@ -50,9 +50,20 @@ writes to the standard output the
.B \-L
and
.B \-l
linker required to link with libpcap, including
linker flags required to link with libpcap, including
.B \-l
flags for libraries required by libpcap.
When run with the
.B \-\-additional-libs
option,
.I pcap-config
writes to the standard output the
.B \-L
and
.B \-l
flags for libraries required by libpcap, but not the
.B \-lpcap
flag to link with libpcap itself.
.LP
By default, it writes flags appropriate for compiling with a
dynamically-linked version of libpcap; the

@ -22,6 +22,10 @@ do
--libs)
show_libs=1
;;
--additional-libs)
show_additional_libs=1
;;
esac
shift
done
@ -34,12 +38,18 @@ then
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
then
echo "-I @includedir@ -L @libdir@ -lpcap @DEPLIBS@"
elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
then
echo "-I @includedir@ -L @libdir@ @DEPLIBS@"
elif [ "$show_cflags" = 1 ]
then
echo "-I @includedir@"
elif [ "$show_libs" = 1 ]
then
echo "-L @libdir@ -lpcap @DEPLIBS@"
elif [ "$show_additional_libs" = 1 ]
then
echo "@DEPLIBS@"
fi
else
#
@ -49,6 +59,9 @@ else
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
then
echo "-I @includedir@ -L @libdir@ -lpcap"
elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
then
echo "-I @includedir@"
elif [ "$show_cflags" = 1 ]
then
echo "-I @includedir@"