X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=89405cd790192127749470a82c839e0cc0ccd3d0;hp=c00a3a46e9adac827649df5d04d1ea59871c7660;hb=d219028de7fe8038b018c1e84dced8576e939f5d;hpb=954cd73a9a93102c24afa869fbe67ac38af6e416 diff --git a/configure b/configure index c00a3a46..89405cd7 100755 --- a/configure +++ b/configure @@ -153,6 +153,8 @@ for opt do --enable-gfio) gfio="yes" ;; + --disable-numa) disable_numa="yes" + ;; --help) show_help="yes" ;; @@ -169,6 +171,7 @@ 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 @@ -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) { @@ -835,7 +842,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 @@ -882,8 +889,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 @@ -897,6 +903,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); @@ -947,7 +954,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; @@ -1085,6 +1092,32 @@ 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" ############################################################################# @@ -1204,6 +1237,9 @@ fi if test "$pwritev" = "yes" ; then output_sym "CONFIG_PWRITEV" fi +if test "$ipv6" = "yes" ; then + output_sym "CONFIG_IPV6" +fi echo "LIBS+=$LIBS" >> $config_host_mak echo "CFLAGS+=$CFLAGS" >> $config_host_mak