diff --git a/configure.ac b/configure.ac index a2e7d18..758f739 100644 --- a/configure.ac +++ b/configure.ac @@ -147,17 +147,20 @@ AC_ARG_WITH([nvml], AM_CONDITIONAL([HAVE_NVML], [test -n "$with_nvml"]) +NVCC="nvcc" + if test -n "$with_cuda" then CUDA_INCLUDES="-I$with_cuda/include" CUDA_LIBS="-lcudart" CUDA_LDFLAGS="-L$with_cuda/lib$SUFFIX" - NVCC="$with_cuda/bin/nvcc" + if test -x "$with_cuda/bin/nvcc" + NVCC="$with_cuda/bin/nvcc" + fi else CUDA_INCLUDES="-I/usr/local/cuda/include" CUDA_LIBS="-lcudart -static-libstdc++" CUDA_LDFLAGS="-L/usr/local/cuda/lib$SUFFIX" - NVCC="nvcc" fi if test -n "$with_nvml" ; then