summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure41
1 files changed, 39 insertions, 2 deletions
diff --git a/configure b/configure
index 105b1ec..c7ba9a0 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#!/bin/bash
# This isn't a configure generated by autoconf!
# netsniff-ng build system
-# Copyright 2013-2015 Tobias Klauser <tklauser@distanz.ch>
+# Copyright 2013-2016 Tobias Klauser <tklauser@distanz.ch>
# Copyright 2013 Daniel Borkmann <borkmann@gnumaniacs.org>
# Subject to the GNU GPL, version 2.
@@ -18,7 +18,44 @@ HAVE_LIBGEOIP=0
HAVE_LIBZ=0
HAVE_TPACKET3=0
-# use "CROSS_COMPILE=<prefix> SYSROOT=<path> ./configure && make" for cross compilation
+DISABLE_GEOIP=0
+DISABLE_ZLIB=0
+
+usage()
+{
+ echo "Usage: ./configure [OPTION]... [VAR=VALUE]..."
+ echo ""
+ echo " -h, --help Display this help and exit"
+ echo ""
+ echo "Optional Features:"
+ echo " --disable-geoip Disable geoip support"
+ echo " --disable-zlib Disable zlib support"
+ echo ""
+ echo "Some influential environment variables:"
+ echo " CC C compiler command"
+ echo " CROSS_COMPILE C cross-compiler prefix"
+
+ exit 0
+}
+
+while [ $# -gt 0 ] ; do
+ case "$1" in
+ -h|--help)
+ usage
+ ;;
+ --disable-geoip)
+ DISABLE_GEOIP=1
+ ;;
+ --disable-zlib)
+ DISABLE_ZLIB=1
+ ;;
+ *)
+ echo "[!] Unrecognized option: '$1'. Try './configure --help' for more information"
+ exit 1
+ ;;
+ esac
+ shift
+done
[ -z "$CC" ] && CC="${CROSS_COMPILE}gcc"
[ -z "$LD" ] && LD="${CROSS_COMPILE}gcc"