summaryrefslogtreecommitdiff
path: root/lib/make
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2006-04-04 23:10:05 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2006-04-04 23:10:05 +0000
commit9658948f65e10c7f64714d8578fa68bb8ee8fbfd (patch)
treea364b76ea32b6e35584feba27e13d07c138dd7fa /lib/make
parentc9747127ac89317c41951220e61bc3aa057dc64d (diff)
Check for the "restrict" qualifier more thoroughly. Certain compilers
(old versions of g++) don't support restrict in arrays which are structure members. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4282 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make')
-rw-r--r--lib/make/aclocal.m42
-rwxr-xr-xlib/make/configure104
2 files changed, 55 insertions, 51 deletions
diff --git a/lib/make/aclocal.m4 b/lib/make/aclocal.m4
index 39035a1c..2b8fb597 100644
--- a/lib/make/aclocal.m4
+++ b/lib/make/aclocal.m4
@@ -286,6 +286,7 @@ for ac_kw in restrict __restrict__ __restrict; do
AC_TRY_COMPILE(, [
double * $ac_kw foo;
void bar (void * $ac_kw arr[]);
+struct tux { char * $ac_kw arr[3]; };
], [cctk_cv_c_restrict=$ac_kw; break])
done
])
@@ -305,6 +306,7 @@ for ac_kw in restrict __restrict__ __restrict; do
AC_TRY_COMPILE(, [
double * $ac_kw foo;
void bar (void * $ac_kw arr[]);
+struct tux { char * $ac_kw arr[3]; };
], [cctk_cv_cxx_restrict=$ac_kw; break])
done
AC_LANG_RESTORE
diff --git a/lib/make/configure b/lib/make/configure
index b793844c..f2af5aa4 100755
--- a/lib/make/configure
+++ b/lib/make/configure
@@ -3594,10 +3594,11 @@ int main() {
double * $ac_kw foo;
void bar (void * $ac_kw arr[]);
+struct tux { char * $ac_kw arr[3]; };
; return 0; }
EOF
-if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cctk_cv_c_restrict=$ac_kw; break
else
@@ -3623,7 +3624,7 @@ EOF
esac
echo $ac_n "checking for C++ restrict""... $ac_c" 1>&6
-echo "configure:3627: checking for C++ restrict" >&5
+echo "configure:3628: checking for C++ restrict" >&5
if eval "test \"`echo '$''{'cctk_cv_cxx_restrict'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3638,17 +3639,18 @@ cross_compiling=$ac_cv_prog_cxx_cross
for ac_kw in restrict __restrict__ __restrict; do
cat > conftest.$ac_ext <<EOF
-#line 3642 "configure"
+#line 3643 "configure"
#include "confdefs.h"
int main() {
double * $ac_kw foo;
void bar (void * $ac_kw arr[]);
+struct tux { char * $ac_kw arr[3]; };
; return 0; }
EOF
-if { (eval echo configure:3652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cctk_cv_cxx_restrict=$ac_kw; break
else
@@ -3682,20 +3684,20 @@ esac
echo $ac_n "checking for C bool""... $ac_c" 1>&6
-echo "configure:3686: checking for C bool" >&5
+echo "configure:3688: checking for C bool" >&5
if eval "test \"`echo '$''{'cctk_cv_have_c_bool'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cctk_cv_have_c_bool=no
cat > conftest.$ac_ext <<EOF
-#line 3692 "configure"
+#line 3694 "configure"
#include "confdefs.h"
int main() {
bool foo;
; return 0; }
EOF
-if { (eval echo configure:3699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cctk_cv_have_c_bool=yes
else
@@ -3717,7 +3719,7 @@ EOF
fi
echo $ac_n "checking for CXX bool""... $ac_c" 1>&6
-echo "configure:3721: checking for CXX bool" >&5
+echo "configure:3723: checking for CXX bool" >&5
if eval "test \"`echo '$''{'cctk_cv_have_cxx_bool'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3731,14 +3733,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 3735 "configure"
+#line 3737 "configure"
#include "confdefs.h"
int main() {
bool foo;
; return 0; }
EOF
-if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cctk_cv_have_cxx_bool=yes
else
@@ -3769,12 +3771,12 @@ fi
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext `CCTK_Wrap "$LIBDIR_PREFIX" "$LIBDIR_SUFFIX" "$LIBDIRS"` `CCTK_Wrap "$LIBLINK_PREFIX" "$LIBLINK_SUFFIX" "$LIBS"` >&5'
echo $ac_n "checking for crypt""... $ac_c" 1>&6
-echo "configure:3773: checking for crypt" >&5
+echo "configure:3775: checking for crypt" >&5
if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3778 "configure"
+#line 3780 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char crypt(); below. */
@@ -3797,7 +3799,7 @@ crypt();
; return 0; }
EOF
-if { (eval echo configure:3801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_crypt=yes"
else
@@ -3815,7 +3817,7 @@ if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for crypt in library crypt""... $ac_c" 1>&6
-echo "configure:3819: checking for crypt in library crypt" >&5
+echo "configure:3821: checking for crypt in library crypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3824,7 +3826,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="crypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
+#line 3830 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3835,7 +3837,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3876,12 +3878,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_
for ac_func in finite
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3880: checking for $ac_func" >&5
+echo "configure:3882: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3885 "configure"
+#line 3887 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3904,7 +3906,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3926,7 +3928,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for finite in library m""... $ac_c" 1>&6
-echo "configure:3930: checking for finite in library m" >&5
+echo "configure:3932: checking for finite in library m" >&5
ac_lib_var=`echo m'_'finite | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3935,7 +3937,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="m $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3939 "configure"
+#line 3941 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3946,7 +3948,7 @@ int main() {
finite()
; return 0; }
EOF
-if { (eval echo configure:3950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3988,12 +3990,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_
for ac_func in isnan
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3992: checking for $ac_func" >&5
+echo "configure:3994: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3997 "configure"
+#line 3999 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4016,7 +4018,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4038,7 +4040,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for isnan in library m""... $ac_c" 1>&6
-echo "configure:4042: checking for isnan in library m" >&5
+echo "configure:4044: checking for isnan in library m" >&5
ac_lib_var=`echo m'_'isnan | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4047,7 +4049,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="m $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4051 "configure"
+#line 4053 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4058,7 +4060,7 @@ int main() {
isnan()
; return 0; }
EOF
-if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4100,12 +4102,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_
for ac_func in mkstemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4104: checking for $ac_func" >&5
+echo "configure:4106: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4109 "configure"
+#line 4111 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4128,7 +4130,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4150,7 +4152,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for mkstemp in library c""... $ac_c" 1>&6
-echo "configure:4154: checking for mkstemp in library c" >&5
+echo "configure:4156: checking for mkstemp in library c" >&5
ac_lib_var=`echo c'_'mkstemp | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4159,7 +4161,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="c $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4163 "configure"
+#line 4165 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4170,7 +4172,7 @@ int main() {
mkstemp()
; return 0; }
EOF
-if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4209,19 +4211,19 @@ done
echo $ac_n "checking for va_copy""... $ac_c" 1>&6
-echo "configure:4213: checking for va_copy" >&5
+echo "configure:4215: checking for va_copy" >&5
if eval "test \"`echo '$''{'cctk_cv_have_va_copy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4218 "configure"
+#line 4220 "configure"
#include "confdefs.h"
#include <stdarg.h>
int main() {
va_list src, dest; va_copy(dest, src); return 0
; return 0; }
EOF
-if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "cctk_cv_have_va_copy=yes"
else
@@ -4248,7 +4250,7 @@ fi
if test "X$PTHREADS" = 'Xyes'; then
PTHREAD_LIBS=
echo $ac_n "checking for main in library c_r""... $ac_c" 1>&6
-echo "configure:4252: checking for main in library c_r" >&5
+echo "configure:4254: checking for main in library c_r" >&5
ac_lib_var=`echo c_r'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4257,14 +4259,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="c_r $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4261 "configure"
+#line 4263 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4285,7 +4287,7 @@ else
fi
echo $ac_n "checking for main in library pthread""... $ac_c" 1>&6
-echo "configure:4289: checking for main in library pthread" >&5
+echo "configure:4291: checking for main in library pthread" >&5
ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4294,14 +4296,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="pthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4298 "configure"
+#line 4300 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4320,7 +4322,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for main in library pthreads""... $ac_c" 1>&6
-echo "configure:4324: checking for main in library pthreads" >&5
+echo "configure:4326: checking for main in library pthreads" >&5
ac_lib_var=`echo pthreads'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4329,14 +4331,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="pthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4333 "configure"
+#line 4335 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4917,7 +4919,7 @@ if test "x$CCTK_NEED_X" = 'xyes' ; then
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:4921: checking for X" >&5
+echo "configure:4923: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -4979,12 +4981,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 4983 "configure"
+#line 4985 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5053,14 +5055,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5057 "configure"
+#line 5059 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.