Browse Source

configure.ac: set nmaxmicdev to 0 when MIC is disabled

Nathalie Furmento 8 years ago
parent
commit
dc1af96a0d
1 changed files with 8 additions and 1 deletions
  1. 8 1
      configure.ac

+ 8 - 1
configure.ac

@@ -1464,7 +1464,14 @@ AC_ARG_WITH(host-param)
 AC_MSG_CHECKING(maximum number of MIC devices)
 AC_ARG_ENABLE(maxmicdev, [AS_HELP_STRING([--enable-maxmicdev=<number>],
 			[maximum number of MIC devices])],
-			nmaxmicdev=$enableval, nmaxmicdev=4)
+			nmaxmicdev=$enableval,
+            [
+             if test x$enable_mic = xyes; then
+                 nmaxmicdev=4
+             else
+                 nmaxmicdev=0
+             fi
+            ])
 AC_MSG_RESULT($nmaxmicdev)
 
 AC_DEFINE_UNQUOTED(STARPU_MAXMICDEVS, [$nmaxmicdev],