]>
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
44 if [ "$V_RPATH_OPT" != "" ]
47 # If libdir isn't /usr/lib, add it to the run-time linker path.
49 if [ "$libdir" != "/usr/lib" ]
51 RPATH
=$V_RPATH_OPT$libdir
57 # Include LIBS so that the flags include libraries containing
58 # routines that libpcap uses.
60 if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
62 echo "-I$includedir -L$libdir -lpcap $LIBS"
63 elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
65 echo "-I$includedir -L$libdir $LIBS"
66 elif [ "$show_cflags" = 1 ]
69 elif [ "$show_libs" = 1 ]
71 echo "-L$libdir -lpcap $LIBS"
72 elif [ "$show_additional_libs" = 1 ]
78 # Omit LIBS - libpcap is assumed to be linked with those
79 # libraries, so there's no need to do so explicitly.
81 if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
83 echo "-I$includedir -L$libdir $RPATH -l$PACKAGE_NAME"
84 elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
87 elif [ "$show_cflags" = 1 ]
90 elif [ "$show_libs" = 1 ]
92 echo "-L$libdir $RPATH -l$PACKAGE_NAME"