diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-07-10 14:53:10 +0200 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-07-10 14:53:10 +0200 |
commit | e71cbd89754a4ced113c295e02dee5c3624aee7c (patch) | |
tree | 43d1b8f13e94c3a8d38380e24ae0b28c3110a51c | |
parent | d4e385dd0e633525666bf95c56a2045bacc2a485 (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-x | configure | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -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 |