configure: check for v2 of libnuma
authorJens Axboe <axboe@kernel.dk>
Mon, 25 Mar 2013 19:20:08 +0000 (13:20 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Mar 2013 19:20:08 +0000 (13:20 -0600)
We use options that require 2.x.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
configure

index b8afe39aa0e35564be011de5901a057e4584f3d0..76da4ba597674a35ba9a14ef5a1d5cb2d1c20374 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"
@@ -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