File: pcap-config.in

package info (click to toggle)
libpcap 1.8.1-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,908 kB
  • ctags: 4,729
  • sloc: ansic: 38,459; sh: 3,197; makefile: 729; yacc: 656; lex: 484; asm: 372
file content (79 lines) | stat: -rw-r--r-- 1,451 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#! /bin/sh

#
# Script to give the appropriate compiler flags and linker flags
# to use when building code that uses libpcap.
#
prefix="@prefix@"
exec_prefix="@exec_prefix@"
includedir="@includedir@"
libdir="@libdir@"
V_RPATH_OPT="@V_RPATH_OPT@"
LIBS="@LIBS@"

static=0
show_cflags=0
show_libs=0
while [ "$#" != 0 ]
do
	case "$1" in

	--static)
		static=1
		;;

	--cflags)
		show_cflags=1
		;;

	--libs)
		show_libs=1
		;;

	--additional-libs)
		show_additional_libs=1
		;;
	esac
	shift
done
if [ "$static" = 1 ]
then
	#
	# Include LIBS so that the flags include libraries containing
	# routines that libpcap uses.
	#
	if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
	then
		echo "-I$includedir -L$libdir -lpcap $LIBS"
	elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
	then
		echo "-I$includedir -L$libdir $LIBS"
	elif [ "$show_cflags" = 1 ]
	then
		echo "-I$includedir"
	elif [ "$show_libs" = 1 ]
	then
		echo "-L$libdir -lpcap $LIBS"
	elif [ "$show_additional_libs" = 1 ]
	then
		echo "$LIBS"
	fi
else
	#
	# Omit LIBS - libpcap is assumed to be linked with those
	# libraries, so there's no need to do so explicitly.
	#
	if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
	then
		echo "-I$includedir -L$libdir $RPATH -lpcap"
	elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
	then
		echo "-I$includedir"
	elif [ "$show_cflags" = 1 ]
	then
		echo "-I$includedir"
	elif [ "$show_libs" = 1 ]
	then
		echo "-L$libdir $RPATH -lpcap"
	fi
fi