-
Notifications
You must be signed in to change notification settings - Fork 658
/
configure.ac.in
1022 lines (895 loc) · 32.2 KB
/
configure.ac.in
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
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
AC_INIT([ntopng],[@VERSION@])
AC_CONFIG_MACRO_DIR([m4])
HERE=`pwd`
SYSTEM=`uname -s`
if test "${with_sanitizer+set}" = set || "${with_leak_sanitizer+set}" = set; then
# Setting debug flags in CFLAGS/CXXFLAGS to avoid AC_PROG_CPP add -O2
CFLAGS="-g -O0"
CXXFLAGS="-g -O0"
fi
AC_PROG_CPP
AC_PROG_CXX
PKG_PROG_PKG_CONFIG
AC_ARG_WITH(leak-sanitizer, [ --with-leak-sanitizer Build with support for the LLVM address leak and sanitizer])
AS_IF([test "${with_leak_sanitizer+set}" = set],[
CFLAGS="${CFLAGS} -Wall -Wno-unused-value -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak -fno-omit-frame-pointer"
CXXFLAGS="${CXXFLAGS} -Wall -Wno-unused-value -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak -fno-omit-frame-pointer"
LDFLAGS="${LDFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak"
USE_CLANG=yes
])
if test $SYSTEM = "Darwin" && "${with_leak_sanitizer+set}" = set; then
echo "FATAL ERROR: sorry --with-leak-sanitizer is not available on macOS"
exit -1
fi
AC_ARG_WITH(sanitizer, [ --with-sanitizer Build with support for the LLVM address sanitizer])
AS_IF([test "${with_sanitizer+set}" = set],[
CFLAGS="${CFLAGS} -Wall -Wno-unused-value -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fno-omit-frame-pointer"
CXXFLAGS="${CXXFLAGS} -Wall -Wno-unused-value -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fno-omit-frame-pointer"
LDFLAGS="${LDFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment"
USE_CLANG=yes
])
AC_ARG_ENABLE(fuzztargets, AS_HELP_STRING([--enable-fuzztargets], [Enable fuzz targets]), [enable_fuzztargets=$enableval], [enable_fuzztargets=no])
AC_ARG_ENABLE(fuzztargets-local, AS_HELP_STRING([--enable-fuzztargets-local], [Enable fuzz targets for local testing]), [enable_fuzztargets_local=$enableval], [enable_fuzztargets_local=no])
AC_ARG_WITH(fuzz-protobuf, AS_HELP_STRING([--with-fuzz-protobuf], [Build with protobuf mutator support]), [with_fuzz_protobuf=$enableval], [with_fuzz_protobuf=no])
AS_VAR_IF(enable_fuzztargets_local, yes, [enable_fuzztargets="yes" AC_SUBST(FUZZ_LOCAL_TEST, "1")])
AS_VAR_IF(with_fuzz_protobuf, yes, [
AC_SUBST(FUZZ_WITH_PROTOBUF, "1")
PKG_CHECK_MODULES(LIBPROTOBUF_MUTATOR, libprotobuf-mutator, [], [AC_MSG_ERROR(Could not find libprotobuf-mutator. Perhaps you should set PKG_CONFIG_PATH accordingly)])
PKG_CHECK_MODULES(PROTOBUF, protobuf, [], [AC_MSG_ERROR(Could not find protobuf. Perhaps you should set PKG_CONFIG_PATH accordingly)])
])
FUZZ_MAKEFILE_INC=
FUZZ_OBJECTS=
AS_VAR_IF(enable_fuzztargets, yes, [
FUZZ_MAKEFILE_INC="include ./fuzz/Makefile"
FUZZ_OBJECTS='$(patsubst %.cpp, %.o, $(wildcard fuzz/stub/*.cpp))'
AC_LANG_PUSH(C++)
AC_SUBST(LIB_FUZZING_ENGINE)
dnl> Check that the compiler supports the flags $LIB_FUZZING_ENGINE
AX_CHECK_COMPILE_FLAG(
$LIB_FUZZING_ENGINE,
[AC_SUBST(HAS_FUZZLDFLAGS, "1")],dnl SUCCESS
[:],dnl FAIL
[],
[AC_LANG_SOURCE([[
#include <sys/types.h>
extern "C" int LLVMFuzzerTestOneInput(const unsigned char *Data, size_t Size);
extern "C" int LLVMFuzzerTestOneInput(const unsigned char *Data, size_t Size) {
(void)Data;
(void)Size;
return 0;
}
]])]
)
AC_LANG_POP()
])
AC_ARG_WITH(hiredis, AS_HELP_STRING([--without-hiredis], [Build without hiredis integration]), [with_hiredis=no], [with_hiredis=yes])
dnl> CLANG_STDLIB="-stdlib=libc++"
dnl> On Ubuntu do sudo apt-get install -y clang-14 clang-tools-14
if test "x$USE_CLANG" = xyes; then
if test $SYSTEM = "Darwin"; then
CC=clang
CXX="clang++ -fno-color-diagnostics -fPIE -stdlib=libc++"
else
if test -x "/usr/bin/clang-10"; then
CLANG_VERSION=10
elif test -x "/usr/bin/clang-13"; then
CLANG_VERSION=13
elif test -x "/usr/bin/clang-14"; then
CLANG_VERSION=14
else
echo "Could not find clang. Please install clang-14 clang-tools-14"
exit 1
fi
CC=clang-$CLANG_VERSION
CXX="clang++-$CLANG_VERSION -fno-color-diagnostics -fPIE $CLANG_STDLIB"
fi
fi
CFLAGS="${CFLAGS} -I${HERE} -I${HERE}/include"
CXXFLAGS="${CXXFLAGS} -I${HERE} -I${HERE}/include"
CXXFLAGS="${CXXFLAGS} -Wno-address-of-packed-member -Wno-unused-function"
dnl> MacOS brew.sh
HOMEBREW_DIR=/opt/homebrew
if test -d $HOMEBREW_DIR; then
CFLAGS="${CFLAGS} -I ${HOMEBREW_DIR}/include"
CXXFLAGS="${CXXFLAGS} -I ${HOMEBREW_DIR}/include"
LDFLAGS="${LDFLAGS} -L ${HOMEBREW_DIR}/lib"
fi
if test -f /proc/device-tree/model; then
IS_RASPBERRY=`cat /proc/device-tree/model | grep -a -e "Orange Pi" -e Raspberry | wc -l`
if test "$IS_RASPBERRY" = "1"; then
CFLAGS="${CFLAGS} -DHAVE_EMBEDDED_SUPPORT"
CXXFLAGS="${CXXFLAGS} -DHAVE_EMBEDDED_SUPPORT"
AC_DEFINE(HAVE_RASPBERRY, 1, [rPI detected])
fi
fi
TODAY=`date +%y%m%d`
NTOPNG_MAJOR=`echo "${PACKAGE_VERSION}" | cut -d . -f 1`
NTOPNG_MINOR=`echo "${PACKAGE_VERSION}" | cut -d . -f 2`
NTOPNG_PATCH=`echo "${PACKAGE_VERSION}" | cut -d . -f 3`
#NTOPNG_SHORT_VERSION="$NTOPNG_MAJOR.$NTOPNG_MINOR.$NTOPNG_PATCH"
NTOPNG_SHORT_VERSION="$NTOPNG_MAJOR.$NTOPNG_MINOR"
NTOPNG_VERSION="$NTOPNG_SHORT_VERSION.$TODAY"
MACHINE=`uname -m`
SYSTEM=`uname -s`
PRO_MAKEFILE_INC=
PRO_INCS=
PRO_LIBS=
ADDITIONAL_PRO_OBJECTS=
PRO_OBJECTS=
PRO_HEADERS=
PRO_LIBS=
AC_ARG_WITH(nedge, [ --with-nedge Enable nEdge device build])
AC_ARG_WITH(nedge, [ --with-test-mode Enable ntopng/nEdge test mode])
CFLAGS="${CFLAGS} -Wall"
OS=""
MAKE=make
BIN_PATH=/usr/bin
LIBPCAP=-lpcap
if test $SYSTEM = "FreeBSD" || test $SYSTEM = "Darwin"; then
CFLAGS="${CFLAGS} -I/usr/local/include"
LDFLAGS="${LDFLAGS} -L/usr/local/lib"
dnl> https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
CC=clang
CXX="clang++ -fpie -fno-color-diagnostics $CLANG_STDLIB"
if test $SYSTEM = "FreeBSD"; then
MAKE=gmake
BIN_PATH=/usr/local/bin
else
dnl> Adds /opt if MacPorts is installed
if [ test -f /opt/local/bin/port ]; then
CFLAGS="${CFLAGS} -I/opt/local/include"
LDFLAGS="${LDFLAGS} -L/opt/local/lib"
fi
fi
dnl> CXX=clang++ -fsanitize=address -fsanitize-address-use-after-scope
OSXV=`sw_vers -productVersion`
if test $SYSTEM = "Darwin"; then
OS="macOS $OSXV"
else
OS=`uname -or | cut -d '-' -f 1`
fi
if test $MACHINE = "x86_64"; then
LDFLAGS="${LDFLAGS} -L/usr/local/opt/ntopng"
RES=`g++ -Wall -fno-color-diagnostics Prefs.cpp 2>&1 | grep "unrecognized command line option "|wc -l`
if test $RES -eq 0; then
CFLAGS="-fno-color-diagnostics $CFLAGS"
fi
fi
fi
dnl> Remove spaces
OS="${OS#"${OS%%[![:space:]]*}"}"
AC_CHECK_LIB([atomic], [__atomic_exchange_8], [LIBS="${LIBS} -latomic"])
AC_ARG_WITH(zmq-static,
[ --with-zmq-static Use static link for the zmq library],
[PKG_CHECK_MODULES_STATIC(ZMQ, [libzmq >= 3],
[AC_DEFINE_UNQUOTED(HAVE_ZMQ, 1, [ZMQ is present])],
[AC_MSG_ERROR(ZMQ not present or too old (< v. 3.x))]
)],
[PKG_CHECK_MODULES(ZMQ, [libzmq >= 3],
[AC_DEFINE_UNQUOTED(HAVE_ZMQ, 1, [ZMQ is present])],
[AC_MSG_ERROR(ZMQ not present or too old (< v. 3.x))]
)]
)
AC_CHECK_LIB([sodium], [sodium_init], LIBS="${LIBS} -lsodium")
AC_CHECK_LIB([rdkafka], [rd_kafka_metadata], AC_DEFINE_UNQUOTED(HAVE_KAFKA, 1, [librdkafka is installed] LIBS="${LIBS} -lrdkafka") LIBS="${LIBS} -lrdkafka")
AC_CHECK_LIB([nats], [natsOptions_Create], AC_DEFINE_UNQUOTED(HAVE_NATS, 1, [nats is installed] LIBS="${LIBS} -lnats") LIBS="${LIBS} -lnats")
NEDGE=0
if test "${with_nedge+set}" = set; then
AC_DEFINE(HAVE_NEDGE, 1, [nedge support is present])
NEDGE=1
AC_CHECK_HEADERS([netinet/in.h libnetfilter_queue/libnetfilter_queue.h])
AC_CHECK_LIB([netfilter_queue], [nfq_create_queue])
AC_CHECK_LIB([nfnetlink], [nfnl_rcvbufsiz])
AC_CHECK_LIB([netfilter_conntrack], [nfct_filter_dump_create], nfct=true)
AC_CHECK_FUNC([nfq_set_verdict2], [AC_DEFINE([HAVE_NFQ_SET_VERDICT2],[1],[Define if nfq_set_verdict2 exists in netfilter_queue.])])
if test "x$ac_cv_lib_netfilter_queue_nfq_create_queue" != xyes; then
AC_MSG_RESULT(Cannot build nedge without Netfilter, exiting.)
exit 1
fi
if test x$nfct = x; then
AC_MSG_RESULT(Cannot build nedge without Conntrack, exiting.)
exit 1
fi
LIBS="${LIBS} -lnetfilter_queue -lnfnetlink -lnetfilter_conntrack"
fi
if test -d "/usr/local/include"; then
CFLAGS="${CFLAGS} -I/usr/local/include"
CXXFLAGS="${CXXFLAGS} -I/usr/local/include"
fi
if test -d "/usr/local/lib"; then
LIBS="${LIBS} -L/usr/local/lib"
fi
if test -d /opt/local/include; then :
CFLAGS="${CFLAGS} -I/opt/local/include"
CXXFLAGS="${CXXFLAGS} -I/opt/local/include"
fi
if test -d /opt/local/lib; then :
LIBS="${LIBS} -L/opt/local/lib"
fi
if [ test -f /usr/bin/lsb_release ]; then
CODENAME=`/usr/bin/lsb_release -c|cut -f 2`
if test $CODENAME = "wheezy" ; then
CXXFLAGS="${CXXFLAGS} -DOLD_NETFILTER_INTERFACE=1"
fi
fi
if test -d "pro/"; then
NTOPCLOUD_LIB=
NTOPCLOUD_HOME="../ntopcloud"
if test -d "${NTOPCLOUD_HOME}"; then
CFLAGS="${CFLAGS} -I${NTOPCLOUD_HOME}"
CXXFLAGS="${CXXFLAGS} -I${NTOPCLOUD_HOME}"
NTOPCLOUD_LIB="${NTOPCLOUD_HOME}/libcloud.a"
AC_DEFINE(HAVE_NTOP_CLOUD, 1, [ntop cloud detected])
fi
fi
JE=../jemalloc/lib/libjemalloc.a
if ! test -f "${JE}"; then
JE=
else
AC_DEFINE(HAVE_JEMALLOC, 1, [ntopng has been compiled with jemalloc])
fi
SHORT_MACHINE=`uname -m | cut -b1-3`
GIT_RELEASE="@GIT_RELEASE@"
GIT_DATE="@GIT_DATE@"
GIT_BRANCH="@GIT_BRANCH@"
PRO_GIT_RELEASE="@PRO_GIT_RELEASE@"
PRO_GIT_DATE="@PRO_GIT_DATE@"
dnl start: nDPI handling
AC_ARG_WITH(ndpi-static-lib,
[ --with-ndpi-static-lib=DIR Search the specified directory for nDPI static library],
[
if test -d $withval ; then :
AC_MSG_CHECKING(your own nDPI library)
if test -r $withval/libndpi.a; then
AC_MSG_RESULT(ok)
NDPI_CUST_LIB=$withval/libndpi.a
else
AC_MSG_RESULT(no)
AC_MSG_ERROR(ERROR: Unable to find custom nDPI static library in $withval)
fi
else
AC_MSG_ERROR(ERROR: Can't open custom nDPI static library directory $withval)
fi
])
AC_ARG_WITH(ndpi-includes,
[ --with-ndpi-includes=DIR Search the specified directory for nDPI header files],
[
if test ! -d $withval ; then :
AC_MSG_ERROR(ERROR: Can't open custom nDPI header files directory $withval)
fi
if test ! -r $withval/ndpi_main.h ; then :
AC_MSG_ERROR(ERROR: Can't read ndpi_main.h in custom nDPI header files directory $withval)
fi
NDPI_CUST_INC="-I$withval -I$withval/../lib/third_party/include"
])
if test -d /usr/local/include/ndpi ; then :
echo "WARNING: /usr/local/include/ndpi is present and might lead to compile errors"
fi
NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`
NDPI_LIB=
NDPI_LIB_DEP=
AC_MSG_CHECKING(for nDPI source)
if test -d "./nDPI" ; then :
NDPI_HOME=./nDPI
elif test -d "../nDPI" ; then :
NDPI_HOME=../nDPI
elif test -d "$HOME/nDPI" ; then :
NDPI_HOME=$HOME/nDPI
fi
if test ! -z "$NDPI_HOME" ; then :
AC_MSG_RESULT(found in $NDPI_HOME)
NDPI_LIB=$NDPI_HOME/src/lib/libndpi.a
AC_MSG_CHECKING(for $NDPI_LIB)
if test -r $NDPI_LIB ; then :
AC_MSG_RESULT(found $NDPI_LIB)
else
AC_MSG_RESULT(not found $NDPI_LIB: compiling)
cd $NDPI_HOME; ./autogen.sh; ${MAKE}; cd -
fi
NDPI_INC="-I$NDPI_HOME/src/include -I$NDPI_HOME/src/lib/third_party/include"
NDPI_LIB=$NDPI_HOME/src/lib/libndpi.a
NDPI_LIB_DEP=$NDPI_LIB
else
AC_MSG_RESULT(not found)
fi
if test ! -z "$NDPI_CUST_INC" ; then :
NDPI_INC=$NDPI_CUST_INC
fi
if test ! -z "$NDPI_CUST_LIB" ; then :
NDPI_LIB=$NDPI_CUST_LIB
fi
if test -z "$NDPI_INC" || test -z "$NDPI_LIB" ; then :
echo "Could not find nDPI"
echo "Please do cd ..; git clone https://github.com/ntop/nDPI.git; cd nDPI; ./autogen.sh; ${MAKE}; cd ../ntopng"
echo "and try again"
exit 1
fi
dnl finish: nDPI handling
AC_ARG_WITH(json-c-static,
[ --with-json-c-static Use static link for the json-c library],
[PKG_CHECK_MODULES_STATIC(JSON, json-c, [], [AC_MSG_ERROR(Please install libjson-c-dev package prerequisite)])],
[PKG_CHECK_MODULES(JSON, json-c, [], [AC_MSG_ERROR(Please install libjson-c-dev package prerequisite)])]
)
if test -x /bin/freebsd-version; then
FREEBSD_VERSION=`freebsd-version | cut -f 1 -d '.'`
fi
pkg-config --exists libssl
if test "$?" -ne 1; then
AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
SSL_INC="`pkg-config --cflags libssl` -I/usr/include/openssl"
SSL_LIB="`pkg-config --libs libssl` -lssl -lcrypto"
else
dnl Workaround for MacOS Brew
if test -d "/usr/local/Cellar/openssl@1.1"; then
AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
SSL_INC="-I/usr/local/Cellar/openssl@1.1/include"
SSL_LIB="-L/usr/local/Cellar/openssl@1.1/lib -lssl -lcrypto"
elif test -d "/usr/local/opt/openssl/lib"; then
AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
SSL_INC="-I/usr/local/opt/openssl/include"
SSL_LIB="-L/usr/local/opt/openssl/lib -lssl -lcrypto"
elif test -d "/opt/homebrew/Cellar/openssl@1.1"; then
AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
SSL_INC="-I/opt/homebrew/Cellar/openssl@1.1/include"
SSL_LIB="-L/opt/homebrew/Cellar/openssl@1.1 -lssl -lcrypto"
elif test -d "/usr/local/opt/openssl/lib"; then
AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
SSL_INC="-I/usr/local/opt/openssl/include"
SSL_LIB="-L/usr/local/opt/openssl/lib -lssl -lcrypto"
dnl Workaround for FreeBSD
elif test -f "/usr/lib/libssl.so"; then
AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
SSL_INC="-I/usr/include"
SSL_LIB="-L/usr/lib -lssl -lcrypto"
else
echo "Please install openssl-dev(el) package prerequisite"
exit -1
fi
fi
AC_MSG_CHECKING([PF_RING nBPF])
NBPF_HOME=${PWD}/../PF_RING/userland/nbpf
LIBNBPF=${NBPF_HOME}/libnbpf.a
if test -f ${LIBNBPF}; then :
LIBS="${LIBS} ${LIBNBPF}"
CFLAGS="${CFLAGS} -I${NBPF_HOME}"
AC_DEFINE_UNQUOTED(HAVE_NBPF, "1", [PF_RING nBPF is present])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(for ntopng professional edition)
REDIS_SERVICE="redis.service"
if [ test -f /usr/bin/lsb_release ]; then
UBUNTU_RELEASE=`lsb_release -r|cut -f 2`
UBUNTU_SUB_RELEASE=`echo $UBUNTU_RELEASE|cut -f 1 -d '.'`
if test "$UBUNTU_SUB_RELEASE" = "8" || test "$UBUNTU_SUB_RELEASE" = "10"; then
REDIS_SERVICE="redis-server.service"
fi
fi
SERVICE_ALIAS=
SERVICE_REQUIRES=
SERVICE_WANTS=${REDIS_SERVICE}
if test "$MACHINE" = "armv7l"; then
SERVICE_AFTER="network-online.target time-sync.target syslog.target ${REDIS_SERVICE}"
if test "${with_nedge+set}" = "set"; then
SERVICE_ALIAS="nedge.service"
fi
elif test "${with_nedge+set}" = "set"; then
SERVICE_AFTER="network-online.target syslog.target ${REDIS_SERVICE}"
SERVICE_REQUIRES="${SERVICE_REQUIRES} nedge_pinger.service"
SERVICE_WANTS="network-online.target ${SERVICE_WANTS}"
SERVICE_PRE="ExecStartPre=sleep 5"
SERVICE_ALIAS="nedge.service"
else
SERVICE_AFTER="network.target syslog.target ${REDIS_SERVICE} pf_ring.service cluster.service mysql.service"
SERVICE_WANTS="${SERVICE_WANTS} pf_ring.service cluster.service"
fi
APP=
if test "${with_nedge+set}" = "set"; then
APP=nedge
else
APP=ntopng
fi
if test -d "pro"; then :
AC_MSG_RESULT(yes)
PRO_OBJECTS='$(patsubst pro/src/%.cpp, pro/src/%.o, $(wildcard pro/src/*.cpp)) $(patsubst pro/src/flow_checks/%.cpp, pro/src/flow_checks/%.o, $(wildcard pro/src/flow_checks/*.cpp)) $(patsubst pro/src/host_checks/%.cpp, pro/src/host_checks/%.o, $(wildcard pro/src/host_checks/*.cpp))'
CFLAGS="${CFLAGS} -I ./pro/include -I./pro/include/flow_checks -I ./pro/include/host_checks"
PRO_HEADERS='$(wildcard pro/include/*.h) $(wildcard pro/include/flow_checks/*.h) $(wildcard pro/include/host_checks/*.h) '
PRO_MAKEFILE_INC="include ./pro/inc.Makefile"
dnl> Remove heading spaces
AC_DEFINE_UNQUOTED(NTOPNG_PRO, 1, [Building ntopng professional])
AC_DEFINE_UNQUOTED(HAVE_CLICKHOUSE, 1, [Building with ClickHouse support])
AC_DEFINE_UNQUOTED(NTOPNG_PRO_GIT_RELEASE, "r${PRO_GIT_RELEASE}", [ntopng professional release])
AC_DEFINE_UNQUOTED(NTOPNG_PRO_GIT_DATE, "${PRO_GIT_DATE}", [ntopng professional date])
DUMMY=`cd ./pro; ${MAKE} build`
PRO_INCS="${PRO_INCS} -I${HERE}/pro -I${HERE}/pro/utils -I${HERE}/pro/third-party/libb64-1.2.1/include"
if test -r "../license/license.h"; then :
LICENSEDIR="`pwd`/../license"
LICENSELIBS="-L${LICENSEDIR} -llicense -L${LICENSEDIR}/license-manager/client/ -llicmgrclient"
AC_DEFINE_UNQUOTED(NTOPNG_PRO_HAVE_LICENSE, 1, [ntopng has license])
PRO_LIBS="${PRO_LIBS} ${LICENSELIBS}"
LICENSE_VERSION=`${LICENSEDIR}/packages/version.sh --version`
LICENSE_DEP="ntop-license = ${LICENSE_VERSION}, ndpi"
fi
else
AC_MSG_RESULT(not found)
fi
GIT_COMMITS=`git rev-list --all |wc -l | tr -d '[[:space:]]'`
REVISION=${GIT_COMMITS}
AC_DEFINE_UNQUOTED(PACKAGE_REVISION, "${GIT_COMMITS}", [Package Revision])
AC_DEFINE_UNQUOTED(NTOPNG_GIT_RELEASE, "${GIT_BRANCH}:${GIT_RELEASE}", [GIT Release])
AC_DEFINE_UNQUOTED(NTOPNG_GIT_DATE, "${GIT_DATE}", [Last GIT change])
if test -z `which pkg-config`; then
echo "#!/bin/sh\n" > pkg-config
fi
if test -f ".git/index"; then
GIT_INDEX=".git/index"
fi
if test $SYSTEM = "Linux"; then
if [ test -f /usr/bin/lsb_release ]; then
OSNAME=`/usr/bin/lsb_release -d|cut -d ':' -f 2| sed -e 's/^[[[:space:]]]*//'`
OS="$OSNAME"
else
if test -f /etc/debian_version; then
DEBIAN_VERSION=`cat /etc/debian_version`
OSNAME="Debian $DEBIAN_VERSION"
else
if test -f /etc/redhat-release; then
OS=`cat /etc/redhat-release | cut -d '(' -f 1 | awk '{$1=$1};1'`
else
OS=`./config.guess`
fi
fi
fi
else
dnl> wget -O config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
if test $SYSTEM = "FreeBSD"; then
OSNAME=$OS
else
OSNAME=`./config.guess`
fi
fi
if test $MACHINE = "x86_64"; then
EXTN="amd64"
else
if test $MACHINE = "i686"; then
EXTN="i386"
fi
fi
DATE=`date +"%Y-%m-%d"`
AC_CHECK_LIB(resolv, inet_aton)
HIREDIS_INC=
HIREDIS_LIB=
AS_VAR_IF(with_hiredis, yes, [
if test -f "${HOME}/hiredis/libhiredis.a" ; then :
HIREDIS_INC="-I${HOME}/hiredis/"
HIREDIS_LIB="${HOME}/hiredis/libhiredis.a"
else
pkg-config --exists hiredis
if test "$?" -ne 1; then
HIREDIS_INC="`pkg-config --cflags hiredis` -I/usr/include/hiredis"
if test $SYSTEM = "FreeBSD" && $FREEBSD_VERSION != "15"; then
dnl> Note: on freebsd 15 .a is not installed
HIREDIS_LIB="/usr/local/lib/libhiredis.a"
else
HIREDIS_LIB="`pkg-config --libs hiredis`"
fi
else
echo "Please install hiredis package prerequisite"
exit -1
fi
fi
])
if test "${with_nedge+set}" != set; then
if test -d "${HOME}/PF_RING" ; then :
PF_RING_HOME=${HOME}/PF_RING
elif test -d "../PF_RING" ; then :
PF_RING_HOME=../PF_RING
elif test -d "./PF_RING" ; then :
PF_RING_HOME=./PF_RING
else
PF_RING_HOME=${HOME}/PF_RING
fi
if test $SYSTEM = "FreeBSD"; then
LIBPCAP="${PF_RING_HOME}/userland/libpcap/libpcap.a"
else
if test -d ${PF_RING_HOME}; then
AC_MSG_CHECKING(for PF_RING source installed in $PF_RING_HOME)
fi
fi
if test -f "/usr/local/lib/libpfring.a" || test -f "/opt/pfring/lib/libpfring.a" || test -f "${PF_RING_HOME}/userland/lib/libpfring.a"; then
AC_DEFINE_UNQUOTED(HAVE_PF_RING, 1, [Native PF_RING support])
if test -f "${PF_RING_HOME}/userland/lib/libpfring.a"; then
echo "${PF_RING_HOME}/userland/libpcap/libpcap.a"
if test -f "${PF_RING_HOME}/userland/libpcap/libpcap.a"; then
LIBS="${LIBS} ${PF_RING_HOME}/userland/lib/libpfring.a -L${PF_RING_HOME}/userland/libpcap/ `${PF_RING_HOME}/userland/lib/pfring_config --libs`"
CXXFLAGS="${CXXFLAGS} -I${PF_RING_HOME}/kernel -I${PF_RING_HOME}/userland/lib -I${PF_RING_HOME}/userland/libpcap"
echo "Using PF_RING installed in ${PF_RING_HOME}"
else
echo "Found PF_RING but the userland libs have not been compiled"
exit 1
fi
else
if test -d "/opt/pfring"; then
if test -f "/opt/pfring/lib/libpfring.a"; then
echo "/opt/pfring/lib/libpfring.a"
LIBS="${LIBS} /opt/pfring/lib/libpfring.a -L/opt/pfring/lib"
CXXFLAGS="${CXXFLAGS} -I/opt/pfring/include"
echo "Using PF_RING installed in /opt/pfring"
else
if test -f "/usr/local/lib/libpfring.a"; then
if test -f "/usr/local/lib/libpcap.a"; then
LIBS="${LIBS} /usr/local/lib/libpfring.a"
echo "Using PF_RING installed in /usr/local/lib"
AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true)
if test x$pcap = x
then
echo "Found /usr/local/lib/libpfring.a but missing header files."
exit 1
fi
else
echo "Found /usr/local/lib/libpfring.a but missing libpcap.a in the same directory"
echo "Please make sure you have installed your PF_RING libraries and try again"
exit 1
fi
fi
fi
else
LIBS="${LIBS} -lpfring -lpcap"
echo "Compiling ntopng with PF_RING support [${LIBS}]"
fi
fi
else
AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true)
if test x$pcap = x
then
echo "Please install libpcap(-dev) (http://tcpdump.org)"
exit 1
fi
fi
fi
SNMP_LIB=
SNMP_INC=
if test "${with_nedge+set}" != set; then
if test $SYSTEM = "Darwin"; then
dnl>
dnl> MacOS Note on NET-SNMP
dnl>
dnl> Note MacOS support can be enbled by uncommenting the lines below
dnl> however net-snmp threaded API seems to be bugged on MacOS thus
dnl> we better keep it commented unless you know what you are doing
dnl>
dnl> if test -d "/usr/local/opt/net-snmp/lib/"; then
dnl> SNMP_LIB="-L/usr/local/opt/net-snmp/lib/ -lsnmp"
dnl> SNMP_INC="-I/usr/local/opt/net-snmp/include/"
dnl> AC_DEFINE_UNQUOTED(HAVE_LIBSNMP, 1, [has net-snmp])
dnl> fi
SNMP_LIB=
else
AC_CHECK_LIB([snmp], [init_snmp])
if test "x$ac_cv_lib_snmp_init_snmp" = xyes; then :
SNMP_LIB="-lsnmp"
else
AC_CHECK_LIB([netsnmp], [init_snmp])
if test "x$ac_cv_lib_netsnmp_init_snmp" = xyes; then :
SNMP_LIB="-lnetsnmp"
AC_DEFINE_UNQUOTED(HAVE_LIBSNMP, 1, [has net-snmp])
fi
fi
fi
fi
if test "${with_nedge+set}" != set; then
FRING_VERSION=""
if test -f "$HOME/PF_RING/kernel/linux/pf_ring.h"; then
PFRING_VERSION=`$HOME/PF_RING/package/version.sh --version`
fi
fi
AC_CHECK_LIB([cap], [cap_get_proc], cap=true)
if test x$cap != x; then
LIBS="${LIBS} -lcap"
AC_DEFINE([HAVE_LIBCAP],[1],[Support for privilege drop])
fi
if test "${with_nedge+set}" != set; then
if test $SYSTEM != "FreeBSD"; then
AC_CHECK_LIB([ldap], [ldap_initialize], [LIBS="${LIBS} -lldap -llber"])
if test "x$ac_cv_lib_ldap_ldap_initialize" = xyes; then
AC_DEFINE_UNQUOTED(HAVE_LDAP, 1, [LDAP support is present])
fi
fi
fi
UGLIFYJS=`which uglifyjs`
if test x$UGLIFYJS != x; then
UGLIFYJS_VERSION=`$UGLIFYJS --version | cut -f 2 -d" "`
UGLIFYJS_MAJOR_VERSION="${UGLIFYJS_VERSION%%.*}"
fi
AC_CHECK_LIB(gtest, main, AC_MSG_RESULT(Please type 'make unit_test' to compile unit tests),
AC_MSG_RESULT([Please do 'sudo apt-get install libgtest-dev' in order to enable unit tests]))
AC_CHECK_LIB([rrd_th], [rrd_update_r], [LIBRRD_LD_FLAGS=-lrrd_th], [LIBRRD_LD_FLAGS=`pkg-config --libs librrd`])
AC_CHECK_LIB([nl], [nl_handle_alloc], [LIBS="${LIBS} -lnl"])
AC_CHECK_LIB([rt], [clock_gettime], [LIBS="${LIBS} -lrt"])
AC_CHECK_LIB([z], [zlibVersion], [LIBS="${LIBS} -lz"; AC_DEFINE_UNQUOTED(HAVE_ZLIB, 1, [zlib is present])])
dnl> ldl (used by edjdb)
AC_CHECK_LIB([dl], [dlopen], [LIBS="${LIBS} -ldl"])
AC_CHECK_LIB([curl], [curl_easy_perform], [LIBS="${LIBS} -lcurl"])
if test ${ac_cv_lib_curl_curl_easy_perform} = "no"; then
echo "Please install libcurl(-dev) (http://curl.haxx.se/)"
exit 1
else
dnl> libcurl has CURLOPT_MAIL_RCPT only starting at version 7.20.0
dnl> https://github.com/curl/curl/blob/curl-7_20_0/TODO-RELEASE
AC_MSG_CHECKING(for curl SMTP support)
if `pkg-config --atleast-version="7.20.0" libcurl` ; then
AC_DEFINE_UNQUOTED(HAVE_CURL_SMTP, 1, [curl supports SMTP])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
fi
RPM_SIGN_CMD="rpm --addsign"
if test -f "/etc/centos-release"; then
CENTOS_RELEASE=`cat /etc/centos-release | cut -d ' ' -f 3|cut -d '.' -f 1`
if test $CENTOS_RELEASE = "release"; then
CENTOS_RELEASE=`cat /etc/centos-release | cut -d ' ' -f 4|cut -d '.' -f 1`
fi
if test "$CENTOS_RELEASE" -ne 8; then
RPM_SIGN_CMD="./packages/rpm-sign.exp"
fi
fi
AC_ARG_WITH(maxminddb-static,
[ --with-maxminddb-static Use static link for the maxminddb library],
[PKG_CHECK_MODULES_STATIC(MAXMINDDB, libmaxminddb,
[
DOWNLOAD_GEOIP=1
AC_DEFINE_UNQUOTED(HAVE_MAXMINDDB, 1, [MaxMind DB support])
],
[AC_MSG_ERROR(Please install libmaxminddb-dev (https://github.com/maxmind/libmaxminddb) and try again)]
)],
[PKG_CHECK_MODULES(MAXMINDDB, libmaxminddb,
[
DOWNLOAD_GEOIP=1
AC_DEFINE_UNQUOTED(HAVE_MAXMINDDB, 1, [MaxMind DB support])
],
[AC_MSG_ERROR(Please install libmaxminddb-dev (https://github.com/maxmind/libmaxminddb) and try again)]
)]
)
AC_CHECK_LIB([sqlite3], [sqlite3_open], sqlite=true)
if test x$sqlite = xtrue; then
AC_DEFINE_UNQUOTED([HAVE_SQLITE], 1, [We have sqlite])
SQLITE_LIB="-lsqlite3"
else
echo "SQLite 3.x missing (libsqlite3-dev): please install it and try again"
exit 1
fi
if test $SYSTEM != "FreeBSD"; then
AC_CHECK_TOOL(MARIADB, mariadb_config)
if test "x$ac_cv_prog_ac_ct_MARIADB" = "xmariadb_config"; then
MYSQLTOOL="mariadb_config"
else
PATH=$PATH:/usr/local/mysql/bin
AC_CHECK_TOOL(MYSQL, mysql_config)
if test "x$ac_cv_prog_ac_ct_MYSQL" = "xmysql_config"; then
MYSQLTOOL="mysql_config"
else
MYSQLTOOL=""
fi
fi
if test -n "$MYSQLTOOL"; then
MYSQLLIBS="`$MYSQLTOOL --libs_r`"
if test ".$MYSQLLIBS" != "."; then
MYSQL_LIB="`$MYSQLTOOL --libs`"
else
MYSQL_LIB="`$MYSQLTOOL --libs_r`"
fi
MYSQL_INC="`$MYSQLTOOL --include`"
AC_DEFINE_UNQUOTED(HAVE_MYSQL, 1, [use mysql])
AC_CHECK_LIB([wrap], [main])
else
echo "Building without support for MySQL libraries."
fi
else
dnl> FreeBSD
if test -f "/usr/local/lib/mysql/libmysqlclient.a"; then
MYSQL_LIB=/usr/local/lib/mysql/libmysqlclient.a
MYSQL_INC="-I /usr/local/include/mysql/"
AC_DEFINE_UNQUOTED(HAVE_MYSQL, 1, [use mysql])
fi
fi
AC_CHECK_LIB([expat], [XML_ParserCreate], expat=true)
if test x$expat = xtrue; then
AC_DEFINE_UNQUOTED(HAVE_EXPAT, 1, [Expath present, needed by speedtest])
EXPAT_LIB="-lexpat"
else
echo "Missing libexpat (speedtest disabled). Install libexpat1-dev (apt) or expat-devel (yum)"
fi
AC_CHECK_LIB([radcli], [rc_read_config], radcli=true)
if test x$radcli = xtrue; then
RADCLI_LIB="-lradcli"
AC_DEFINE_UNQUOTED(HAVE_RADIUS, 1, [RADIUS support is present])
AC_CHECK_LIB([radcli], [rc_test_config], rc_test_config=true)
if test x$rc_test_config = xtrue
then
AC_DEFINE_UNQUOTED(HAVE_RC_TEST_CONFIG, 1, [rc_test_config exists in radcli])
fi
fi
AC_CHECK_TYPES([pthread_spinlock_t, pthread_rwlock_t], AC_DEFINE_UNQUOTED(HAVE_RW_LOCK, 1, [pthread rwlocks supported]))
if test -f /usr/bin/lsb_release; then
LINUX_OS_RELEASE=`lsb_release -r | cut -f 2|cut -d '.' -f 1`
else
LINUX_OS_RELEASE=0
fi
if test "${with_nedge+set}" != set; then
if test $LINUX_OS_RELEASE -eq 7; then
MYSQL_DEP="mariadb-libs >= 5.5 tcp_wrappers-libs >= 7.6"
else
MYSQL_DEP="mysql-libs >= 5.1.0 tcp_wrappers-libs >= 7.6"
fi
fi
AC_DEFINE_UNQUOTED(_CRT_SECURE_NO_WARNINGS, 1, [Disable warning on windows])
GMAKE='$(MAKE)'
GIT=`which git`
if test x$GIT = x; then
AC_MSG_RESULT(FATAL ERROR: git is not installed on your host)
fi
umask 002
INSTALL_DIR=${prefix}
if test $INSTALL_DIR = "NONE"; then
INSTALL_DIR=${ac_default_prefix}
fi
if test $SYSTEM = "Darwin"; then
MAN_DIR=$INSTALL_DIR/share/man
else
MAN_DIR=$INSTALL_DIR/man
fi
if test $SYSTEM = "OpenBSD"; then
INSTALL_DIR=${prefix}
MAN_DIR=${prefix}
fi
STABLE_SUFFIX=""
if test $GIT_BRANCH != "dev"; then
STABLE_SUFFIX="-stable"
fi
if test $SYSTEM = "Darwin"; then
MYSQL_LIB=`echo $MYSQL_LIB | sed 's/openssl@1.1/openssl@1.1/g'`
fi
PWD=${HERE}
AC_DEFINE_UNQUOTED(PACKAGE_RELEASE, "r$GIT_RELEASE", [GIT release of this package])
AC_DEFINE_UNQUOTED(PACKAGE_MACHINE, "$MACHINE", [Architecture of this host])
AC_DEFINE_UNQUOTED(PACKAGE_OS, "${OS}", [OS Name])
AC_SUBST(PWD)
AC_SUBST(MACHINE)
AC_SUBST(SYSTEM)
AC_SUBST(BIN_PATH)
AC_SUBST(EXTN)
AC_SUBST(DATE)
AC_SUBST(KERNEL)
AC_SUBST(GIT_RELEASE)
AC_SUBST(LINK_OPTS)
AC_SUBST(SQLITE_LIB)
AC_SUBST(GMAKE)
AC_SUBST(CPP)
AC_SUBST(CXX)
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(NTOPNG_VERSION)
AC_SUBST(NTOPNG_SHORT_VERSION)
AC_SUBST(GIT_RELEASE)
AC_SUBST(GIT_DATE)
AC_SUBST(GIT_INDEX)
AC_SUBST(INSTALL_DIR)
AC_SUBST(MAN_DIR)
AC_SUBST(NDPI_HOME)
AC_SUBST(NDPI_INC)
AC_SUBST(NDPI_LIB)
AC_SUBST(NDPI_LIB_DEP)
AC_SUBST(HIREDIS_INC)
AC_SUBST(HIREDIS_LIB)
AC_SUBST(EXPAT_LIB)
AC_SUBST(RADCLI_LIB)
AC_SUBST(SSL_INC)
AC_SUBST(SSL_LIB)
AC_SUBST(PRO_OBJECTS)
AC_SUBST(PRO_HEADERS)
AC_SUBST(PRO_MAKEFILE_INC)
AC_SUBST(PRO_LIBS)
AC_SUBST(PRO_INCS)
AC_SUBST(LICENSE_DEP)
AC_SUBST(REVISION)
AC_SUBST(MYSQL_LIB)
AC_SUBST(MYSQL_INC)
AC_SUBST(MYSQL_DEP)
AC_SUBST(SNMP_INC)
AC_SUBST(SNMP_LIB)
AC_SUBST(NTOPCLOUD_LIB)
AC_SUBST(PFRING_VERSION)
AC_SUBST(NEDGE)
AC_SUBST(UGLIFYJS_MAJOR_VERSION)
AC_SUBST(SERVICE_AFTER)
AC_SUBST(SERVICE_REQUIRES)
AC_SUBST(SERVICE_WANTS)
AC_SUBST(SERVICE_PRE)
AC_SUBST(SERVICE_ALIAS)
AC_SUBST(APP)
AC_SUBST(JE)
AC_SUBST(LIBPCAP)
AC_SUBST(RPM_SIGN_CMD)
AC_SUBST(LIBRRD_LD_FLAGS)
AC_SUBST(STABLE_SUFFIX)
AC_SUBST(LIBS)
AC_SUBST(FUZZ_MAKEFILE_INC)
AC_SUBST(FUZZ_OBJECTS)
AC_CONFIG_HEADERS(include/config.h)
AC_CONFIG_FILES(packages/ntopng.spec)
AC_CONFIG_FILES(packages/ntopng-data.spec)
AC_CONFIG_FILES(packages/FreeBSD/build.sh)
AC_CONFIG_FILES(packages/OPNsense/build.sh)
AC_CONFIG_FILES(packages/OPNsense/package/+MANIFEST)
AC_CONFIG_FILES(packages/OPNsense/package/+POST_INSTALL)
AC_CONFIG_FILES(packages/OPNsense/package/Makefile)
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(fuzz/Makefile)
AC_CONFIG_FILES(tools/json2tlv/Makefile)
AC_CONFIG_FILES(doc/doxygen.conf)
AC_CONFIG_FILES(httpdocs/misc/ntopng-utils-manage-config)
AC_CONFIG_FILES(httpdocs/misc/ntopng-utils-manage-updates)
AC_CONFIG_FILES(packages/wizard/ntopng-config)
AC_CONFIG_FILES(packages/etc/systemd/system/ntopng.service)
AC_CONFIG_FILES(packages/etc/systemd/system/ntopng@.service)
AC_CONFIG_FILES(python/setup.py)
AC_CONFIG_FILES(python/__init__.py)
AC_OUTPUT
if test -f "httpdocs/misc/ntopng-utils-manage-config"; then
chmod +x httpdocs/misc/ntopng-utils-manage-config
fi
if test -f "httpdocs/misc/ntopng-utils-manage-updates"; then
chmod +x httpdocs/misc/ntopng-utils-manage-updates
fi
if test -f "packages/wizard/ntopng-config"; then
chmod +x packages/wizard/ntopng-config
fi
if test -f "packages/OPNsense/build.sh"; then
chmod +x packages/OPNsense/build.sh
fi
echo "
This is the ntopng configuration:
C Compiler : ${CC}
C Flags : ${CFLAGS}
C++ Compiler : ${CXX}
C++ Flags : ${CXXFLAGS}
Preprocessor : ${CPP}
Preprocessor Flags : ${CPPFLAGS}
Linker Flags: : ${LDFLAGS}
System Libs : ${LIBS}
nDPI Lib: : ${NDPI_LIB}
JSON Lib: : ${JSON_LIBS}
SSL Lib: : ${SSL_LIB}
SNMP Lib : ${SNMP_LIB}
Expat Lib : ${EXPAT_LIB}
SQLite Lib : ${SQLITE_LIB}
MySQL Lib : ${MYSQL_LIB}
PCAP Lib : ${LIBPCAP}
ZMQ Lib : ${ZMQ_LIBS}
libprotobuf-mutator : ${LIBPROTOBUF_MUTATOR_LIBS}
protobuf Lib : ${PROTOBUF_LIBS}
Install path : ${INSTALL_DIR}