summaryrefslogtreecommitdiffstats
path: root/build/linux/acinclude.m4
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2015-02-25 17:28:47 +0100
committerWillem Jan Palenstijn <wjp@usecode.org>2015-02-25 17:28:47 +0100
commit51a1313422e22dbb6a5ca8f780a39561fc737403 (patch)
tree3aa78132720d217f5bd3a6965b92c9ffb651a5c2 /build/linux/acinclude.m4
parent214a5429db07e3e18af5856e164f850fbabca427 (diff)
parentc2005e33b2152ca7cd306590ea22fe1c1bd68c29 (diff)
downloadastra-51a1313422e22dbb6a5ca8f780a39561fc737403.tar.gz
astra-51a1313422e22dbb6a5ca8f780a39561fc737403.tar.bz2
astra-51a1313422e22dbb6a5ca8f780a39561fc737403.tar.xz
astra-51a1313422e22dbb6a5ca8f780a39561fc737403.zip
Merge pull request #17 from wjp/nvcc_config
Clean up and improve nvcc/cuda configure checks
Diffstat (limited to 'build/linux/acinclude.m4')
-rw-r--r--build/linux/acinclude.m415
1 files changed, 11 insertions, 4 deletions
diff --git a/build/linux/acinclude.m4 b/build/linux/acinclude.m4
index 4ff9e4b..713b5d3 100644
--- a/build/linux/acinclude.m4
+++ b/build/linux/acinclude.m4
@@ -60,8 +60,14 @@ AC_DEFUN([ASTRA_RUN_STOREOUTPUT],[{
test $ac_status = 0;
}])
-dnl ASTRA_RUN(command)
-AC_DEFUN([ASTRA_RUN],[ASTRA_RUN_STOREOUTPUT($1,/dev/null)])
+dnl ASTRA_RUN_LOGOUTPUT(command)
+AC_DEFUN([ASTRA_RUN_LOGOUTPUT],[{
+ AS_ECHO(["$as_me:${as_lineno-$LINENO}: $1"]) >&AS_MESSAGE_LOG_FD
+ ( $1 ) >&AS_MESSAGE_LOG_FD 2>&1
+ ac_status=$?
+ AS_ECHO(["$as_me:${as_lineno-$LINENO}: \$? = $ac_status"]) >&AS_MESSAGE_LOG_FD
+ test $ac_status = 0;
+ }])
@@ -79,9 +85,9 @@ ASTRA_RUN_STOREOUTPUT([$NVCC -c -o conftest.o conftest.cu $$2],conftest.nvcc.out
$1="no"
# Check if hack for gcc 4.4 helps
if grep -q __builtin_stdarg_start conftest.nvcc.out; then
+ AS_ECHO(["$as_me:${as_lineno-$LINENO}: Trying CUDA hack for gcc 4.4"]) >&AS_MESSAGE_LOG_FD
NVCC_OPT="-Xcompiler -D__builtin_stdarg_start=__builtin_va_start"
-
- ASTRA_RUN([$NVCC -c -o conftest.o conftest.cu $$2 $NVCC_OPT]) && {
+ ASTRA_RUN_LOGOUTPUT([$NVCC -c -o conftest.o conftest.cu $$2 $NVCC_OPT]) && {
$1="yes"
$2="$$2 $NVCC_OPT"
}
@@ -94,6 +100,7 @@ fi
rm -f conftest.cu conftest.o conftest.nvcc.out
])
+
dnl ASTRA_FIND_NVCC_ARCHS(archs-to-try,cppflags-to-extend,output-list)
dnl Architectures should be of the form 10,20,30,35,
dnl and should be in order. The last accepted one will be used for PTX output.