X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=9bdc7a156e73ab46bd6102615f4dfbfe4619b14f;hp=f38e9c75684b84b11d35db8a6203ee55553150f1;hb=897c606a258e1ac7a21fd30ff3a5de59a3d097a1;hpb=26532556b53e08cc5ccf190134a1f782e82a7ef0 diff --git a/configure b/configure index f38e9c75..9bdc7a15 100755 --- a/configure +++ b/configure @@ -167,6 +167,8 @@ for opt do ;; --build-32bit-win) build_32bit_win="yes" ;; + --target-win-ver=*) target_win_ver="$optarg" + ;; --build-static) build_static="yes" ;; --enable-gfio) gfio_check="yes" @@ -213,6 +215,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 "--target-win-ver= Minimum version of Windows to target (XP or 7)" echo "--build-static Build a static fio" echo "--esx Configure build options for esx" echo "--enable-gfio Enable building of gtk gfio" @@ -329,20 +332,27 @@ CYGWIN*) cc="x86_64-w64-mingw32-gcc" fi fi - if test ! -z "$build_32bit_win" && test "$build_32bit_win" = "yes"; then - output_sym "CONFIG_32BIT" + + target_win_ver=$(echo "$target_win_ver" | tr '[:lower:]' '[:upper:]') + if test -z "$target_win_ver"; then + # Default Windows API target + target_win_ver="7" + fi + if test "$target_win_ver" = "XP"; then + output_sym "CONFIG_WINDOWS_XP" + elif test "$target_win_ver" = "7"; then + output_sym "CONFIG_WINDOWS_7" + CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0601" else - output_sym "CONFIG_64BIT_LLP64" + fatal "Unknown target Windows version" fi + # We need this to be output_sym'd here because this is Windows specific. # The regular configure path never sets this config. output_sym "CONFIG_WINDOWSAIO" # We now take the regular configuration path without having exit 0 here. # 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 @@ -350,11 +360,7 @@ CYGWIN*) gettimeofday="yes" sched_idle="yes" tcp_nodelay="yes" - tls_thread="yes" - static_assert="yes" ipv6="yes" - mkdir_two="no" - echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak ;; esac @@ -498,6 +504,9 @@ fi print_config "Operating system" "$targetos" print_config "CPU" "$cpu" print_config "Big endian" "$bigendian" +if test ! -z "$target_win_ver"; then + print_config "Target Windows version" "$target_win_ver" +fi print_config "Compiler" "$cc" print_config "Cross compile" "$cross_compile" echo @@ -600,7 +609,7 @@ int main(void) EOF if compile_prog "" "" "posixaio" ; then posix_aio="yes" -elif compile_prog "" "-lrt" "posixaio"; then +elif compile_prog "" "-lrt" "posixaio -lrt"; then posix_aio="yes" posix_aio_lrt="yes" LIBS="-lrt $LIBS" @@ -783,6 +792,40 @@ if test "$disable_rdma" != "yes" && compile_prog "" "-lrdmacm" "rdma"; then fi print_config "rdmacm" "$rdmacm" +########################################## +# asprintf() and vasprintf() probes +if test "$have_asprintf" != "yes" ; then + have_asprintf="no" +fi +cat > $TMPC << EOF +#include + +int main(int argc, char **argv) +{ + return asprintf(NULL, "%s", "str") == 0; +} +EOF +if compile_prog "" "" "have_asprintf"; then + have_asprintf="yes" +fi +print_config "asprintf()" "$have_asprintf" + +if test "$have_vasprintf" != "yes" ; then + have_vasprintf="no" +fi +cat > $TMPC << EOF +#include + +int main(int argc, char **argv) +{ + return vasprintf(NULL, "%s", NULL) == 0; +} +EOF +if compile_prog "" "" "have_vasprintf"; then + have_vasprintf="yes" +fi +print_config "vasprintf()" "$have_vasprintf" + ########################################## # Linux fallocate probe if test "$linux_fallocate" != "yes" ; then @@ -1851,15 +1894,15 @@ fi ########################################## # Report whether pmemblk engine is enabled -print_config "NVML pmemblk engine" "$pmemblk" +print_config "PMDK pmemblk engine" "$pmemblk" ########################################## # Report whether dev-dax engine is enabled -print_config "NVML dev-dax engine" "$devdax" +print_config "PMDK dev-dax engine" "$devdax" ########################################## # Report whether libpmem engine is enabled -print_config "NVML libpmem engine" "$pmem" +print_config "PMDK libpmem engine" "$pmem" ########################################## # Check if we have lex/yacc available @@ -2050,24 +2093,47 @@ fi print_config "strndup" "$strndup" ########################################## +# probe +# Note: presence of implies that is +# also available but not the other way around. +if test "$valgrind_dev" != "yes" ; then + valgrind_dev="no" +fi +cat > $TMPC << EOF +#include +int main(int argc, char **argv) +{ + return 0; +} +EOF +if compile_prog "" "" "valgrind_dev"; then + valgrind_dev="yes" +fi +print_config "Valgrind headers" "$valgrind_dev" + # check march=armv8-a+crc+crypto if test "$march_armv8_a_crc_crypto" != "yes" ; then march_armv8_a_crc_crypto="no" fi if test "$cpu" = "arm64" ; then cat > $TMPC < #include #include +#include int main(void) { - return 0; + /* Can we also do a runtime probe? */ +#if __linux__ + return getauxval(AT_HWCAP); +#else +# error "Don't know how to do runtime probe for ARM CRC32c" +#endif } EOF - if compile_prog "-march=armv8-a+crc+crypto" "" ""; then + if compile_prog "-march=armv8-a+crc+crypto" "" "ARM CRC32c"; then march_armv8_a_crc_crypto="yes" - CFLAGS="$CFLAGS -march=armv8-a+crc+crypto -DARCH_HAVE_CRC_CRYPTO" + CFLAGS="$CFLAGS -march=armv8-a+crc+crypto" march_set="yes" fi fi @@ -2151,6 +2217,12 @@ fi if test "$posix_pshared" = "yes" ; then output_sym "CONFIG_PSHARED" fi +if test "$have_asprintf" = "yes" ; then + output_sym "CONFIG_HAVE_ASPRINTF" +fi +if test "$have_vasprintf" = "yes" ; then + output_sym "CONFIG_HAVE_VASPRINTF" +fi if test "$linux_fallocate" = "yes" ; then output_sym "CONFIG_LINUX_FALLOCATE" fi @@ -2354,12 +2426,18 @@ fi if test "$disable_opt" = "yes" ; then output_sym "CONFIG_DISABLE_OPTIMIZATIONS" fi +if test "$valgrind_dev" = "yes"; then + output_sym "CONFIG_VALGRIND_DEV" +fi if test "$zlib" = "no" ; then echo "Consider installing zlib-dev (zlib-devel, some fio features depend on it." if test "$build_static" = "yes"; then echo "Note that some distros have separate packages for static libraries." fi fi +if test "$march_armv8_a_crc_crypto" = "yes" ; then + output_sym "ARCH_HAVE_CRC_CRYPTO" +fi if test "$cuda" = "yes" ; then output_sym "CONFIG_CUDA" fi