summaryrefslogtreecommitdiffstats
path: root/build/linux/acinclude.m4
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-01-23 16:51:24 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-01-30 11:39:43 +0100
commit382d11b5169d73b50104348f4411d2c4a7059a23 (patch)
tree98e863061c7b84d49345309118b17111246ab2d1 /build/linux/acinclude.m4
parentfeba05e1d9a2d3d6026763136c283fee214d5786 (diff)
downloadastra-382d11b5169d73b50104348f4411d2c4a7059a23.tar.gz
astra-382d11b5169d73b50104348f4411d2c4a7059a23.tar.bz2
astra-382d11b5169d73b50104348f4411d2c4a7059a23.tar.xz
astra-382d11b5169d73b50104348f4411d2c4a7059a23.zip
Store result of nvcc tests in config.log
Diffstat (limited to 'build/linux/acinclude.m4')
-rw-r--r--build/linux/acinclude.m425
1 files changed, 23 insertions, 2 deletions
diff --git a/build/linux/acinclude.m4 b/build/linux/acinclude.m4
index 5022e5b..4ff9e4b 100644
--- a/build/linux/acinclude.m4
+++ b/build/linux/acinclude.m4
@@ -49,6 +49,22 @@ done
rm -f conftest.cc conftest.o
])
+
+dnl ASTRA_RUN_STOREOUTPUT(command, output)
+AC_DEFUN([ASTRA_RUN_STOREOUTPUT],[{
+ AS_ECHO(["$as_me:${as_lineno-$LINENO}: $1"]) >&AS_MESSAGE_LOG_FD
+ ( $1 ) >$2 2>&1
+ ac_status=$?
+ cat $2 >&AS_MESSAGE_LOG_FD
+ AS_ECHO(["$as_me:${as_lineno-$LINENO}: \$? = $ac_status"]) >&AS_MESSAGE_LOG_FD
+ test $ac_status = 0;
+ }])
+
+dnl ASTRA_RUN(command)
+AC_DEFUN([ASTRA_RUN],[ASTRA_RUN_STOREOUTPUT($1,/dev/null)])
+
+
+
dnl ASTRA_CHECK_NVCC(variable-to-set,cppflags-to-set)
AC_DEFUN([ASTRA_CHECK_NVCC],[
cat >conftest.cu <<_ACEOF
@@ -59,17 +75,22 @@ int main() {
}
_ACEOF
$1="yes"
-$NVCC -c -o conftest.o conftest.cu $$2 >conftest.nvcc.out 2>&1 || {
+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
NVCC_OPT="-Xcompiler -D__builtin_stdarg_start=__builtin_va_start"
- $NVCC -c -o conftest.o conftest.cu $$2 $NVCC_OPT >/dev/null 2>&1 && {
+
+ ASTRA_RUN([$NVCC -c -o conftest.o conftest.cu $$2 $NVCC_OPT]) && {
$1="yes"
$2="$$2 $NVCC_OPT"
}
fi
}
+if test x$$1 = xno; then
+ AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
+ sed 's/^/| /' conftest.cu >&AS_MESSAGE_LOG_FD
+fi
rm -f conftest.cu conftest.o conftest.nvcc.out
])