forked from session-replay-tools/tcpcopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·148 lines (112 loc) · 2.84 KB
/
configure
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#!/bin/sh
LC_ALL=C
export LC_ALL
. auto/options
. auto/init
. auto/sources
test -d $TC_OBJS || mkdir $TC_OBJS
echo > $TC_AUTO_HEADERS_H
echo > $TC_AUTOCONF_ERR
echo "#define TC_CONFIGURE \"$TC_CONFIGURE\"" > $TC_AUTO_CONFIG_H
if test -z "$TC_PLATFORM"; then
echo "checking for OS"
TC_SYSTEM=`uname -s 2>/dev/null`
TC_RELEASE=`uname -r 2>/dev/null`
TC_MACHINE=`uname -m 2>/dev/null`
echo " + $TC_SYSTEM $TC_RELEASE $TC_MACHINE"
TC_PLATFORM="$TC_SYSTEM:$TC_RELEASE:$TC_MACHINE";
else
echo "building for $TC_PLATFORM"
TC_SYSTEM=$TC_PLATFORM
fi
case "$TC_PLATFORM" in
Linux:*)
. auto/os/linux
;;
*)
echo "error: Linux only!"
exit 1
esac
if [ $TC_DEBUG = YES ]; then
have=TC_DEBUG . auto/have
have=TC_DETECT_MEMORY . auto/have
else
if [ $TC_DETECT_MEMORY = YES ]; then
have=TC_DETECT_MEMORY . auto/have
fi
fi
if [ $TC_SINGLE = YES ]; then
have=TC_SINGLE . auto/have
fi
if [ $TC_OFFLINE = YES ]; then
TC_PCAP_NEEDED=YES
have=TC_OFFLINE . auto/have
fi
if [ $TC_PCAP_CAPTURE = YES ]; then
TC_PCAP_NEEDED=YES
have=TC_PCAP . auto/have
fi
if [ $TC_PCAP_SEND = YES ]; then
TC_PCAP_NEEDED=YES
have=TC_PCAP_SND . auto/have
fi
if [ $TC_PCAP_NEEDED = YES ]; then
if [ $TC_PF_RING_DIR != NONE ]; then
have=TC_HAVE_PF_RING . auto/have
CORE_LIBS="$CORE_LIBS $TC_PF_RING_DIR/userland/libpcap/libpcap.a"
CORE_LIBS="$CORE_LIBS $TC_PF_RING_DIR/userland/lib/libpfring.a"
CORE_LIBS="$CORE_LIBS -lrt -lpthread -lnuma"
else
CORE_LIBS="$CORE_LIBS -lpcap"
fi
fi
if [ $TC_MILLION_SUPPORT = YES ]; then
have=TC_MILLION_SUPPORT . auto/have
fi
if test -n "$TC_ADDONS"; then
have=TC_PLUGIN . auto/have
fi
if [ $TC_COMBINED = YES ]; then
have=TC_COMBINED . auto/have
fi
if [ $TC_UDP = YES ]; then
have=TC_UDP . auto/have
fi
if [ $TC_DNAT = YES ]; then
have=TC_DNAT . auto/have
fi
. auto/cc/conf
. auto/headers
. auto/os/conf
. auto/linux
. auto/modules
if [ $TC_PAYLOAD = YES ]; then
have=TC_PAYLOAD . auto/have
fi
if [ $TC_DIGEST = YES ]; then
tc_include="openssl/evp.h"; . auto/include
have=TC_DIGEST . auto/have
CORE_LIBS="$CORE_LIBS -lcrypto -lm"
fi
case ".$TC_PREFIX" in
.)
TC_PREFIX=${TC_PREFIX:-/usr/local/tcpcopy}
have=TC_PREFIX value="\"$TC_PREFIX/\"" . auto/define
;;
.!)
TC_PREFIX=
;;
*)
have=TC_PREFIX value="\"$TC_PREFIX/\"" . auto/define
;;
esac
if [ ".$TC_CONF_PREFIX" != "." ]; then
have=TC_CONF_PREFIX value="\"$TC_CONF_PREFIX/\"" . auto/define
fi
have=TC_SBIN_PATH value="\"$TC_SBIN_PATH\"" . auto/define
have=TC_CONF_PATH value="\"$TC_CONF_PATH\"" . auto/define
have=TC_PID_PATH value="\"$TC_PID_PATH\"" . auto/define
have=TC_ERROR_LOG_PATH value="\"$TC_ERROR_LOG_PATH\"" . auto/define
. auto/make
. auto/install
. auto/summary