Fix manpage warnings
[netsniff-ng-new.git] / configure
blob510826a798f51d1622279d8ba3b8df14a7518667
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/sodium ... "
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=$(pkg-config --variable=includedir libsodium)
208 if [ -z $NACL_INC_DIR ] ; then
209 NACL_INC_DIR="$SYSROOT/usr/include/nacl"
210 else
211 NACL_INC_DIR="$NACL_INC_DIR/sodium"
212 NACL_LIB="sodium"
216 if [ -z $NACL_LIB_DIR ] ; then
217 NACL_LIB_DIR="$SYSROOT/usr/lib"
220 if [ -z $NACL_LIB ] ; then
221 NACL_LIB="nacl"
224 LDFLAGS="-L $NACL_LIB_DIR"
225 CFLAGS="-I $NACL_INC_DIR"
227 $CC $CFLAGS $LDFLAGS -o $TMPDIR/nacltest $TMPDIR/nacltest.c >> config.log 2>&1
228 if [ ! -x $TMPDIR/nacltest ] ; then
229 echo "[NO]"
230 MISSING_NACL=1
231 tools_remove "curvetun"
232 else
233 echo "[YES]"
234 echo "CONFIG_NACL_INC_DIR:=$NACL_INC_DIR" >> Config
235 echo "CONFIG_NACL_LIB_DIR:=$NACL_LIB_DIR" >> Config
236 echo "CONFIG_NACL_LIB:=$NACL_LIB" >> Config
240 check_libnl()
242 echo -n "[*] Checking libnl ... "
244 if [ "$DISABLE_LIBNL" == "1" ] ; then
245 echo "[DISABLED]"
246 return
249 cat > $TMPDIR/libnltest.c << EOF
250 #include <netlink/genl/genl.h>
251 #include <netlink/genl/family.h>
252 #include <netlink/genl/ctrl.h>
253 #include <netlink/msg.h>
254 #include <netlink/attr.h>
255 #include <netlink/version.h>
257 #if LIBNL_VER_NUM < LIBNL_VER(3,0)
258 # error incompatible libnl version
259 #endif
261 int main(void)
263 struct nl_sock *sock = nl_socket_alloc();
264 struct nl_cache *nl_cache;
265 int ret = genl_connect(sock);
267 ret = genl_ctrl_alloc_cache(sock, &nl_cache);
271 $CC \
272 $($PKG_CONFIG --cflags libnl-3.0 2>> config.log) \
273 $($PKG_CONFIG --cflags libnl-genl-3.0 2>> config.log) \
274 -o $TMPDIR/libnltest \
275 $TMPDIR/libnltest.c \
276 $($PKG_CONFIG --libs libnl-3.0 2>> config.log) \
277 $($PKG_CONFIG --libs libnl-genl-3.0 2>> config.log) \
278 >> config.log 2>&1
279 if [ ! -x $TMPDIR/libnltest ] ; then
280 echo "[NO]"
281 MISSING_DEFS=1
282 else
283 echo "[YES]"
284 HAVE_LIBNL=1
288 check_libnl_route()
290 echo -n "[*] Checking libnl-route ... "
292 if [ "$DISABLE_LIBNL" == "1" ] ; then
293 echo "[DISABLED]"
294 return
297 if [ "$HAVE_LIBNL" == "0" ] ; then
298 echo "[SKIPPED]"
299 return
302 cat > $TMPDIR/libnlroutetest.c << EOF
303 #include <netlink/route/link.h>
304 #include <netlink/route/addr.h>
306 int main(void)
308 char str[100];
310 rtnl_addr_flags2str(1, str, sizeof(str));
311 rtnl_link_flags2str(1, str, sizeof(str));
312 rtnl_link_operstate2str(1, str, sizeof(str));
314 return 0;
318 $CC \
319 $($PKG_CONFIG --cflags libnl-route-3.0 2>> config.log) \
320 -o $TMPDIR/libnlroutetest \
321 $TMPDIR/libnlroutetest.c \
322 $($PKG_CONFIG --libs libnl-route-3.0 2>> config.log) \
323 >> config.log 2>&1
324 if [ ! -x $TMPDIR/libnlroutetest ] ; then
325 echo "[NO]"
326 MISSING_DEFS=1
327 HAVE_LIBNL=0
328 else
329 echo "[YES]"
330 # HAVE_LIBNL already set by check_libnl()
334 check_tpacket_v3()
336 echo -n "[*] Checking tpacket_v3 ... "
338 cat > $TMPDIR/tpacketv3test.c << EOF
339 #include <stdio.h>
340 #include <linux/if_packet.h>
342 int main(void)
344 struct tpacket3_hdr *hdr;
345 int foo[] = {
346 TP_STATUS_BLK_TMO,
349 printf("%d\n", hdr->tp_status);
353 $CC -o $TMPDIR/tpacketv3test $TMPDIR/tpacketv3test.c >> config.log 2>&1
354 if [ ! -x $TMPDIR/tpacketv3test ] ; then
355 echo "[NO]"
356 MISSING_DEFS=1
357 else
358 echo "[YES]"
359 HAVE_TPACKET3=1
363 check_tpacket_v2()
365 echo -n "[*] Checking tpacket_v2 ... "
367 cat > $TMPDIR/tpacketv2test.c << EOF
368 #include <stdio.h>
369 #include <linux/if_packet.h>
371 int main(void)
373 struct tpacket2_hdr *hdr;
374 int foo[] = {
375 TP_STATUS_AVAILABLE,
376 TP_STATUS_SEND_REQUEST,
377 TP_STATUS_SENDING,
378 TP_STATUS_KERNEL,
379 TP_STATUS_USER,
382 printf("%d\n", hdr->tp_status);
386 $CC -o $TMPDIR/tpacketv2test $TMPDIR/tpacketv2test.c >> config.log 2>&1
387 if [ ! -x $TMPDIR/tpacketv2test ] ; then
388 echo "[NO]"
389 MISSING_DEFS=1
390 tools_remove "netsniff-ng"
391 tools_remove "trafgen"
392 else
393 echo "[YES]"
397 check_fopencookie()
399 echo -n "[*] Checking fopencookie ... "
401 cat > $TMPDIR/fopencookietest.c << EOF
402 #define _GNU_SOURCE
403 #include <stdio.h>
405 static cookie_io_functions_t cookie_fns;
407 int main(void)
409 FILE *f = fopencookie(NULL, "w", cookie_fns);
413 $CC -o $TMPDIR/fopencookietest $TMPDIR/fopencookietest.c >> config.log 2>&1
414 if [ ! -x $TMPDIR/fopencookietest ] ; then
415 echo "[NO]"
416 MISSING_DEFS=1
417 tools_remove "curvetun"
418 else
419 echo "[YES]"
423 check_ncurses()
425 echo -n "[*] Checking ncurses ... "
427 cat > $TMPDIR/ncursestest.c << EOF
428 #include <curses.h>
430 int main(void)
432 WINDOW *screen = initscr();
436 $CC \
437 $($PKG_CONFIG --cflags ncurses 2>> config.log) \
438 -o $TMPDIR/ncursestest $TMPDIR/ncursestest.c \
439 $($PKG_CONFIG --libs ncurses 2>> config.log \
440 || echo '-lncurses' ) \
441 >> config.log 2>&1
442 if [ ! -x $TMPDIR/ncursestest ] ; then
443 echo "[NO]"
444 MISSING_DEFS=1
445 tools_remove "flowtop"
446 tools_remove "ifpps"
447 else
448 echo "[YES]"
452 check_libgeoip()
454 echo -n "[*] Checking libGeoIP ... "
456 if [ "$DISABLE_GEOIP" == "1" ] ; then
457 echo "[DISABLED]"
458 return
461 cat > $TMPDIR/geoiptest.c << EOF
462 #include <GeoIP.h>
463 #include <GeoIPCity.h>
465 int main(void)
467 int dbs[] = {
468 GEOIP_CITY_EDITION_REV1,
469 GEOIP_CITY_EDITION_REV1_V6,
470 GEOIP_COUNTRY_EDITION,
471 GEOIP_COUNTRY_EDITION_V6,
472 GEOIP_ASNUM_EDITION,
473 GEOIP_ASNUM_EDITION_V6,
475 GeoIP *geoip = GeoIP_new(0);
479 $CC -o $TMPDIR/geoiptest $TMPDIR/geoiptest.c -lGeoIP >> config.log 2>&1
480 if [ ! -x $TMPDIR/geoiptest ] ; then
481 echo "[NO]"
482 MISSING_DEFS=1
483 else
484 echo "[YES]"
485 HAVE_LIBGEOIP=1
489 check_libnf_ct()
491 echo -n "[*] Checking libnetfilter-conntrack ... "
493 cat > $TMPDIR/nfcttest.c << EOF
494 #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
495 #include <libnetfilter_conntrack/libnetfilter_conntrack_tcp.h>
496 #include <libnetfilter_conntrack/libnetfilter_conntrack_dccp.h>
497 #include <libnetfilter_conntrack/libnetfilter_conntrack_sctp.h>
499 int main(void)
501 struct nf_conntrack *ct;
502 const uint32_t id = nfct_get_attr_u32(ct, ATTR_ID);
506 $CC \
507 $($PKG_CONFIG --cflags libnetfilter_conntrack 2>> config.log) \
508 -o $TMPDIR/nfcttest \
509 $TMPDIR/nfcttest.c \
510 $($PKG_CONFIG --libs libnetfilter_conntrack 2>> config.log) \
511 >> config.log 2>&1
512 if [ ! -x $TMPDIR/nfcttest ] ; then
513 echo "[NO]"
514 MISSING_DEFS=1
515 tools_remove "flowtop"
516 else
517 echo "[YES]"
521 check_zlib()
523 echo -n "[*] Checking libz ... "
525 if [ "$DISABLE_ZLIB" == "1" ] ; then
526 echo "[DISABLED]"
527 return
530 cat > $TMPDIR/ztest.c << EOF
531 #include "zlib.h"
533 int main(void)
535 gzFile fp = gzopen("foo.gz", "rb");
539 $CC -o $TMPDIR/ztest $TMPDIR/ztest.c -lz >> config.log 2>&1
540 if [ ! -x $TMPDIR/ztest ] ; then
541 echo "[NO]"
542 echo "CONFIG_LIBZ=0" >> Config
543 MISSING_DEFS=1
544 tools_remove "astraceroute"
545 tools_remove "flowtop"
546 else
547 echo "[YES]"
548 echo "CONFIG_LIBZ=1" >> Config
549 HAVE_LIBZ=1
553 check_urcu()
555 echo -n "[*] Checking liburcu ... "
557 cat > $TMPDIR/urcutest.c << EOF
558 #include <urcu.h>
560 int main(void)
562 rcu_init();
563 synchronize_rcu();
567 $CC -o $TMPDIR/urcutest $TMPDIR/urcutest.c -lurcu >> config.log 2>&1
568 if [ ! -x $TMPDIR/urcutest ] ; then
569 echo "[NO]"
570 MISSING_DEFS=1
571 tools_remove "flowtop"
572 else
573 echo "[YES]"
577 check_libpcap()
579 echo -n "[*] Checking libpcap ... "
581 cat > $TMPDIR/pcaptest.c << EOF
582 #include <pcap.h>
584 int main(void)
586 struct bpf_program bpf;
587 int ret = pcap_compile_nopcap(65535, 1, &bpf, "foo.bpf", 1, 0xffffffff);
591 $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c -lpcap >> config.log 2>&1
592 if [ ! -x $TMPDIR/pcaptest ] ; then
593 echo "[NO]"
594 echo "CONFIG_LIBPCAP=0" >> Config
595 MISSING_DEFS=1
596 tools_remove "mausezahn"
597 else
598 echo "[YES]"
599 echo "CONFIG_LIBPCAP=1" >> Config
600 HAVE_LIBPCAP=1
604 check_hwtstamp()
606 echo -n "[*] Checking hw timestamping ... "
608 cat > $TMPDIR/hwtstest.c << EOF
609 #include <string.h>
610 #include <arpa/inet.h>
611 #include <sys/ioctl.h>
612 #include <sys/types.h>
613 #include <sys/socket.h>
614 #include <linux/sockios.h>
615 #include <linux/net_tstamp.h>
616 #include <linux/if_packet.h>
617 #include <linux/if_ether.h>
618 #include <linux/if.h>
620 int main(void)
622 int timesource = SOF_TIMESTAMPING_RAW_HARDWARE, ret;
623 int sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
624 struct hwtstamp_config hwconfig;
625 struct ifreq ifr;
627 memset(&hwconfig, 0, sizeof(hwconfig));
628 hwconfig.tx_type = HWTSTAMP_TX_OFF;
629 hwconfig.rx_filter = HWTSTAMP_FILTER_ALL;
631 memset(&ifr, 0, sizeof(ifr));
632 strncpy(ifr.ifr_name, "lo", sizeof(ifr.ifr_name));
633 ifr.ifr_data = &hwconfig;
635 ioctl(sock, SIOCSHWTSTAMP, &ifr);
636 setsockopt(sock, SOL_PACKET, PACKET_TIMESTAMP, &timesource,
637 sizeof(timesource));
641 $CC -o $TMPDIR/hwtstest $TMPDIR/hwtstest.c >> config.log 2>&1
642 if [ ! -x $TMPDIR/hwtstest ] ; then
643 echo "[NO]"
644 echo "CONFIG_HWTSTAMP=0" >> Config
645 else
646 echo "[YES]"
647 echo "CONFIG_HWTSTAMP=1" >> Config
648 HAVE_HWTSTAMP=1
652 check_libcli()
654 echo -n "[*] Checking libcli ... "
656 cat > $TMPDIR/clitest.c << EOF
657 #include <sys/time.h>
658 #include <libcli.h>
660 int main(void)
662 struct cli_def *cli = cli_init();
666 $CC -o $TMPDIR/clitest $TMPDIR/clitest.c -lcli >> config.log 2>&1
667 if [ ! -x $TMPDIR/clitest ] ; then
668 echo "[NO]"
669 MISSING_DEFS=1
670 tools_remove "mausezahn"
671 else
672 echo "[YES]"
676 check_libnet()
678 echo -n "[*] Checking libnet ... "
680 cat > $TMPDIR/nettest.c << EOF
681 #include <libnet.h>
683 int main(void)
685 char err_buf[LIBNET_ERRBUF_SIZE];
686 libnet_t *l = libnet_init(LIBNET_LINK_ADV, "ethX", err_buf);
690 $CC -o $TMPDIR/nettest $TMPDIR/nettest.c -lnet >> config.log 2>&1
691 if [ ! -x $TMPDIR/nettest ] ; then
692 echo "[NO]"
693 MISSING_DEFS=1
694 tools_remove "mausezahn"
695 else
696 echo "[YES]"
700 gen_version_appendix()
702 local _appendix=""
704 git rev-parse > /dev/null 2>&1
705 if [ "$?" == "0" ] ; then
706 if [ ! "`git describe --always`" == \
707 "`git describe --abbrev=0 --tags`" ] ; then
708 _appendix="+"
712 echo "CONFIG_RC=\"$_appendix\"" >> Config
715 gen_config_hdr()
717 local _version=""
718 local _have_libpcap=""
719 local _have_libgeoip=""
720 local _have_libnl=""
721 local _have_libz=""
722 local _have_hwts=""
723 local _have_tp3=""
725 echo "[*] Generating config.h ..."
727 git rev-parse > /dev/null 2>&1
728 if [ "$?" == "0" ] ; then
729 _version="`git describe --always`"
730 else
731 _version="(none)"
734 if [ "$HAVE_LIBNL" == "1" ] ; then
735 _have_libnl="#define HAVE_LIBNL 1"
736 else
737 _have_libnl="/* HAVE_LIBNL is not defined */"
740 if [ "$HAVE_LIBPCAP" == "1" ] ; then
741 _have_libpcap="#define HAVE_TCPDUMP_LIKE_FILTER 1"
742 else
743 _have_libpcap="/* HAVE_TCPDUMP_LIKE_FILTER is not defined */"
746 if [ "$HAVE_HWTSTAMP" == "1" ] ; then
747 _have_hwts="#define HAVE_HARDWARE_TIMESTAMPING 1"
748 else
749 _have_hwts="/* HAVE_HARDWARE_TIMESTAMPING is not defined */"
752 if [ "$HAVE_LIBGEOIP" == "1" ] ; then
753 _have_libgeoip="#define HAVE_GEOIP 1"
754 else
755 _have_libgeoip="/* HAVE_GEOIP is not defined */"
758 if [ "$HAVE_LIBZ" == "1" ] ; then
759 _have_libz="#define HAVE_LIBZ 1"
760 else
761 _have_libz="/* HAVE_LIBZ is not defined */"
764 if [ "$HAVE_TPACKET3" == "1" ] ; then
765 _have_tp3="#define HAVE_TPACKET3 1"
766 else
767 _have_tp3="/* HAVE_TPACKET3 is not defined */"
770 cat > config.h << EOF
771 #ifndef CONFIG_H
772 #define CONFIG_H
773 #define FILE_CLIENTS ".curvetun/clients"
774 #define FILE_SERVERS ".curvetun/servers"
775 #define FILE_PRIVKEY ".curvetun/priv.key"
776 #define FILE_PUBKEY ".curvetun/pub.key"
777 #define FILE_USERNAM ".curvetun/username"
778 #define GITVERSION "$_version"
779 $_have_libnl
780 $_have_libpcap
781 $_have_libgeoip
782 $_have_libz
783 $_have_hwts
784 $_have_tp3
785 #endif /* CONFIG_H */
789 rm -f config.log
791 echo "# This file is autogenerated by the configure script" > Config
792 check_toolchain
794 if [ "$MISSING_TOOLCHAIN" == "1" ] ; then
795 echo "[!] One or more of the toolchain tools couldn't be found in your"
796 echo " \$PATH. Please check the file config.log for details."
797 exit 1
800 # external tools
801 check_flex
802 check_bison
804 # kernel features
805 check_tpacket_v2
806 check_tpacket_v3
807 check_hwtstamp
809 # libc features
810 check_fopencookie
812 # libraries
813 check_libcli
814 check_libgeoip
815 check_libnet
816 check_libnf_ct
817 check_libnl
818 check_libnl_route
819 check_libpcap
820 check_nacl
821 check_ncurses
822 check_urcu
823 check_zlib
825 gen_config_hdr
826 gen_version_appendix
828 if [ "$MISSING_DEFS" == "1" ] ; then
829 echo "[!] Some libraries or header definitions are missing or too old. Thus"
830 echo " certain tools will not be built (see below) or they will be built"
831 echo " with reduced functionality. Please refer to the INSTALL file for"
832 echo " the libraries needed to build the complete netsniff-ng toolkit"
835 if [ "$MISSING_NACL" == "1" ] ; then
836 echo "[!] The NaCl crypto library is currently not present on your system or"
837 echo " could not be found. Either install it from your distro or build it"
838 echo " manually using 'make nacl' and make sure that the NACL_INC_DIR and"
839 echo " NACL_LIB_DIR environment variables are set appropriately."
842 if [ "x$TOOLS_NOBUILD" != "x" ] ; then
843 echo "[!] The following tools will *not* be built: $TOOLS_NOBUILD"
844 echo "[*] The following tools will be built: $TOOLS"
845 else
846 echo "[*] Looks good! All tools will be built!"
849 if [ -s config.log ] ; then
850 echo "[!] There were errors in the configure script. Please check the file"
851 echo " config.log for details."
854 echo "CONFIG_LIBNL=$HAVE_LIBNL" >> Config
856 if [ "$HAVE_LIBGEOIP" == "1" -a "$HAVE_LIBZ" == "1" ] ; then
857 echo "CONFIG_GEOIP=1" >> Config
858 else
859 echo "CONFIG_GEOIP=0" >> Config
862 echo "CONFIG_PREFIX=$PREFIX" >> Config
863 echo "CONFIG_ETCDIR=$SYSCONF_DIR" >> Config
865 echo "CONFIG_DEBUG=$ENABLE_DEBUG" >> Config
866 echo "CONFIG_TOOLS=$TOOLS" >> Config
867 echo "CONFIG_OK=1" >> Config
869 exit 0