X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=4757d6705e7ef95bac00eb4fbb2865a431703b20;hp=4a8d352cdc9080e76edced844e4350933d46a1b8;hb=81795ce399bef3af497e5767546458e20ce81bbf;hpb=6cf71c249abd60f2d2f6878ae436d4bab00aacbd diff --git a/configure b/configure index 4a8d352c..4757d670 100755 --- a/configure +++ b/configure @@ -130,9 +130,6 @@ output_sym() { targetos="" cpu="" -cross_prefix=${cross_prefix-${CROSS_COMPILE}} -cc="${CC-${cross_prefix}gcc}" - # default options show_help="no" exit_val=0 @@ -175,6 +172,9 @@ if test "$show_help" = "yes" ; then exit $exit_val fi +cross_prefix=${cross_prefix-${CROSS_COMPILE}} +cc="${CC-${cross_prefix}gcc}" + if check_define __ANDROID__ ; then targetos="Android" elif check_define __linux__ ; then @@ -184,6 +184,8 @@ elif check_define __OpenBSD__ ; then elif check_define __sun__ ; then targetos='SunOS' CFLAGS="$CFLAGS -D_REENTRANT" +elif check_define _WIN32 ; then + targetos='CYGWIN' else targetos=`uname -s` fi @@ -1161,7 +1163,54 @@ if compile_prog "" "-lrbd -lrados" "rbd"; then 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 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 @@ -1289,6 +1338,13 @@ fi if test "$cpu_count" = "yes" ; then output_sym "CONFIG_CPU_COUNT" fi +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 echo "LIBS+=$LIBS" >> $config_host_mak echo "CFLAGS+=$CFLAGS" >> $config_host_mak