From e71cbd89754a4ced113c295e02dee5c3624aee7c Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Wed, 10 Jul 2013 14:53:10 +0200 Subject: configure: check for flex and bison flex and bison are needed for bpfc and trafgen, so check for their existance. If they are not present, lets remove those two from the build in case users do not want it. Signed-off-by: Daniel Borkmann --- configure | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/configure b/configure index 120d5bf..ec31bf2 100755 --- a/configure +++ b/configure @@ -65,6 +65,34 @@ check_ccache() fi } +check_flex() +{ + echo -n "[*] Checking flex ... " + + if [ "x$(which flex)" == "x" ] ; then + echo "[NO]" + MISSING_DEFS=1 + tools_remove "trafgen" + tools_remove "bpfc" + else + echo "[YES]" + fi +} + +check_bison() +{ + echo -n "[*] Checking bison ... " + + if [ "x$(which bison)" == "x" ] ; then + echo "[NO]" + MISSING_DEFS=1 + tools_remove "trafgen" + tools_remove "bpfc" + else + echo "[YES]" + fi +} + check_nacl() { echo -n "[*] Checking nacl ... " @@ -511,6 +539,8 @@ if [ "$MISSING_PKG_CONFIG" == "1" ] ; then fi check_ccache +check_flex +check_bison check_nacl check_libnl check_tpacket_v2 -- cgit v1.2.3-54-g00ecf