X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=configure;h=0d02bce81ec37c7d91e5b3a92a5d7f573011133d;hb=df292e805f9762e4ef3479e1254b3c7328e19988;hp=7741ef4fd850853aa4ba60a7453c15f927f89b8e;hpb=10fc06dc4166ef7c69a6c06cb3a318878048f6be;p=fio.git diff --git a/configure b/configure index 7741ef4f..0d02bce8 100755 --- a/configure +++ b/configure @@ -117,7 +117,7 @@ has() { } num() { - echo "$1" | grep -P -q "^[0-9]+$" + echo "$1" | grep -E -q "^[0-9]+$" } check_define() { @@ -163,7 +163,6 @@ show_help="no" exit_val=0 gfio_check="no" libhdfs="no" -pmemblk="no" devdax="no" pmem="no" cuda="no" @@ -176,6 +175,7 @@ libiscsi="no" libnbd="no" libnfs="" xnvme="" +libblkio="" libzbc="" dfs="" seed_buckets="" @@ -248,6 +248,8 @@ for opt do ;; --disable-xnvme) xnvme="no" ;; + --disable-libblkio) libblkio="no" + ;; --disable-tcmalloc) disable_tcmalloc="yes" ;; --disable-libnfs) libnfs="no" @@ -304,6 +306,7 @@ if test "$show_help" = "yes" ; then echo "--enable-libiscsi Enable iscsi support" echo "--enable-libnbd Enable libnbd (NBD engine) support" echo "--disable-xnvme Disable xnvme support even if found" + echo "--disable-libblkio Disable libblkio support even if found" echo "--disable-libzbc Disable libzbc even if found" echo "--disable-tcmalloc Disable tcmalloc support" echo "--dynamic-libengines Lib-based ioengines as dynamic libraries" @@ -1172,7 +1175,9 @@ cat > $TMPC << EOF #include int main(int argc, char **argv) { - return clock_gettime(0, NULL); + struct timespec ts; + + return clock_gettime(0, &ts); } EOF if compile_prog "" "" "clock_gettime"; then @@ -1194,7 +1199,9 @@ if test "$clock_gettime" = "yes" ; then #include int main(int argc, char **argv) { - return clock_gettime(CLOCK_MONOTONIC, NULL); + struct timespec ts; + + return clock_gettime(CLOCK_MONOTONIC, &ts); } EOF if compile_prog "" "$LIBS" "clock monotonic"; then @@ -2221,43 +2228,6 @@ if compile_prog "" "-lpmem2" "libpmem2"; then fi print_config "libpmem2" "$libpmem2" -########################################## -# Check whether we have libpmemblk -# libpmem is a prerequisite -if test "$libpmemblk" != "yes" ; then - libpmemblk="no" -fi -if test "$libpmem" = "yes"; then - cat > $TMPC << EOF -#include -int main(int argc, char **argv) -{ - PMEMblkpool *pbp; - pbp = pmemblk_open("", 0); - return 0; -} -EOF - if compile_prog "" "-lpmemblk" "libpmemblk"; then - libpmemblk="yes" - fi -fi -print_config "libpmemblk" "$libpmemblk" - -# Choose libpmem-based ioengines -if test "$libpmem" = "yes" && test "$disable_pmem" = "no"; then - devdax="yes" - if test "$libpmem1_5" = "yes"; then - pmem="yes" - fi - if test "$libpmemblk" = "yes"; then - pmemblk="yes" - fi -fi - -########################################## -# Report whether pmemblk engine is enabled -print_config "PMDK pmemblk engine" "$pmemblk" - ########################################## # Report whether dev-dax engine is enabled print_config "PMDK dev-dax engine" "$devdax" @@ -2561,7 +2531,7 @@ if compile_prog "" "" "valgrind_dev"; then fi print_config "Valgrind headers" "$valgrind_dev" -if test "$targetos" = "Linux" ; then +if test "$targetos" = "Linux" || test "$targetos" = "Android"; then ########################################## # probe if test "$linux_blkzoned" != "yes" ; then @@ -2634,8 +2604,6 @@ cat > $TMPC << EOF #include int main(void) { - struct nvme_uring_cmd *cmd; - return sizeof(struct nvme_uring_cmd); } EOF @@ -2662,21 +2630,39 @@ fi print_config "xnvme engine" "$xnvme" ########################################## -# check march=armv8-a+crc+crypto -if test "$march_armv8_a_crc_crypto" != "yes" ; then - march_armv8_a_crc_crypto="no" +# Check if we have libblkio +if test "$libblkio" != "no" ; then + if check_min_lib_version blkio 1.0.0; then + libblkio="yes" + libblkio_cflags=$(pkg-config --cflags blkio) + libblkio_libs=$(pkg-config --libs blkio) + else + if test "$libblkio" = "yes" ; then + feature_not_found "libblkio" "libblkio-dev or libblkio-devel" + fi + libblkio="no" + fi fi +print_config "libblkio engine" "$libblkio" + +########################################## +# check march=armv8-a+crc+crypto +march_armv8_a_crc_crypto="no" if test "$cpu" = "arm64" ; then cat > $TMPC < #include #include +#endif int main(void) { /* Can we also do a runtime probe? */ #if __linux__ return getauxval(AT_HWCAP); +#elif defined(__APPLE__) + return 0; #else # error "Don't know how to do runtime probe for ARM CRC32c" #endif @@ -2723,9 +2709,9 @@ int main(int argc, char* argv[]) { return 0; } EOF - if compile_prog "" "-lcuda -lcudart -lcufile" "libcufile"; then + if compile_prog "" "-lcuda -lcudart -lcufile -ldl" "libcufile"; then libcufile="yes" - LIBS="-lcuda -lcudart -lcufile $LIBS" + LIBS="-lcuda -lcudart -lcufile -ldl $LIBS" else if test "$libcufile" = "yes" ; then feature_not_found "libcufile" "" @@ -2804,6 +2790,22 @@ if compile_prog "-Wimplicit-fallthrough=2" "" "-Wimplicit-fallthrough=2"; then fi print_config "-Wimplicit-fallthrough=2" "$fallthrough" +########################################## +# check if the compiler has -Wno-stringop-concatenation +no_stringop="no" +cat > $TMPC << EOF +#include + +int main(int argc, char **argv) +{ + return printf("%s\n", argv[0]); +} +EOF +if compile_prog "-Wno-stringop-truncation -Werror" "" "no_stringop"; then + no_stringop="yes" +fi +print_config "-Wno-stringop-truncation" "$no_stringop" + ########################################## # check for MADV_HUGEPAGE support if test "$thp" != "yes" ; then @@ -3151,9 +3153,6 @@ fi if test "$mtd" = "yes" ; then output_sym "CONFIG_MTD" fi -if test "$pmemblk" = "yes" ; then - output_sym "CONFIG_PMEMBLK" -fi if test "$devdax" = "yes" ; then output_sym "CONFIG_LINUX_DEVDAX" fi @@ -3249,6 +3248,9 @@ fi if test "$fallthrough" = "yes"; then CFLAGS="$CFLAGS -Wimplicit-fallthrough" fi +if test "$no_stringop" = "yes"; then + output_sym "CONFIG_HAVE_NO_STRINGOP" +fi if test "$thp" = "yes" ; then output_sym "CONFIG_HAVE_THP" fi @@ -3274,6 +3276,11 @@ if test "$xnvme" = "yes" ; then echo "LIBXNVME_CFLAGS=$xnvme_cflags" >> $config_host_mak echo "LIBXNVME_LIBS=$xnvme_libs" >> $config_host_mak fi +if test "$libblkio" = "yes" ; then + output_sym "CONFIG_LIBBLKIO" + echo "LIBBLKIO_CFLAGS=$libblkio_cflags" >> $config_host_mak + echo "LIBBLKIO_LIBS=$libblkio_libs" >> $config_host_mak +fi if test "$dynamic_engines" = "yes" ; then output_sym "CONFIG_DYNAMIC_ENGINES" fi