X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=configure;h=8b763700dacd203fcde0f3649beaa339608cd204;hb=575686bb85fa36f326524c505e83c54abc0d2f2b;hp=81bfb270c9f68f9f7043cd190e127bafa5f89d48;hpb=03eabd8a7a53c80a6c9d1376b38a9b7ddce2268a;p=fio.git diff --git a/configure b/configure index 81bfb270..8b763700 100755 --- a/configure +++ b/configure @@ -45,6 +45,7 @@ print_config() { # Default CFLAGS CFLAGS="-D_GNU_SOURCE -include config-host.h $CFLAGS" +CONFIGURE_CFLAGS="-Werror-implicit-function-declaration" BUILD_CFLAGS="" # Print a helpful header at the top of config.log @@ -88,14 +89,14 @@ do_cc() { } compile_object() { - do_cc $CFLAGS -Werror-implicit-function-declaration -c -o $TMPO $TMPC + do_cc $CFLAGS $CONFIGURE_CFLAGS -c -o $TMPO $TMPC } compile_prog() { local_cflags="$1" local_ldflags="$2 $LIBS" echo "Compiling test case $3" >> config.log - do_cc $CFLAGS -Werror-implicit-function-declaration $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags + do_cc $CFLAGS $CONFIGURE_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags } feature_not_found() { @@ -141,7 +142,7 @@ check_min_lib_version() { fi : "${_feature:=${1}}" if "${cross_prefix}"pkg-config --version > /dev/null 2>&1; then - if eval "echo \$$_feature" = "yes" ; then + if test "$(eval echo \"\$$_feature\")" = "yes" ; then feature_not_found "$_feature" "$1 >= $2" fi else @@ -162,14 +163,16 @@ pmemblk="no" devdax="no" pmem="no" cuda="no" +libcufile="no" disable_lex="" disable_pmem="no" disable_native="no" march_set="no" libiscsi="no" libnbd="no" -libaio_uring="no" +libnfs="no" libzbc="" +dfs="" dynamic_engines="no" prefix=/usr/local @@ -193,6 +196,8 @@ for opt do ;; --target-win-ver=*) target_win_ver="$optarg" ;; + --enable-pdb) pdb="yes" + ;; --build-static) build_static="yes" ;; --enable-gfio) gfio_check="yes" @@ -223,6 +228,8 @@ for opt do ;; --enable-cuda) cuda="yes" ;; + --enable-libcufile) libcufile="yes" + ;; --disable-native) disable_native="yes" ;; --with-ime=*) ime_path="$optarg" @@ -235,10 +242,12 @@ for opt do ;; --disable-tcmalloc) disable_tcmalloc="yes" ;; - --enable-libaio-uring) libaio_uring="yes" + --disable-nfs) disable_nfs="yes" ;; --dynamic-libengines) dynamic_engines="yes" ;; + --disable-dfs) dfs="no" + ;; --help) show_help="yes" ;; @@ -255,7 +264,8 @@ 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 "--target-win-ver= Minimum version of Windows to target (only accepts 7)" + echo "--enable-pdb Enable Windows PDB symbols generation (needs clang/lld)" echo "--build-static Build a static fio" echo "--esx Configure build options for esx" echo "--enable-gfio Enable building of gtk gfio" @@ -264,22 +274,25 @@ if test "$show_help" = "yes" ; then echo "--disable-rados Disable Rados support even if found" echo "--disable-rbd Disable Rados Block Device even if found" echo "--disable-http Disable HTTP support even if found" + echo "--disable-nfs Disable userspace NFS support even if found" echo "--disable-gfapi Disable gfapi" echo "--enable-libhdfs Enable hdfs support" + echo "--enable-libnfs Enable nfs support" echo "--disable-lex Disable use of lex/yacc for math" echo "--disable-pmem Disable pmem based engines even if found" echo "--enable-lex Enable use of lex/yacc for math" echo "--disable-shm Disable SHM support" echo "--disable-optimizations Don't enable compiler optimizations" echo "--enable-cuda Enable GPUDirect RDMA support" + echo "--enable-libcufile Enable GPUDirect Storage cuFile support" echo "--disable-native Don't build for native host" echo "--with-ime= Install path for DDN's Infinite Memory Engine" echo "--enable-libiscsi Enable iscsi support" echo "--enable-libnbd Enable libnbd (NBD engine) support" echo "--disable-libzbc Disable libzbc even if found" echo "--disable-tcmalloc Disable tcmalloc support" - echo "--enable-libaio-uring Enable libaio emulated over io_uring" echo "--dynamic-libengines Lib-based ioengines as dynamic libraries" + echo "--disable-dfs Disable DAOS File System support even if found" exit $exit_val fi @@ -357,16 +370,15 @@ Darwin) if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" = "1"; then cpu="x86_64" fi - # Error at compile time linking of weak/partial symbols if possible... + # Avoid configure feature detection of features provided by weak symbols cat > $TMPC < $TMPC < $TMPC < $TMPC < int main(void) { @@ -779,11 +779,12 @@ int main(void) return 0; } EOF -if compile_prog "" "$LIBS" "pthread_condattr_setclock" ; then - pthread_condattr_setclock=yes -elif compile_prog "" "$LIBS -lpthread" "pthread_condattr_setclock" ; then - pthread_condattr_setclock=yes - LIBS="$LIBS -lpthread" + if compile_prog "" "$LIBS" "pthread_condattr_setclock" ; then + pthread_condattr_setclock=yes + elif compile_prog "" "$LIBS -lpthread" "pthread_condattr_setclock" ; then + pthread_condattr_setclock=yes + LIBS="$LIBS -lpthread" + fi fi print_config "pthread_condattr_setclock()" "$pthread_condattr_setclock" @@ -808,6 +809,29 @@ elif compile_prog "" "$LIBS -lpthread" "pthread_sigmask" ; then fi print_config "pthread_sigmask()" "$pthread_sigmask" +########################################## +# pthread_getaffinity_np() probe +if test "$pthread_getaffinity" != "yes" ; then + pthread_getaffinity="no" +fi +cat > $TMPC < /* NULL */ +#include /* pthread_sigmask() */ +#include +int main(void) +{ + cpu_set_t set; + return pthread_getaffinity_np(pthread_self(), sizeof(set), &set); +} +EOF +if compile_prog "" "$LIBS" "pthread_getaffinity" ; then + pthread_getaffinity="yes" +elif compile_prog "" "$LIBS -lpthread" "pthread_getaffinity" ; then + pthread_getaffinity="yes" + LIBS="$LIBS -lpthread" +fi +print_config "pthread_getaffinity_np()" "$pthread_getaffinity" + ########################################## # solaris aio probe if test "$solaris_aio" != "yes" ; then @@ -929,6 +953,49 @@ if test "$disable_rdma" != "yes" && compile_prog "" "-lrdmacm" "rdma"; then fi print_config "rdmacm" "$rdmacm" +########################################## +# librpma probe +if test "$librpma" != "yes" ; then + librpma="no" +fi +cat > $TMPC << EOF +#include +#include +int main(int argc, char **argv) +{ + enum rpma_conn_event event = RPMA_CONN_REJECTED; + (void) event; /* unused */ + rpma_log_set_threshold(RPMA_LOG_THRESHOLD, RPMA_LOG_LEVEL_INFO); + return 0; +} +EOF +if test "$disable_rdma" != "yes" && compile_prog "" "-lrpma" "rpma"; then + librpma="yes" +fi +print_config "librpma" "$librpma" + +########################################## +# libprotobuf-c probe +if test "$libprotobuf_c" != "yes" ; then + libprotobuf_c="no" +fi +cat > $TMPC << EOF +#include +#include +#if !defined(PROTOBUF_C_VERSION_NUMBER) +# error PROTOBUF_C_VERSION_NUMBER is not defined! +#endif +int main(int argc, char **argv) +{ + (void)protobuf_c_message_check(NULL); + return 0; +} +EOF +if compile_prog "" "-lprotobuf-c" "protobuf_c"; then + libprotobuf_c="yes" +fi +print_config "libprotobuf_c" "$libprotobuf_c" + ########################################## # asprintf() and vasprintf() probes if test "$have_asprintf" != "yes" ; then @@ -939,7 +1006,8 @@ cat > $TMPC << EOF int main(int argc, char **argv) { - return asprintf(NULL, "%s", "str") == 0; + char *buf; + return asprintf(&buf, "%s", "str") == 0; } EOF if compile_prog "" "" "have_asprintf"; then @@ -956,7 +1024,8 @@ cat > $TMPC << EOF int main(int argc, char **argv) { va_list ap; - return vasprintf(NULL, "%s", ap) == 0; + char *buf; + return vasprintf(&buf, "%s", ap) == 0; } EOF if compile_prog "" "" "have_vasprintf"; then @@ -1097,46 +1166,6 @@ EOF fi print_config "CLOCK_MONOTONIC" "$clock_monotonic" -########################################## -# CLOCK_MONOTONIC_RAW probe -if test "$clock_monotonic_raw" != "yes" ; then - clock_monotonic_raw="no" -fi -if test "$clock_gettime" = "yes" ; then - cat > $TMPC << EOF -#include -#include -int main(int argc, char **argv) -{ - return clock_gettime(CLOCK_MONOTONIC_RAW, NULL); -} -EOF - if compile_prog "" "$LIBS" "clock monotonic"; then - clock_monotonic_raw="yes" - fi -fi -print_config "CLOCK_MONOTONIC_RAW" "$clock_monotonic_raw" - -########################################## -# CLOCK_MONOTONIC_PRECISE probe -if test "$clock_monotonic_precise" != "yes" ; then - clock_monotonic_precise="no" -fi -if test "$clock_gettime" = "yes" ; then - cat > $TMPC << EOF -#include -#include -int main(int argc, char **argv) -{ - return clock_gettime(CLOCK_MONOTONIC_PRECISE, NULL); -} -EOF - if compile_prog "" "$LIBS" "clock monotonic precise"; then - clock_monotonic_precise="yes" - fi -fi -print_config "CLOCK_MONOTONIC_PRECISE" "$clock_monotonic_precise" - ########################################## # clockid_t probe if test "$clockid_t" != "yes" ; then @@ -1311,25 +1340,6 @@ if compile_prog "" "" "linux splice"; then fi print_config "Linux splice(2)" "$linux_splice" -########################################## -# GUASI probe -if test "$guasi" != "yes" ; then - guasi="no" -fi -cat > $TMPC << EOF -#include -#include -int main(int argc, char **argv) -{ - guasi_t ctx = guasi_create(0, 0, 0); - return 0; -} -EOF -if compile_prog "" "-lguasi" "guasi"; then - guasi="yes" -fi -print_config "GUASI" "$guasi" - ########################################## # libnuma probe if test "$libnuma" != "yes" ; then @@ -2121,7 +2131,7 @@ cat > $TMPC << EOF int main(int argc, char **argv) { int rc; - rc = pmem_is_pmem(NULL, NULL); + rc = pmem_is_pmem(NULL, 0); return 0; } EOF @@ -2245,6 +2255,48 @@ if test "$libnbd" != "no" ; then fi print_config "NBD engine" "$libnbd" +########################################## +# check for dfs (DAOS File System) +if test "$dfs" != "no" ; then + cat > $TMPC << EOF +#include +#include +#include + +int main(int argc, char **argv) +{ + daos_handle_t poh; + daos_handle_t coh; + dfs_t *dfs; + + (void) dfs_mount(poh, coh, O_RDWR, &dfs); + + return 0; +} +EOF + if compile_prog "" "-luuid -ldfs -ldaos" "dfs"; then + dfs="yes" + else + dfs="no" + fi +fi +print_config "DAOS File System (dfs) Engine" "$dfs" + +########################################## +# Check if we have libnfs (for userspace nfs support). +if test "$disable_nfs" != "yes"; then + if $(pkg-config libnfs); then + libnfs="yes" + libnfs_cflags=$(pkg-config --cflags libnfs) + libnfs_libs=$(pkg-config --libs libnfs) + else + if test "$libnfs" = "yes" ; then + echo "libnfs" "Install libnfs" + fi + fi +fi +print_config "NFS engine" "$libnfs" + ########################################## # Check if we have lex/yacc available yacc="no" @@ -2253,19 +2305,14 @@ lex="no" arith="no" if test "$disable_lex" = "no" || test -z "$disable_lex" ; then if test "$targetos" != "SunOS" ; then -LEX=$(which lex 2> /dev/null) -if test -x "$LEX" ; then +if has lex; then lex="yes" fi -YACC=$(which bison 2> /dev/null) -if test -x "$YACC" ; then +if has bison; then yacc="yes" yacc_is_bison="yes" -else - YACC=$(which yacc 2> /dev/null) - if test -x "$YACC" ; then - yacc="yes" - fi +elif has yacc; then + yacc="yes" fi if test "$yacc" = "yes" && test "$lex" = "yes" ; then arith="yes" @@ -2281,7 +2328,9 @@ int main(int argc, char **argv) return 0; } EOF -if compile_prog "" "-ll" "lex"; then +if compile_prog "" "-lfl" "flex"; then + LIBS="-lfl $LIBS" +elif compile_prog "" "-ll" "lex"; then LIBS="-ll $LIBS" else arith="no" @@ -2295,8 +2344,7 @@ if test "$arith" = "yes" ; then if test "$force_no_lex_o" = "yes" ; then lex_use_o="no" else -$LEX -o lex.yy.c exp/expression-parser.l 2> /dev/null -if test "$?" = "0" ; then +if lex -o lex.yy.c exp/expression-parser.l 2> /dev/null; then lex_use_o="yes" else lex_use_o="no" @@ -2565,6 +2613,29 @@ EOF fi print_config "cuda" "$cuda" +########################################## +# libcufile probe +if test "$libcufile" != "no" ; then +cat > $TMPC << EOF +#include + +int main(int argc, char* argv[]) { + cuFileDriverOpen(); + return 0; +} +EOF + if compile_prog "" "-lcuda -lcudart -lcufile" "libcufile"; then + libcufile="yes" + LIBS="-lcuda -lcudart -lcufile $LIBS" + else + if test "$libcufile" = "yes" ; then + feature_not_found "libcufile" "" + fi + libcufile="no" + fi +fi +print_config "libcufile" "$libcufile" + ########################################## # check for cc -march=native build_native="no" @@ -2717,6 +2788,47 @@ if compile_prog "" "" "statx_syscall"; then fi print_config "statx(2)/syscall" "$statx_syscall" +########################################## +# check for Windows PDB generation support +if test "pdb" != "no" ; then + cat > $TMPC < $TMPC << EOF +#include +#include + +int main(int argc, char **argv) +{ + return timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK); +} +EOF + if compile_prog "" "" "timerfd_create"; then + timerfd_create="yes" + fi +fi +print_config "timerfd_create" "$timerfd_create" + ############################################################################# if test "$wordsize" = "64" ; then @@ -2739,9 +2851,6 @@ if test "$libaio" = "yes" ; then if test "$libaio_rw_flags" = "yes" ; then output_sym "CONFIG_LIBAIO_RW_FLAGS" fi - if test "$libaio_uring" = "yes" ; then - output_sym "CONFIG_LIBAIO_URING" - fi fi if test "$posix_aio" = "yes" ; then output_sym "CONFIG_POSIXAIO" @@ -2758,6 +2867,9 @@ fi if test "$pthread_sigmask" = "yes" ; then output_sym "CONFIG_PTHREAD_SIGMASK" fi +if test "$pthread_getaffinity" = "yes" ; then + output_sym "CONFIG_PTHREAD_GETAFFINITY" +fi if test "$have_asprintf" = "yes" ; then output_sym "CONFIG_HAVE_ASPRINTF" fi @@ -2797,18 +2909,21 @@ fi if test "$libverbs" = "yes" -a "$rdmacm" = "yes" ; then output_sym "CONFIG_RDMA" fi +# librpma is supported on the 'x86_64' architecture for now +if test "$cpu" = "x86_64" -a "$libverbs" = "yes" -a "$rdmacm" = "yes" \ + -a "$librpma" = "yes" -a "$libpmem" = "yes" ; then + output_sym "CONFIG_LIBRPMA_APM" +fi +if test "$cpu" = "x86_64" -a "$libverbs" = "yes" -a "$rdmacm" = "yes" \ + -a "$librpma" = "yes" -a "$libpmem" = "yes" -a "$libprotobuf_c" = "yes" ; then + output_sym "CONFIG_LIBRPMA_GPSPM" +fi if test "$clock_gettime" = "yes" ; then output_sym "CONFIG_CLOCK_GETTIME" fi if test "$clock_monotonic" = "yes" ; then output_sym "CONFIG_CLOCK_MONOTONIC" fi -if test "$clock_monotonic_raw" = "yes" ; then - output_sym "CONFIG_CLOCK_MONOTONIC_RAW" -fi -if test "$clock_monotonic_precise" = "yes" ; then - output_sym "CONFIG_CLOCK_MONOTONIC_PRECISE" -fi if test "$clockid_t" = "yes"; then output_sym "CONFIG_CLOCKID_T" fi @@ -2847,9 +2962,6 @@ fi if test "$linux_splice" = "yes" ; then output_sym "CONFIG_LINUX_SPLICE" fi -if test "$guasi" = "yes" ; then - output_sym "CONFIG_GUASI" -fi if test "$libnuma_v2" = "yes" ; then output_sym "CONFIG_LIBNUMA" fi @@ -2953,9 +3065,9 @@ fi if test "$arith" = "yes" ; then output_sym "CONFIG_ARITHMETIC" if test "$yacc_is_bison" = "yes" ; then - echo "YACC=$YACC -y" >> $config_host_mak + echo "YACC=bison -y" >> $config_host_mak else - echo "YACC=$YACC" >> $config_host_mak + echo "YACC=yacc" >> $config_host_mak fi if test "$lex_use_o" = "yes" ; then echo "CONFIG_LEX_USE_O=y" >> $config_host_mak @@ -3003,6 +3115,15 @@ fi if test "$cuda" = "yes" ; then output_sym "CONFIG_CUDA" fi +if test "$libcufile" = "yes" ; then + output_sym "CONFIG_LIBCUFILE" +fi +if test "$dfs" = "yes" ; then + output_sym "CONFIG_DFS" +fi +if test "$libnfs" = "yes" ; then + output_sym "CONFIG_NFS" +fi if test "$march_set" = "no" && test "$build_native" = "yes" ; then output_sym "CONFIG_BUILD_NATIVE" fi @@ -3021,6 +3142,9 @@ fi if test "$statx_syscall" = "yes"; then output_sym "CONFIG_HAVE_STATX_SYSCALL" fi +if test "$timerfd_create" = "yes"; then + output_sym "CONFIG_HAVE_TIMERFD_CREATE" +fi if test "$fallthrough" = "yes"; then CFLAGS="$CFLAGS -Wimplicit-fallthrough" fi @@ -3039,9 +3163,19 @@ if test "$libnbd" = "yes" ; then echo "LIBNBD_CFLAGS=$libnbd_cflags" >> $config_host_mak echo "LIBNBD_LIBS=$libnbd_libs" >> $config_host_mak fi +if test "$libnfs" = "yes" ; then + output_sym "CONFIG_LIBNFS" + echo "CONFIG_LIBNFS=m" >> $config_host_mak + echo "LIBNFS_CFLAGS=$libnfs_cflags" >> $config_host_mak + echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak +fi if test "$dynamic_engines" = "yes" ; then output_sym "CONFIG_DYNAMIC_ENGINES" fi +if test "$pdb" = yes; then + output_sym "CONFIG_PDB" +fi + print_config "Lib-based ioengines dynamic" "$dynamic_engines" cat > $TMPC << EOF int main(int argc, char **argv)