Fix build if just one of libverbs or librdma is installed
[fio.git] / configure
index 2859891dc47697f2cda408633957ba1af0c785ad..836d7ade7940979f1e39b2c40baa959f4f1321b0 100755 (executable)
--- a/configure
+++ b/configure
@@ -809,6 +809,24 @@ if compile_prog "" "-lnuma" "libnuma"; then
 fi
 echo "libnuma                       $libnuma"
 
+##########################################
+# libnuma 2.x version API
+if test "$libnuma" = "yes" ; then
+libnuma_v2="no"
+cat > $TMPC << EOF
+#include <numa.h>
+int main(int argc, char **argv)
+{
+  struct bitmask *mask = numa_parse_nodestring(NULL);
+  return 0;
+}
+EOF
+if compile_prog "" "" "libnuma api"; then
+  libnuma_v2="yes"
+fi
+echo "libnuma v2                    $libnuma_v2"
+fi
+
 ##########################################
 # strsep() probe
 strsep="no"
@@ -999,7 +1017,7 @@ fi
 if test "$sfaa" = "yes" ; then
   output_sym "CONFIG_SFAA"
 fi
-if test "$libverbs" = "yes" -o "rdmacm" = "yes" ; then
+if test "$libverbs" = "yes" -a "rdmacm" = "yes" ; then
   output_sym "CONFIG_RDMA"
 fi
 if test "$clock_gettime" = "yes" ; then
@@ -1046,7 +1064,7 @@ fi
 if test "$fusion_aw" = "yes" ; then
   output_sym "CONFIG_FUSION_AW"
 fi
-if test "$libnuma" = "yes" ; then
+if test "$libnuma_v2" = "yes" ; then
   output_sym "CONFIG_LIBNUMA"
 fi
 if test "$solaris_aio" = "yes" ; then
@@ -1061,9 +1079,9 @@ fi
 if test "$sched_idle" = "yes" ; then
   output_sym "CONFIG_SCHED_IDLE"
 fi
-#if test "$tcp_nodelay" = "yes" ; then
-  #output_sym "CONFIG_TCP_NODELAY"
-#fi
+if test "$tcp_nodelay" = "yes" ; then
+  output_sym "CONFIG_TCP_NODELAY"
+fi
 if test "$rlimit_memlock" = "yes" ; then
   output_sym "CONFIG_RLIMIT_MEMLOCK"
 fi