X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=d34c000656bf7f6970d6a2eb917b8715761bbc69;hp=749cb1fba35697399480ed9fad4344312453f944;hb=3b973af558aa0802e2c8193e9afac4cd49af3ca0;hpb=6e8136d10c903b9aab0f9159077890a68ee46dd9 diff --git a/configure b/configure index 749cb1fb..d34c0006 100755 --- a/configure +++ b/configure @@ -343,6 +343,8 @@ CYGWIN*) # Flags below are still necessary mostly for MinGW. socklen_t="yes" sfaa="yes" + sync_sync="yes" + cmp_swap="yes" rusage_thread="yes" fdatasync="yes" clock_gettime="yes" # clock_monotonic probe has dependency on this @@ -353,6 +355,7 @@ CYGWIN*) tls_thread="yes" static_assert="yes" ipv6="yes" + mkdir_two="no" echo "BUILD_CFLAGS=$CFLAGS -I../zlib -include config-host.h -D_GNU_SOURCE" >> $config_host_mak ;; esac @@ -705,6 +708,44 @@ if compile_prog "" "" "__sync_fetch_and_add()" ; then fi print_config "__sync_fetch_and_add" "$sfaa" +########################################## +# __sync_synchronize() test +if test "$sync_sync" != "yes" ; then + sync_sync="no" +fi +cat > $TMPC << EOF +#include + +int main(int argc, char **argv) +{ + __sync_synchronize(); + return 0; +} +EOF +if compile_prog "" "" "__sync_synchronize()" ; then + sync_sync="yes" +fi +print_config "__sync_synchronize" "$sync_sync" + +########################################## +# __sync_val_compare_and_swap() test +if test "$cmp_swap" != "yes" ; then + cmp_swap="no" +fi +cat > $TMPC << EOF +#include + +int main(int argc, char **argv) +{ + int x = 0; + return __sync_val_compare_and_swap(&x, 1, 2); +} +EOF +if compile_prog "" "" "__sync_val_compare_and_swap()" ; then + cmp_swap="yes" +fi +print_config "__sync_val_compare_and_swap" "$cmp_swap" + ########################################## # libverbs probe if test "$libverbs" != "yes" ; then @@ -2047,6 +2088,22 @@ if test "$enable_cuda" = "yes" && compile_prog "" "-lcuda" "cuda"; then fi print_config "cuda" "$cuda" +########################################## +# mkdir() probe. mingw apparently has a one-argument mkdir :/ +mkdir_two="no" +cat > $TMPC << EOF +#include +#include +int main(int argc, char **argv) +{ + return mkdir("/tmp/bla", 0600); +} +EOF +if compile_prog "" "" "mkdir(a, b)"; then + mkdir_two="yes" +fi +print_config "mkdir(a, b)" "$mkdir_two" + ############################################################################# if test "$wordsize" = "64" ; then @@ -2091,6 +2148,12 @@ fi if test "$sfaa" = "yes" ; then output_sym "CONFIG_SFAA" fi +if test "$sync_sync" = "yes" ; then + output_sym "CONFIG_SYNC_SYNC" +fi +if test "$cmp_swap" = "yes" ; then + output_sym "CONFIG_CMP_SWAP" +fi if test "$libverbs" = "yes" -a "$rdmacm" = "yes" ; then output_sym "CONFIG_RDMA" fi @@ -2275,6 +2338,9 @@ fi if test "$cuda" = "yes" ; then output_sym "CONFIG_CUDA" fi +if test "$mkdir_two" = "yes" ; then + output_sym "CONFIG_HAVE_MKDIR_TWO" +fi echo "LIBS+=$LIBS" >> $config_host_mak echo "GFIO_LIBS+=$GFIO_LIBS" >> $config_host_mak