show_help="no"
exit_val=0
gfio="no"
+libhdfs="no"
# parse options
for opt do
case "$opt" in
--cpu=*) cpu="$optarg"
;;
+ # esx is cross compiled and cannot be detect through simple uname calls
+ --esx)
+ esx="yes"
+ ;;
--cc=*) CC="$optarg"
;;
--extra-cflags=*) CFLAGS="$CFLAGS $optarg"
;;
--disable-numa) disable_numa="yes"
;;
+ --disable-rbd) disable_rbd="yes"
+ ;;
+ --disable-gfapi) disable_gfapi="yes"
+ ;;
+ --enable-libhdfs) libhdfs="yes"
+ ;;
--help)
show_help="yes"
;;
echo "--cc= Specify compiler to use"
echo "--extra-cflags= Specify extra CFLAGS to pass to compiler"
echo "--build-32bit-win Enable 32-bit build on Windows"
+ 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
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
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
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"
+
#############################################################################
if test "$wordsize" = "64" ; then
if test "$gfio" = "yes" ; then
echo "CONFIG_GFIO=y" >> $config_host_mak
fi
+if test "$esx" = "yes" ; then
+ output_sym "CONFIG_ESX"
+ output_sym "CONFIG_NO_SHM"
+fi
if test "$sched_idle" = "yes" ; then
output_sym "CONFIG_SCHED_IDLE"
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 "$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