aboutsummaryrefslogtreecommitdiff
path: root/pcap-config.in
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-10-03 00:16:44 -0700
committerGuy Harris <guy@alum.mit.edu>2017-10-03 00:16:44 -0700
commitc2e151358d7bc7c77dddb4ca00770034872cd081 (patch)
treec510e6c7794691b16333d6f837a13655d3baffac /pcap-config.in
parent14a09752363be415b299cc113895d297ef65a342 (diff)
Don't wire the library name into pcap-config.
With autotools, set the package name with AC_INIT(), which now takes the package name and version as arguments, rather than the name of a file in the source directory. That sets PACKAGE_NAME. With CMake, set PACKAGE_NAME to ${LIBRARY_NAME}. In pcap-config.in, use "-l@PACKAGE_NAME@", rather than -lpcap, as the library name. That means that pcap-config will use -lwpcap, rather than -lpcap, on Windows, where the library's name is wpcap rather than just pcap.
Diffstat (limited to 'pcap-config.in')
-rw-r--r--pcap-config.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/pcap-config.in b/pcap-config.in
index 145851bf..54ca42f0 100644
--- a/pcap-config.in
+++ b/pcap-config.in
@@ -14,6 +14,7 @@ includedir="@includedir@"
libdir="@libdir@"
V_RPATH_OPT="@V_RPATH_OPT@"
LIBS="@LIBS@"
+PACKAGE_NAME="@PACKAGE_NAME@"
static=0
show_cflags=0
@@ -79,7 +80,7 @@ else
#
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
then
- echo "-I$includedir -L$libdir $RPATH -lpcap"
+ echo "-I$includedir -L$libdir $RPATH -l$PACKAGE_NAME"
elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
then
echo "-I$includedir"
@@ -88,6 +89,6 @@ else
echo "-I$includedir"
elif [ "$show_libs" = 1 ]
then
- echo "-L$libdir $RPATH -lpcap"
+ echo "-L$libdir $RPATH -l$PACKAGE_NAME"
fi
fi