summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-07-08 10:32:50 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-07-08 10:32:50 +0200
commit43b65d355ae3b9d2780f7e6998ff25900fe262ab (patch)
tree9a0a90517e19d87d6f0eded85fb123ae873a5eaf
parent6412c045db94d54f2b4eb93250fb3896e858ea85 (diff)
config: check for libz
Add a configure extension to check for libz that is needed for the geoip updater. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rwxr-xr-xconfigure25
1 files changed, 23 insertions, 2 deletions
diff --git a/configure b/configure
index f5b7732..a49ed78 100755
--- a/configure
+++ b/configure
@@ -70,7 +70,6 @@ EOF
echo "CONFIG_NACL_INC_DIR:=$NACL_INC_DIR" >> Config
echo "CONFIG_NACL_LIB_DIR:=$NACL_LIB_DIR" >> Config
fi
-
}
check_libnl()
@@ -195,7 +194,6 @@ EOF
else
echo "[YES]"
fi
-
}
check_libnf_ct()
@@ -221,8 +219,30 @@ EOF
else
echo "[YES]"
fi
+}
+
+check_zlib()
+{
+ echo -n "[*] Checking libz ... "
+ cat > $TMPDIR/ztest.c << EOF
+#include "zlib.h"
+
+void main(void)
+{
+ gzFile fp;
}
+EOF
+
+ $CC -o $TMPDIR/ztest $TMPDIR/ztest.c >> $TMPDIR/config.log 2>&1
+ if [ ! -x $TMPDIR/ztest ] ; then
+ echo "[NO]"
+ MISSING_DEFS=1
+ else
+ echo "[YES]"
+ fi
+}
+
echo "# This file is autogenerated by the configure script" > Config
check_pkg_config
@@ -238,6 +258,7 @@ check_tpacket
check_libnf_ct
check_ncurses
check_libgeoip
+check_zlib
if [ "$MISSING_DEFS" == "1" ] ; then
echo "[!] Some libraries or header definitions are missing or too old."