]>
The Tcpdump Group git mirrors - libpcap/blob - pcap-config.in
4 # Script to give the appropriate compiler flags and linker flags
5 # to use when building code that uses libpcap.
7 # These variables come from the configure script, so includedir and
8 # libdir may be defined in terms of prefix and exec_prefix, so the
9 # latter must be defined as well.
12 exec_prefix
="@exec_prefix@"
13 includedir
="@includedir@"
15 V_RPATH_OPT
="@V_RPATH_OPT@"
17 PACKAGE_NAME
="@PACKAGE_NAME@"
39 show_additional_libs
=1
45 # If libdir isn't /usr/lib, add it to the link-time linker path.
47 if [ "$libdir" != "/usr/lib" ]
51 if [ "$V_RPATH_OPT" != "" ]
54 # If libdir isn't /usr/lib, add it to the run-time linker path.
56 if [ "$libdir" != "/usr/lib" ]
58 RPATH
=$V_RPATH_OPT$libdir
64 # Include LIBS so that the flags include libraries containing
65 # routines that libpcap uses.
67 if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
69 echo "-I$includedir $LPATH -lpcap $LIBS"
70 elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
72 echo "-I$includedir $LPATH $LIBS"
73 elif [ "$show_cflags" = 1 ]
76 elif [ "$show_libs" = 1 ]
78 echo "$LPATH -lpcap $LIBS"
79 elif [ "$show_additional_libs" = 1 ]
85 # Omit LIBS - libpcap is assumed to be linked with those
86 # libraries, so there's no need to do so explicitly.
88 if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
90 echo "-I$includedir $LPATH $RPATH -l$PACKAGE_NAME"
91 elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
94 elif [ "$show_cflags" = 1 ]
97 elif [ "$show_libs" = 1 ]
99 echo "$LPATH $RPATH -l$PACKAGE_NAME"