X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=f7d8ff92b22cf27200aa04dbbb4a11972d16c02d;hp=0e861eef906bdb12f3a4099522e5c7ae35a50484;hb=719cda0367e9ebce91d3f013deebcb9e041f2b5f;hpb=c89318761586dbd77b8f31ce0ed68ff4fc086c89 diff --git a/configure b/configure index 0e861eef..f7d8ff92 100755 --- a/configure +++ b/configure @@ -134,6 +134,7 @@ cpu="" show_help="no" exit_val=0 gfio="no" +libhdfs="no" # parse options for opt do @@ -156,6 +157,12 @@ for opt do ;; --disable-numa) disable_numa="yes" ;; + --disable-rbd) disable_rbd="yes" + ;; + --disable-gfapi) disable_gfapi="yes" + ;; + --enable-libhdfs) libhdfs="yes" + ;; --help) show_help="yes" ;; @@ -174,6 +181,7 @@ if test "$show_help" = "yes" ; then echo "--esx Configure build options for esx" echo "--enable-gfio Enable building of gtk gfio" echo "--disable-numa Disable libnuma even if found" + echo "--enable-libhdfs Enable hdfs support" exit $exit_val fi @@ -1146,7 +1154,7 @@ int main(int argc, char **argv) return 0; } EOF -if compile_prog "" "-lrbd -lrados" "rbd"; then +if test "$disable_rbd" != "yes" && compile_prog "" "-lrbd -lrados" "rbd"; then LIBS="-lrbd -lrados $LIBS" rbd="yes" fi @@ -1183,7 +1191,7 @@ int main(int argc, char **argv) return 0; } EOF -if compile_prog "" "-lgfapi -lglusterfs" "gfapi"; then +if test "$disable_gfapi" != "yes" && compile_prog "" "-lgfapi -lglusterfs" "gfapi"; then LIBS="-lgfapi -lglusterfs $LIBS" gfapi="yes" fi @@ -1239,6 +1247,72 @@ if compile_prog "" "" "s390_z196_facilities"; then fi fi echo "s390_z196_facilities $s390_z196_facilities" + +########################################## +# 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" +yacc_is_bison="no" +lex="no" +arith="no" +LEX=$(which lex 2> /dev/null) +if test -x "$LEX" ; then + lex="yes" +fi +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" +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 @@ -1380,6 +1454,21 @@ fi if test "$gf_fadvise" = "yes" ; then output_sym "CONFIG_GF_FADVISE" 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." +fi echo "LIBS+=$LIBS" >> $config_host_mak echo "CFLAGS+=$CFLAGS" >> $config_host_mak