forked from e2guardian/e2guardian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
706 lines (652 loc) · 18.5 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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
# Autoconf script
AC_DEFINE([__SSLMITM],[""],[Define to enable SSL MITM])
AC_PREREQ(2.57)
AC_INIT(e2guardian, 5.4.5r)
AC_CONFIG_HEADERS([e2config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([subdir-objects])
AC_CACHE_LOAD
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_LANG(C++)
AC_CACHE_SAVE
#########################################################################
# Get GCC version
#########################################################################
GCC_VERSION=$(gcc --version | head -1 | awk '{print $NF}')
GCC_VERSION_MAJOR=$(echo $GCC_VERSION |cut -d'.' -f1 2>/dev/null)
GCC_VERSION_MINOR=$(echo $GCC_VERSION |cut -d'.' -f2 2>/dev/null)
GCC_VERSION_PATCH=$(echo $GCC_VERSION |cut -d'.' -f3 2>/dev/null)
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h])
AC_CHECK_HEADERS([string.h sys/socket.h sys/time.h syslog.h unistd.h locale.h])
AC_CHECK_HEADERS([sys/types.h sys/un.h sys/poll.h sys/epoll.h sys/resource.h])
AC_CHECK_HEADERS([pwd.h grp.h])
AC_CHECK_HEADERS([byteswap.h])
# Check system endianness
AC_C_BIGENDIAN
# check for zlib
AC_MSG_CHECKING(if zlib should be statically linked)
AC_ARG_ENABLE(static-zlib,
[AC_HELP_STRING([--enable-static-zlib@<:@=no@:>@], [Enable static linking of zlib])],
[ if test "x$enableval" = "xno"; then
staticzlib=false
AC_MSG_RESULT(no)
else
staticzlib=true
AC_MSG_RESULT(yes)
fi
],
[
staticzlib=false
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for zlib)
AC_ARG_WITH(zlib,
[AC_HELP_STRING([--with-zlib@<:@=NONE@:>@], [non-standard search path for zlib library])],
[ # check for header & func (in library) in given prefix
CPPFLAGS="${CPPFLAGS} -I${withval}/include"
if test "x$staticzlib" = "xtrue"; then
LIBS="-Bstatic -L${withval} -lz -Bdynamic ${LIBS}"
else
LIBS="-L${withval}/lib -lz ${LIBS}"
fi
],
[ # if --with-zlib is not supplied, we still need -lz in LIBS.
if test "x$staticzlib" = "xtrue"; then
LIBS="-Bstatic -lz -Bdynamic ${LIBS}"
else
LIBS="-lz ${LIBS}"
fi
])
AC_CHECK_HEADERS([zlib.h])
if ! test "x$staticzlib" = "xtrue"; then
AC_CHECK_LIB(z, gzdopen, [AC_MSG_RESULT(yes)], [AC_MSG_ERROR([no zlib!])])
fi
AC_CACHE_SAVE
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_OFF_T
AC_TYPE_UID_T
# Checks for library functions.
AC_FUNC_FORK
AC_CHECK_FUNCS([dup2 gettimeofday memset select])
AC_CHECK_FUNCS([strerror strstr strtol])
AC_CHECK_FUNCS([setuid setgid umask seteuid setreuid setlocale])
AC_SEARCH_LIBS([floor], [m])
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([socket], [socket], [], [
AC_CHECK_LIB(
[socket], [socket], [LIBS="-lsocket -lnsl $LIBS"],
[], [-lnsl]
)
])
AC_SEARCH_LIBS([inet_aton], [resolv])
AC_CACHE_SAVE
AC_MSG_CHECKING(for backside with both hands)
AC_MSG_RESULT(no)
AC_MSG_CHECKING(build os)
AC_CANONICAL_BUILD
AC_MSG_RESULT($build_os)
AC_MSG_CHECKING(for debug option)
AC_ARG_WITH(e2debug,
[AC_HELP_STRING([--with-e2debug@<:@=off@:>@], [switch on debug build mode])],
[if test "x${withval}" = "xoff" ; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
e2debug=${withval}
AC_DEFINE(E2DEBUG, 1, [Define to enable debug build mode])
fi], [
# disable by default
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for newdebug option)
AC_ARG_WITH(newdebug,
[AC_HELP_STRING([--with-newdebug@<:@=off@:>@], [switch off debuglevel build mode])],
[if test "x${withval}" = "xon" ; then
AC_MSG_RESULT(YES)
AC_DEFINE(NEWDEBUG_ON, 1, [Define to enable debuglevel build mode])
else
AC_MSG_RESULT(no)
# enable by default
newdebug=${withval}
AC_DEFINE(NEWDEBUG_OFF, 1, [Define to disable debuglevel build mode])
fi], [
# enable by default
AC_DEFINE(NEWDEBUG_ON, 1, [Define to enable debuglevel build mode])
AC_MSG_RESULT(yes)
])
AC_MSG_CHECKING(for netdebug option)
AC_ARG_WITH(netdebug,
[AC_HELP_STRING([--with-netdebug@<:@=off@:>@], [switch on netdebug build mode])],
[if test "x${withval}" = "xoff" ; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
netdebug=${withval}
AC_DEFINE(NETDEBUG, 1, [Define to enable debug build mode for socket functions])
fi], [
# disable by default
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for REdebug option)
AC_ARG_WITH(redebug,
[AC_HELP_STRING([--with-redebug@<:@=off@:>@], [switch on redebug build mode])],
[if test "x${withval}" = "xoff" ; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
redebug=${withval}
AC_DEFINE(REDEBUG, 1, [Define to enable debug build mode for regexp functions])
fi], [
# disable by default
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for proxy user)
AC_ARG_WITH(proxyuser,
[AC_HELP_STRING([--with-proxyuser@<:@=nobody@:>@], [name of proxy user])],
[if test "x${withval}" != "x" ; then
AC_MSG_RESULT(yes)
proxyuser=${withval}
else
AC_MSG_RESULT(no)
proxyuser=nobody
fi], [
# disable by default
AC_MSG_RESULT(no)
proxyuser=nobody
])
AC_SUBST(E2PROXYUSER, "$proxyuser")
#AC_DEFINE_UNQUOTED(__PROXYUSER,"$proxyuser","User to run as")
AC_MSG_CHECKING(for proxy group)
AC_ARG_WITH(proxygroup,
[AC_HELP_STRING([--with-proxygroup@<:@=nobody@:>@], [name of proxy group])],
[if test "x${withval}" != "x" ; then
AC_MSG_RESULT(yes)
proxygroup=${withval}
else
AC_MSG_RESULT(no)
proxygroup=nobody
fi], [
# disable by default
AC_MSG_RESULT(no)
proxygroup=nobody
])
AC_SUBST(E2PROXYGROUP, "$proxygroup")
#AC_DEFINE_UNQUOTED(__PROXYGROUP,"$proxygroup","Group to run as")
AC_MSG_CHECKING(for piddir)
AC_ARG_WITH(piddir,
[AC_HELP_STRING([--with-piddir@<:@=${localstatedir}/run@:>@], [path for pid file])],
[if test "x${withval}" != "x" ; then
AC_MSG_RESULT(yes)
piddir=${withval}
else
AC_MSG_RESULT(no)
piddir="${localstatedir}/run"
fi], [
# disable by default
AC_MSG_RESULT(no)
piddir="${localstatedir}/run"
])
AC_FINALIZE_VAR(E2PIDDIR,"$piddir")
AC_SUBST(E2PIDDIR)
#AC_DEFINE_UNQUOTED([__PIDDIR],[${E2PIDDIR}], "path of pid directory")
AC_MSG_CHECKING(for logdir)
AC_ARG_WITH(logdir,
[AC_HELP_STRING([--with-logdir@<:@=${localstatedir}/log/${PACKAGE_NAME}@:>@], [path for log files])],
[if test "x${withval}" != "x" ; then
AC_MSG_RESULT(yes)
logdir=${withval}
else
AC_MSG_RESULT(no)
logdir="${localstatedir}/log/${PACKAGE_NAME}"
fi], [
# disable by default
AC_MSG_RESULT(no)
logdir="${localstatedir}/log/${PACKAGE_NAME}"
])
AC_FINALIZE_VAR(E2LOGLOCATION,"$logdir")
AC_SUBST(E2LOGLOCATION)
# AC_DEFINE_UNQUOTED([__LOGLOCATION],[${E2LOGLOCATION}], "path of log directory")
PKG_PROG_PKG_CONFIG
# asking user if they want PCRE support
AC_MSG_CHECKING(for PCRE support)
AC_ARG_ENABLE(
pcre,
[AC_HELP_STRING([--enable-pcre@<:@=yes@:>@], [Enable support for the PCRE library])],
[ if test "x$enableval" = "xno"; then
pcre=false
AC_MSG_RESULT(no)
else
pcre=true
AC_MSG_RESULT(yes)
fi
],
[ # enable by default
pcre=true
AC_MSG_RESULT(yes)
]
)
if test "x$pcre" = "xtrue"; then
PKG_CHECK_MODULES([PCRE],[libpcre >= 6.0])
AC_DEFINE([HAVE_PCRE],[],[Define to enable PCRE support])
PCRE_LIBS="-lpcreposix ${PCRE_LIBS}"
else
AC_CHECK_FUNCS([regcomp])
fi
AM_CONDITIONAL(HAVE_PCRE, test "x$pcre" = "xtrue")
AC_CHECK_HEADERS([pthread.h], [ LIBS="-lpthread ${LIBS}"], [
echo "pthread.h required, failing"
exit -1
])
#AC_CHECK_HEADERS([event2/thread.h], [
#LIBS="-levent_pthreads ${LIBS}"
#], [
#echo "libevent_pthreads required, failing"
#exit -1
#])
[if test "$GCC_VERSION_MAJOR" -eq 4; then
if test "$GCC_VERSION_MINOR" -ge 9; then
if test "$GCC_VERSION_PATCH" -ge 3; then
echo "Version: $GCC_VERSION"
CXXFLAGS="${CXXFLAGS} --std=c++11"
fi
fi
echo "Version: $GCC_VERSION "
CXXFLAGS="${CXXFLAGS} --std=c++1y"
else
if test "$GCC_VERSION_MAJOR" -ge 5; then
echo "Version: $GCC_VERSION "
CXXFLAGS="${CXXFLAGS} --std=c++11"
else
echo "Version: $GCC_VERSION "
CXXFLAGS="${CXXFLAGS} --std=c++1y"
fi
fi
]
# ask user if they want large file support on 32 bit systems
AC_MSG_CHECKING([for large file support])
AC_ARG_ENABLE(
lfs,
[AC_HELP_STRING([--enable-lfs@<:@=yes@:>@], [Enable large file support on 32 bit systems])],
[ if test "x$enableval" = "xno"; then
AC_MSG_RESULT(no)
else
lfsflags=`getconf LFS_CFLAGS`
lfsld=`getconf LFS_LDFLAGS`
lfslib=`getconf LFS_LIBS`
CXXFLAGS="${CXXFLAGS} $lfsflags"
LDFLAGS="${LDFLAGS} $lfsld"
LIBS="${LIBS} $lfslib"
AC_MSG_RESULT(yes)
fi
],
[ # enable by default
lfsflags=`getconf LFS_CFLAGS`
lfsld=`getconf LFS_LDFLAGS`
lfslib=`getconf LFS_LIBS`
CXXFLAGS="${CXXFLAGS} $lfsflags "
LDFLAGS="${LDFLAGS} $lfsld"
LIBS="${LIBS} $lfslib"
AC_MSG_RESULT(yes)
])
# determine whether or not "off_t" is simply a typedef of
# "int", "unsigned int", "long", etc. - if it is, the String
# class won't compile if its off_t constructor is defined,
# as that would represent a function redefinition.
AC_MSG_CHECKING([for type collision with off_t])
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[[#include <sys/types.h>]],[[
struct Foo{
void f(const int);
void f(const long);
void f(const long unsigned);
void f(const unsigned int);
void f(const off_t);
};]])
],[
AC_MSG_RESULT([no])
],[
AC_MSG_RESULT([yes])
AC_DEFINE([OFFT_COLLISION],[],[Define if type "off_t" is a typedef of another type for which String already has a constructor])
])
# by default, we do not need the content scanner list or config directories, nor the download manager list directory
cslists=false
csconfigs=false
dmlists=false
# asking user if they want clamd support
AC_MSG_CHECKING(for clamd support)
AC_ARG_ENABLE(
clamd,
[AC_HELP_STRING([--enable-clamd@<:@=no@:>@], [Enable support for the ClamD content scanner])],
[ if test "x$enableval" = "xno"; then
AC_MSG_RESULT(no)
clamd=false
CLAMDSUPPORT="!! Not compiled !! "
else
AC_MSG_RESULT(yes)
clamd=true
cslists=true
csconfigs=true
CLAMDSUPPORT=""
AC_DEFINE([ENABLE_CLAMD],[],[Define to enable ClamD content scanner])
fi],
[
AC_MSG_RESULT(no)
clamd=false
CLAMDSUPPORT="!! Not compiled !! "
]
)
AM_CONDITIONAL(ENABLE_CLAMD, test "x$clamd" = "xtrue")
AC_SUBST(CLAMDSUPPORT)
# asking user if they want avastd support
AC_MSG_CHECKING(for avastd support)
AC_ARG_ENABLE(
avastd,
[AC_HELP_STRING([--enable-avastd@<:@=no@:>@], [Enable support for the AvastD content scanner])],
[ if test "x$enableval" = "xno"; then
AC_MSG_RESULT(no)
avastd=false
AVASTDSUPPORT="!! Not compiled !! "
else
AC_MSG_RESULT(yes)
avastd=true
cslists=true
csconfigs=true
AVASTDSUPPORT=""
AC_DEFINE([ENABLE_AVASTD],[],[Define to enable AvastD content scanner])
fi],
[
AC_MSG_RESULT(no)
avastd=false
AVASTDSUPPORT="!! Not compiled !! "
]
)
AM_CONDITIONAL(ENABLE_AVASTD, test "x$avastd" = "xtrue")
AC_SUBST(AVASTDSUPPORT)
# asking user if they want icap support
AC_MSG_CHECKING(for icap support)
AC_ARG_ENABLE(
icap,
[AC_HELP_STRING([--enable-icap@<:@=no@:>@], [Enable support for ICAP AV server content scanner])],
[ if test "x$enableval" = "xno"; then
AC_MSG_RESULT(no)
icap=false
ICAPSUPPORT="!! Not compiled !! "
else
AC_MSG_RESULT(yes)
icap=true
cslists=true
csconfigs=true
AC_DEFINE([ENABLE_ICAP],[],[Define to enable ICAP content scanner])
ICAPSUPPORT=""
fi],
[
AC_MSG_RESULT(no)
icap=false
ICAPSUPPORT="!! Not compiled !! "
]
)
AM_CONDITIONAL(ENABLE_ICAP, test "x$icap" = "xtrue")
AC_SUBST(ICAPSUPPORT)
# asking user if they want kavd support
AC_MSG_CHECKING(for kavd support)
AC_ARG_ENABLE(
kavd,
[AC_HELP_STRING([--enable-kavd@<:@=no@:>@], [Enable support for the Kaspersky AV daemon content scanner])],
[ if test "x$enableval" = "xno"; then
AC_MSG_RESULT(no)
kavd=false
KAVDSUPPORT="!! Not compiled !! "
else
AC_MSG_RESULT(yes)
kavd=true
cslists=true
csconfigs=true
KAVDSUPPORT=""
AC_DEFINE([ENABLE_KAVD],[],[Define to enable KAVD content scanner])
fi],
[
AC_MSG_RESULT(no)
kavd=false
KAVDSUPPORT="!! Not compiled !! "
]
)
AM_CONDITIONAL(ENABLE_KAVD, test "x$kavd" = "xtrue")
AC_SUBST(KAVDSUPPORT)
# asking user if they want command-line content scanner support
AC_MSG_CHECKING(for command-line content scanner support)
AC_ARG_ENABLE(
commandline,
[AC_HELP_STRING([--enable-commandline@<:@=no@:>@], [Enable support for command-line content scanners])],
[ if test "x$enableval" = "xno"; then
AC_MSG_RESULT(no)
commandline=false
COMMANDLINESUPPORT="!! Not compiled !! "
else
AC_MSG_RESULT(yes)
commandline=true
cslists=true
csconfigs=true
COMMANDLINESUPPORT=""
AC_DEFINE([ENABLE_COMMANDLINE],[],[Define to enable command-line content scanner])
fi],
[
AC_MSG_RESULT(no)
commandline=false
COMMANDLINESUPPORT="!! Not compiled !! "
])
AM_CONDITIONAL(ENABLE_COMMANDLINE, test "x$commandline" = "xtrue")
AC_SUBST(COMMANDLINESUPPORT)
# install CS configs and lists if necessary
AM_CONDITIONAL(NEED_CSLISTS, test "x$cslists" = "xtrue")
AM_CONDITIONAL(NEED_CSCONFIGS, test "x$csconfigs" = "xtrue")
# install DM lists if necessary
AM_CONDITIONAL(NEED_DMLISTS, test "x$dmlists" = "xtrue")
# asking user if they want NTLM auth support
AC_MSG_CHECKING(for NTLM support)
AC_ARG_ENABLE(
ntlm,
[AC_HELP_STRING([--enable-ntlm@<:@=no@:>@], [Enable support for the NTLM auth plugin])],
[ if test "x$enableval" = "xno"; then
AC_MSG_RESULT(no)
ntlm=false
NTLMSUPPORT="!! Not compiled !! "
else
AC_MSG_RESULT(yes)
ntlm=true
NTLMSUPPORT=""
AC_DEFINE([ENABLE_NTLM],[],[Define to enable NTLM auth plugin])
# now need to check if they're using an iconv library, rather
# than a native iconv implementation
AC_ARG_WITH(libiconv,
[AC_HELP_STRING([--with-libiconv@<:@=NONE@:>@], [Specify search path on a system which requires an external iconv library (only used in conjunction with NTLM auth plugin).])],
[ # check for header & func (in library) in given prefix
if test "x$withval" != "x"; then
CPPFLAGS="${CPPFLAGS} -I${withval}/include"
LIBS="-L${withval}/lib -liconv ${LIBS}"
else
LIBS="-liconv ${LIBS}"
fi
AC_CHECK_LIB(iconv, iconv, [AC_MSG_RESULT(linked)], [
AC_MSG_RESULT(no)
AC_CHECK_LIB(iconv, libiconv, [AC_MSG_RESULT(linked)], [
AC_MSG_ERROR([no libiconv found in given search path! (needed by NTLM plugin)])
])
])
],
[ # check for native header & func (no library)
AC_CHECK_FUNCS(iconv, [AC_MSG_RESULT(native)], [
AC_MSG_RESULT(no)
# native not found, so look for linked
LIBS="-liconv ${LIBS}"
AC_CHECK_LIB(iconv, iconv, [
AC_MSG_RESULT(linked)
], [
AC_MSG_RESULT(no)
AC_CHECK_LIB(iconv, libiconv, [AC_MSG_RESULT(linked)], [
AC_MSG_ERROR([no native or standard library iconv function found! (needed by NTLM plugin - try again with "--with-libiconv"?)])
])
])
])
]
)
fi],
[
AC_MSG_RESULT(no)
ntlm=false
NTLMSUPPORT="!! Not compiled !! "
]
)
AM_CONDITIONAL(ENABLE_NTLM, test "x$ntlm" = "xtrue")
AC_SUBST(NTLMSUPPORT)
# asking user if they want SSL MITM support
AC_MSG_CHECKING(for SSL MITM support)
AC_ARG_ENABLE(
sslmitm,
[AC_HELP_STRING([--enable-sslmitm@<:@=no@:>@], [Enable support for the SSL MITM plugin])],
[ if test "x$enableval" = "xno"; then
AC_MSG_RESULT(no)
sslmitm=false
SSLMITMSUPPORT="!! Not compiled !! "
else
AC_MSG_RESULT(yes)
sslmitm=true
SSLMITMSUPPORT=""
LIBS="${LIBS} -lssl -lcrypto"
AC_DEFINE([__SSLMITM],[],[Define to enable SSL MITM ])
AC_DEFINE([__SSLCERT],[],[Define to enable SSL CERT ])
PKG_CHECK_MODULES([OPENSSL],[ openssl >= 1.0.1])
fi],
[
AC_MSG_RESULT(no)
sslmitm=false
SSLMITMSUPPORT="!! Not compiled !! "
]
)
AM_CONDITIONAL(__SSLMITM, test "x$sslmitm" = "xtrue")
AM_CONDITIONAL(__SSLCERT, test "x$sslmitm" = "xtrue")
AC_SUBST(SSLMITMSUPPORT)
# asking user if they want DNS auth support
AC_MSG_CHECKING(for DNS support)
AC_ARG_ENABLE(
dnsauth,
[AC_HELP_STRING([--enable-dnsauth@<:@=no@:>@], [Enable support for the DNS auth plugin])],
[ if test "x$enableval" = "xno"; then
AC_MSG_RESULT(no)
dnsauth=false
DNSAUTHSUPPORT="!! Not compiled !! "
else
AC_MSG_RESULT(yes)
dnsauth=true
DNSAUTHSUPPORT=""
LIBS="${LIBS} -lresolv"
AC_DEFINE([PRT_DNSAUTH],[],[Define to enable DNS auth plugin])
fi],
[
AC_MSG_RESULT(no)
dnsauth=false
DNSAUTHSUPPORT="!! Not compiled !! "
]
)
AM_CONDITIONAL(PRT_DNSAUTH, test "x$dnsauth" = "xtrue")
AC_SUBST(DNSAUTHSUPPORT)
# asking the user if they want email notifications
AC_MSG_CHECKING(for email notification support)
AC_ARG_ENABLE(
email,
[AC_HELP_STRING([--enable-email@<:@=no@:>@], [Enable support for email reporting functionality])],
[ if test "x$enableval" = "xyes"; then
email=true
EMAILSUPPORT=""
AC_MSG_RESULT(yes)
AC_DEFINE([ENABLE_EMAIL],[],[Define to enable email reporting])
else
email=false
EMAILSUPPORT="#!! Not compiled !!"
AC_MSG_RESULT(no)
fi],
[
email=false
EMAILSUPPORT="#!! Not compiled !!"
AC_MSG_RESULT(no)
])
AC_SUBST(EMAILSUPPORT)
AC_DEFINE_UNQUOTED([E2_CONFIGURE_OPTIONS], ["$ac_configure_args"], [Record configure-time options])
libdir="${libdir}/${PACKAGE_NAME}"
AC_ARG_WITH(sysconfsubdir,
[AC_HELP_STRING([--with-sysconfsubdir@<:@=e2guardian@:>@], [subdirectory under sysconfdir in which to place config files])],
[if test "x$withval" != "x"; then
e2sysconfdir="${sysconfdir}/${withval}"
else
e2sysconfdir="${sysconfdir}"
fi],
[e2sysconfdir="${sysconfdir}/${PACKAGE_NAME}"])
AC_FINALIZE_VAR(E2LIBDIR,"${libdir}")
AC_SUBST(E2LIBDIR)
AC_FINALIZE_VAR(E2BINDIR,"${sbindir}")
AC_SUBST(E2BINDIR)
AC_FINALIZE_VAR(E2CONFDIR,"${e2sysconfdir}")
AC_SUBST(E2CONFDIR)
AC_FINALIZE_VAR(E2DATADIR,"${datadir}/${PACKAGE_NAME}")
AC_SUBST(E2DATADIR)
AC_FINALIZE_VAR(E2CONFFILE,"${e2sysconfdir}/${PACKAGE_NAME}.conf")
AC_SUBST(E2CONFFILE)
#AC_DEFINE_UNQUOTED(__CONFDIR,"${e2sysconfdir}","")
AC_DEFINE_UNQUOTED([__DATADIR],["${E2DATADIR}"],["Data directory path"])
AC_DEFINE_UNQUOTED(__CONFFILE,"${e2sysconfdir}/${PACKAGE_NAME}.conf","Configure file path")
AC_CONFIG_FILES([Makefile
data/Makefile
data/languages/Makefile
data/scripts/Makefile
data/scripts/bsd-init
data/scripts/e2guardian
data/scripts/logrotation
data/scripts/solaris-init
data/scripts/systemv-init
data/scripts/e2guardian.service
doc/Makefile
configs/e2guardian.conf
configs/e2guardianf1.conf
configs/examplef1.story
configs/Makefile
configs/lists/Makefile
configs/lists/common/Makefile
configs/lists/example.group/Makefile
configs/lists/phraselists/Makefile
configs/lists/oldphraselists/Makefile
configs/lists/rooms/Makefile
configs/lists/contentscanners/Makefile
configs/lists/example.group/bannedphraselist
configs/lists/example.group/oldbannedphraselist
configs/lists/example.group/bannedurllist
configs/lists/example.group/bannedsitelist
configs/lists/example.group/domainsnobypass
configs/lists/example.group/urlnobypass
configs/lists/example.group/exceptionphraselist
configs/lists/example.group/weightedphraselist
configs/lists/example.group/oldexceptionphraselist
configs/lists/example.group/oldweightedphraselist
configs/downloadmanagers/Makefile
configs/downloadmanagers/default.conf
configs/contentscanners/Makefile
configs/contentscanners/clamdscan.conf
configs/contentscanners/avastdscan.conf
configs/contentscanners/icapscan.conf
configs/contentscanners/kavdscan.conf
configs/contentscanners/commandlinescan.conf
configs/authplugins/Makefile
configs/lists/authplugins/Makefile
configs/lists/downloadmanagers/Makefile
src/Makefile
])
AC_OUTPUT