-
Notifications
You must be signed in to change notification settings - Fork 7
/
configure.ac
353 lines (304 loc) · 12.9 KB
/
configure.ac
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
################################################################################
# Version information #
################################################################################
# Program version
define([EEMO_VERSION_MAJOR], [0])
define([EEMO_VERSION_MINOR], [5])
define([EEMO_VERSION_BUILDREV], esyscmd([sh -c "git rev-list --count HEAD|tr -d '\n'"]))
define([PACKAGE_SUFFIX], [])
# Plugin library versions
# Version guidelines
# Interface added/removed/changed: <PLUGIN>_VERSION_CURRENT++, <PLUGIN>_VERSION_REVISION=0
# Code changed: <PLUGIN>_VERSION_REVISION++
# Interface added: <PLUGIN>_VERSION_AGE++
# Interface removed: <PLUGIN>_VERSION_AGE=0
# Demo plugin
define([EEMO_DEMO_CURRENT], [1])
define([EEMO_DEMO_REVISION], [0])
define([EEMO_DEMO_AGE], [0])
# DNS statistics plugin
define([EEMO_DNSSTATS_CURRENT], [1])
define([EEMO_DNSSTATS_REVISION], [0])
define([EEMO_DNSSTATS_AGE], [0])
# DNSSEC validating resolver monitoring
define([EEMO_DNSQFW_CURRENT], [1])
define([EEMO_DNSQFW_REVISION], [0])
define([EEMO_DNSQFW_AGE], [0])
# ICMP fragment reassembly timeout monitoring
define([EEMO_ICMPFRAGMON_CURRENT], [1])
define([EEMO_ICMPFRAGMON_REVISION], [0])
define([EEMO_ICMPFRAGMON_AGE], [0])
# IP/ICMP to DNS sensor forwarder
define([EEMO_DNSSENSORFW_CURRENT], [1])
define([EEMO_DNSSENSORFW_REVISION], [0])
define([EEMO_DNSSENSORFW_AGE], [0])
# UDP retransmission plugin
define([EEMO_UDPREXMIT_CURRENT], [1])
define([EEMO_UDPREXMIT_REVISION], [0])
define([EEMO_UDPREXMIT_AGE], [0])
# EDNS0 client subnet monitoring plugin
define([EEMO_ECSMONITOR_CURRENT], [1])
define([EEMO_ECSMONITOR_REVISION], [0])
define([EEMO_ECSMONITOR_AGE], [0])
# DNS statistics module for Zabbix
define([EEMO_DNSZABBIX_CURRENT], [1])
define([EEMO_DNSZABBIX_REVISION], [0])
define([EEMO_DNSZABBIX_AGE], [0])
# PCAP dumping
define([EEMO_DUMPPCAP_CURRENT], [1])
define([EEMO_DUMPPCAP_REVISION], [0])
define([EEMO_DUMPPCAP_AGE], [0])
# Extract DNSKEYs from authoritative answers
define([EEMO_DNSKEYEX_CURRENT], [1])
define([EEMO_DNSKEYEX_REVISION], [0])
define([EEMO_DNSKEYEX_AGE], [0])
# Extract answer names from DNS answers
define([EEMO_NAMEX_CURRENT], [1])
define([EEMO_NAMEX_REVISION], [0])
define([EEMO_NAMEX_AGE], [0])
# Monitor queries for a specific name
define([EEMO_AUTH_VS_CLIENT_CURRENT], [1])
define([EEMO_AUTH_VS_CLIENT_REVISION], [0])
define([EEMO_AUTH_VS_CLIENT_AGE], [0])
# Non-EDNS0 client subnet monitoring plugin
define([EEMO_NONECSMONITOR_CURRENT], [1])
define([EEMO_NONECSMONITOR_REVISION], [0])
define([EEMO_NONECSMONITOR_AGE], [0])
# Plugin that collects statistics on unique DNS clients seen
define([EEMO_UNIQDNSIP_CURRENT], [1])
define([EEMO_UNIQDNSIP_REVISION], [0])
define([EEMO_UNIQDNSIP_AGE], [0])
# Plugin that extracts DNS-scanning queries from PCAPs
define([EEMO_DARKSCANEX_CURRENT], [1])
define([EEMO_DARKSCANEX_REVISION], [0])
define([EEMO_DARKSCANEX_AGE], [0])
# Plugin that measures query and client populations
define([EEMO_QUERYPOP_CURRENT], [1])
define([EEMO_QUERYPOP_REVISION], [0])
define([EEMO_QUERYPOP_AGE], [0])
# Plugin that measures SLD query popularity
define([EEMO_SLDPOP_CURRENT], [1])
define([EEMO_SLDPOP_REVISION], [0])
define([EEMO_SLDPOP_AGE], [0])
# Plugin for darknet monitoring
define([EEMO_DARKMON_CURRENT], [1])
define([EEMO_DARKMON_REVISION], [0])
define([EEMO_DARKMON_AGE], [0])
# Plugin for compact CSV DNS query logging
define([EEMO_CSVQLOG_CURRENT], [1])
define([EEMO_CSVQLOG_REVISION], [0])
define([EEMO_CSVQLOG_AGE], [0])
# Plugin for compact CSV DNS query logging
define([EEMO_QRSIZEDIST_CURRENT], [1])
define([EEMO_QRSIZEDIST_REVISION], [0])
define([EEMO_QRSIZEDIST_AGE], [0])
# Plugin for DNS de-NAT project
define([EEMO_DNSDENATEX_CURRENT], [1])
define([EEMO_DNSDENATEX_REVISION], [0])
define([EEMO_DNSDENATEX_AGE], [0])
# Plugin for logging query src IPs with high-precision timestamps
define([EEMO_QSRCIPS_CURRENT], [1])
define([EEMO_QSRCIPS_REVISION], [0])
define([EEMO_QSRCIPS_AGE], [0])
# Plugin for logging query src IPs and AS
define([EEMO_QANDASLOG_CURRENT], [1])
define([EEMO_QANDASLOG_REVISION], [0])
define([EEMO_QANDASLOG_AGE], [0])
# Plugin for DNS statistics collection for InfluxDB
define([EEMO_DNSINFLUX_CURRENT], [1])
define([EEMO_DNSINFLUX_REVISION], [0])
define([EEMO_DNSINFLUX_AGE], [0])
# Plugin for Honas Bloom Filter software
define([EEMO_HONAS_CURRENT], [1])
define([EEMO_HONAS_REVISION], [0])
define([EEMO_HONAS_AGE], [0])
# Plugin for counting unique domain names per IP prefix.
define([EEMO_DNSUNIQ_CURRENT], [1])
define([EEMO_DNSUNIQ_REVISION], [0])
define([EEMO_DNSUNIQ_AGE], [0])
# Plugin for dnstap output to a UNIX domain socket
define([EEMO_DNSTAPOUT_CURRENT], [1])
define([EEMO_DNSTAPOUT_REVISION], [0])
define([EEMO_DNSTAPOUT_AGE], [0])
################################################################################
# Configuration functions #
################################################################################
# Init
AC_PREREQ(2.61)
AC_INIT([eemo],[EEMO_VERSION_MAJOR.EEMO_VERSION_MINOR.EEMO_VERSION_BUILDREV[]PACKAGE_SUFFIX])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE(foreign subdir-objects)
ACX_PREFIXHACK
# Variable substitutions
EEMO_DNSSTATS_VERSION_INFO="EEMO_DNSSTATS_CURRENT:EEMO_DNSSTATS_REVISION:EEMO_DNSSTATS_AGE"
AC_SUBST(EEMO_DNSSTATS_VERSION_INFO)
EEMO_DEMO_VERSION_INFO="EEMO_DEMO_CURRENT:EEMO_DEMO_REVISION:EEMO_DEMO_AGE"
AC_SUBST(EEMO_DEMO_VERSION_INFO)
EEMO_DNSQFW_VERSION_INFO="EEMO_DNSQFW_CURRENT:EEMO_DNSQFW_REVISION:EEMO_DNSQFW_AGE"
AC_SUBST(EEMO_DNSQFW_VERSION_INFO)
EEMO_ICMPFRAGMON_VERSION_INFO="EEMO_ICMPFRAGMON_CURRENT:EEMO_ICMPFRAGMON_REVISION:EEMO_ICMPFRAGMON_AGE"
AC_SUBST(EEMO_ICMPFRAGMON_VERSION_INFO)
EEMO_DNSSENSORFW_VERSION_INFO="EEMO_DNSSENSORFW_CURRENT:EEMO_DNSSENSORFW_REVISION:EEMO_DNSSENSORFW_AGE"
AC_SUBST(EEMO_DNSSENSORFW_VERSION_INFO)
EEMO_UDPREXMIT_VERSION_INFO="EEMO_UDPREXMIT_CURRENT:EEMO_UDPREXMIT_REVISION:EEMO_UDPREXMIT_AGE"
AC_SUBST(EEMO_UDPREXMIT_VERSION_INFO)
EEMO_ECSMONITOR_VERSION_INFO="EEMO_ECSMONITOR_CURRENT:EEMO_ECSMONITOR_REVISION:EEMO_ECSMONITOR_AGE"
AC_SUBST(EEMO_ECSMONITOR_VERSION_INFO)
EEMO_DNSZABBIX_VERSION_INFO="EEMO_DNSZABBIX_CURRENT:EEMO_DNSZABBIX_REVISION:EEMO_DNSZABBIX_AGE"
AC_SUBST(EEMO_DNSZABBIX_VERSION_INFO)
EEMO_DUMPPCAP_VERSION_INFO="EEMO_DUMPPCAP_CURRENT:EEMO_DUMPPCAP_REVISION:EEMO_DUMPPCAP_AGE"
AC_SUBST(EEMO_DUMPPCAP_VERSION_INFO)
EEMO_DNSKEYEX_VERSION_INFO="EEMO_DNSKEYEX_CURRENT:EEMO_DNSKEYEX_REVISION:EEMO_DNSKEYEX_AGE"
AC_SUBST(EEMO_DNSKEYEX_VERSION_INFO)
EEMO_NAMEX_VERSION_INFO="EEMO_NAMEX_CURRENT:EEMO_NAMEX_REVISION:EEMO_NAMEX_AGE"
AC_SUBST(EEMO_NAMEX_VERSION_INFO)
EEMO_AUTH_VS_CLIENT_VERSION_INFO="EEMO_AUTH_VS_CLIENT_CURRENT:EEMO_AUTH_VS_CLIENT_REVISION:EEMO_AUTH_VS_CLIENT_AGE"
AC_SUBST(EEMO_AUTH_VS_CLIENT_VERSION_INFO)
EEMO_NONECSMONITOR_VERSION_INFO="EEMO_NONECSMONITOR_CURRENT:EEMO_NONECSMONITOR_REVISION:EEMO_NONECSMONITOR_AGE"
AC_SUBST(EEMO_NONECSMONITOR_VERSION_INFO)
EEMO_UNIQDNSIP_VERSION_INFO="EEMO_UNIQDNSIP_CURRENT:EEMO_UNIQDNSIP_REVISION:EEMO_UNIQDNSIP_AGE"
AC_SUBST(EEMO_UNIQDNSIP_VERSION_INFO)
EEMO_DARKSCANEX_VERSION_INFO="EEMO_DARKSCANEX_CURRENT:EEMO_DARKSCANEX_REVISION:EEMO_DARKSCANEX_AGE"
AC_SUBST(EEMO_DARKSCANEX_VERSION_INFO)
EEMO_QUERYPOP_VERSION_INFO="EEMO_QUERYPOP_CURRENT:EEMO_QUERYPOP_REVISION:EEMO_QUERYPOP_AGE"
AC_SUBST(EEMO_QUERYPOP_VERSION_INFO)
EEMO_SLDPOP_VERSION_INFO="EEMO_SLDPOP_CURRENT:EEMO_SLDPOP_REVISION:EEMO_SLDPOP_AGE"
AC_SUBST(EEMO_SLDPOP_VERSION_INFO)
EEMO_DARKMON_VERSION_INFO="EEMO_DARKMON_CURRENT:EEMO_DARKMON_REVISION:EEMO_DARKMON_AGE"
AC_SUBST(EEMO_DARKMON_VERSION_INFO)
EEMO_CSVQLOG_VERSION_INFO="EEMO_CSVQLOG_CURRENT:EEMO_CSVQLOG_REVISION:EEMO_CSVQLOG_AGE"
AC_SUBST(EEMO_CSVQLOG_VERSION_INFO)
EEMO_QRSIZEDIST_VERSION_INFO="EEMO_QRSIZEDIST_CURRENT:EEMO_QRSIZEDIST_REVISION:EEMO_QRSIZEDIST_AGE"
AC_SUBST(EEMO_QRSIZEDIST_VERSION_INFO)
EEMO_DNSDENATEX_VERSION_INFO="EEMO_DNSDENATEX_CURRENT:EEMO_DNSDENATEX_REVISION:EEMO_DNSDENATEX_AGE"
AC_SUBST(EEMO_DNSDENATEX_VERSION_INFO)
EEMO_QSRCIPS_VERSION_INFO="EEMO_QSRCIPS_CURRENT:EEMO_QSRCIPS_REVISION:EEMO_QSRCIPS_AGE"
AC_SUBST(EEMO_QSRCIPS_VERSION_INFO)
EEMO_QANDASLOG_VERSION_INFO="EEMO_QANDASLOG_CURRENT:EEMO_QANDASLOG_REVISION:EEMO_QANDASLOG_AGE"
AC_SUBST(EEMO_QANDASLOG_VERSION_INFO)
EEMO_DNSINFLUX_VERSION_INFO="EEMO_DNSINFLUX_CURRENT:EEMO_DNSINFLUX_REVISION:EEMO_DNSINFLUX_AGE"
AC_SUBST(EEMO_DNSINFLUX_VERSION_INFO)
EEMO_HONAS_VERSION_INFO="EEMO_HONAS_CURRENT:EEMO_HONAS_REVISION:EEMO_HONAS_AGE"
AC_SUBST(EEMO_HONAS_VERSION_INFO)
EEMO_DNSUNIQ_VERSION_INFO="EEMO_DNSUNIQ_CURRENT:EEMO_DNSUNIQ_REVISION:EEMO_DNSUNIQ_AGE"
AC_SUBST(EEMO_DNSUNIQ_VERSION_INFO)
EEMO_DNSTAPOUT_VERSION_INFO="EEMO_DNSTAPOUT_CURRENT:EEMO_DNSTAPOUT_REVISION:EEMO_DNSTAPOUT_AGE"
AC_SUBST(EEMO_DNSTAPOUT_VERSION_INFO)
# Checks for compilers and other programs
AC_PROG_CC_C99
AC_PROG_INSTALL
# Compiler flags
ACX_PEDANTIC
ACX_STRICT
# Libtool settings
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
# Log level
AC_ARG_WITH(
[loglevel],
[AS_HELP_STRING([--with-loglevel=INT],[The log level. 0=No log 1=Error 2=Warning 3=Info 4=Debug (default INT=3)])],
[EEMO_LOGLEVEL="$withval"],
[EEMO_LOGLEVEL=3]
)
# Check for libraries
ACX_DLOPEN
ACX_PCAP
PKG_CHECK_MODULES([LIBCONFIG], [libconfig >= 1.3.2],, AC_MSG_ERROR([libconfig 1.3.2 or newer not found]))
ACX_PTHREAD
PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0.1],, AC_MSG_ERROR([OpenSSL 1.0.1 or newer not found]))
PKG_CHECK_MODULES([ZLIB], [zlib >= 0.2.0],, AC_MSG_ERROR([zlib 1.2.8 or newer not found]))
PKG_CHECK_MODULES([LIBARCHIVE], [libarchive >= 3.0.0],, AC_MSG_ERROR([libarchive 3.0.0 or newer not found]))
PKG_CHECK_MODULES([LIBPROTOBUFC], [libprotobuf-c >= 1.2.1],[
PKG_CHECK_MODULES([FSTRM], [libfstrm >= 0.2.0],, AC_MSG_ERROR([libfstrm 0.2.0 required to build the dnstap output plugin]))
AC_CHECK_PROG([PROTOCC], protoc-c, yes, no)
if test $PROTOCC = no ; then
AC_MSG_ERROR([protoc-c is required to build the dnstap output plugin])
fi
AM_CONDITIONAL([HAVE_DNSTAP], true)
], [
AC_MSG_WARN([libprotobuf-c 1.2.1 or newer not found -- skipping build of dnstap plugin])
AM_CONDITIONAL([HAVE_DNSTAP], false)
])
AX_LIB_SQLITE3(3.7.0)
AM_COND_IF([WITH_SQLITE3], ,AC_MSG_WARN([Not building IP-to-AS or GeoIP support since these depend on SQLite!]))
# Check for headers
AC_CHECK_HEADERS([pcap.h])
AC_CHECK_HEADERS([arpa/inet.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_HEADERS([netdb.h])
AC_CHECK_HEADERS([ifaddrs.h])
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([unistd.h])
AC_CHECK_HEADERS([syslog.h])
AC_CHECK_HEADERS([signal.h])
AC_HEADER_STDC
# Check for functions
AC_FUNC_MEMCMP
AC_CHECK_FUNCS(ntohs ntohl,,AC_MSG_ERROR([ntohs and ntohl are required to build eemo]))
AC_CHECK_FUNCS(getnameinfo,,AC_MSG_ERROR([getnameinfo is required to build eemo]))
AC_CHECK_FUNCS(getifaddrs,,AC_MSG_ERROR([getifaddrs is required to build eemo]))
AC_CHECK_FUNCS(syslog,,AC_MSG_ERROR([syslog is required to build eemo]))
# Define default paths
full_sysconfdir=`eval eval eval eval eval echo "${sysconfdir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"`
full_localstatedir=`eval eval eval eval eval echo "${localstatedir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"`
full_libdir=`eval eval eval eval eval echo "${libdir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"`
default_eemo_conf="`eval echo ${full_sysconfdir} | sed s,NONE,$ac_default_prefix,g`/eemo.conf"
default_pid_file="`eval echo ${full_localstatedir} | sed s,NONE,$ac_default_prefix,g`/run/eemo.pid"
default_eemo_mux_conf="`eval echo ${full_sysconfdir} | sed s,NONE,$ac_default_prefix,g`/eemo_mux.conf"
default_mux_pid_file="`eval echo ${full_localstatedir} | sed s,NONE,$ac_default_prefix,g`/run/eemo_mux.pid"
default_eemo_sensor_conf="`eval echo ${full_sysconfdir} | sed s,NONE,$ac_default_prefix,g`/eemo_sensor.conf"
default_sensor_pid_file="`eval echo ${full_localstatedir} | sed s,NONE,$ac_default_prefix,g`/run/eemo_sensor.pid"
# Define some variables for the code
AC_DEFINE_UNQUOTED(
[VERSION_MAJOR],
[EEMO_VERSION_MAJOR],
[Major version number]
)
AC_DEFINE_UNQUOTED(
[VERSION_MINOR],
[EEMO_VERSION_MINOR],
[Minor version number]
)
AC_DEFINE_UNQUOTED(
[EEMO_LOGLEVEL],
[$EEMO_LOGLEVEL],
[The log level set by the user]
)
AC_DEFINE_UNQUOTED(
[DEFAULT_EEMO_CONF],
["$default_eemo_conf"],
[The default configuration file]
)
AC_DEFINE_UNQUOTED(
[DEFAULT_EEMO_PIDFILE],
["$default_pid_file"],
[The default PID file]
)
AC_DEFINE_UNQUOTED(
[DEFAULT_EEMO_MUX_CONF],
["$default_eemo_mux_conf"],
[The default configuration file for the sensor multiplexer]
)
AC_DEFINE_UNQUOTED(
[DEFAULT_EEMO_MUX_PIDFILE],
["$default_mux_pid_file"],
[The default PID file for the sensor multiplexer]
)
AC_DEFINE_UNQUOTED(
[DEFAULT_EEMO_SENSOR_CONF],
["$default_eemo_sensor_conf"],
[The default configuration file for the sensor daemon]
)
AC_DEFINE_UNQUOTED(
[DEFAULT_EEMO_SENSOR_PIDFILE],
["$default_sensor_pid_file"],
[The default PID file for the sensor daemon]
)
# Generate theinstall script
AC_PROG_INSTALL
# Generate the makefiles
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT