浏览代码

configure: Fix `nvcc' detection.

Ludovic Courtès 14 年之前
父节点
当前提交
d8322376a1
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      configure.ac

+ 6 - 1
configure.ac

@@ -379,7 +379,12 @@ if test x$enable_cuda = xyes; then
 		AC_SUBST(NVCCFLAGS)
 	fi
 
-	AC_PATH_PROG([NVCC], [nvcc], [nvcc], [$cuda_dir/bin:$PATH:/usr/local/bin:/usr/bin:/bin], [AC_MSG_WARN(Cannot find nvcc.)])
+	AC_PATH_PROG([NVCC], [nvcc], [not-found],
+	  [$cuda_dir/bin:$PATH:/usr/local/bin:/usr/bin:/bin])
+	if test "x$NVCC" = "xnot-found"; then
+	   AC_MSG_WARN([`nvcc' not found, disabling CUDA])
+	   enable_cuda=no
+	fi
 fi
 
 enable_magma=no