tools: set CPUS correctly on Solaris
authorSean McGovern <gseanmcg@gmail.com>
Tue, 11 Mar 2014 19:12:35 +0000 (15:12 -0400)
committerRafaël Carré <funman@videolan.org>
Sun, 23 Mar 2014 00:02:38 +0000 (01:02 +0100)
Signed-off-by: Rafaël Carré <funman@videolan.org>
extras/tools/bootstrap

index 0133d66..fcd3f10 100755 (executable)
@@ -90,6 +90,9 @@ case `uname` in
         gcc-4.2 --version >/dev/null 2>&1 && CC=CC=gcc-4.2
         g++-4.2 --version >/dev/null 2>&1 && CXX=CXX=g++-4.2
     ;;
+    SunOS)
+        CPUS=`/usr/bin/kstat -p :::state | grep 'on-line$' | wc -l | sed 's/ //g'`
+    ;;
     *)
         CPUS=1  # default
      ;;