summaryrefslogtreecommitdiff
path: root/lib/make
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2006-04-02 16:59:49 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2006-04-02 16:59:49 +0000
commit8f08915164484b43782f2be93016dbb3ade3ff05 (patch)
tree9e919dec417d97016dc704e55ff74d8ce81fc632 /lib/make
parenta81b06427c041466fa6a185603ef22803263fdd5 (diff)
Add another test when checking for the "restrict" qualifiers. Some
buggy compilers (e.g. old versions of gcc) do not support "restrict" on arrays which are function arguments. On these compilers, we now disable "restrict". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4280 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make')
-rw-r--r--lib/make/aclocal.m410
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/make/aclocal.m4 b/lib/make/aclocal.m4
index 4a7bf769..39035a1c 100644
--- a/lib/make/aclocal.m4
+++ b/lib/make/aclocal.m4
@@ -283,7 +283,10 @@ AC_DEFUN(CCTK_CHECK_C_RESTRICT,
[AC_CACHE_CHECK([for C restrict], cctk_cv_c_restrict,
[cctk_cv_c_restrict=no
for ac_kw in restrict __restrict__ __restrict; do
- AC_TRY_COMPILE(, [double * $ac_kw foo;], [cctk_cv_c_restrict=$ac_kw; break])
+ AC_TRY_COMPILE(, [
+double * $ac_kw foo;
+void bar (void * $ac_kw arr[]);
+], [cctk_cv_c_restrict=$ac_kw; break])
done
])
case "$cctk_cv_c_restrict" in
@@ -299,7 +302,10 @@ AC_DEFUN(CCTK_CHECK_CXX_RESTRICT,
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
for ac_kw in restrict __restrict__ __restrict; do
- AC_TRY_COMPILE(, [double * $ac_kw foo;], [cctk_cv_cxx_restrict=$ac_kw; break])
+ AC_TRY_COMPILE(, [
+double * $ac_kw foo;
+void bar (void * $ac_kw arr[]);
+], [cctk_cv_cxx_restrict=$ac_kw; break])
done
AC_LANG_RESTORE
])