diff options
author | knarf <knarf@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2010-11-23 19:28:02 +0000 |
---|---|---|
committer | knarf <knarf@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2010-11-23 19:28:02 +0000 |
commit | 7f0d29bc6b722a44191aaa06daa01c983e82c66e (patch) | |
tree | 657a866e2566558f79cfef298ba71b1da4b9f60a | |
parent | b15b5f628e90931cee5d0d4aed64791946b4a727 (diff) |
support __unused__ where known. This let's e.g. gcc know that especially the Cactus variables might be unused and should not be reported as such. This closes ET ticket #1
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4651 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rwxr-xr-x | lib/make/configure | 625 | ||||
-rw-r--r-- | lib/make/configure.in | 10 | ||||
-rw-r--r-- | lib/sbin/CreateParameterBindings.pl | 10 | ||||
-rw-r--r-- | lib/sbin/GridFuncStuff.pl | 4 | ||||
-rw-r--r-- | lib/sbin/create_c_stuff.pl | 12 | ||||
-rw-r--r-- | lib/sbin/create_fortran_stuff.pl | 2 | ||||
-rw-r--r-- | src/include/cctk.h | 111 | ||||
-rw-r--r-- | src/include/cctk_Types.h | 79 |
8 files changed, 493 insertions, 360 deletions
diff --git a/lib/make/configure b/lib/make/configure index 5b71c519..98ebdd51 100755 --- a/lib/make/configure +++ b/lib/make/configure @@ -1937,15 +1937,16 @@ else #line 1938 "configure" #include "confdefs.h" #include <stdio.h> -int main() +#include <sys/types.h> +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long long)); - return(0); + exit(0); } EOF -if { (eval echo configure:1949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -1970,7 +1971,7 @@ if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_LONG_INT" ; then fi echo $ac_n "checking size of long int""... $ac_c" 1>&6 -echo "configure:1974: checking size of long int" >&5 +echo "configure:1975: checking size of long int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1978,18 +1979,19 @@ else ac_cv_sizeof_long_int=$SIZEOF_LONG_INT else cat > conftest.$ac_ext <<EOF -#line 1982 "configure" +#line 1983 "configure" #include "confdefs.h" #include <stdio.h> -int main() +#include <sys/types.h> +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long int)); - return(0); + exit(0); } EOF -if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_int=`cat conftestval` else @@ -2014,7 +2016,7 @@ if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_INT" ; then fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2018: checking size of int" >&5 +echo "configure:2020: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2022,18 +2024,19 @@ else ac_cv_sizeof_int=$SIZEOF_INT else cat > conftest.$ac_ext <<EOF -#line 2026 "configure" +#line 2028 "configure" #include "confdefs.h" #include <stdio.h> -int main() +#include <sys/types.h> +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); - return(0); + exit(0); } EOF -if { (eval echo configure:2037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2058,7 +2061,7 @@ if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_SHORT_INT" ; then fi echo $ac_n "checking size of short int""... $ac_c" 1>&6 -echo "configure:2062: checking size of short int" >&5 +echo "configure:2065: checking size of short int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2066,18 +2069,19 @@ else ac_cv_sizeof_short_int=$SIZEOF_SHORT_INT else cat > conftest.$ac_ext <<EOF -#line 2070 "configure" +#line 2073 "configure" #include "confdefs.h" #include <stdio.h> -int main() +#include <sys/types.h> +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(short int)); - return(0); + exit(0); } EOF -if { (eval echo configure:2081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short_int=`cat conftestval` else @@ -2104,7 +2108,7 @@ if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_LONG_DOUBLE" ; then fi echo $ac_n "checking size of long double""... $ac_c" 1>&6 -echo "configure:2108: checking size of long double" >&5 +echo "configure:2112: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2112,18 +2116,19 @@ else ac_cv_sizeof_long_double=$SIZEOF_LONG_DOUBLE else cat > conftest.$ac_ext <<EOF -#line 2116 "configure" +#line 2120 "configure" #include "confdefs.h" #include <stdio.h> -int main() +#include <sys/types.h> +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long double)); - return(0); + exit(0); } EOF -if { (eval echo configure:2127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_double=`cat conftestval` else @@ -2148,7 +2153,7 @@ if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_DOUBLE" ; then fi echo $ac_n "checking size of double""... $ac_c" 1>&6 -echo "configure:2152: checking size of double" >&5 +echo "configure:2157: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2156,18 +2161,19 @@ else ac_cv_sizeof_double=$SIZEOF_DOUBLE else cat > conftest.$ac_ext <<EOF -#line 2160 "configure" +#line 2165 "configure" #include "confdefs.h" #include <stdio.h> -int main() +#include <sys/types.h> +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(double)); - return(0); + exit(0); } EOF -if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_double=`cat conftestval` else @@ -2193,7 +2199,7 @@ if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_FLOAT" ; then fi echo $ac_n "checking size of float""... $ac_c" 1>&6 -echo "configure:2197: checking size of float" >&5 +echo "configure:2203: checking size of float" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2201,18 +2207,19 @@ else ac_cv_sizeof_float=$SIZEOF_FLOAT else cat > conftest.$ac_ext <<EOF -#line 2205 "configure" +#line 2211 "configure" #include "confdefs.h" #include <stdio.h> -int main() +#include <sys/types.h> +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(float)); - return(0); + exit(0); } EOF -if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_float=`cat conftestval` else @@ -2239,7 +2246,7 @@ if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_POINTER" ; then fi echo $ac_n "checking size of char *""... $ac_c" 1>&6 -echo "configure:2243: checking size of char *" >&5 +echo "configure:2250: checking size of char *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2247,18 +2254,19 @@ else ac_cv_sizeof_char_p=$SIZEOF_POINTER else cat > conftest.$ac_ext <<EOF -#line 2251 "configure" +#line 2258 "configure" #include "confdefs.h" #include <stdio.h> -int main() +#include <sys/types.h> +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(char *)); - return(0); + exit(0); } EOF -if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char_p=`cat conftestval` else @@ -2293,7 +2301,7 @@ EOF else echo $ac_n "checking for the null device""... $ac_c" 1>&6 -echo "configure:2297: checking for the null device" >&5 +echo "configure:2305: checking for the null device" >&5 if eval "test \"`echo '$''{'cctk_cv_nulldevice'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2356,12 +2364,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2360: checking for $ac_func" >&5 +echo "configure:2368: 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 2365 "configure" +#line 2373 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2384,7 +2392,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2396: \"$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 @@ -2406,7 +2414,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in library nsl""... $ac_c" 1>&6 -echo "configure:2410: checking for gethostbyname in library nsl" >&5 +echo "configure:2418: checking for gethostbyname in library nsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2415,7 +2423,7 @@ else ac_save_LIBS="$LIBS" LIBS="nsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 2419 "configure" +#line 2427 "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 @@ -2426,7 +2434,7 @@ int main() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2438: \"$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 @@ -2457,12 +2465,12 @@ done # Check if we have mode_t available echo $ac_n "checking whether mode_t is defined""... $ac_c" 1>&6 -echo "configure:2461: checking whether mode_t is defined" >&5 +echo "configure:2469: checking whether mode_t is defined" >&5 if eval "test \"`echo '$''{'cctk_cv_have_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2466 "configure" +#line 2474 "configure" #include "confdefs.h" #include <stdio.h> #include <stdlib.h> @@ -2472,7 +2480,7 @@ int main() { mode_t foo; return 0 ; return 0; } EOF -if { (eval echo configure:2476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_have_mode_t=yes" else @@ -2498,12 +2506,12 @@ fi echo $ac_n "checking for availability of gettimeofday timing""... $ac_c" 1>&6 -echo "configure:2502: checking for availability of gettimeofday timing" >&5 +echo "configure:2510: checking for availability of gettimeofday timing" >&5 if eval "test \"`echo '$''{'cctk_cv_time_gettimeofday'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2507 "configure" +#line 2515 "configure" #include "confdefs.h" int main() { @@ -2511,7 +2519,7 @@ gettimeofday(0, 0); return 0; ; return 0; } EOF -if { (eval echo configure:2515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "cctk_cv_time_gettimeofday=yes" else @@ -2533,12 +2541,12 @@ else fi if eval "test \"`echo '$cctk_cv_time_gettimeofday'`\" = yes"; then echo $ac_n "checking if gettimeofday needs timezone""... $ac_c" 1>&6 -echo "configure:2537: checking if gettimeofday needs timezone" >&5 +echo "configure:2545: checking if gettimeofday needs timezone" >&5 if eval "test \"`echo '$''{'cctk_cv_time_gettimeofday_timezone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2542 "configure" +#line 2550 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/time.h> @@ -2551,7 +2559,7 @@ struct timeval tp; return 0; ; return 0; } EOF -if { (eval echo configure:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "cctk_cv_time_gettimeofday_timezone=yes" else @@ -2574,12 +2582,12 @@ fi fi echo $ac_n "checking for availability of getrusage timing""... $ac_c" 1>&6 -echo "configure:2578: checking for availability of getrusage timing" >&5 +echo "configure:2586: checking for availability of getrusage timing" >&5 if eval "test \"`echo '$''{'cctk_cv_time_getrusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2583 "configure" +#line 2591 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/time.h> @@ -2592,7 +2600,7 @@ struct rusage ru; return 0; ; return 0; } EOF -if { (eval echo configure:2596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "cctk_cv_time_getrusage=yes" else @@ -2614,12 +2622,12 @@ else fi echo $ac_n "checking for availability of _ftime timing""... $ac_c" 1>&6 -echo "configure:2618: checking for availability of _ftime timing" >&5 +echo "configure:2626: checking for availability of _ftime timing" >&5 if eval "test \"`echo '$''{'cctk_cv_time_ftime'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2623 "configure" +#line 2631 "configure" #include "confdefs.h" #include <stdio.h> #include <time.h> @@ -2632,7 +2640,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "cctk_cv_time_ftime=yes" else @@ -2659,12 +2667,12 @@ for cctk_hdr in time.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2663: checking for $cctk_hdr" >&5 +echo "configure:2671: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2668 "configure" +#line 2676 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -2672,7 +2680,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2699,12 +2707,12 @@ for cctk_hdr in sys/time.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2703: checking for $cctk_hdr" >&5 +echo "configure:2711: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2708 "configure" +#line 2716 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -2712,7 +2720,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2739,12 +2747,12 @@ for cctk_hdr in sys/types.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2743: checking for $cctk_hdr" >&5 +echo "configure:2751: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2748 "configure" +#line 2756 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -2752,7 +2760,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2779,12 +2787,12 @@ for cctk_hdr in unistd.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2783: checking for $cctk_hdr" >&5 +echo "configure:2791: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2788 "configure" +#line 2796 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -2792,7 +2800,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2819,12 +2827,12 @@ for cctk_hdr in string.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2823: checking for $cctk_hdr" >&5 +echo "configure:2831: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2828 "configure" +#line 2836 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -2832,7 +2840,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2859,12 +2867,12 @@ for cctk_hdr in assert.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2863: checking for $cctk_hdr" >&5 +echo "configure:2871: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2868 "configure" +#line 2876 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -2872,7 +2880,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2899,12 +2907,12 @@ for cctk_hdr in tgmath.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2903: checking for $cctk_hdr" >&5 +echo "configure:2911: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2908 "configure" +#line 2916 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -2912,7 +2920,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2939,12 +2947,12 @@ for cctk_hdr in sys/stat.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2943: checking for $cctk_hdr" >&5 +echo "configure:2951: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2948 "configure" +#line 2956 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -2952,7 +2960,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2979,12 +2987,12 @@ for cctk_hdr in getopt.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2983: checking for $cctk_hdr" >&5 +echo "configure:2991: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2988 "configure" +#line 2996 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -2992,7 +3000,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3019,12 +3027,12 @@ for cctk_hdr in dirent.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3023: checking for $cctk_hdr" >&5 +echo "configure:3031: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3028 "configure" +#line 3036 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -3032,7 +3040,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3059,12 +3067,12 @@ for cctk_hdr in c_asm.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3063: checking for $cctk_hdr" >&5 +echo "configure:3071: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3068 "configure" +#line 3076 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -3072,7 +3080,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3099,12 +3107,12 @@ for cctk_hdr in intrinsics.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3103: checking for $cctk_hdr" >&5 +echo "configure:3111: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3108 "configure" +#line 3116 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -3112,7 +3120,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3139,12 +3147,12 @@ for cctk_hdr in mach/mach_time.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3143: checking for $cctk_hdr" >&5 +echo "configure:3151: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3148 "configure" +#line 3156 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -3152,7 +3160,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3176,12 +3184,12 @@ fi done echo $ac_n "checking for regex.h""... $ac_c" 1>&6 -echo "configure:3180: checking for regex.h" >&5 +echo "configure:3188: checking for regex.h" >&5 if eval "test \"`echo '$''{'cctk_cv_header_regex_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3185 "configure" +#line 3193 "configure" #include "confdefs.h" #include <stdio.h> #include <regex.h> @@ -3189,7 +3197,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_regex_h=yes" else @@ -3214,12 +3222,12 @@ for cctk_hdr in sys/filio.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3218: checking for $cctk_hdr" >&5 +echo "configure:3226: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3223 "configure" +#line 3231 "configure" #include "confdefs.h" #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -3229,7 +3237,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3256,12 +3264,12 @@ for cctk_hdr in sys/ioctl.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3260: checking for $cctk_hdr" >&5 +echo "configure:3268: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3265 "configure" +#line 3273 "configure" #include "confdefs.h" #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -3271,7 +3279,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3298,12 +3306,12 @@ for cctk_hdr in sys/socket.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3302: checking for $cctk_hdr" >&5 +echo "configure:3310: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3307 "configure" +#line 3315 "configure" #include "confdefs.h" #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -3313,7 +3321,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3340,12 +3348,12 @@ for cctk_hdr in netinet/in.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3344: checking for $cctk_hdr" >&5 +echo "configure:3352: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3349 "configure" +#line 3357 "configure" #include "confdefs.h" #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -3355,7 +3363,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3382,12 +3390,12 @@ for cctk_hdr in netdb.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3386: checking for $cctk_hdr" >&5 +echo "configure:3394: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3391 "configure" +#line 3399 "configure" #include "confdefs.h" #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -3397,7 +3405,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3424,12 +3432,12 @@ for cctk_hdr in arpa/inet.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3428: checking for $cctk_hdr" >&5 +echo "configure:3436: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3433 "configure" +#line 3441 "configure" #include "confdefs.h" #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -3439,7 +3447,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3466,12 +3474,12 @@ for cctk_hdr in winsock2.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3470: checking for $cctk_hdr" >&5 +echo "configure:3478: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3475 "configure" +#line 3483 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -3479,7 +3487,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3506,12 +3514,12 @@ for cctk_hdr in crypt.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3510: checking for $cctk_hdr" >&5 +echo "configure:3518: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3515 "configure" +#line 3523 "configure" #include "confdefs.h" #ifdef HAVE_UNISTD_H #include <unistd.h> @@ -3521,7 +3529,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3548,12 +3556,12 @@ for cctk_hdr in signal.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3552: checking for $cctk_hdr" >&5 +echo "configure:3560: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3557 "configure" +#line 3565 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -3561,7 +3569,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3588,12 +3596,12 @@ for cctk_hdr in malloc.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3592: checking for $cctk_hdr" >&5 +echo "configure:3600: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3597 "configure" +#line 3605 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -3601,7 +3609,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3626,12 +3634,12 @@ done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3630: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3638: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3635 "configure" +#line 3643 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -3640,7 +3648,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3665,12 +3673,12 @@ fi # Check if we have socklen_t available echo $ac_n "checking whether socklen_t is defined""... $ac_c" 1>&6 -echo "configure:3669: checking whether socklen_t is defined" >&5 +echo "configure:3677: checking whether socklen_t is defined" >&5 if eval "test \"`echo '$''{'cctk_cv_have_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3674 "configure" +#line 3682 "configure" #include "confdefs.h" #include <stdio.h> #include <stdlib.h> @@ -3690,7 +3698,7 @@ int main() { socklen_t foo; return 0 ; return 0; } EOF -if { (eval echo configure:3694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_have_socklen_t=yes" else @@ -3715,12 +3723,12 @@ fi # Check if someone has defined SOCKET echo $ac_n "checking whether SOCKET is defined""... $ac_c" 1>&6 -echo "configure:3719: checking whether SOCKET is defined" >&5 +echo "configure:3727: checking whether SOCKET is defined" >&5 if eval "test \"`echo '$''{'cctk_cv_have_SOCKET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3724 "configure" +#line 3732 "configure" #include "confdefs.h" #include <stdio.h> #include <stdlib.h> @@ -3740,7 +3748,7 @@ int main() { SOCKET foo; return 0 ; return 0; } EOF -if { (eval echo configure:3744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_have_SOCKET=yes" else @@ -3766,12 +3774,12 @@ fi # Check for timing functions echo $ac_n "checking for hrtime_t""... $ac_c" 1>&6 -echo "configure:3770: checking for hrtime_t" >&5 +echo "configure:3778: checking for hrtime_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_hrtime_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3775 "configure" +#line 3783 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3802,12 +3810,12 @@ fi for ac_func in gethrtime read_real_time time_base_to_time clock_gettime mach_absolute_time do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3806: checking for $ac_func" >&5 +echo "configure:3814: 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 3811 "configure" +#line 3819 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3830,7 +3838,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3842: \"$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 @@ -3856,10 +3864,10 @@ done echo $ac_n "checking for _rtc intrinsic""... $ac_c" 1>&6 -echo "configure:3860: checking for _rtc intrinsic" >&5 +echo "configure:3868: checking for _rtc intrinsic" >&5 rtc_ok=yes cat > conftest.$ac_ext <<EOF -#line 3863 "configure" +#line 3871 "configure" #include "confdefs.h" #ifdef HAVE_INTRINSICS_H #include <intrinsics.h> @@ -3868,7 +3876,7 @@ int main() { _rtc() ; return 0; } EOF -if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE__RTC 1 @@ -3889,12 +3897,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ for ac_func in mallinfo do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3893: checking for $ac_func" >&5 +echo "configure:3901: 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 3898 "configure" +#line 3906 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3917,7 +3925,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3929: \"$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 @@ -3946,12 +3954,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ for ac_func in mallopt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3950: checking for $ac_func" >&5 +echo "configure:3958: 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 3955 "configure" +#line 3963 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3974,7 +3982,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3986: \"$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 @@ -4002,12 +4010,12 @@ done # Check if M_MMAP_THRESHOLD is defined echo $ac_n "checking whether M_MMAP_THRESHOLD is defined""... $ac_c" 1>&6 -echo "configure:4006: checking whether M_MMAP_THRESHOLD is defined" >&5 +echo "configure:4014: checking whether M_MMAP_THRESHOLD is defined" >&5 if eval "test \"`echo '$''{'cctk_cv_have_M_MMAP_THRESHOLD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4011 "configure" +#line 4019 "configure" #include "confdefs.h" #include <stdlib.h> #ifdef HAVE_MALLOC_H @@ -4017,7 +4025,7 @@ int main() { int x=M_MMAP_THRESHOLD; return 0 ; return 0; } EOF -if { (eval echo configure:4021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_have_M_MMAP_THRESHOLD=yes" else @@ -4043,19 +4051,19 @@ fi # Check if we have __int64 echo $ac_n "checking if __int64 is defined""... $ac_c" 1>&6 -echo "configure:4047: checking if __int64 is defined" >&5 +echo "configure:4055: checking if __int64 is defined" >&5 if eval "test \"`echo '$''{'cctk_cv_have___int64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4052 "configure" +#line 4060 "configure" #include "confdefs.h" int main() { __int64 foo; return 0 ; return 0; } EOF -if { (eval echo configure:4059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_have___int64=yes" else @@ -4090,12 +4098,12 @@ cross_compiling=$ac_cv_prog_cxx_cross do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:4094: checking for $cctk_hdr" >&5 +echo "configure:4102: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4099 "configure" +#line 4107 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -4103,7 +4111,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -4142,12 +4150,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ for ac_func in getopt_long_only do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4146: checking for $ac_func" >&5 +echo "configure:4154: 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 4151 "configure" +#line 4159 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4170,7 +4178,7 @@ $ac_func(); ; 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:4182: \"$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 @@ -4213,12 +4221,12 @@ else fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4217: checking for working const" >&5 +echo "configure:4225: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4222 "configure" +#line 4230 "configure" #include "confdefs.h" int main() { @@ -4267,7 +4275,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:4271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4289,14 +4297,14 @@ fi #AC_C_INLINE echo $ac_n "checking for C inline""... $ac_c" 1>&6 -echo "configure:4293: checking for C inline" >&5 +echo "configure:4301: checking for C inline" >&5 if eval "test \"`echo '$''{'cctk_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cctk_cv_c_inline=no for ac_kw in inline __inline__ __inline '__inline__ __attribute__((__gnu_inline__))'; do cat > conftest.$ac_ext <<EOF -#line 4300 "configure" +#line 4308 "configure" #include "confdefs.h" int main() { @@ -4304,14 +4312,14 @@ foo(); ; return 0; } EOF cat > conftest2.$ac_ext <<EOF -#line 4308 "configure" +#line 4316 "configure" #include "confdefs.h" int main2() { ;} $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:4315: \"$ac_link conftest2.$ac_ext\") 1>&5; (eval $ac_link conftest2.$ac_ext) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4323: \"$ac_link conftest2.$ac_ext\") 1>&5; (eval $ac_link conftest2.$ac_ext) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cctk_cv_c_inline=$ac_kw; break else @@ -4341,14 +4349,14 @@ EOF esac echo $ac_n "checking for C static inline""... $ac_c" 1>&6 -echo "configure:4345: checking for C static inline" >&5 +echo "configure:4353: checking for C static inline" >&5 if eval "test \"`echo '$''{'cctk_cv_c_static_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cctk_cv_c_static_inline=no for ac_kw in 'static inline' 'static __inline__' 'static __inline' 'static __inline__ __attribute__((__gnu_inline__))'; do cat > conftest.$ac_ext <<EOF -#line 4352 "configure" +#line 4360 "configure" #include "confdefs.h" int main() { @@ -4356,14 +4364,14 @@ int main() { ; return 0; } EOF cat > conftest2.$ac_ext <<EOF -#line 4360 "configure" +#line 4368 "configure" #include "confdefs.h" int main2() { ;} $ac_kw ifoo(){} foo2(){ifoo(); ; return 0; } EOF -if { (eval echo configure:4367: \"$ac_link conftest2.$ac_ext\") 1>&5; (eval $ac_link conftest2.$ac_ext) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4375: \"$ac_link conftest2.$ac_ext\") 1>&5; (eval $ac_link conftest2.$ac_ext) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cctk_cv_c_static_inline=$ac_kw; break else @@ -4389,14 +4397,14 @@ esac echo $ac_n "checking for C restrict""... $ac_c" 1>&6 -echo "configure:4393: checking for C restrict" >&5 +echo "configure:4401: checking for C restrict" >&5 if eval "test \"`echo '$''{'cctk_cv_c_restrict'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cctk_cv_c_restrict=no for ac_kw in restrict __restrict__ __restrict; do cat > conftest.$ac_ext <<EOF -#line 4400 "configure" +#line 4408 "configure" #include "confdefs.h" int main() { @@ -4408,7 +4416,7 @@ void func (void * arr[$ac_kw]); ; return 0; } EOF -if { (eval echo configure:4412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_c_restrict=$ac_kw; break else @@ -4438,7 +4446,7 @@ EOF esac echo $ac_n "checking for C++ restrict""... $ac_c" 1>&6 -echo "configure:4442: checking for C++ restrict" >&5 +echo "configure:4450: 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 @@ -4453,7 +4461,7 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_kw in restrict __restrict__ __restrict; do cat > conftest.$ac_ext <<EOF -#line 4457 "configure" +#line 4465 "configure" #include "confdefs.h" int main() { @@ -4464,7 +4472,7 @@ struct tux { char * $ac_kw arr[3]; }; ; return 0; } EOF -if { (eval echo configure:4468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_cxx_restrict=$ac_kw; break else @@ -4502,20 +4510,20 @@ esac echo $ac_n "checking for C bool""... $ac_c" 1>&6 -echo "configure:4506: checking for C bool" >&5 +echo "configure:4514: 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 4512 "configure" +#line 4520 "configure" #include "confdefs.h" int main() { bool foo; ; return 0; } EOF -if { (eval echo configure:4519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_c_bool=yes else @@ -4537,7 +4545,7 @@ EOF fi echo $ac_n "checking for CXX bool""... $ac_c" 1>&6 -echo "configure:4541: checking for CXX bool" >&5 +echo "configure:4549: 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 @@ -4551,14 +4559,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 4555 "configure" +#line 4563 "configure" #include "confdefs.h" int main() { bool foo; ; return 0; } EOF -if { (eval echo configure:4562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_cxx_bool=yes else @@ -4588,20 +4596,20 @@ fi echo $ac_n "checking for C _Pragma""... $ac_c" 1>&6 -echo "configure:4592: checking for C _Pragma" >&5 +echo "configure:4600: checking for C _Pragma" >&5 if eval "test \"`echo '$''{'cctk_cv_have_c__Pragma'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cctk_cv_have_c__Pragma=no cat > conftest.$ac_ext <<EOF -#line 4598 "configure" +#line 4606 "configure" #include "confdefs.h" int main() { int x; _Pragma ("omp barrier") x=0; ; return 0; } EOF -if { (eval echo configure:4605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_c__Pragma=yes else @@ -4636,11 +4644,94 @@ fi #CCTK_C_ATTRIBUTE_PURE #CCTK_CXX_ATTRIBUTE_PURE #CCTK_CXX_MEMBER_ATTRIBUTE_PURE -# -## Find out whether the C compiler supports __attribute__((unused)) -#CCTK_C_ATTRIBUTE_UNUSED -#CCTK_CXX_ATTRIBUTE_UNUSED -# + +# Find out whether the C compiler supports __attribute__((unused)) +echo $ac_n "checking for C __attribute__((__unused__))""... $ac_c" 1>&6 +echo "configure:4651: checking for C __attribute__((__unused__))" >&5 +if eval "test \"`echo '$''{'cctk_cv_have_c_attribute_unused'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cctk_cv_have_c_attribute_unused=no +cat > conftest.$ac_ext <<EOF +#line 4657 "configure" +#include "confdefs.h" + +int main() { +double * foo __attribute__((__unused__)); +; return 0; } +EOF +if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cctk_cv_have_c_attribute_unused=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cctk_cv_have_c_attribute_unused=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$cctk_cv_have_c_attribute_unused" 1>&6 +if test "$cctk_cv_have_c_attribute_unused" = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_CCTK_C_ATTRIBUTE_UNUSED 1 +EOF + +fi + +echo $ac_n "checking for CXX __attribute__((__unused__))""... $ac_c" 1>&6 +echo "configure:4686: checking for CXX __attribute__((__unused__))" >&5 +if eval "test \"`echo '$''{'cctk_cv_have_cxx_attribute_unused'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cctk_cv_have_cxx_attribute_unused=no + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext <<EOF +#line 4700 "configure" +#include "confdefs.h" + +int main() { +double * foo __attribute__((__unused__)); +; return 0; } +EOF +if { (eval echo configure:4707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cctk_cv_have_cxx_attribute_unused=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cctk_cv_have_cxx_attribute_unused=no +fi +rm -f conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + + +fi + +echo "$ac_t""$cctk_cv_have_cxx_attribute_unused" 1>&6 +if test "$cctk_cv_have_cxx_attribute_unused" = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_CCTK_CXX_ATTRIBUTE_UNUSED 1 +EOF + +fi + + ## Find out whether the C compiler supports __attribute__((cold)) #CCTK_C_ATTRIBUTE_COLD #CCTK_CXX_ATTRIBUTE_COLD @@ -4649,7 +4740,7 @@ fi #CCTK_C_ATTRIBUTE_HOT #CCTK_CXX_ATTRIBUTE_HOT echo $ac_n "checking for Fortran REAL*4""... $ac_c" 1>&6 -echo "configure:4653: checking for Fortran REAL*4" >&5 +echo "configure:4744: checking for Fortran REAL*4" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_real4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4665,7 +4756,7 @@ cat > conftest.$ac_ext <<EOF REAL*4 a end EOF -if { (eval echo configure:4669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_real4=yes else @@ -4694,7 +4785,7 @@ EOF fi echo $ac_n "checking for Fortran REAL*8""... $ac_c" 1>&6 -echo "configure:4698: checking for Fortran REAL*8" >&5 +echo "configure:4789: checking for Fortran REAL*8" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_real8'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4710,7 +4801,7 @@ cat > conftest.$ac_ext <<EOF REAL*8 a end EOF -if { (eval echo configure:4714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_real8=yes else @@ -4739,7 +4830,7 @@ EOF fi echo $ac_n "checking for Fortran REAL*16""... $ac_c" 1>&6 -echo "configure:4743: checking for Fortran REAL*16" >&5 +echo "configure:4834: checking for Fortran REAL*16" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_real16'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4755,7 +4846,7 @@ cat > conftest.$ac_ext <<EOF REAL*16 a end EOF -if { (eval echo configure:4759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_real16=yes else @@ -4785,7 +4876,7 @@ fi echo $ac_n "checking for Fortran COMPLEX*8""... $ac_c" 1>&6 -echo "configure:4789: checking for Fortran COMPLEX*8" >&5 +echo "configure:4880: checking for Fortran COMPLEX*8" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_complex8'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4801,7 +4892,7 @@ cat > conftest.$ac_ext <<EOF COMPLEX*8 a end EOF -if { (eval echo configure:4805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_complex8=yes else @@ -4830,7 +4921,7 @@ EOF fi echo $ac_n "checking for Fortran COMPLEX*16""... $ac_c" 1>&6 -echo "configure:4834: checking for Fortran COMPLEX*16" >&5 +echo "configure:4925: checking for Fortran COMPLEX*16" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_complex16'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4846,7 +4937,7 @@ cat > conftest.$ac_ext <<EOF COMPLEX*16 a end EOF -if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_complex16=yes else @@ -4875,7 +4966,7 @@ EOF fi echo $ac_n "checking for Fortran COMPLEX*32""... $ac_c" 1>&6 -echo "configure:4879: checking for Fortran COMPLEX*32" >&5 +echo "configure:4970: checking for Fortran COMPLEX*32" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_complex32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4891,7 +4982,7 @@ cat > conftest.$ac_ext <<EOF COMPLEX*32 a end EOF -if { (eval echo configure:4895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_complex32=yes else @@ -4922,12 +5013,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:4926: checking for crypt" >&5 +echo "configure:5017: 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 4931 "configure" +#line 5022 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char crypt(); below. */ @@ -4950,7 +5041,7 @@ crypt(); ; return 0; } EOF -if { (eval echo configure:4954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5045: \"$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 @@ -4968,7 +5059,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:4972: checking for crypt in library crypt" >&5 +echo "configure:5063: 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 @@ -4977,7 +5068,7 @@ else ac_save_LIBS="$LIBS" LIBS="crypt $LIBS" cat > conftest.$ac_ext <<EOF -#line 4981 "configure" +#line 5072 "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 @@ -4988,7 +5079,7 @@ int main() { crypt() ; return 0; } EOF -if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5083: \"$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 @@ -5029,12 +5120,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:5033: checking for $ac_func" >&5 +echo "configure:5124: 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 5038 "configure" +#line 5129 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5057,7 +5148,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5152: \"$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 @@ -5079,7 +5170,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for finite in library m""... $ac_c" 1>&6 -echo "configure:5083: checking for finite in library m" >&5 +echo "configure:5174: 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 @@ -5088,7 +5179,7 @@ else ac_save_LIBS="$LIBS" LIBS="m $LIBS" cat > conftest.$ac_ext <<EOF -#line 5092 "configure" +#line 5183 "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 @@ -5099,7 +5190,7 @@ int main() { finite() ; return 0; } EOF -if { (eval echo configure:5103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5194: \"$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 @@ -5141,12 +5232,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:5145: checking for $ac_func" >&5 +echo "configure:5236: 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 5150 "configure" +#line 5241 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5169,7 +5260,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5264: \"$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 @@ -5191,7 +5282,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for isnan in library m""... $ac_c" 1>&6 -echo "configure:5195: checking for isnan in library m" >&5 +echo "configure:5286: 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 @@ -5200,7 +5291,7 @@ else ac_save_LIBS="$LIBS" LIBS="m $LIBS" cat > conftest.$ac_ext <<EOF -#line 5204 "configure" +#line 5295 "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 @@ -5211,7 +5302,7 @@ int main() { isnan() ; return 0; } EOF -if { (eval echo configure:5215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5306: \"$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 @@ -5253,12 +5344,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ for ac_func in isinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5257: checking for $ac_func" >&5 +echo "configure:5348: 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 5262 "configure" +#line 5353 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5281,7 +5372,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5376: \"$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 @@ -5303,7 +5394,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for isinf in library m""... $ac_c" 1>&6 -echo "configure:5307: checking for isinf in library m" >&5 +echo "configure:5398: checking for isinf in library m" >&5 ac_lib_var=`echo m'_'isinf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5312,7 +5403,7 @@ else ac_save_LIBS="$LIBS" LIBS="m $LIBS" cat > conftest.$ac_ext <<EOF -#line 5316 "configure" +#line 5407 "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 @@ -5323,7 +5414,7 @@ int main() { isinf() ; return 0; } EOF -if { (eval echo configure:5327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5418: \"$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 @@ -5365,12 +5456,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:5369: checking for $ac_func" >&5 +echo "configure:5460: 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 5374 "configure" +#line 5465 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5393,7 +5484,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5488: \"$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 @@ -5415,7 +5506,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for mkstemp in library c""... $ac_c" 1>&6 -echo "configure:5419: checking for mkstemp in library c" >&5 +echo "configure:5510: 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 @@ -5424,18 +5515,18 @@ else ac_save_LIBS="$LIBS" LIBS="c $LIBS" cat > conftest.$ac_ext <<EOF -#line 5428 "configure" +#line 5519 "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 builtin and then its argument prototype would still apply. */ -char MsafWo; +char fRQzfT; int main() { -oGzJcf +pSqC0Q ; return 0; } EOF -if { (eval echo configure:5439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5530: \"$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 @@ -5474,19 +5565,19 @@ done echo $ac_n "checking for va_copy""... $ac_c" 1>&6 -echo "configure:5478: checking for va_copy" >&5 +echo "configure:5569: 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 5483 "configure" +#line 5574 "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:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5581: \"$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 @@ -5525,7 +5616,7 @@ if test "$PTHREADS_MODE" = 'yes'; then if test -z "$PTHREAD_LIBS"; then PTHREAD_LIBS= echo $ac_n "checking for main in library c_r""... $ac_c" 1>&6 -echo "configure:5529: checking for main in library c_r" >&5 +echo "configure:5620: 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 @@ -5534,14 +5625,14 @@ else ac_save_LIBS="$LIBS" LIBS="c_r $LIBS" cat > conftest.$ac_ext <<EOF -#line 5538 "configure" +#line 5629 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5636: \"$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 @@ -5562,7 +5653,7 @@ else fi echo $ac_n "checking for main in library pthread""... $ac_c" 1>&6 -echo "configure:5566: checking for main in library pthread" >&5 +echo "configure:5657: 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 @@ -5571,14 +5662,14 @@ else ac_save_LIBS="$LIBS" LIBS="pthread $LIBS" cat > conftest.$ac_ext <<EOF -#line 5575 "configure" +#line 5666 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5673: \"$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 @@ -5597,7 +5688,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:5601: checking for main in library pthreads" >&5 +echo "configure:5692: 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 @@ -5606,14 +5697,14 @@ else ac_save_LIBS="$LIBS" LIBS="pthreads $LIBS" cat > conftest.$ac_ext <<EOF -#line 5610 "configure" +#line 5701 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:5617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5708: \"$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 @@ -6080,7 +6171,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:6084: checking for X" >&5 +echo "configure:6175: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -6142,12 +6233,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 6146 "configure" +#line 6237 "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:6151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6242: \"$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* @@ -6216,14 +6307,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 6220 "configure" +#line 6311 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:6227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6318: \"$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. diff --git a/lib/make/configure.in b/lib/make/configure.in index 8b1f4cce..4152e7b6 100644 --- a/lib/make/configure.in +++ b/lib/make/configure.in @@ -781,11 +781,11 @@ CCTK_C__PRAGMA #CCTK_C_ATTRIBUTE_PURE #CCTK_CXX_ATTRIBUTE_PURE #CCTK_CXX_MEMBER_ATTRIBUTE_PURE -# -## Find out whether the C compiler supports __attribute__((unused)) -#CCTK_C_ATTRIBUTE_UNUSED -#CCTK_CXX_ATTRIBUTE_UNUSED -# + +# Find out whether the C compiler supports __attribute__((unused)) +CCTK_C_ATTRIBUTE_UNUSED +CCTK_CXX_ATTRIBUTE_UNUSED + ## Find out whether the C compiler supports __attribute__((cold)) #CCTK_C_ATTRIBUTE_COLD #CCTK_CXX_ATTRIBUTE_COLD diff --git a/lib/sbin/CreateParameterBindings.pl b/lib/sbin/CreateParameterBindings.pl index 7905238b..9202d98e 100644 --- a/lib/sbin/CreateParameterBindings.pl +++ b/lib/sbin/CreateParameterBindings.pl @@ -200,7 +200,6 @@ sub CreateParameterBindings push(@data, " DECLARE_PRIVATE_\U$thorn\E_STRUCT_PARAMS \\") if($header_files{"\U$thorn\E PRIVATE"}); - @use = (); my $delim = ' '; foreach $friend (split(' ',$rhparameter_db->{"\U$thorn\E SHARES implementations"})) { @@ -222,18 +221,11 @@ sub CreateParameterBindings $varprefix = ' const *'; } - push(@data, " $type_string$varprefix const $parameter = RESTRICTED_\U$friend\E_STRUCT.$realname; \\"); - push(@use, " $delim dummy_$friend\_$realname = sizeof( $parameter ) \\"); + push(@data, " CCTK_DECLARE_INIT ($type_string$varprefix const, $parameter, RESTRICTED_\U$friend\E_STRUCT.$realname); \\"); $delim = ','; } } - if(@use) - { - push(@data, " enum { \\"); - push(@data, @use); - push(@data, " };"); - } push(@data, ''); push(@data, "#endif /* _\U$thorn\E_PARAMETERS_H_ */"); push(@data, "\n"); # workaround for perl 5.004_04 to add a trailing newline diff --git a/lib/sbin/GridFuncStuff.pl b/lib/sbin/GridFuncStuff.pl index 10699255..b5972f8c 100644 --- a/lib/sbin/GridFuncStuff.pl +++ b/lib/sbin/GridFuncStuff.pl @@ -481,7 +481,7 @@ sub CreateFortranArgumentDeclarations for(my $level = 0; $level < $ntimelevels; $level++) { - push(@declarations, "CCTK_$type $argument$dimensions"); + push(@declarations, "CCTK_DECLARE(CCTK_$type,$argument,$dimensions)"); # Modify the name for the time level $argument .= '_p'; @@ -527,7 +527,7 @@ sub CreateCArgumentDeclarations for(my $level = 0; $level < $ntimelevels; $level++) { - push(@declarations, "CCTK_$type * CCTK_RESTRICT $varname = (cctki_dummy_int = \&$varname - \&$varname, (CCTK_$type *) CCTKi_VarDataPtr(cctkGH, $level, $implementation, $var));"); + push(@declarations, "CCTK_DECLARE_INIT (CCTK_$type * CCTK_RESTRICT const, $varname, (CCTK_$type *) CCTKi_VarDataPtr(cctkGH, $level, $implementation, $var));"); # Modify the name for the time level $varname .= '_p'; diff --git a/lib/sbin/create_c_stuff.pl b/lib/sbin/create_c_stuff.pl index 124fd560..3277c15f 100644 --- a/lib/sbin/create_c_stuff.pl +++ b/lib/sbin/create_c_stuff.pl @@ -172,11 +172,10 @@ sub GetThornParameterList sub CreateCStructureParameterHeader { my($prefix, $structure, $rhparameters, $rhparameter_db) = @_; - my($line,@data,@use); + my($line,@data); my(%parameters); my($type, $type_string); my(@definition); - my(@use); # Create the structure push(@data, '#ifdef __cplusplus'); @@ -207,8 +206,7 @@ sub CreateCStructureParameterHeader my $realname = $rhparameter_db->{"\U$rhparameters->{$parameter} $parameter\E realname"}; push(@data, " $type_string $realname$suffix;"); - push(@definition, " $type_string$varprefix const $parameter = $structure.$realname; \\"); - push(@use, " $delim dummy\_$structure\_$parameter = sizeof( $parameter ) \\"); + push(@definition, " CCTK_DECLARE_INIT ($type_string$varprefix const, $parameter, $structure.$realname); \\"); $delim = ','; } @@ -228,12 +226,6 @@ sub CreateCStructureParameterHeader push(@data, "#define DECLARE_${structure}_PARAMS \\"); push(@data, @definition); - if( @use ) - { - push(@data, " enum { \\"); - push(@data, @use); - push(@data, " }; \\"); - } push(@data, "\n"); # workaround for perl 5.004_04 to add a trailing newline diff --git a/lib/sbin/create_fortran_stuff.pl b/lib/sbin/create_fortran_stuff.pl index 9b15521b..2fa3ab99 100644 --- a/lib/sbin/create_fortran_stuff.pl +++ b/lib/sbin/create_fortran_stuff.pl @@ -178,7 +178,7 @@ sub CreateFortranCommonDeclaration $name = $rhparameter_db->{"\U$rhparameters->{$parameter} $parameter\E realname"}; } - $line = "$type_string $name$suffix"; + $line = "CCTK_DECLARE($type_string,$name,$suffix)"; $definition .= "$sepchar$name"; push(@data, $line); diff --git a/src/include/cctk.h b/src/include/cctk.h index 24e39aa8..d4fed70e 100644 --- a/src/include/cctk.h +++ b/src/include/cctk.h @@ -21,7 +21,6 @@ /* Include the constants */ #include "cctk_Constants.h" - /* Define some stuff */ #ifdef FCODE @@ -41,24 +40,29 @@ cctk_levfac,cctk_levoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,\ cctk_convfac,cctk_nghostzones,cctk_iteration,cctkGH #define _DECLARE_CCTK_ARGUMENTS _DECLARE_CCTK_FARGUMENTS -#define _DECLARE_CCTK_FARGUMENTS INTEGER cctk_dim&&\ - INTEGER cctk_gsh(cctk_dim),cctk_lsh(cctk_dim)&&\ - INTEGER cctk_lbnd(cctk_dim),cctk_ubnd(cctk_dim)&&\ - INTEGER cctk_lssh(CCTK_NSTAGGER*cctk_dim)&&\ - INTEGER cctk_from(cctk_dim),cctk_to(cctk_dim)&&\ - INTEGER cctk_bbox(2*cctk_dim)&&\ - CCTK_REAL cctk_delta_time, cctk_time&&\ - CCTK_REAL cctk_delta_space(cctk_dim)&&\ - CCTK_REAL cctk_origin_space(cctk_dim)&&\ - INTEGER cctk_levfac(cctk_dim)&&\ - INTEGER cctk_levoff(cctk_dim)&&\ - INTEGER cctk_levoffdenom(cctk_dim)&&\ - INTEGER cctk_timefac&&\ - INTEGER cctk_convlevel&&\ - INTEGER cctk_convfac&&\ - INTEGER cctk_nghostzones(cctk_dim)&&\ - INTEGER cctk_iteration&&\ - CCTK_POINTER cctkGH&& +#define _DECLARE_CCTK_FARGUMENTS &&\ + CCTK_DECLARE(INTEGER,cctk_dim,)&&\ + CCTK_DECLARE(INTEGER,cctk_gsh,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_lsh,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_lbnd,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_ubnd,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_lssh,(CCTK_NSTAGGER*cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_from,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_to,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_bbox,(2*cctk_dim))&&\ + CCTK_DECLARE(CCTK_REAL,cctk_delta_time,)&&\ + CCTK_DECLARE(CCTK_REAL,cctk_time,)&&\ + CCTK_DECLARE(CCTK_REAL,cctk_delta_space,(cctk_dim))&&\ + CCTK_DECLARE(CCTK_REAL,cctk_origin_space,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_levfac,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_levoff,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_levoffdenom,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_timefac,)&&\ + CCTK_DECLARE(INTEGER,cctk_convlevel,)&&\ + CCTK_DECLARE(INTEGER,cctk_convfac,)&&\ + CCTK_DECLARE(INTEGER,cctk_nghostzones,(cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_iteration,)&&\ + CCTK_DECLARE(CCTK_POINTER,cctkGH,)&& #define CCTK_WARN(a,b) CCTK_Warn(a,__LINE__,__FORTRANFILE__,CCTK_THORNSTRING,b) @@ -232,53 +236,28 @@ static inline int CCTK_GFINDEX4D (const cGH *GH, int i, int j, int k, int l) #define _DECLARE_CCTK_ARGUMENTS _DECLARE_CCTK_CARGUMENTS #define _DECLARE_CCTK_CARGUMENTS \ - ptrdiff_t cctki_dummy_int;\ - int cctk_dim = cctkGH->cctk_dim;\ - int *cctk_gsh = cctkGH->cctk_gsh;\ - int *cctk_lsh = cctkGH->cctk_lsh;\ - int *cctk_lbnd = cctkGH->cctk_lbnd;\ - int *cctk_ubnd = cctkGH->cctk_ubnd;\ - int *cctk_lssh = cctkGH->cctk_lssh;\ - int *cctk_from = cctkGH->cctk_from;\ - int *cctk_to = cctkGH->cctk_to;\ - int *cctk_bbox = cctkGH->cctk_bbox;\ - CCTK_REAL cctk_delta_time = cctkGH->cctk_delta_time;\ - CCTK_REAL cctk_time = cctkGH->cctk_time;\ - CCTK_REAL *cctk_delta_space = cctkGH->cctk_delta_space;\ - CCTK_REAL *cctk_origin_space = cctkGH->cctk_origin_space;\ - int *cctk_levfac = cctkGH->cctk_levfac;\ - int *cctk_levoff = cctkGH->cctk_levoff;\ - int *cctk_levoffdenom = cctkGH->cctk_levoffdenom;\ - int cctk_timefac = cctkGH->cctk_timefac;\ - int cctk_convlevel = cctkGH->cctk_convlevel;\ - int cctk_convfac = cctkGH->cctk_convfac;\ - int *cctk_nghostzones = cctkGH->cctk_nghostzones;\ - int cctk_iteration = cctkGH->cctk_iteration;\ - enum { \ - cctk_dummyi_dummy_int = sizeof( cctki_dummy_int ), \ - cctk_dummy_dim = sizeof( cctk_dim ), \ - cctk_dummy_gsh = sizeof( cctk_gsh ), \ - cctk_dummy_lsh = sizeof( cctk_lsh ), \ - cctk_dummy_lbnd = sizeof( cctk_lbnd ), \ - cctk_dummy_ubnd = sizeof( cctk_ubnd ), \ - cctk_dummy_lssh = sizeof( cctk_lssh ), \ - cctk_dummy_from = sizeof( cctk_from ), \ - cctk_dummy_to = sizeof( cctk_to ), \ - cctk_dummy_bbox = sizeof( cctk_bbox ), \ - cctk_dummy_delta_time = sizeof( cctk_delta_time ), \ - cctk_dummy_time = sizeof( cctk_time ), \ - cctk_dummy_delta_space = sizeof( cctk_delta_space ), \ - cctk_dummy_origin_space = sizeof( cctk_origin_space ), \ - cctk_dummy_levoff = sizeof( cctk_levoff ), \ - cctk_dummy_levfac = sizeof( cctk_levfac ), \ - cctk_dummy_levoffdenom = sizeof( cctk_levoffdenom ), \ - cctk_dummy_timefac = sizeof( cctk_timefac ), \ - cctk_dummy_convlevel = sizeof( cctk_convlevel ), \ - cctk_dummy_convfac = sizeof( cctk_convfac ), \ - cctk_dummy_nghostzones = sizeof( cctk_nghostzones ), \ - cctk_dummy_iteration = sizeof( cctk_iteration ) \ - }; - + CCTK_DECLARE_INIT(ptrdiff_t,cctki_dummy_int,0);\ + CCTK_DECLARE_INIT(int,cctk_dim,cctkGH->cctk_dim);\ + CCTK_DECLARE_INIT(int,*cctk_gsh,cctkGH->cctk_gsh);\ + CCTK_DECLARE_INIT(int,*cctk_lsh,cctkGH->cctk_lsh);\ + CCTK_DECLARE_INIT(int,*cctk_lbnd,cctkGH->cctk_lbnd);\ + CCTK_DECLARE_INIT(int,*cctk_ubnd,cctkGH->cctk_ubnd);\ + CCTK_DECLARE_INIT(int,*cctk_lssh,cctkGH->cctk_lssh);\ + CCTK_DECLARE_INIT(int,*cctk_from,cctkGH->cctk_from);\ + CCTK_DECLARE_INIT(int,*cctk_to,cctkGH->cctk_to);\ + CCTK_DECLARE_INIT(int,*cctk_bbox,cctkGH->cctk_bbox);\ + CCTK_DECLARE_INIT(CCTK_REAL,cctk_delta_time,cctkGH->cctk_delta_time);\ + CCTK_DECLARE_INIT(CCTK_REAL,cctk_time,cctkGH->cctk_time);\ + CCTK_DECLARE_INIT(CCTK_REAL,*cctk_delta_space,cctkGH->cctk_delta_space);\ + CCTK_DECLARE_INIT(CCTK_REAL,*cctk_origin_space,cctkGH->cctk_origin_space);\ + CCTK_DECLARE_INIT(int,*cctk_levfac,cctkGH->cctk_levfac);\ + CCTK_DECLARE_INIT(int,*cctk_levoff,cctkGH->cctk_levoff);\ + CCTK_DECLARE_INIT(int,*cctk_levoffdenom,cctkGH->cctk_levoffdenom);\ + CCTK_DECLARE_INIT(int,cctk_timefac,cctkGH->cctk_timefac);\ + CCTK_DECLARE_INIT(int,cctk_convlevel,cctkGH->cctk_convlevel);\ + CCTK_DECLARE_INIT(int,cctk_convfac,cctkGH->cctk_convfac);\ + CCTK_DECLARE_INIT(int,*cctk_nghostzones,cctkGH->cctk_nghostzones);\ + CCTK_DECLARE_INIT(int,cctk_iteration,cctkGH->cctk_iteration);\ #define _INITIALISE_CCTK_C2F #define _DECLARE_CCTK_C2F diff --git a/src/include/cctk_Types.h b/src/include/cctk_Types.h index 734a0c17..22f52c37 100644 --- a/src/include/cctk_Types.h +++ b/src/include/cctk_Types.h @@ -196,3 +196,82 @@ typedef unsigned char CCTK_BYTE; #endif /*_CCTK_TYPES_H_ */ +/* Determine whether we have a traditional or an ANSI cpp. */ +#ifdef FCODE +/* The empty + comment in the definition of CCTK_ANSI_FPP will either turn into + nothing or into white space. There must not be any add spaces + around this empty comment. + + A traditional cpp will turn it into nothing, an ANSI cpp will turn + it into white space. Depending on this, CCTK_ANSI_FPP will either + turn into a single separate token (which lead to the value 0), or + into two separate tokens (which lead to the value 1). + + This is magic. */ +#define CCTKi_FPP_A +#define CCTKi_FPP_B 1 +#define CCTKi_FPP_ACCTKi_FPP_B 0 +#define CCTK_ANSI_FPP CCTKi_FPP_A/**/CCTKi_FPP_B +#endif + +/* Handle 'unused' function arguments */ +#ifdef FCODE +/* Declare a variable and tell the compiler that it may be unused. + This is used for CCTK_ARGUMENTS. + + The macro CCTK_DECLARE (typ, nam, dim) is used with + typ: a type, used to declare the variable (e.g. "CCTK_REAL") + nam: the variable name (e.g. "x") + dim: optional array dimensions, (e.g. "(10,10)") +*/ +#ifdef F90CODE +/* Declare it, and use it for a dummy operation */ + +#if CCTK_ANSI_FPP +#define CCTK_DECLARE(typ,nam,dim) \ + typ nam dim && \ + integer, parameter :: cctki_use_##nam = kind(nam) +#else +#define CCTK_DECLARE(typ,nam,dim) \ + typ nam dim && \ + integer, parameter :: cctki_use_/**/nam = kind(nam) +#endif + +#else /* F90CODE */ + +/* Just declare it; FORTRAN 77 has no good way of marking it as used + within a block of declarations */ +#define CCTK_DECLARE(typ,nam,dim) \ + typ nam dim + +#endif /* F90CODE */ +#endif /* FCODE */ + +#ifdef CCODE +/* Declare and initialise a variable and tell the compiler that it may + be unused. This is used for CCTK_PARAMETERS and CCTK_ARGUMENTS. + + The macro CCTK_DECLARE_INIT (typ, nam, val) is used with + typ: a type, used to declare the variable (e.g. "const int") + nam: the variable name (e.g. "x") + val: the value used to initialise it (e.g. "42") +*/ +#if (! defined(__cplusplus) && defined(HAVE_CCTK_C_ATTRIBUTE_UNUSED )) \ + || ( defined(__cplusplus) && defined(HAVE_CCTK_CXX_ATTRIBUTE_UNUSED)) + +/* We have __attribute__((unused)), so use it */ +#define CCTK_DECLARE_INIT(typ,nam,val) \ + typ nam __attribute__((unused)) = (val); + +#else + +/* Some fallback, bound to fool most compilers */ +#define CCTK_DECLARE_INIT(typ,nam,val) \ + typ nam = (val); \ + enum cctki_use_##nam { cctki_use0_##nam = sizeof nam }; + +#endif /* HAVE_..._ATTRIBUTE_UNUSED */ + +#endif /* CCODE */ + |