File tree 1 file changed +10
-1
lines changed 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],
50
50
[ AS_HELP_STRING ( [ --with-cuda(=DIR)] ,
51
51
[ Build cuda support, optionally adding DIR/include] ) ] )
52
52
AC_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.
53
57
AC_ARG_WITH ( [ cuda-libdir] ,
54
58
[ 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
+ ] )
56
65
57
66
# Note that CUDA support is off by default. To turn it on, the user has to
58
67
# 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