X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=7b1d79a458a7cadcde21e821e19c34f11d7f9386;hp=95765cceffac57a203855a46941e6daa23d26482;hb=47986339e372697d9a79d48de21eb0f311386bf0;hpb=07fc0acd46e024b4df7ac60a3424fa1434a84600 diff --git a/configure b/configure index 95765cce..7b1d79a4 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 @@ -153,6 +150,8 @@ for opt do --enable-gfio) gfio="yes" ;; + --disable-numa) disable_numa="yes" + ;; --help) show_help="yes" ;; @@ -169,9 +168,13 @@ if test "$show_help" = "yes" ; then echo "--extra-cflags= Specify extra CFLAGS to pass to compiler" echo "--build-32bit-win Enable 32-bit build on Windows" echo "--enable-gfio Enable building of gtk gfio" + echo "--disable-numa Disable libnuma even if found" 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 @@ -180,6 +183,7 @@ elif check_define __OpenBSD__ ; then targetos='OpenBSD' elif check_define __sun__ ; then targetos='SunOS' + CFLAGS="$CFLAGS -D_REENTRANT" else targetos=`uname -s` fi @@ -239,6 +243,8 @@ CYGWIN*) output_sym "CONFIG_CLOCK_GETTIME" output_sym "CONFIG_SCHED_IDLE" output_sym "CONFIG_TCP_NODELAY" + output_sym "CONFIG_TLS_THREAD" + output_sym "CONFIG_IPV6" echo "CC=$CC" >> $config_host_mak echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak exit 0 @@ -566,6 +572,7 @@ echo "rdmacm $rdmacm" linux_fallocate="no" cat > $TMPC << EOF #include +#include #include int main(int argc, char **argv) { @@ -642,6 +649,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" @@ -809,15 +832,18 @@ echo "GUASI $guasi" # fusion-aw probe fusion_aw="no" cat > $TMPC << EOF -#include +#include int main(int argc, char **argv) { - struct vsl_iovec iov; - return vsl_vectored_write(0, &iov, 0, O_ATOMIC); + nvm_version_t ver_info; + nvm_handle_t handle; + + handle = nvm_get_handle(0, &ver_info); + return nvm_atomic_write(handle, 0, 0, 0); } EOF -if compile_prog "" "-L/usr/lib/fio -lnvm-primitives" "fusion-aw"; then - LIBS="-L/usr/lib/fio -lnvm-primitives $LIBS" +if compile_prog "" "-L/usr/lib/fio -L/usr/lib/nvm -lnvm-primitives -lvsl -ldl" "fusion-aw"; then + LIBS="-L/usr/lib/fio -L/usr/lib/nvm -lnvm-primitives -lvsl -ldl $LIBS" fusion_aw="yes" fi echo "Fusion-io atomic engine $fusion_aw" @@ -832,7 +858,7 @@ int main(int argc, char **argv) return numa_available(); } EOF -if compile_prog "" "-lnuma" "libnuma"; then +if test "$disable_numa" != "yes" && compile_prog "" "-lnuma" "libnuma"; then libnuma="yes" LIBS="-lnuma $LIBS" fi @@ -879,8 +905,7 @@ cat > $TMPC << EOF #include int main(int argc, char **argv) { - strcasestr(NULL, NULL); - return 0; + return strcasestr(argv[0], argv[1]) != NULL; } EOF if compile_prog "" "" "strcasestr"; then @@ -894,6 +919,7 @@ getopt_long_only="no" cat > $TMPC << EOF #include #include +#include int main(int argc, char **argv) { int c = getopt_long_only(argc, argv, NULL, NULL, NULL); @@ -944,7 +970,7 @@ echo "socklen_t $socklen_t" tls_thread="no" cat > $TMPC << EOF #include -static int __thread ret; +static __thread int ret; int main(int argc, char **argv) { return ret; @@ -1082,6 +1108,59 @@ if compile_prog "" "" "pwritev"; then fi echo "pwritev/preadv $pwritev" +########################################## +# Check whether we have the required functions for ipv6 +ipv6="no" +cat > $TMPC << EOF +#include +#include +#include +#include +#include +int main(int argc, char **argv) +{ + struct addrinfo hints; + struct in6_addr addr; + int ret; + + ret = getaddrinfo(NULL, NULL, &hints, NULL); + freeaddrinfo(NULL); + printf("%s\n", gai_strerror(ret)); + addr = in6addr_any; + return 0; +} +EOF +if compile_prog "" "" "ipv6"; then + ipv6="yes" +fi +echo "IPv6 helpers $ipv6" + +########################################## +# check for rbd +rbd="no" +cat > $TMPC << EOF +#include + +int main(int argc, char **argv) +{ + + rados_t cluster; + rados_ioctx_t io_ctx; + const char pool[] = "rbd"; + + int major, minor, extra; + rbd_version(&major, &minor, &extra); + + rados_ioctx_create(cluster, pool, &io_ctx); + return 0; +} +EOF +if compile_prog "" "-lrbd -lrados" "rbd"; then + LIBS="-lrbd -lrados $LIBS" + rbd="yes" +fi +echo "Rados Block Device engine $rbd" + ############################################################################# @@ -1124,7 +1203,7 @@ fi if test "$sfaa" = "yes" ; then output_sym "CONFIG_SFAA" fi -if test "$libverbs" = "yes" -a "rdmacm" = "yes" ; then +if test "$libverbs" = "yes" -a "$rdmacm" = "yes" ; then output_sym "CONFIG_RDMA" fi if test "$clock_gettime" = "yes" ; then @@ -1201,6 +1280,15 @@ fi if test "$pwritev" = "yes" ; then output_sym "CONFIG_PWRITEV" fi +if test "$ipv6" = "yes" ; then + output_sym "CONFIG_IPV6" +fi +if test "$rbd" = "yes" ; then + output_sym "CONFIG_RBD" +fi +if test "$cpu_count" = "yes" ; then + output_sym "CONFIG_CPU_COUNT" +fi echo "LIBS+=$LIBS" >> $config_host_mak echo "CFLAGS+=$CFLAGS" >> $config_host_mak