build: configure: Add option to specify install path for binary files
[netsniff-ng.git] / configure
blobdb9727cc2c3368ed3a97c88e218bc46dec338bf4
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 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 ""
40 echo "By default, \`make install' will install all the files in"
41 echo "\`$PREFIX/bin', \`$PREFIX/lib' etc. You can specify"
42 echo "an installation prefix other than \`$PREFIX' using \`--prefix',"
43 echo "for instance \`--prefix=\$HOME'."
44 echo ""
45 echo "Optional Features:"
46 echo " --disable-libnl Disable libnl support"
47 echo " --disable-geoip Disable geoip support"
48 echo " --disable-zlib Disable zlib support"
49 echo " --enable-debug Enable debug mode (default disabled)"
50 echo ""
51 echo "Some influential environment variables:"
52 echo " CC C compiler command"
53 echo " CROSS_COMPILE C cross-compiler prefix"
55 exit 0
58 while [ $# -gt 0 ] ; do
59 case "$1" in
60 -h|--help)
61 usage
63 --prefix=*)
64 PREFIX="${1#*=}"
65 HAVE_PREFIX=1
67 --disable-libnl)
68 DISABLE_LIBNL=1
70 --disable-geoip)
71 DISABLE_GEOIP=1
73 --disable-zlib)
74 DISABLE_ZLIB=1
76 --enable-debug)
77 ENABLE_DEBUG=1
80 echo "[!] Unrecognized option: '$1'. Try './configure --help' for more information"
81 exit 1
83 esac
84 shift
85 done
87 [ -z "$CC" ] && CC="${CROSS_COMPILE}gcc"
88 [ -z "$LD" ] && LD="${CROSS_COMPILE}gcc"
89 if [ "x$SYSROOT" != "x" ] ; then
90 PKG_CONFIG_PATH="$SYSROOT/usr/lib/pkgconfig:$PKG_CONFIG_PATH"
92 [ -z $PKG_CONFIG ] && PKG_CONFIG="${CROSS_COMPILE}pkg-config"
94 TMPDIR=$(mktemp -d config.XXXXXX)
95 trap 'status=$?; rm -rf $TMPDIR; exit $status' EXIT HUP INT QUIT TERM
97 tools_remove()
99 local _tools=$TOOLS
100 local _todel=$1
101 TOOLS=""
102 for tool in $_tools ; do
103 case "$tool" in
104 $_todel)
105 case $_todel in
106 $TOOLS_NOBUILD) ;;
107 *) TOOLS_NOBUILD="$TOOLS_NOBUILD $tool" ;;
108 esac ;;
109 *) TOOLS="$TOOLS $tool" ;;
110 esac
111 done
113 TOOLS=${TOOLS# }
114 TOOLS_NOBUILD=${TOOLS_NOBUILD# }
117 check_toolchain()
119 if [ "x$CROSS_COMPILE" != "x" ] ; then
120 echo "[*] Cross-compiling for $($CC -print-multiarch)"
121 echo "CROSS_COMPILE=$CROSS_COMPILE" >> Config
124 echo -n "[*] Checking compiler $CC ... "
125 if [ "x$(which $CC 2>> config.log)" == "x" ] ; then
126 echo "[NO]"
127 MISSING_TOOLCHAIN=1
128 else
129 echo "[YES]"
130 echo "CC=$CC" >> Config
133 echo -n "[*] Checking linker $LD ... "
134 if [ "x$(which $LD 2>> config.log)" == "x" ] ; then
135 echo "[NO]"
136 MISSING_TOOLCHAIN=1
137 else
138 echo "[YES]"
139 echo "LD=$LD" >> Config
142 echo -n "[*] Checking $PKG_CONFIG ... "
143 if [ "x$(which $PKG_CONFIG 2>> config.log)" == "x" ] ; then
144 echo "[NO]"
145 MISSING_TOOLCHAIN=1
146 else
147 echo "[YES]"
148 echo "PKG_CONFIG=$PKG_CONFIG" >> Config
149 echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> Config
153 check_flex()
155 echo -n "[*] Checking flex ... "
157 if [ "x$(which flex 2>> config.log)" == "x" ] ; then
158 echo "[NO]"
159 MISSING_DEFS=1
160 tools_remove "trafgen"
161 tools_remove "bpfc"
162 else
163 echo "[YES]"
167 check_bison()
169 echo -n "[*] Checking bison ... "
171 if [ "x$(which bison 2>> config.log)" == "x" ] ; then
172 echo "[NO]"
173 MISSING_DEFS=1
174 tools_remove "trafgen"
175 tools_remove "bpfc"
176 else
177 echo "[YES]"
181 check_nacl()
183 echo -n "[*] Checking nacl ... "
185 cat > $TMPDIR/nacltest.c << EOF
186 #include "crypto_hash_sha512.h"
187 #include "crypto_verify_32.h"
188 #include "crypto_hash_sha512.h"
189 #include "crypto_box_curve25519xsalsa20poly1305.h"
190 #include "crypto_scalarmult_curve25519.h"
191 #include "crypto_auth_hmacsha512256.h"
193 int main(void) { }
196 if [ -z $NACL_INC_DIR ] ; then
197 NACL_INC_DIR="$SYSROOT/usr/include/nacl"
200 if [ -z $NACL_LIB_DIR ] ; then
201 NACL_LIB_DIR="$SYSROOT/usr/lib"
204 if [ -z $NACL_LIB ] ; then
205 NACL_LIB="nacl"
208 LDFLAGS="-L $NACL_LIB_DIR"
209 CFLAGS="-I $NACL_INC_DIR"
211 $CC $CFLAGS $LDFLAGS -o $TMPDIR/nacltest $TMPDIR/nacltest.c >> config.log 2>&1
212 if [ ! -x $TMPDIR/nacltest ] ; then
213 echo "[NO]"
214 MISSING_NACL=1
215 tools_remove "curvetun"
216 else
217 echo "[YES]"
218 echo "CONFIG_NACL_INC_DIR:=$NACL_INC_DIR" >> Config
219 echo "CONFIG_NACL_LIB_DIR:=$NACL_LIB_DIR" >> Config
220 echo "CONFIG_NACL_LIB:=$NACL_LIB" >> Config
224 check_libnl()
226 echo -n "[*] Checking libnl ... "
228 if [ "$DISABLE_LIBNL" == "1" ] ; then
229 echo "[DISABLED]"
230 return
233 cat > $TMPDIR/libnltest.c << EOF
234 #include <netlink/genl/genl.h>
235 #include <netlink/genl/family.h>
236 #include <netlink/genl/ctrl.h>
237 #include <netlink/msg.h>
238 #include <netlink/attr.h>
239 #include <netlink/version.h>
241 #if LIBNL_VER_NUM < LIBNL_VER(3,0)
242 # error incompatible libnl version
243 #endif
245 int main(void)
247 struct nl_sock *sock = nl_socket_alloc();
248 struct nl_cache *nl_cache;
249 int ret = genl_connect(sock);
251 ret = genl_ctrl_alloc_cache(sock, &nl_cache);
255 $CC \
256 $($PKG_CONFIG --cflags libnl-3.0 2>> config.log) \
257 $($PKG_CONFIG --cflags libnl-genl-3.0 2>> config.log) \
258 -o $TMPDIR/libnltest \
259 $TMPDIR/libnltest.c \
260 $($PKG_CONFIG --libs libnl-3.0 2>> config.log) \
261 $($PKG_CONFIG --libs libnl-genl-3.0 2>> config.log) \
262 >> config.log 2>&1
263 if [ ! -x $TMPDIR/libnltest ] ; then
264 echo "[NO]"
265 MISSING_DEFS=1
266 else
267 echo "[YES]"
268 HAVE_LIBNL=1
272 check_libnl_route()
274 echo -n "[*] Checking libnl-route ... "
276 if [ "$DISABLE_LIBNL" == "1" ] ; then
277 echo "[DISABLED]"
278 return
281 if [ "$HAVE_LIBNL" == "0" ] ; then
282 echo "[SKIPPED]"
283 return
286 cat > $TMPDIR/libnlroutetest.c << EOF
287 #include <netlink/route/link.h>
288 #include <netlink/route/addr.h>
290 int main(void)
292 char str[100];
294 rtnl_addr_flags2str(1, str, sizeof(str));
295 rtnl_link_flags2str(1, str, sizeof(str));
296 rtnl_link_operstate2str(1, str, sizeof(str));
298 return 0;
302 $CC \
303 $($PKG_CONFIG --cflags libnl-route-3.0 2>> config.log) \
304 -o $TMPDIR/libnlroutetest \
305 $TMPDIR/libnlroutetest.c \
306 $($PKG_CONFIG --libs libnl-route-3.0 2>> config.log) \
307 >> config.log 2>&1
308 if [ ! -x $TMPDIR/libnlroutetest ] ; then
309 echo "[NO]"
310 MISSING_DEFS=1
311 HAVE_LIBNL=0
312 else
313 echo "[YES]"
314 # HAVE_LIBNL already set by check_libnl()
318 check_tpacket_v3()
320 echo -n "[*] Checking tpacket_v3 ... "
322 cat > $TMPDIR/tpacketv3test.c << EOF
323 #include <stdio.h>
324 #include <linux/if_packet.h>
326 int main(void)
328 struct tpacket3_hdr *hdr;
329 int foo[] = {
330 TP_STATUS_BLK_TMO,
333 printf("%d\n", hdr->tp_status);
337 $CC -o $TMPDIR/tpacketv3test $TMPDIR/tpacketv3test.c >> config.log 2>&1
338 if [ ! -x $TMPDIR/tpacketv3test ] ; then
339 echo "[NO]"
340 MISSING_DEFS=1
341 else
342 echo "[YES]"
343 HAVE_TPACKET3=1
347 check_tpacket_v2()
349 echo -n "[*] Checking tpacket_v2 ... "
351 cat > $TMPDIR/tpacketv2test.c << EOF
352 #include <stdio.h>
353 #include <linux/if_packet.h>
355 int main(void)
357 struct tpacket2_hdr *hdr;
358 int foo[] = {
359 TP_STATUS_AVAILABLE,
360 TP_STATUS_SEND_REQUEST,
361 TP_STATUS_SENDING,
362 TP_STATUS_KERNEL,
363 TP_STATUS_USER,
366 printf("%d\n", hdr->tp_status);
370 $CC -o $TMPDIR/tpacketv2test $TMPDIR/tpacketv2test.c >> config.log 2>&1
371 if [ ! -x $TMPDIR/tpacketv2test ] ; then
372 echo "[NO]"
373 MISSING_DEFS=1
374 tools_remove "netsniff-ng"
375 tools_remove "trafgen"
376 else
377 echo "[YES]"
382 check_ncurses()
384 echo -n "[*] Checking ncurses ... "
386 cat > $TMPDIR/ncursestest.c << EOF
387 #include <curses.h>
389 int main(void)
391 WINDOW *screen = initscr();
395 $CC \
396 $($PKG_CONFIG --cflags ncurses 2>> config.log) \
397 -o $TMPDIR/ncursestest $TMPDIR/ncursestest.c \
398 $($PKG_CONFIG --libs ncurses 2>> config.log \
399 || echo '-lncurses' ) \
400 >> config.log 2>&1
401 if [ ! -x $TMPDIR/ncursestest ] ; then
402 echo "[NO]"
403 MISSING_DEFS=1
404 tools_remove "flowtop"
405 tools_remove "ifpps"
406 else
407 echo "[YES]"
411 check_libgeoip()
413 echo -n "[*] Checking libGeoIP ... "
415 if [ "$DISABLE_GEOIP" == "1" ] ; then
416 echo "[DISABLED]"
417 return
420 cat > $TMPDIR/geoiptest.c << EOF
421 #include <GeoIP.h>
422 #include <GeoIPCity.h>
424 int main(void)
426 int dbs[] = {
427 GEOIP_CITY_EDITION_REV1,
428 GEOIP_CITY_EDITION_REV1_V6,
429 GEOIP_COUNTRY_EDITION,
430 GEOIP_COUNTRY_EDITION_V6,
431 GEOIP_ASNUM_EDITION,
432 GEOIP_ASNUM_EDITION_V6,
434 GeoIP *geoip = GeoIP_new(0);
438 $CC -o $TMPDIR/geoiptest $TMPDIR/geoiptest.c -lGeoIP >> config.log 2>&1
439 if [ ! -x $TMPDIR/geoiptest ] ; then
440 echo "[NO]"
441 MISSING_DEFS=1
442 else
443 echo "[YES]"
444 HAVE_LIBGEOIP=1
448 check_libnf_ct()
450 echo -n "[*] Checking libnetfilter-conntrack ... "
452 cat > $TMPDIR/nfcttest.c << EOF
453 #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
454 #include <libnetfilter_conntrack/libnetfilter_conntrack_tcp.h>
455 #include <libnetfilter_conntrack/libnetfilter_conntrack_dccp.h>
456 #include <libnetfilter_conntrack/libnetfilter_conntrack_sctp.h>
458 int main(void)
460 struct nf_conntrack *ct;
461 const uint32_t id = nfct_get_attr_u32(ct, ATTR_ID);
465 $CC \
466 $($PKG_CONFIG --cflags libnetfilter_conntrack 2>> config.log) \
467 -o $TMPDIR/nfcttest \
468 $TMPDIR/nfcttest.c \
469 $($PKG_CONFIG --libs libnetfilter_conntrack 2>> config.log) \
470 >> config.log 2>&1
471 if [ ! -x $TMPDIR/nfcttest ] ; then
472 echo "[NO]"
473 MISSING_DEFS=1
474 tools_remove "flowtop"
475 else
476 echo "[YES]"
480 check_zlib()
482 echo -n "[*] Checking libz ... "
484 if [ "$DISABLE_ZLIB" == "1" ] ; then
485 echo "[DISABLED]"
486 return
489 cat > $TMPDIR/ztest.c << EOF
490 #include "zlib.h"
492 int main(void)
494 gzFile fp = gzopen("foo.gz", "rb");
498 $CC -o $TMPDIR/ztest $TMPDIR/ztest.c -lz >> config.log 2>&1
499 if [ ! -x $TMPDIR/ztest ] ; then
500 echo "[NO]"
501 echo "CONFIG_LIBZ=0" >> Config
502 MISSING_DEFS=1
503 tools_remove "astraceroute"
504 tools_remove "flowtop"
505 else
506 echo "[YES]"
507 echo "CONFIG_LIBZ=1" >> Config
508 HAVE_LIBZ=1
512 check_urcu()
514 echo -n "[*] Checking liburcu ... "
516 cat > $TMPDIR/urcutest.c << EOF
517 #include <urcu.h>
519 int main(void)
521 rcu_init();
522 synchronize_rcu();
526 $CC -o $TMPDIR/urcutest $TMPDIR/urcutest.c -lurcu >> config.log 2>&1
527 if [ ! -x $TMPDIR/urcutest ] ; then
528 echo "[NO]"
529 MISSING_DEFS=1
530 tools_remove "flowtop"
531 else
532 echo "[YES]"
536 check_libpcap()
538 echo -n "[*] Checking libpcap ... "
540 cat > $TMPDIR/pcaptest.c << EOF
541 #include <pcap.h>
543 int main(void)
545 struct bpf_program bpf;
546 int ret = pcap_compile_nopcap(65535, 1, &bpf, "foo.bpf", 1, 0xffffffff);
550 $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c -lpcap >> config.log 2>&1
551 if [ ! -x $TMPDIR/pcaptest ] ; then
552 echo "[NO]"
553 echo "CONFIG_LIBPCAP=0" >> Config
554 MISSING_DEFS=1
555 tools_remove "mausezahn"
556 else
557 echo "[YES]"
558 echo "CONFIG_LIBPCAP=1" >> Config
559 HAVE_LIBPCAP=1
563 check_hwtstamp()
565 echo -n "[*] Checking hw timestamping ... "
567 cat > $TMPDIR/hwtstest.c << EOF
568 #include <string.h>
569 #include <arpa/inet.h>
570 #include <sys/ioctl.h>
571 #include <sys/types.h>
572 #include <sys/socket.h>
573 #include <linux/sockios.h>
574 #include <linux/net_tstamp.h>
575 #include <linux/if_packet.h>
576 #include <linux/if_ether.h>
577 #include <linux/if.h>
579 int main(void)
581 int timesource = SOF_TIMESTAMPING_RAW_HARDWARE, ret;
582 int sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
583 struct hwtstamp_config hwconfig;
584 struct ifreq ifr;
586 memset(&hwconfig, 0, sizeof(hwconfig));
587 hwconfig.tx_type = HWTSTAMP_TX_OFF;
588 hwconfig.rx_filter = HWTSTAMP_FILTER_ALL;
590 memset(&ifr, 0, sizeof(ifr));
591 strncpy(ifr.ifr_name, "lo", sizeof(ifr.ifr_name));
592 ifr.ifr_data = &hwconfig;
594 ioctl(sock, SIOCSHWTSTAMP, &ifr);
595 setsockopt(sock, SOL_PACKET, PACKET_TIMESTAMP, &timesource,
596 sizeof(timesource));
600 $CC -o $TMPDIR/hwtstest $TMPDIR/hwtstest.c >> config.log 2>&1
601 if [ ! -x $TMPDIR/hwtstest ] ; then
602 echo "[NO]"
603 echo "CONFIG_HWTSTAMP=0" >> Config
604 else
605 echo "[YES]"
606 echo "CONFIG_HWTSTAMP=1" >> Config
607 HAVE_HWTSTAMP=1
611 check_libcli()
613 echo -n "[*] Checking libcli ... "
615 cat > $TMPDIR/clitest.c << EOF
616 #include <sys/time.h>
617 #include <libcli.h>
619 int main(void)
621 struct cli_def *cli = cli_init();
625 $CC -o $TMPDIR/clitest $TMPDIR/clitest.c -lcli >> config.log 2>&1
626 if [ ! -x $TMPDIR/clitest ] ; then
627 echo "[NO]"
628 MISSING_DEFS=1
629 tools_remove "mausezahn"
630 else
631 echo "[YES]"
635 check_libnet()
637 echo -n "[*] Checking libnet ... "
639 cat > $TMPDIR/nettest.c << EOF
640 #include <libnet.h>
642 int main(void)
644 char err_buf[LIBNET_ERRBUF_SIZE];
645 libnet_t *l = libnet_init(LIBNET_LINK_ADV, "ethX", err_buf);
649 $CC -o $TMPDIR/nettest $TMPDIR/nettest.c -lnet >> config.log 2>&1
650 if [ ! -x $TMPDIR/nettest ] ; then
651 echo "[NO]"
652 MISSING_DEFS=1
653 tools_remove "mausezahn"
654 else
655 echo "[YES]"
659 gen_version_appendix()
661 local _appendix=""
663 git rev-parse > /dev/null 2>&1
664 if [ "$?" == "0" ] ; then
665 if [ ! "`git describe --always`" == \
666 "`git describe --abbrev=0 --tags`" ] ; then
667 _appendix="+"
671 echo "CONFIG_RC=\"$_appendix\"" >> Config
674 gen_config_hdr()
676 local _version=""
677 local _have_libpcap=""
678 local _have_libgeoip=""
679 local _have_libnl=""
680 local _have_libz=""
681 local _have_hwts=""
682 local _have_tp3=""
684 echo "[*] Generating config.h ..."
686 git rev-parse > /dev/null 2>&1
687 if [ "$?" == "0" ] ; then
688 _version="`git describe --always`"
689 else
690 _version="(none)"
693 if [ "$HAVE_LIBNL" == "1" ] ; then
694 _have_libnl="#define HAVE_LIBNL 1"
695 else
696 _have_libnl="/* HAVE_LIBNL is not defined */"
699 if [ "$HAVE_LIBPCAP" == "1" ] ; then
700 _have_libpcap="#define HAVE_TCPDUMP_LIKE_FILTER 1"
701 else
702 _have_libpcap="/* HAVE_TCPDUMP_LIKE_FILTER is not defined */"
705 if [ "$HAVE_HWTSTAMP" == "1" ] ; then
706 _have_hwts="#define HAVE_HARDWARE_TIMESTAMPING 1"
707 else
708 _have_hwts="/* HAVE_HARDWARE_TIMESTAMPING is not defined */"
711 if [ "$HAVE_LIBGEOIP" == "1" ] ; then
712 _have_libgeoip="#define HAVE_GEOIP 1"
713 else
714 _have_libgeoip="/* HAVE_GEOIP is not defined */"
717 if [ "$HAVE_LIBZ" == "1" ] ; then
718 _have_libz="#define HAVE_LIBZ 1"
719 else
720 _have_libz="/* HAVE_LIBZ is not defined */"
723 if [ "$HAVE_TPACKET3" == "1" ] ; then
724 _have_tp3="#define HAVE_TPACKET3 1"
725 else
726 _have_tp3="/* HAVE_TPACKET3 is not defined */"
729 cat > config.h << EOF
730 #ifndef CONFIG_H
731 #define CONFIG_H
732 #define FILE_CLIENTS ".curvetun/clients"
733 #define FILE_SERVERS ".curvetun/servers"
734 #define FILE_PRIVKEY ".curvetun/priv.key"
735 #define FILE_PUBKEY ".curvetun/pub.key"
736 #define FILE_USERNAM ".curvetun/username"
737 #define GITVERSION "$_version"
738 $_have_libnl
739 $_have_libpcap
740 $_have_libgeoip
741 $_have_libz
742 $_have_hwts
743 $_have_tp3
744 #endif /* CONFIG_H */
748 rm -f config.log
750 echo "# This file is autogenerated by the configure script" > Config
751 check_toolchain
753 if [ "$MISSING_TOOLCHAIN" == "1" ] ; then
754 echo "[!] One or more of the toolchain tools couldn't be found in your"
755 echo " \$PATH. Please check the file config.log for details."
756 exit 1
759 check_flex
760 check_bison
761 check_nacl
762 check_libnl
763 check_libnl_route
764 check_tpacket_v2
765 check_tpacket_v3
766 check_libnf_ct
767 check_ncurses
768 check_libgeoip
769 check_zlib
770 check_urcu
771 check_libpcap
772 check_hwtstamp
773 check_libcli
774 check_libnet
776 gen_config_hdr
777 gen_version_appendix
779 if [ "$MISSING_DEFS" == "1" ] ; then
780 echo "[!] Some libraries or header definitions are missing or too old. Thus"
781 echo " certain tools will not be built (see below). Please refer to the"
782 echo " INSTALL file for the libraries needed to build the complete"
783 echo " netsniff-ng toolkit."
786 if [ "$MISSING_NACL" == "1" ] ; then
787 echo "[!] The NaCl crypto library is currently not present on your system or"
788 echo " could not be found. Either install it from your distro or build it"
789 echo " manually using 'make nacl' and make sure that the NACL_INC_DIR and"
790 echo " NACL_LIB_DIR environment variables are set appropriately."
793 if [ "x$TOOLS_NOBUILD" != "x" ] ; then
794 echo "[!] The following tools will *not* be built: $TOOLS_NOBUILD"
795 echo "[*] The following tools will be built: $TOOLS"
796 else
797 echo "[*] Looks good! All tools will be built!"
800 if [ -s config.log ] ; then
801 echo "[!] There were errors in the configure script. Please check the file"
802 echo " config.log for details."
805 echo "CONFIG_LIBNL=$HAVE_LIBNL" >> Config
807 if [ "$HAVE_LIBGEOIP" == "1" -a "$HAVE_LIBZ" == "1" ] ; then
808 echo "CONFIG_GEOIP=1" >> Config
809 else
810 echo "CONFIG_GEOIP=0" >> Config
813 if [ "$HAVE_PREFIX" == "1" ] ; then
814 echo "PREFIX=$PREFIX" >> Config
817 echo "CONFIG_DEBUG=$ENABLE_DEBUG" >> Config
818 echo "CONFIG_TOOLS=$TOOLS" >> Config
819 echo "CONFIG_OK=1" >> Config
821 exit 0