X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=1494dd766b87e9e2d181f9fa2ef62e00a5001b7a;hp=063ccab429b4002b308227415d7663455666734c;hb=605cf82e0f9ea67f62b15b8b1e53f0843908b886;hpb=6fa14b995d65be5d4fd423664f4d339568c3c846 diff --git a/configure b/configure index 063ccab4..1494dd76 100755 --- a/configure +++ b/configure @@ -141,6 +141,10 @@ 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" @@ -152,6 +156,10 @@ for opt do ;; --disable-numa) disable_numa="yes" ;; + --disable-rbd) disable_rbd="yes" + ;; + --disable-gfapi) disable_gfapi="yes" + ;; --help) show_help="yes" ;; @@ -167,6 +175,7 @@ if test "$show_help" = "yes" ; then 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" exit $exit_val @@ -651,22 +660,6 @@ fi echo "sched_setaffinity(3 arg) $linux_3arg_affinity" echo "sched_setaffinity(2 arg) $linux_2arg_affinity" -########################################## -# CPU_COUNT test -cpu_count="no" -cat > $TMPC << EOF -#include -int main(int argc, char **argv) -{ - cpu_set_t mask; - return CPU_COUNT(&mask); -} -EOF -if compile_prog "" "" "cpu_count"; then - cpu_count="yes" -fi -echo "CPU_COUNT $cpu_count" - ########################################## # clock_gettime probe clock_gettime="no" @@ -1157,13 +1150,30 @@ 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 echo "Rados Block Device engine $rbd" ########################################## +# Check whether we have setvbuf +setvbuf="no" +cat > $TMPC << EOF +#include +int main(int argc, char **argv) +{ + FILE *f = NULL; + char buf[80]; + setvbuf(f, buf, _IOFBF, sizeof(buf)); + return 0; +} +EOF +if compile_prog "" "" "setvbuf"; then + setvbuf="yes" +fi +echo "setvbuf $setvbuf" + # check for gfapi gfapi="no" cat > $TMPC << EOF @@ -1177,7 +1187,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 @@ -1203,6 +1213,36 @@ if compile_prog "" "-lgfapi -lglusterfs" "gfapi"; then fi echo "Gluster API use fadvise $gf_fadvise" +########################################## +# Check if we support stckf on s390 +s390_z196_facilities="no" +cat > $TMPC << EOF +#define STFLE_BITS_Z196 45 /* various z196 facilities ... */ +int main(int argc, char **argv) +{ + /* We want just 1 double word to be returned. */ + register unsigned long reg0 asm("0") = 0; + unsigned long stfle_bits; + asm volatile(".machine push" "\n\t" + ".machine \"z9-109\"" "\n\t" + "stfle %0" "\n\t" + ".machine pop" "\n" + : "=QS" (stfle_bits), "+d" (reg0) + : : "cc"); + + if ((stfle_bits & (1UL << (63 - STFLE_BITS_Z196))) != 0) + return 0; + else + return -1; +} +EOF +if compile_prog "" "" "s390_z196_facilities"; then + $TMPE + if [[ $? -eq 0 ]]; then + s390_z196_facilities="yes" + fi +fi +echo "s390_z196_facilities $s390_z196_facilities" ############################################################################# if test "$wordsize" = "64" ; then @@ -1309,6 +1349,10 @@ fi 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 @@ -1327,8 +1371,12 @@ fi if test "$rbd" = "yes" ; then output_sym "CONFIG_RBD" fi -if test "$cpu_count" = "yes" ; then - output_sym "CONFIG_CPU_COUNT" +if test "$setvbuf" = "yes" ; then + output_sym "CONFIG_SETVBUF" +fi +if test "$s390_z196_facilities" = "yes" ; then + output_sym "CONFIG_S390_Z196_FACILITIES" + CFLAGS="$CFLAGS -march=z9-109" fi if test "$gfapi" = "yes" ; then output_sym "CONFIG_GFAPI" @@ -1337,6 +1385,10 @@ if test "$gf_fadvise" = "yes" ; then output_sym "CONFIG_GF_FADVISE" 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 echo "CC=$cc" >> $config_host_mak