X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=configure;h=e3ec25232706bc7dcb0f41df335626e1cb2d0475;hb=c5dd6d8975fc36da778d08c21d3e051add6d3030;hp=33d1327ebbba5b70a001e422bb5ad9b24d7c7b49;hpb=1b10477b21157800f030c3ec91511a810e75e4c7;p=fio.git diff --git a/configure b/configure index 33d1327e..e3ec2523 100755 --- a/configure +++ b/configure @@ -1270,6 +1270,49 @@ if test "$libhdfs" = "yes" ; then fi echo "HDFS engine $libhdfs" +# Check if we have lex/yacc available +yacc="no" +yacc_is_bison="no" +lex="no" +arith="no" +LEX=$(which lex 2> /dev/null) +if test -x "$LEX" ; then + lex="yes" +fi +YACC=$(which bison 2> /dev/null) +if test -x "$YACC" ; then + yacc="yes" + yacc_is_bison="yes" +else + YACC=$(which yacc 2> /dev/null) + if test -x "$YACC" ; then + yacc="yes" + fi +fi +if test "$yacc" = "yes" && test "$lex" = "yes" ; then + arith="yes" +fi + +if test "$arith" = "yes" ; then +cat > $TMPC << EOF +extern int yywrap(void); + +int main(int argc, char **argv) +{ + yywrap(); + return 0; +} +EOF + +if compile_prog "" "-ll" "lex"; then + LIBS="-ll $LIBS" +else + arith="no" +fi +fi + +echo "lex/yacc for arithmetic $arith" + ############################################################################# if test "$wordsize" = "64" ; then @@ -1414,6 +1457,14 @@ fi if test "$libhdfs" = "yes" ; then output_sym "CONFIG_LIBHDFS" 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 echo "Consider installing zlib-dev (zlib-devel), some fio features depend on it."