From: Jens Axboe Date: Mon, 29 Sep 2014 22:44:31 +0000 (-0600) Subject: configure: fix for the cases where bison provides yacc X-Git-Tag: fio-2.1.14~101^2~13 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=e7b2c7a37f62f892c466aa82bfb0b6c19e319c60 configure: fix for the cases where bison provides yacc Signed-off-by: Jens Axboe --- diff --git a/configure b/configure index 7ce874d7..a0198702 100755 --- a/configure +++ b/configure @@ -1272,15 +1272,22 @@ echo "HDFS engine $libhdfs" # Check if we have lex/yacc available yacc="no" +yacc_is_bison="no" lex="no" arith="no" -LEX=$(which lex) +LEX=$(which lex 2> /dev/null) if test -x "$LEX" ; then lex="yes" fi -YACC=$(which yacc) +YACC=$(which yacc 2> /dev/null) if test -x "$YACC" ; then yacc="yes" +else + YACC=$(which bison 2> /dev/null) + if test -x "$YACC" ; then + yacc="yes" + yacc_is_bison="yes" + fi fi if test "$yacc" = "yes" && test "$lex" = "yes" ; then arith="yes" @@ -1452,6 +1459,11 @@ if test "$libhdfs" = "yes" ; then fi if test "$arith" = "yes" ; then output_sym "CONFIG_ARITHMETIC" + if test "$yacc_is_bison" = "yes" ; then + echo "YACC=$YACC -y" >> $config_host_mak + else + echo "YACC=$YACC" >> $config_host_mak + fi fi if test "$zlib" = "no" ; then