pcap-config.in (214518) | pcap-config.in (235426) |
---|---|
1#! /bin/sh 2 3# 4# Script to give the appropriate compiler flags and linker flags 5# to use when building code that uses libpcap. 6# | 1#! /bin/sh 2 3# 4# Script to give the appropriate compiler flags and linker flags 5# to use when building code that uses libpcap. 6# |
7prefix="@prefix@" 8exec_prefix="@exec_prefix@" 9includedir="@includedir@" 10libdir="@libdir@" 11V_RPATH_OPT="@V_RPATH_OPT@" 12LIBS="@LIBS@" 13 |
|
7static=0 8show_cflags=0 9show_libs=0 10while [ "$#" != 0 ] 11do 12 case "$1" in 13 14 --static) --- 9 unchanged lines hidden (view full) --- 24 ;; 25 26 --additional-libs) 27 show_additional_libs=1 28 ;; 29 esac 30 shift 31done | 14static=0 15show_cflags=0 16show_libs=0 17while [ "$#" != 0 ] 18do 19 case "$1" in 20 21 --static) --- 9 unchanged lines hidden (view full) --- 31 ;; 32 33 --additional-libs) 34 show_additional_libs=1 35 ;; 36 esac 37 shift 38done |
32if [ "@V_RPATH_OPT@" != "" ] | 39if [ "$V_RPATH_OPT" != "" ] |
33then 34 # 35 # If libdir isn't /usr/lib, add it to the run-time linker path. 36 # | 40then 41 # 42 # If libdir isn't /usr/lib, add it to the run-time linker path. 43 # |
37 if [ "@libdir@" != "/usr/lib" ] | 44 if [ "$libdir" != "/usr/lib" ] |
38 then | 45 then |
39 RPATH=@V_RPATH_OPT@@libdir@ | 46 RPATH=$V_RPATH_OPT$libdir |
40 fi 41fi 42if [ "$static" = 1 ] 43then 44 # 45 # Include LIBS so that the flags include libraries containing 46 # routines that libpcap uses. 47 # 48 if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] 49 then | 47 fi 48fi 49if [ "$static" = 1 ] 50then 51 # 52 # Include LIBS so that the flags include libraries containing 53 # routines that libpcap uses. 54 # 55 if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] 56 then |
50 echo "-I@includedir@ -L@libdir@ -lpcap @LIBS@" | 57 echo "-I$includedir -L$libdir -lpcap $LIBS" |
51 elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] 52 then | 58 elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] 59 then |
53 echo "-I@includedir@ -L@libdir@ @LIBS@" | 60 echo "-I$includedir -L$libdir $LIBS" |
54 elif [ "$show_cflags" = 1 ] 55 then | 61 elif [ "$show_cflags" = 1 ] 62 then |
56 echo "-I@includedir@" | 63 echo "-I$includedir" |
57 elif [ "$show_libs" = 1 ] 58 then | 64 elif [ "$show_libs" = 1 ] 65 then |
59 echo "-L@libdir@ -lpcap @LIBS@" | 66 echo "-L$libdir -lpcap $LIBS" |
60 elif [ "$show_additional_libs" = 1 ] 61 then | 67 elif [ "$show_additional_libs" = 1 ] 68 then |
62 echo "@LIBS@" | 69 echo "$LIBS" |
63 fi 64else 65 # 66 # Omit LIBS - libpcap is assumed to be linked with those 67 # libraries, so there's no need to do so explicitly. 68 # 69 if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] 70 then | 70 fi 71else 72 # 73 # Omit LIBS - libpcap is assumed to be linked with those 74 # libraries, so there's no need to do so explicitly. 75 # 76 if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] 77 then |
71 echo "-I@includedir@ -L@libdir@ $RPATH -lpcap" | 78 echo "-I$includedir -L$libdir $RPATH -lpcap" |
72 elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] 73 then | 79 elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] 80 then |
74 echo "-I@includedir@" | 81 echo "-I$includedir" |
75 elif [ "$show_cflags" = 1 ] 76 then | 82 elif [ "$show_cflags" = 1 ] 83 then |
77 echo "-I@includedir@" | 84 echo "-I$includedir" |
78 elif [ "$show_libs" = 1 ] 79 then | 85 elif [ "$show_libs" = 1 ] 86 then |
80 echo "-L@libdir@ $RPATH -lpcap" | 87 echo "-L$libdir $RPATH -lpcap" |
81 fi 82fi | 88 fi 89fi |