Fio 2.1.6.1
[fio.git] / configure
index 4b006792c55c8f99c11e0ca462240c0a19520328..4a8d352cdc9080e76edced844e4350933d46a1b8 100755 (executable)
--- a/configure
+++ b/configure
@@ -649,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 <sched.h>
+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"
@@ -1270,6 +1286,9 @@ 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