Windows: add CONFIG_TLS_THREAD=y and swap pthreadGC2 to libwinpthread-1.
[fio.git] / configure
index 95765cceffac57a203855a46941e6daa23d26482..0f1acd0b78e125f1d1d2301ff14d3b21eee6201e 100755 (executable)
--- 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,7 @@ CYGWIN*)
   output_sym "CONFIG_CLOCK_GETTIME"
   output_sym "CONFIG_SCHED_IDLE"
   output_sym "CONFIG_TCP_NODELAY"
+  output_sym "CONFIG_TLS_THREAD"
   echo "CC=$CC" >> $config_host_mak
   echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
   exit 0
@@ -809,15 +814,18 @@ echo "GUASI                         $guasi"
 # fusion-aw probe
 fusion_aw="no"
 cat > $TMPC << EOF
-#include <nvm/vectored_write.h>
+#include <nvm/nvm_primitives.h>
 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 +840,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
@@ -1124,7 +1132,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