summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure b/configure
index ec31bf2..53b5d03 100755
--- a/configure
+++ b/configure
@@ -14,6 +14,7 @@ TOOLS_NOBUILD=""
HAVE_LIBPCAP=0
HAVE_HWTSTAMP=0
+HAVE_LIBGEOIP=0
[ -z $CC ] && CC=cc
@@ -292,12 +293,14 @@ EOF
$CC -o $TMPDIR/geoiptest $TMPDIR/geoiptest.c -lGeoIP >> $TMPDIR/config.log 2>&1
if [ ! -x $TMPDIR/geoiptest ] ; then
echo "[NO]"
+ echo "CONFIG_LIBGEOIP=0" >> Config
MISSING_DEFS=1
- tools_remove "netsniff-ng"
tools_remove "astraceroute"
tools_remove "flowtop"
else
echo "[YES]"
+ echo "CONFIG_LIBGEOIP=1" >> Config
+ HAVE_LIBGEOIP=1
fi
}
@@ -503,6 +506,7 @@ gen_config_hdr()
{
local _version="`git describe --always`"
local _have_libpcap=""
+ local _have_libgeoip=""
local _have_hwts=""
echo "[*] Generating config.h ... "
@@ -515,6 +519,10 @@ gen_config_hdr()
_have_hwts="#define HAVE_HARDWARE_TIMESTAMPING 1"
fi
+ if [ "$HAVE_LIBGEOIP" == "1" ] ; then
+ _have_libgeoip="#define HAVE_GEOIP 1"
+ fi
+
cat > config.h << EOF
#ifndef CONFIG_H
#define CONFIG_H
@@ -525,6 +533,7 @@ gen_config_hdr()
#define FILE_USERNAM ".curvetun/username"
#define GITVERSION "$_version"
$_have_libpcap
+$_have_libgeoip
$_have_hwts
#endif /* CONFIG_H */
EOF