File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -50,9 +50,18 @@ AC_ARG_WITH([cuda],
5050 [ AS_HELP_STRING ( [ --with-cuda(=DIR)] ,
5151 [ Build cuda support, optionally adding DIR/include] ) ] )
5252AC_MSG_CHECKING ( [ if --with-cuda is set] )
53+
54+ # Search for libcuda.so in $with_cuda if the user didn't pass --with-cuda-libdir
55+ # Otherwise check for cuda in the default path, /usr/local/cuda. If the default
56+ # path doesn't exist, set with_cuda_libdir to empty.
5357AC_ARG_WITH ( [ cuda-libdir] ,
5458 [ AS_HELP_STRING ( [ --with-cuda-libdir=DIR] ,
55- [ Search for CUDA libraries in DIR] ) ] )
59+ [ Search for CUDA libraries in DIR] ) ] ,
60+ [ ] ,
61+ [ AS_IF ( [ test -d "$with_cuda"] ,
62+ [ with_cuda_libdir=$(dirname $(find $with_cuda -name libcuda.so) 2> /dev/null)] ,
63+ [ with_cuda_libdir=$(dirname $(find /usr/local/cuda -name libcuda.so) 2> /dev/null)] )
64+ ] )
5665
5766# Note that CUDA support is off by default. To turn it on, the user has to
5867# request it. The user can just ask for --with-cuda and it that case we
You can’t perform that action at this time.
0 commit comments