summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-07-10 14:53:10 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-07-10 14:53:10 +0200
commite71cbd89754a4ced113c295e02dee5c3624aee7c (patch)
tree43d1b8f13e94c3a8d38380e24ae0b28c3110a51c
parentd4e385dd0e633525666bf95c56a2045bacc2a485 (diff)
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 <dborkman@redhat.com>
-rwxr-xr-xconfigure30
1 files changed, 30 insertions, 0 deletions
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