ring: use xzmalloc_aligned
[netsniff-ng.git] / configure
blobd5fe7e68c54eee54603756b01f12a74bce0dcb43
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 SYSCONF_DIR="/etc"
30 usage()
32 echo "Usage: ./configure [OPTION]... [VAR=VALUE]..."
33 echo ""
34 echo " -h, --help Display this help and exit"
35 echo ""
36 echo "Installation directories:"
37 echo " --prefix=PREFIX install architecture-independent files in PREFIX"
38 echo " [$PREFIX]"
39 echo " --sysconfdir=DIR read-only single-machine data [$SYSCONF_DIR]"
40 echo ""
41 echo "By default, \`make install' will install all the files in"
42 echo "\`$PREFIX/bin', \`$PREFIX/lib' etc. You can specify"
43 echo "an installation prefix other than \`$PREFIX' using \`--prefix',"
44 echo "for instance \`--prefix=\$HOME'."
45 echo ""
46 echo "Optional Features:"
47 echo " --disable-libnl Disable libnl support"
48 echo " --disable-geoip Disable geoip support"
49 echo " --disable-zlib Disable zlib support"
50 echo " --enable-debug Enable debug mode (default disabled)"
51 echo ""
52 echo "Some influential environment variables:"
53 echo " CC C compiler command"
54 echo " CROSS_COMPILE C cross-compiler prefix"
56 exit 0
59 while [ $# -gt 0 ] ; do
60 case "$1" in
61 -h|--help)
62 usage
64 --prefix=*)
65 PREFIX="${1#*=}"
67 --sysconfdir=*)
68 SYSCONF_DIR="${1#*=}"
70 --disable-libnl)
71 DISABLE_LIBNL=1
73 --disable-geoip)
74 DISABLE_GEOIP=1
76 --disable-zlib)
77 DISABLE_ZLIB=1
79 --enable-debug)
80 ENABLE_DEBUG=1
83 echo "[!] Unrecognized option: '$1'. Try './configure --help' for more information"
84 exit 1
86 esac
87 shift
88 done
90 [ -z "$CC" ] && CC="${CROSS_COMPILE}gcc"
91 [ -z "$LD" ] && LD="${CROSS_COMPILE}gcc"
92 if [ "x$SYSROOT" != "x" ] ; then
93 PKG_CONFIG_PATH="$SYSROOT/usr/lib/pkgconfig:$PKG_CONFIG_PATH"
95 [ -z $PKG_CONFIG ] && PKG_CONFIG="${CROSS_COMPILE}pkg-config"
97 TMPDIR=$(mktemp -d config.XXXXXX)
98 trap 'status=$?; rm -rf $TMPDIR; exit $status' EXIT HUP INT QUIT TERM
100 tools_remove()
102 local _tools=$TOOLS
103 local _todel=$1
104 TOOLS=""
105 for tool in $_tools ; do
106 case "$tool" in
107 $_todel)
108 case $_todel in
109 $TOOLS_NOBUILD) ;;
110 *) TOOLS_NOBUILD="$TOOLS_NOBUILD $tool" ;;
111 esac ;;
112 *) TOOLS="$TOOLS $tool" ;;
113 esac
114 done
116 TOOLS=${TOOLS# }
117 TOOLS_NOBUILD=${TOOLS_NOBUILD# }
120 check_command()
122 local cmd="$1"
124 [ "x$(which "$cmd" 2>> config.log)" == "x" ]
127 check_toolchain()
129 if [ "x$CROSS_COMPILE" != "x" ] ; then
130 echo "[*] Cross-compiling for $($CC -print-multiarch)"
131 echo "CROSS_COMPILE=$CROSS_COMPILE" >> Config
134 echo -n "[*] Checking compiler $CC ... "
135 if check_command $CC ; then
136 echo "[NO]"
137 MISSING_TOOLCHAIN=1
138 else
139 echo "[YES]"
140 echo "CC=$CC" >> Config
143 echo -n "[*] Checking linker $LD ... "
144 if check_command $LD ; then
145 echo "[NO]"
146 MISSING_TOOLCHAIN=1
147 else
148 echo "[YES]"
149 echo "LD=$LD" >> Config
152 echo -n "[*] Checking $PKG_CONFIG ... "
153 if check_command $PKG_CONFIG ; then
154 echo "[NO]"
155 MISSING_TOOLCHAIN=1
156 else
157 echo "[YES]"
158 echo "PKG_CONFIG=$PKG_CONFIG" >> Config
159 echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> Config
163 check_flex()
165 echo -n "[*] Checking flex ... "
167 if check_command flex ; then
168 echo "[NO]"
169 MISSING_DEFS=1
170 tools_remove "trafgen"
171 tools_remove "bpfc"
172 else
173 echo "[YES]"
177 check_bison()
179 echo -n "[*] Checking bison ... "
181 if check_command bison ; then
182 echo "[NO]"
183 MISSING_DEFS=1
184 tools_remove "trafgen"
185 tools_remove "bpfc"
186 else
187 echo "[YES]"
191 check_nacl()
193 echo -n "[*] Checking nacl ... "
195 cat > $TMPDIR/nacltest.c << EOF
196 #include "crypto_hash_sha512.h"
197 #include "crypto_verify_32.h"
198 #include "crypto_hash_sha512.h"
199 #include "crypto_box_curve25519xsalsa20poly1305.h"
200 #include "crypto_scalarmult_curve25519.h"
201 #include "crypto_auth_hmacsha512256.h"
203 int main(void) { }
206 if [ -z $NACL_INC_DIR ] ; then
207 NACL_INC_DIR="$SYSROOT/usr/include/nacl"
210 if [ -z $NACL_LIB_DIR ] ; then
211 NACL_LIB_DIR="$SYSROOT/usr/lib"
214 if [ -z $NACL_LIB ] ; then
215 NACL_LIB="nacl"
218 LDFLAGS="-L $NACL_LIB_DIR"
219 CFLAGS="-I $NACL_INC_DIR"
221 $CC $CFLAGS $LDFLAGS -o $TMPDIR/nacltest $TMPDIR/nacltest.c >> config.log 2>&1
222 if [ ! -x $TMPDIR/nacltest ] ; then
223 echo "[NO]"
224 MISSING_NACL=1
225 tools_remove "curvetun"
226 else
227 echo "[YES]"
228 echo "CONFIG_NACL_INC_DIR:=$NACL_INC_DIR" >> Config
229 echo "CONFIG_NACL_LIB_DIR:=$NACL_LIB_DIR" >> Config
230 echo "CONFIG_NACL_LIB:=$NACL_LIB" >> Config
234 check_libnl()
236 echo -n "[*] Checking libnl ... "
238 if [ "$DISABLE_LIBNL" == "1" ] ; then
239 echo "[DISABLED]"
240 return
243 cat > $TMPDIR/libnltest.c << EOF
244 #include <netlink/genl/genl.h>
245 #include <netlink/genl/family.h>
246 #include <netlink/genl/ctrl.h>
247 #include <netlink/msg.h>
248 #include <netlink/attr.h>
249 #include <netlink/version.h>
251 #if LIBNL_VER_NUM < LIBNL_VER(3,0)
252 # error incompatible libnl version
253 #endif
255 int main(void)
257 struct nl_sock *sock = nl_socket_alloc();
258 struct nl_cache *nl_cache;
259 int ret = genl_connect(sock);
261 ret = genl_ctrl_alloc_cache(sock, &nl_cache);
265 $CC \
266 $($PKG_CONFIG --cflags libnl-3.0 2>> config.log) \
267 $($PKG_CONFIG --cflags libnl-genl-3.0 2>> config.log) \
268 -o $TMPDIR/libnltest \
269 $TMPDIR/libnltest.c \
270 $($PKG_CONFIG --libs libnl-3.0 2>> config.log) \
271 $($PKG_CONFIG --libs libnl-genl-3.0 2>> config.log) \
272 >> config.log 2>&1
273 if [ ! -x $TMPDIR/libnltest ] ; then
274 echo "[NO]"
275 MISSING_DEFS=1
276 else
277 echo "[YES]"
278 HAVE_LIBNL=1
282 check_libnl_route()
284 echo -n "[*] Checking libnl-route ... "
286 if [ "$DISABLE_LIBNL" == "1" ] ; then
287 echo "[DISABLED]"
288 return
291 if [ "$HAVE_LIBNL" == "0" ] ; then
292 echo "[SKIPPED]"
293 return
296 cat > $TMPDIR/libnlroutetest.c << EOF
297 #include <netlink/route/link.h>
298 #include <netlink/route/addr.h>
300 int main(void)
302 char str[100];
304 rtnl_addr_flags2str(1, str, sizeof(str));
305 rtnl_link_flags2str(1, str, sizeof(str));
306 rtnl_link_operstate2str(1, str, sizeof(str));
308 return 0;
312 $CC \
313 $($PKG_CONFIG --cflags libnl-route-3.0 2>> config.log) \
314 -o $TMPDIR/libnlroutetest \
315 $TMPDIR/libnlroutetest.c \
316 $($PKG_CONFIG --libs libnl-route-3.0 2>> config.log) \
317 >> config.log 2>&1
318 if [ ! -x $TMPDIR/libnlroutetest ] ; then
319 echo "[NO]"
320 MISSING_DEFS=1
321 HAVE_LIBNL=0
322 else
323 echo "[YES]"
324 # HAVE_LIBNL already set by check_libnl()
328 check_tpacket_v3()
330 echo -n "[*] Checking tpacket_v3 ... "
332 cat > $TMPDIR/tpacketv3test.c << EOF
333 #include <stdio.h>
334 #include <linux/if_packet.h>
336 int main(void)
338 struct tpacket3_hdr *hdr;
339 int foo[] = {
340 TP_STATUS_BLK_TMO,
343 printf("%d\n", hdr->tp_status);
347 $CC -o $TMPDIR/tpacketv3test $TMPDIR/tpacketv3test.c >> config.log 2>&1
348 if [ ! -x $TMPDIR/tpacketv3test ] ; then
349 echo "[NO]"
350 MISSING_DEFS=1
351 else
352 echo "[YES]"
353 HAVE_TPACKET3=1
357 check_tpacket_v2()
359 echo -n "[*] Checking tpacket_v2 ... "
361 cat > $TMPDIR/tpacketv2test.c << EOF
362 #include <stdio.h>
363 #include <linux/if_packet.h>
365 int main(void)
367 struct tpacket2_hdr *hdr;
368 int foo[] = {
369 TP_STATUS_AVAILABLE,
370 TP_STATUS_SEND_REQUEST,
371 TP_STATUS_SENDING,
372 TP_STATUS_KERNEL,
373 TP_STATUS_USER,
376 printf("%d\n", hdr->tp_status);
380 $CC -o $TMPDIR/tpacketv2test $TMPDIR/tpacketv2test.c >> config.log 2>&1
381 if [ ! -x $TMPDIR/tpacketv2test ] ; then
382 echo "[NO]"
383 MISSING_DEFS=1
384 tools_remove "netsniff-ng"
385 tools_remove "trafgen"
386 else
387 echo "[YES]"
391 check_fopencookie()
393 echo -n "[*] Checking fopencookie ... "
395 cat > $TMPDIR/fopencookietest.c << EOF
396 #define _GNU_SOURCE
397 #include <stdio.h>
399 static cookie_io_functions_t cookie_fns;
401 int main(void)
403 FILE *f = fopencookie(NULL, "w", cookie_fns);
407 $CC -o $TMPDIR/fopencookietest $TMPDIR/fopencookietest.c >> config.log 2>&1
408 if [ ! -x $TMPDIR/fopencookietest ] ; then
409 echo "[NO]"
410 MISSING_DEFS=1
411 tools_remove "curvetun"
412 else
413 echo "[YES]"
417 check_ncurses()
419 echo -n "[*] Checking ncurses ... "
421 cat > $TMPDIR/ncursestest.c << EOF
422 #include <curses.h>
424 int main(void)
426 WINDOW *screen = initscr();
430 $CC \
431 $($PKG_CONFIG --cflags ncurses 2>> config.log) \
432 -o $TMPDIR/ncursestest $TMPDIR/ncursestest.c \
433 $($PKG_CONFIG --libs ncurses 2>> config.log \
434 || echo '-lncurses' ) \
435 >> config.log 2>&1
436 if [ ! -x $TMPDIR/ncursestest ] ; then
437 echo "[NO]"
438 MISSING_DEFS=1
439 tools_remove "flowtop"
440 tools_remove "ifpps"
441 else
442 echo "[YES]"
446 check_libgeoip()
448 echo -n "[*] Checking libGeoIP ... "
450 if [ "$DISABLE_GEOIP" == "1" ] ; then
451 echo "[DISABLED]"
452 return
455 cat > $TMPDIR/geoiptest.c << EOF
456 #include <GeoIP.h>
457 #include <GeoIPCity.h>
459 int main(void)
461 int dbs[] = {
462 GEOIP_CITY_EDITION_REV1,
463 GEOIP_CITY_EDITION_REV1_V6,
464 GEOIP_COUNTRY_EDITION,
465 GEOIP_COUNTRY_EDITION_V6,
466 GEOIP_ASNUM_EDITION,
467 GEOIP_ASNUM_EDITION_V6,
469 GeoIP *geoip = GeoIP_new(0);
473 $CC -o $TMPDIR/geoiptest $TMPDIR/geoiptest.c -lGeoIP >> config.log 2>&1
474 if [ ! -x $TMPDIR/geoiptest ] ; then
475 echo "[NO]"
476 MISSING_DEFS=1
477 else
478 echo "[YES]"
479 HAVE_LIBGEOIP=1
483 check_libnf_ct()
485 echo -n "[*] Checking libnetfilter-conntrack ... "
487 cat > $TMPDIR/nfcttest.c << EOF
488 #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
489 #include <libnetfilter_conntrack/libnetfilter_conntrack_tcp.h>
490 #include <libnetfilter_conntrack/libnetfilter_conntrack_dccp.h>
491 #include <libnetfilter_conntrack/libnetfilter_conntrack_sctp.h>
493 int main(void)
495 struct nf_conntrack *ct;
496 const uint32_t id = nfct_get_attr_u32(ct, ATTR_ID);
500 $CC \
501 $($PKG_CONFIG --cflags libnetfilter_conntrack 2>> config.log) \
502 -o $TMPDIR/nfcttest \
503 $TMPDIR/nfcttest.c \
504 $($PKG_CONFIG --libs libnetfilter_conntrack 2>> config.log) \
505 >> config.log 2>&1
506 if [ ! -x $TMPDIR/nfcttest ] ; then
507 echo "[NO]"
508 MISSING_DEFS=1
509 tools_remove "flowtop"
510 else
511 echo "[YES]"
515 check_zlib()
517 echo -n "[*] Checking libz ... "
519 if [ "$DISABLE_ZLIB" == "1" ] ; then
520 echo "[DISABLED]"
521 return
524 cat > $TMPDIR/ztest.c << EOF
525 #include "zlib.h"
527 int main(void)
529 gzFile fp = gzopen("foo.gz", "rb");
533 $CC -o $TMPDIR/ztest $TMPDIR/ztest.c -lz >> config.log 2>&1
534 if [ ! -x $TMPDIR/ztest ] ; then
535 echo "[NO]"
536 echo "CONFIG_LIBZ=0" >> Config
537 MISSING_DEFS=1
538 tools_remove "astraceroute"
539 tools_remove "flowtop"
540 else
541 echo "[YES]"
542 echo "CONFIG_LIBZ=1" >> Config
543 HAVE_LIBZ=1
547 check_urcu()
549 echo -n "[*] Checking liburcu ... "
551 cat > $TMPDIR/urcutest.c << EOF
552 #include <urcu.h>
554 int main(void)
556 rcu_init();
557 synchronize_rcu();
561 $CC -o $TMPDIR/urcutest $TMPDIR/urcutest.c -lurcu >> config.log 2>&1
562 if [ ! -x $TMPDIR/urcutest ] ; then
563 echo "[NO]"
564 MISSING_DEFS=1
565 tools_remove "flowtop"
566 else
567 echo "[YES]"
571 check_libpcap()
573 echo -n "[*] Checking libpcap ... "
575 cat > $TMPDIR/pcaptest.c << EOF
576 #include <pcap.h>
578 int main(void)
580 struct bpf_program bpf;
581 int ret = pcap_compile_nopcap(65535, 1, &bpf, "foo.bpf", 1, 0xffffffff);
585 $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c -lpcap >> config.log 2>&1
586 if [ ! -x $TMPDIR/pcaptest ] ; then
587 echo "[NO]"
588 echo "CONFIG_LIBPCAP=0" >> Config
589 MISSING_DEFS=1
590 tools_remove "mausezahn"
591 else
592 echo "[YES]"
593 echo "CONFIG_LIBPCAP=1" >> Config
594 HAVE_LIBPCAP=1
598 check_hwtstamp()
600 echo -n "[*] Checking hw timestamping ... "
602 cat > $TMPDIR/hwtstest.c << EOF
603 #include <string.h>
604 #include <arpa/inet.h>
605 #include <sys/ioctl.h>
606 #include <sys/types.h>
607 #include <sys/socket.h>
608 #include <linux/sockios.h>
609 #include <linux/net_tstamp.h>
610 #include <linux/if_packet.h>
611 #include <linux/if_ether.h>
612 #include <linux/if.h>
614 int main(void)
616 int timesource = SOF_TIMESTAMPING_RAW_HARDWARE, ret;
617 int sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
618 struct hwtstamp_config hwconfig;
619 struct ifreq ifr;
621 memset(&hwconfig, 0, sizeof(hwconfig));
622 hwconfig.tx_type = HWTSTAMP_TX_OFF;
623 hwconfig.rx_filter = HWTSTAMP_FILTER_ALL;
625 memset(&ifr, 0, sizeof(ifr));
626 strncpy(ifr.ifr_name, "lo", sizeof(ifr.ifr_name));
627 ifr.ifr_data = &hwconfig;
629 ioctl(sock, SIOCSHWTSTAMP, &ifr);
630 setsockopt(sock, SOL_PACKET, PACKET_TIMESTAMP, &timesource,
631 sizeof(timesource));
635 $CC -o $TMPDIR/hwtstest $TMPDIR/hwtstest.c >> config.log 2>&1
636 if [ ! -x $TMPDIR/hwtstest ] ; then
637 echo "[NO]"
638 echo "CONFIG_HWTSTAMP=0" >> Config
639 else
640 echo "[YES]"
641 echo "CONFIG_HWTSTAMP=1" >> Config
642 HAVE_HWTSTAMP=1
646 check_libcli()
648 echo -n "[*] Checking libcli ... "
650 cat > $TMPDIR/clitest.c << EOF
651 #include <sys/time.h>
652 #include <libcli.h>
654 int main(void)
656 struct cli_def *cli = cli_init();
660 $CC -o $TMPDIR/clitest $TMPDIR/clitest.c -lcli >> config.log 2>&1
661 if [ ! -x $TMPDIR/clitest ] ; then
662 echo "[NO]"
663 MISSING_DEFS=1
664 tools_remove "mausezahn"
665 else
666 echo "[YES]"
670 check_libnet()
672 echo -n "[*] Checking libnet ... "
674 cat > $TMPDIR/nettest.c << EOF
675 #include <libnet.h>
677 int main(void)
679 char err_buf[LIBNET_ERRBUF_SIZE];
680 libnet_t *l = libnet_init(LIBNET_LINK_ADV, "ethX", err_buf);
684 $CC -o $TMPDIR/nettest $TMPDIR/nettest.c -lnet >> config.log 2>&1
685 if [ ! -x $TMPDIR/nettest ] ; then
686 echo "[NO]"
687 MISSING_DEFS=1
688 tools_remove "mausezahn"
689 else
690 echo "[YES]"
694 gen_version_appendix()
696 local _appendix=""
698 git rev-parse > /dev/null 2>&1
699 if [ "$?" == "0" ] ; then
700 if [ ! "`git describe --always`" == \
701 "`git describe --abbrev=0 --tags`" ] ; then
702 _appendix="+"
706 echo "CONFIG_RC=\"$_appendix\"" >> Config
709 gen_config_hdr()
711 local _version=""
712 local _have_libpcap=""
713 local _have_libgeoip=""
714 local _have_libnl=""
715 local _have_libz=""
716 local _have_hwts=""
717 local _have_tp3=""
719 echo "[*] Generating config.h ..."
721 git rev-parse > /dev/null 2>&1
722 if [ "$?" == "0" ] ; then
723 _version="`git describe --always`"
724 else
725 _version="(none)"
728 if [ "$HAVE_LIBNL" == "1" ] ; then
729 _have_libnl="#define HAVE_LIBNL 1"
730 else
731 _have_libnl="/* HAVE_LIBNL is not defined */"
734 if [ "$HAVE_LIBPCAP" == "1" ] ; then
735 _have_libpcap="#define HAVE_TCPDUMP_LIKE_FILTER 1"
736 else
737 _have_libpcap="/* HAVE_TCPDUMP_LIKE_FILTER is not defined */"
740 if [ "$HAVE_HWTSTAMP" == "1" ] ; then
741 _have_hwts="#define HAVE_HARDWARE_TIMESTAMPING 1"
742 else
743 _have_hwts="/* HAVE_HARDWARE_TIMESTAMPING is not defined */"
746 if [ "$HAVE_LIBGEOIP" == "1" ] ; then
747 _have_libgeoip="#define HAVE_GEOIP 1"
748 else
749 _have_libgeoip="/* HAVE_GEOIP is not defined */"
752 if [ "$HAVE_LIBZ" == "1" ] ; then
753 _have_libz="#define HAVE_LIBZ 1"
754 else
755 _have_libz="/* HAVE_LIBZ is not defined */"
758 if [ "$HAVE_TPACKET3" == "1" ] ; then
759 _have_tp3="#define HAVE_TPACKET3 1"
760 else
761 _have_tp3="/* HAVE_TPACKET3 is not defined */"
764 cat > config.h << EOF
765 #ifndef CONFIG_H
766 #define CONFIG_H
767 #define FILE_CLIENTS ".curvetun/clients"
768 #define FILE_SERVERS ".curvetun/servers"
769 #define FILE_PRIVKEY ".curvetun/priv.key"
770 #define FILE_PUBKEY ".curvetun/pub.key"
771 #define FILE_USERNAM ".curvetun/username"
772 #define GITVERSION "$_version"
773 $_have_libnl
774 $_have_libpcap
775 $_have_libgeoip
776 $_have_libz
777 $_have_hwts
778 $_have_tp3
779 #endif /* CONFIG_H */
783 rm -f config.log
785 echo "# This file is autogenerated by the configure script" > Config
786 check_toolchain
788 if [ "$MISSING_TOOLCHAIN" == "1" ] ; then
789 echo "[!] One or more of the toolchain tools couldn't be found in your"
790 echo " \$PATH. Please check the file config.log for details."
791 exit 1
794 # external tools
795 check_flex
796 check_bison
798 # kernel features
799 check_tpacket_v2
800 check_tpacket_v3
801 check_hwtstamp
803 # libc features
804 check_fopencookie
806 # libraries
807 check_libcli
808 check_libgeoip
809 check_libnet
810 check_libnf_ct
811 check_libnl
812 check_libnl_route
813 check_libpcap
814 check_nacl
815 check_ncurses
816 check_urcu
817 check_zlib
819 gen_config_hdr
820 gen_version_appendix
822 if [ "$MISSING_DEFS" == "1" ] ; then
823 echo "[!] Some libraries or header definitions are missing or too old. Thus"
824 echo " certain tools will not be built (see below) or they will be built"
825 echo " with reduced functionality. Please refer to the INSTALL file for"
826 echo " the libraries needed to build the complete netsniff-ng toolkit"
829 if [ "$MISSING_NACL" == "1" ] ; then
830 echo "[!] The NaCl crypto library is currently not present on your system or"
831 echo " could not be found. Either install it from your distro or build it"
832 echo " manually using 'make nacl' and make sure that the NACL_INC_DIR and"
833 echo " NACL_LIB_DIR environment variables are set appropriately."
836 if [ "x$TOOLS_NOBUILD" != "x" ] ; then
837 echo "[!] The following tools will *not* be built: $TOOLS_NOBUILD"
838 echo "[*] The following tools will be built: $TOOLS"
839 else
840 echo "[*] Looks good! All tools will be built!"
843 if [ -s config.log ] ; then
844 echo "[!] There were errors in the configure script. Please check the file"
845 echo " config.log for details."
848 echo "CONFIG_LIBNL=$HAVE_LIBNL" >> Config
850 if [ "$HAVE_LIBGEOIP" == "1" -a "$HAVE_LIBZ" == "1" ] ; then
851 echo "CONFIG_GEOIP=1" >> Config
852 else
853 echo "CONFIG_GEOIP=0" >> Config
856 echo "CONFIG_PREFIX=$PREFIX" >> Config
857 echo "CONFIG_ETCDIR=$SYSCONF_DIR" >> Config
859 echo "CONFIG_DEBUG=$ENABLE_DEBUG" >> Config
860 echo "CONFIG_TOOLS=$TOOLS" >> Config
861 echo "CONFIG_OK=1" >> Config
863 exit 0