]>
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.
8 exec_prefix
="@exec_prefix@"
9 includedir
="@includedir@"
11 V_RPATH_OPT
="@V_RPATH_OPT@"
34 show_additional_libs
=1
39 if [ "$V_RPATH_OPT" != "" ]
42 # If libdir isn't /usr/lib, add it to the run-time linker path.
44 if [ "$libdir" != "/usr/lib" ]
46 RPATH
=$V_RPATH_OPT$libdir
52 # Include LIBS so that the flags include libraries containing
53 # routines that libpcap uses.
55 if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
57 echo "-I$includedir -L$libdir -lpcap $LIBS"
58 elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
60 echo "-I$includedir -L$libdir $LIBS"
61 elif [ "$show_cflags" = 1 ]
64 elif [ "$show_libs" = 1 ]
66 echo "-L$libdir -lpcap $LIBS"
67 elif [ "$show_additional_libs" = 1 ]
73 # Omit LIBS - libpcap is assumed to be linked with those
74 # libraries, so there's no need to do so explicitly.
76 if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
78 echo "-I$includedir -L$libdir $RPATH -lpcap"
79 elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
82 elif [ "$show_cflags" = 1 ]
85 elif [ "$show_libs" = 1 ]
87 echo "-L$libdir $RPATH -lpcap"