+
+##########################################
+# Check if we have required environment variables configured for libhdfs
+if test "$libhdfs" = "yes" ; then
+ hdfs_conf_error=0
+ if test "$JAVA_HOME" = "" ; then
+ echo "configure: JAVA_HOME should be defined to jdk/jvm path"
+ hdfs_conf_error=1
+ fi
+ if test "$FIO_LIBHDFS_INCLUDE" = "" ; then
+ echo "configure: FIO_LIBHDFS_INCLUDE should be defined to libhdfs inlude path"
+ hdfs_conf_error=1
+ fi
+ if test "$FIO_LIBHDFS_LIB" = "" ; then
+ echo "configure: FIO_LIBHDFS_LIB should be defined to libhdfs library path"
+ hdfs_conf_error=1
+ fi
+ if test "$hdfs_conf_error" = "1" ; then
+ exit 1
+ fi
+fi
+echo "HDFS engine $libhdfs"
+
+# Check if we have lex/yacc available
+yacc="no"
+lex="no"
+arith="no"
+LEX=$(which lex)
+if test -x "$LEX" ; then
+ lex="yes"
+fi
+YACC=$(which yacc)
+if test -x "$YACC" ; then
+ yacc="yes"
+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 -ly" "lex"; then
+ LIBS="-ll -ly $LIBS"
+else
+ arith="no"
+fi
+fi
+
+echo "lex/yacc for arithmetic $arith"
+