X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=05f985b6634e5dc516d0ef98dfbf5b45294becae;hp=4b006792c55c8f99c11e0ca462240c0a19520328;hb=976406b8a0d823f053400178b7b86f32a973762d;hpb=fc5c03455598ecb3250506e741c74bade0dae6d8 diff --git a/configure b/configure index 4b006792..05f985b6 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 @@ -649,6 +651,22 @@ 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" @@ -1145,6 +1163,23 @@ 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" ############################################################################# @@ -1270,6 +1305,12 @@ fi if test "$rbd" = "yes" ; then output_sym "CONFIG_RBD" fi +if test "$cpu_count" = "yes" ; then + output_sym "CONFIG_CPU_COUNT" +fi +if test "$setvbuf" = "yes" ; then + output_sym "CONFIG_SETVBUF" +fi echo "LIBS+=$LIBS" >> $config_host_mak echo "CFLAGS+=$CFLAGS" >> $config_host_mak