trafgen: parser: Add 'drnd()' function for proto fields
[netsniff-ng.git] / configure
blob5b2afe087d68e44b6c1b27ba0bc420f7d3d3cdaf
1 #!/bin/bash
2 # This isn't a configure generated by autoconf!
3 # netsniff-ng build system
4 # Copyright 2013-2016 Tobias Klauser <tklauser@distanz.ch>
5 # Copyright 2013 Daniel Borkmann <borkmann@gnumaniacs.org>
6 # Subject to the GNU GPL, version 2.
8 MISSING_TOOLCHAIN=0
9 MISSING_DEFS=0
10 MISSING_NACL=0
12 TOOLS="netsniff-ng trafgen astraceroute flowtop ifpps bpfc curvetun mausezahn"
13 TOOLS_NOBUILD=""
15 HAVE_LIBNL=0
16 HAVE_LIBPCAP=0
17 HAVE_HWTSTAMP=0
18 HAVE_LIBGEOIP=0
19 HAVE_LIBZ=0
20 HAVE_TPACKET3=0
22 DISABLE_LIBNL=0
23 DISABLE_GEOIP=0
24 DISABLE_ZLIB=0
25 ENABLE_DEBUG=0
27 PREFIX="/usr/local"
28 HAVE_PREFIX=0
30 SYSCONF_DIR=""
32 usage()
34 echo "Usage: ./configure [OPTION]... [VAR=VALUE]..."
35 echo ""
36 echo " -h, --help Display this help and exit"
37 echo ""
38 echo "Installation directories:"
39 echo " --prefix=PREFIX install architecture-independent files in PREFIX"
40 echo " [$PREFIX]"
41 echo " --sysconfdir=DIR read-only single-machine data [PREFIX/etc]"
42 echo ""
43 echo "By default, \`make install' will install all the files in"
44 echo "\`$PREFIX/bin', \`$PREFIX/lib' etc. You can specify"
45 echo "an installation prefix other than \`$PREFIX' using \`--prefix',"
46 echo "for instance \`--prefix=\$HOME'."
47 echo ""
48 echo "Optional Features:"
49 echo " --disable-libnl Disable libnl support"
50 echo " --disable-geoip Disable geoip support"
51 echo " --disable-zlib Disable zlib support"
52 echo " --enable-debug Enable debug mode (default disabled)"
53 echo ""
54 echo "Some influential environment variables:"
55 echo " CC C compiler command"
56 echo " CROSS_COMPILE C cross-compiler prefix"
58 exit 0
61 while [ $# -gt 0 ] ; do
62 case "$1" in
63 -h|--help)
64 usage
66 --prefix=*)
67 PREFIX="${1#*=}"
68 HAVE_PREFIX=1
70 --sysconfdir=*)
71 SYSCONF_DIR="${1#*=}"
73 --disable-libnl)
74 DISABLE_LIBNL=1
76 --disable-geoip)
77 DISABLE_GEOIP=1
79 --disable-zlib)
80 DISABLE_ZLIB=1
82 --enable-debug)
83 ENABLE_DEBUG=1
86 echo "[!] Unrecognized option: '$1'. Try './configure --help' for more information"
87 exit 1
89 esac
90 shift
91 done
93 [ -z "$CC" ] && CC="${CROSS_COMPILE}gcc"
94 [ -z "$LD" ] && LD="${CROSS_COMPILE}gcc"
95 if [ "x$SYSROOT" != "x" ] ; then
96 PKG_CONFIG_PATH="$SYSROOT/usr/lib/pkgconfig:$PKG_CONFIG_PATH"
98 [ -z $PKG_CONFIG ] && PKG_CONFIG="${CROSS_COMPILE}pkg-config"
100 TMPDIR=$(mktemp -d config.XXXXXX)
101 trap 'status=$?; rm -rf $TMPDIR; exit $status' EXIT HUP INT QUIT TERM
103 tools_remove()
105 local _tools=$TOOLS
106 local _todel=$1
107 TOOLS=""
108 for tool in $_tools ; do
109 case "$tool" in
110 $_todel)
111 case $_todel in
112 $TOOLS_NOBUILD) ;;
113 *) TOOLS_NOBUILD="$TOOLS_NOBUILD $tool" ;;
114 esac ;;
115 *) TOOLS="$TOOLS $tool" ;;
116 esac
117 done
119 TOOLS=${TOOLS# }
120 TOOLS_NOBUILD=${TOOLS_NOBUILD# }
123 check_toolchain()
125 if [ "x$CROSS_COMPILE" != "x" ] ; then
126 echo "[*] Cross-compiling for $($CC -print-multiarch)"
127 echo "CROSS_COMPILE=$CROSS_COMPILE" >> Config
130 echo -n "[*] Checking compiler $CC ... "
131 if [ "x$(which $CC 2>> config.log)" == "x" ] ; then
132 echo "[NO]"
133 MISSING_TOOLCHAIN=1
134 else
135 echo "[YES]"
136 echo "CC=$CC" >> Config
139 echo -n "[*] Checking linker $LD ... "
140 if [ "x$(which $LD 2>> config.log)" == "x" ] ; then
141 echo "[NO]"
142 MISSING_TOOLCHAIN=1
143 else
144 echo "[YES]"
145 echo "LD=$LD" >> Config
148 echo -n "[*] Checking $PKG_CONFIG ... "
149 if [ "x$(which $PKG_CONFIG 2>> config.log)" == "x" ] ; then
150 echo "[NO]"
151 MISSING_TOOLCHAIN=1
152 else
153 echo "[YES]"
154 echo "PKG_CONFIG=$PKG_CONFIG" >> Config
155 echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> Config
159 check_flex()
161 echo -n "[*] Checking flex ... "
163 if [ "x$(which flex 2>> config.log)" == "x" ] ; then
164 echo "[NO]"
165 MISSING_DEFS=1
166 tools_remove "trafgen"
167 tools_remove "bpfc"
168 else
169 echo "[YES]"
173 check_bison()
175 echo -n "[*] Checking bison ... "
177 if [ "x$(which bison 2>> config.log)" == "x" ] ; then
178 echo "[NO]"
179 MISSING_DEFS=1
180 tools_remove "trafgen"
181 tools_remove "bpfc"
182 else
183 echo "[YES]"
187 check_nacl()
189 echo -n "[*] Checking nacl ... "
191 cat > $TMPDIR/nacltest.c << EOF
192 #include "crypto_hash_sha512.h"
193 #include "crypto_verify_32.h"
194 #include "crypto_hash_sha512.h"
195 #include "crypto_box_curve25519xsalsa20poly1305.h"
196 #include "crypto_scalarmult_curve25519.h"
197 #include "crypto_auth_hmacsha512256.h"
199 int main(void) { }
202 if [ -z $NACL_INC_DIR ] ; then
203 NACL_INC_DIR="$SYSROOT/usr/include/nacl"
206 if [ -z $NACL_LIB_DIR ] ; then
207 NACL_LIB_DIR="$SYSROOT/usr/lib"
210 if [ -z $NACL_LIB ] ; then
211 NACL_LIB="nacl"
214 LDFLAGS="-L $NACL_LIB_DIR"
215 CFLAGS="-I $NACL_INC_DIR"
217 $CC $CFLAGS $LDFLAGS -o $TMPDIR/nacltest $TMPDIR/nacltest.c >> config.log 2>&1
218 if [ ! -x $TMPDIR/nacltest ] ; then
219 echo "[NO]"
220 MISSING_NACL=1
221 tools_remove "curvetun"
222 else
223 echo "[YES]"
224 echo "CONFIG_NACL_INC_DIR:=$NACL_INC_DIR" >> Config
225 echo "CONFIG_NACL_LIB_DIR:=$NACL_LIB_DIR" >> Config
226 echo "CONFIG_NACL_LIB:=$NACL_LIB" >> Config
230 check_libnl()
232 echo -n "[*] Checking libnl ... "
234 if [ "$DISABLE_LIBNL" == "1" ] ; then
235 echo "[DISABLED]"
236 return
239 cat > $TMPDIR/libnltest.c << EOF
240 #include <netlink/genl/genl.h>
241 #include <netlink/genl/family.h>
242 #include <netlink/genl/ctrl.h>
243 #include <netlink/msg.h>
244 #include <netlink/attr.h>
245 #include <netlink/version.h>
247 #if LIBNL_VER_NUM < LIBNL_VER(3,0)
248 # error incompatible libnl version
249 #endif
251 int main(void)
253 struct nl_sock *sock = nl_socket_alloc();
254 struct nl_cache *nl_cache;
255 int ret = genl_connect(sock);
257 ret = genl_ctrl_alloc_cache(sock, &nl_cache);
261 $CC \
262 $($PKG_CONFIG --cflags libnl-3.0 2>> config.log) \
263 $($PKG_CONFIG --cflags libnl-genl-3.0 2>> config.log) \
264 -o $TMPDIR/libnltest \
265 $TMPDIR/libnltest.c \
266 $($PKG_CONFIG --libs libnl-3.0 2>> config.log) \
267 $($PKG_CONFIG --libs libnl-genl-3.0 2>> config.log) \
268 >> config.log 2>&1
269 if [ ! -x $TMPDIR/libnltest ] ; then
270 echo "[NO]"
271 MISSING_DEFS=1
272 else
273 echo "[YES]"
274 HAVE_LIBNL=1
278 check_libnl_route()
280 echo -n "[*] Checking libnl-route ... "
282 if [ "$DISABLE_LIBNL" == "1" ] ; then
283 echo "[DISABLED]"
284 return
287 if [ "$HAVE_LIBNL" == "0" ] ; then
288 echo "[SKIPPED]"
289 return
292 cat > $TMPDIR/libnlroutetest.c << EOF
293 #include <netlink/route/link.h>
294 #include <netlink/route/addr.h>
296 int main(void)
298 char str[100];
300 rtnl_addr_flags2str(1, str, sizeof(str));
301 rtnl_link_flags2str(1, str, sizeof(str));
302 rtnl_link_operstate2str(1, str, sizeof(str));
304 return 0;
308 $CC \
309 $($PKG_CONFIG --cflags libnl-route-3.0 2>> config.log) \
310 -o $TMPDIR/libnlroutetest \
311 $TMPDIR/libnlroutetest.c \
312 $($PKG_CONFIG --libs libnl-route-3.0 2>> config.log) \
313 >> config.log 2>&1
314 if [ ! -x $TMPDIR/libnlroutetest ] ; then
315 echo "[NO]"
316 MISSING_DEFS=1
317 HAVE_LIBNL=0
318 else
319 echo "[YES]"
320 # HAVE_LIBNL already set by check_libnl()
324 check_tpacket_v3()
326 echo -n "[*] Checking tpacket_v3 ... "
328 cat > $TMPDIR/tpacketv3test.c << EOF
329 #include <stdio.h>
330 #include <linux/if_packet.h>
332 int main(void)
334 struct tpacket3_hdr *hdr;
335 int foo[] = {
336 TP_STATUS_BLK_TMO,
339 printf("%d\n", hdr->tp_status);
343 $CC -o $TMPDIR/tpacketv3test $TMPDIR/tpacketv3test.c >> config.log 2>&1
344 if [ ! -x $TMPDIR/tpacketv3test ] ; then
345 echo "[NO]"
346 MISSING_DEFS=1
347 else
348 echo "[YES]"
349 HAVE_TPACKET3=1
353 check_tpacket_v2()
355 echo -n "[*] Checking tpacket_v2 ... "
357 cat > $TMPDIR/tpacketv2test.c << EOF
358 #include <stdio.h>
359 #include <linux/if_packet.h>
361 int main(void)
363 struct tpacket2_hdr *hdr;
364 int foo[] = {
365 TP_STATUS_AVAILABLE,
366 TP_STATUS_SEND_REQUEST,
367 TP_STATUS_SENDING,
368 TP_STATUS_KERNEL,
369 TP_STATUS_USER,
372 printf("%d\n", hdr->tp_status);
376 $CC -o $TMPDIR/tpacketv2test $TMPDIR/tpacketv2test.c >> config.log 2>&1
377 if [ ! -x $TMPDIR/tpacketv2test ] ; then
378 echo "[NO]"
379 MISSING_DEFS=1
380 tools_remove "netsniff-ng"
381 tools_remove "trafgen"
382 else
383 echo "[YES]"
388 check_ncurses()
390 echo -n "[*] Checking ncurses ... "
392 cat > $TMPDIR/ncursestest.c << EOF
393 #include <curses.h>
395 int main(void)
397 WINDOW *screen = initscr();
401 $CC \
402 $($PKG_CONFIG --cflags ncurses 2>> config.log) \
403 -o $TMPDIR/ncursestest $TMPDIR/ncursestest.c \
404 $($PKG_CONFIG --libs ncurses 2>> config.log \
405 || echo '-lncurses' ) \
406 >> config.log 2>&1
407 if [ ! -x $TMPDIR/ncursestest ] ; then
408 echo "[NO]"
409 MISSING_DEFS=1
410 tools_remove "flowtop"
411 tools_remove "ifpps"
412 else
413 echo "[YES]"
417 check_libgeoip()
419 echo -n "[*] Checking libGeoIP ... "
421 if [ "$DISABLE_GEOIP" == "1" ] ; then
422 echo "[DISABLED]"
423 return
426 cat > $TMPDIR/geoiptest.c << EOF
427 #include <GeoIP.h>
428 #include <GeoIPCity.h>
430 int main(void)
432 int dbs[] = {
433 GEOIP_CITY_EDITION_REV1,
434 GEOIP_CITY_EDITION_REV1_V6,
435 GEOIP_COUNTRY_EDITION,
436 GEOIP_COUNTRY_EDITION_V6,
437 GEOIP_ASNUM_EDITION,
438 GEOIP_ASNUM_EDITION_V6,
440 GeoIP *geoip = GeoIP_new(0);
444 $CC -o $TMPDIR/geoiptest $TMPDIR/geoiptest.c -lGeoIP >> config.log 2>&1
445 if [ ! -x $TMPDIR/geoiptest ] ; then
446 echo "[NO]"
447 MISSING_DEFS=1
448 else
449 echo "[YES]"
450 HAVE_LIBGEOIP=1
454 check_libnf_ct()
456 echo -n "[*] Checking libnetfilter-conntrack ... "
458 cat > $TMPDIR/nfcttest.c << EOF
459 #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
460 #include <libnetfilter_conntrack/libnetfilter_conntrack_tcp.h>
461 #include <libnetfilter_conntrack/libnetfilter_conntrack_dccp.h>
462 #include <libnetfilter_conntrack/libnetfilter_conntrack_sctp.h>
464 int main(void)
466 struct nf_conntrack *ct;
467 const uint32_t id = nfct_get_attr_u32(ct, ATTR_ID);
471 $CC \
472 $($PKG_CONFIG --cflags libnetfilter_conntrack 2>> config.log) \
473 -o $TMPDIR/nfcttest \
474 $TMPDIR/nfcttest.c \
475 $($PKG_CONFIG --libs libnetfilter_conntrack 2>> config.log) \
476 >> config.log 2>&1
477 if [ ! -x $TMPDIR/nfcttest ] ; then
478 echo "[NO]"
479 MISSING_DEFS=1
480 tools_remove "flowtop"
481 else
482 echo "[YES]"
486 check_zlib()
488 echo -n "[*] Checking libz ... "
490 if [ "$DISABLE_ZLIB" == "1" ] ; then
491 echo "[DISABLED]"
492 return
495 cat > $TMPDIR/ztest.c << EOF
496 #include "zlib.h"
498 int main(void)
500 gzFile fp = gzopen("foo.gz", "rb");
504 $CC -o $TMPDIR/ztest $TMPDIR/ztest.c -lz >> config.log 2>&1
505 if [ ! -x $TMPDIR/ztest ] ; then
506 echo "[NO]"
507 echo "CONFIG_LIBZ=0" >> Config
508 MISSING_DEFS=1
509 tools_remove "astraceroute"
510 tools_remove "flowtop"
511 else
512 echo "[YES]"
513 echo "CONFIG_LIBZ=1" >> Config
514 HAVE_LIBZ=1
518 check_urcu()
520 echo -n "[*] Checking liburcu ... "
522 cat > $TMPDIR/urcutest.c << EOF
523 #include <urcu.h>
525 int main(void)
527 rcu_init();
528 synchronize_rcu();
532 $CC -o $TMPDIR/urcutest $TMPDIR/urcutest.c -lurcu >> config.log 2>&1
533 if [ ! -x $TMPDIR/urcutest ] ; then
534 echo "[NO]"
535 MISSING_DEFS=1
536 tools_remove "flowtop"
537 else
538 echo "[YES]"
542 check_libpcap()
544 echo -n "[*] Checking libpcap ... "
546 cat > $TMPDIR/pcaptest.c << EOF
547 #include <pcap.h>
549 int main(void)
551 struct bpf_program bpf;
552 int ret = pcap_compile_nopcap(65535, 1, &bpf, "foo.bpf", 1, 0xffffffff);
556 $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c -lpcap >> config.log 2>&1
557 if [ ! -x $TMPDIR/pcaptest ] ; then
558 echo "[NO]"
559 echo "CONFIG_LIBPCAP=0" >> Config
560 MISSING_DEFS=1
561 tools_remove "mausezahn"
562 else
563 echo "[YES]"
564 echo "CONFIG_LIBPCAP=1" >> Config
565 HAVE_LIBPCAP=1
569 check_hwtstamp()
571 echo -n "[*] Checking hw timestamping ... "
573 cat > $TMPDIR/hwtstest.c << EOF
574 #include <string.h>
575 #include <arpa/inet.h>
576 #include <sys/ioctl.h>
577 #include <sys/types.h>
578 #include <sys/socket.h>
579 #include <linux/sockios.h>
580 #include <linux/net_tstamp.h>
581 #include <linux/if_packet.h>
582 #include <linux/if_ether.h>
583 #include <linux/if.h>
585 int main(void)
587 int timesource = SOF_TIMESTAMPING_RAW_HARDWARE, ret;
588 int sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
589 struct hwtstamp_config hwconfig;
590 struct ifreq ifr;
592 memset(&hwconfig, 0, sizeof(hwconfig));
593 hwconfig.tx_type = HWTSTAMP_TX_OFF;
594 hwconfig.rx_filter = HWTSTAMP_FILTER_ALL;
596 memset(&ifr, 0, sizeof(ifr));
597 strncpy(ifr.ifr_name, "lo", sizeof(ifr.ifr_name));
598 ifr.ifr_data = &hwconfig;
600 ioctl(sock, SIOCSHWTSTAMP, &ifr);
601 setsockopt(sock, SOL_PACKET, PACKET_TIMESTAMP, &timesource,
602 sizeof(timesource));
606 $CC -o $TMPDIR/hwtstest $TMPDIR/hwtstest.c >> config.log 2>&1
607 if [ ! -x $TMPDIR/hwtstest ] ; then
608 echo "[NO]"
609 echo "CONFIG_HWTSTAMP=0" >> Config
610 else
611 echo "[YES]"
612 echo "CONFIG_HWTSTAMP=1" >> Config
613 HAVE_HWTSTAMP=1
617 check_libcli()
619 echo -n "[*] Checking libcli ... "
621 cat > $TMPDIR/clitest.c << EOF
622 #include <sys/time.h>
623 #include <libcli.h>
625 int main(void)
627 struct cli_def *cli = cli_init();
631 $CC -o $TMPDIR/clitest $TMPDIR/clitest.c -lcli >> config.log 2>&1
632 if [ ! -x $TMPDIR/clitest ] ; then
633 echo "[NO]"
634 MISSING_DEFS=1
635 tools_remove "mausezahn"
636 else
637 echo "[YES]"
641 check_libnet()
643 echo -n "[*] Checking libnet ... "
645 cat > $TMPDIR/nettest.c << EOF
646 #include <libnet.h>
648 int main(void)
650 char err_buf[LIBNET_ERRBUF_SIZE];
651 libnet_t *l = libnet_init(LIBNET_LINK_ADV, "ethX", err_buf);
655 $CC -o $TMPDIR/nettest $TMPDIR/nettest.c -lnet >> config.log 2>&1
656 if [ ! -x $TMPDIR/nettest ] ; then
657 echo "[NO]"
658 MISSING_DEFS=1
659 tools_remove "mausezahn"
660 else
661 echo "[YES]"
665 gen_version_appendix()
667 local _appendix=""
669 git rev-parse > /dev/null 2>&1
670 if [ "$?" == "0" ] ; then
671 if [ ! "`git describe --always`" == \
672 "`git describe --abbrev=0 --tags`" ] ; then
673 _appendix="+"
677 echo "CONFIG_RC=\"$_appendix\"" >> Config
680 gen_config_hdr()
682 local _version=""
683 local _have_libpcap=""
684 local _have_libgeoip=""
685 local _have_libnl=""
686 local _have_libz=""
687 local _have_hwts=""
688 local _have_tp3=""
690 echo "[*] Generating config.h ..."
692 git rev-parse > /dev/null 2>&1
693 if [ "$?" == "0" ] ; then
694 _version="`git describe --always`"
695 else
696 _version="(none)"
699 if [ "$HAVE_LIBNL" == "1" ] ; then
700 _have_libnl="#define HAVE_LIBNL 1"
701 else
702 _have_libnl="/* HAVE_LIBNL is not defined */"
705 if [ "$HAVE_LIBPCAP" == "1" ] ; then
706 _have_libpcap="#define HAVE_TCPDUMP_LIKE_FILTER 1"
707 else
708 _have_libpcap="/* HAVE_TCPDUMP_LIKE_FILTER is not defined */"
711 if [ "$HAVE_HWTSTAMP" == "1" ] ; then
712 _have_hwts="#define HAVE_HARDWARE_TIMESTAMPING 1"
713 else
714 _have_hwts="/* HAVE_HARDWARE_TIMESTAMPING is not defined */"
717 if [ "$HAVE_LIBGEOIP" == "1" ] ; then
718 _have_libgeoip="#define HAVE_GEOIP 1"
719 else
720 _have_libgeoip="/* HAVE_GEOIP is not defined */"
723 if [ "$HAVE_LIBZ" == "1" ] ; then
724 _have_libz="#define HAVE_LIBZ 1"
725 else
726 _have_libz="/* HAVE_LIBZ is not defined */"
729 if [ "$HAVE_TPACKET3" == "1" ] ; then
730 _have_tp3="#define HAVE_TPACKET3 1"
731 else
732 _have_tp3="/* HAVE_TPACKET3 is not defined */"
735 cat > config.h << EOF
736 #ifndef CONFIG_H
737 #define CONFIG_H
738 #define FILE_CLIENTS ".curvetun/clients"
739 #define FILE_SERVERS ".curvetun/servers"
740 #define FILE_PRIVKEY ".curvetun/priv.key"
741 #define FILE_PUBKEY ".curvetun/pub.key"
742 #define FILE_USERNAM ".curvetun/username"
743 #define GITVERSION "$_version"
744 $_have_libnl
745 $_have_libpcap
746 $_have_libgeoip
747 $_have_libz
748 $_have_hwts
749 $_have_tp3
750 #endif /* CONFIG_H */
754 rm -f config.log
756 echo "# This file is autogenerated by the configure script" > Config
757 check_toolchain
759 if [ "$MISSING_TOOLCHAIN" == "1" ] ; then
760 echo "[!] One or more of the toolchain tools couldn't be found in your"
761 echo " \$PATH. Please check the file config.log for details."
762 exit 1
765 check_flex
766 check_bison
767 check_nacl
768 check_libnl
769 check_libnl_route
770 check_tpacket_v2
771 check_tpacket_v3
772 check_libnf_ct
773 check_ncurses
774 check_libgeoip
775 check_zlib
776 check_urcu
777 check_libpcap
778 check_hwtstamp
779 check_libcli
780 check_libnet
782 gen_config_hdr
783 gen_version_appendix
785 if [ "$MISSING_DEFS" == "1" ] ; then
786 echo "[!] Some libraries or header definitions are missing or too old. Thus"
787 echo " certain tools will not be built (see below). Please refer to the"
788 echo " INSTALL file for the libraries needed to build the complete"
789 echo " netsniff-ng toolkit."
792 if [ "$MISSING_NACL" == "1" ] ; then
793 echo "[!] The NaCl crypto library is currently not present on your system or"
794 echo " could not be found. Either install it from your distro or build it"
795 echo " manually using 'make nacl' and make sure that the NACL_INC_DIR and"
796 echo " NACL_LIB_DIR environment variables are set appropriately."
799 if [ "x$TOOLS_NOBUILD" != "x" ] ; then
800 echo "[!] The following tools will *not* be built: $TOOLS_NOBUILD"
801 echo "[*] The following tools will be built: $TOOLS"
802 else
803 echo "[*] Looks good! All tools will be built!"
806 if [ -s config.log ] ; then
807 echo "[!] There were errors in the configure script. Please check the file"
808 echo " config.log for details."
811 echo "CONFIG_LIBNL=$HAVE_LIBNL" >> Config
813 if [ "$HAVE_LIBGEOIP" == "1" -a "$HAVE_LIBZ" == "1" ] ; then
814 echo "CONFIG_GEOIP=1" >> Config
815 else
816 echo "CONFIG_GEOIP=0" >> Config
819 if [ "$HAVE_PREFIX" == "1" ] ; then
820 echo "PREFIX=$PREFIX" >> Config
823 if [ ! -z $SYSCONF_DIR ] ; then
824 echo "ETCDIR=$SYSCONF_DIR" >> Config
827 echo "CONFIG_DEBUG=$ENABLE_DEBUG" >> Config
828 echo "CONFIG_TOOLS=$TOOLS" >> Config
829 echo "CONFIG_OK=1" >> Config
831 exit 0