diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-06-26 11:17:19 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-06-26 11:17:19 +0000 |
commit | 62aa6166f201c760bebda497d7b0e09e54f94275 (patch) | |
tree | 3926fb7a504a6b99ba96523875b7b1026b38c2ee | |
parent | cdfbf3c3e9eee598e3cfe5a0852df8b94ee28316 (diff) |
Do not define CCTK_L2_CACHE_SIZE and CCTK_L2_CACHELINE_BYTES macros anymore.
They have been depricated in beta13.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3792 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | lib/make/cctk_Config.h.in | 138 | ||||
-rwxr-xr-x | lib/make/configure | 420 | ||||
-rw-r--r-- | lib/make/configure.in | 414 |
3 files changed, 341 insertions, 631 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in index f2f7b07e..723bf694 100644 --- a/lib/make/cctk_Config.h.in +++ b/lib/make/cctk_Config.h.in @@ -8,56 +8,14 @@ /* Define if standard C headers are available. */ #undef STDC_HEADERS -/* Size info for various types */ - -/* The number of bytes in a short int. */ -#undef SIZEOF_SHORT_INT - -/* The number of bytes in a int. */ -#undef SIZEOF_INT - -/* The number of bytes in a long int. */ -#undef SIZEOF_LONG_INT - -/* The number of bytes in a long long. */ -#undef SIZEOF_LONG_LONG - -/* The number of bytes in a long double. */ -#undef SIZEOF_LONG_DOUBLE - -/* The number of bytes in a double. */ -#undef SIZEOF_DOUBLE - -/* The number of bytes in a float. */ -#undef SIZEOF_FLOAT - -/* The number of bytes in a char *. */ -#undef SIZEOF_CHAR_P - -/* The chosen CCTK precision */ - -/* Floating point precision */ -#undef CCTK_REAL_PRECISION_16 -#undef CCTK_REAL_PRECISION_8 -#undef CCTK_REAL_PRECISION_4 - -/* Integer precision */ -#undef CCTK_INTEGER_PRECISION_8 -#undef CCTK_INTEGER_PRECISION_4 -#undef CCTK_INTEGER_PRECISION_2 -#undef CCTK_INTEGER_PRECISION_1 - /* Modifier for Fortran function definitions. */ - #undef CCTK_FCALL /* What debugging options to use */ - #undef CCTK_DEBUG #undef CCTK_TRACEMEMORY /* Various library functions */ - #undef HAVE_GETHOSTBYNAME #undef HAVE_GETOPT_LONG_ONLY #undef HAVE_CRYPT @@ -66,17 +24,19 @@ #undef HAVE_MKSTEMP /* Do we have mode_t ? */ - #undef HAVE_MODE_T -/* Do we have socklen_t ? */ - -#undef HAVE_SOCKLEN_T - /* Do we have SOCKET ? */ - #undef HAVE_SOCKET_TYPE +/* Do we have socklen_t ? Default to 'int' if not. */ +#undef HAVE_SOCKLEN_T +#ifdef HAVE_SOCKLEN_T +#define CCTK_SOCKLEN_T socklen_t +#else +#define CCTK_SOCKLEN_T int +#endif + /* Some include things */ #undef HAVE_TIME_H #undef HAVE_SYS_FILIO_H @@ -101,40 +61,52 @@ #undef TIME_WITH_SYS_TIME /* Which format does the C++ STL on this machine provide. */ - #undef HAVE_VECTOR #undef HAVE_VECTOR_H /* Timing stuff */ - #undef HAVE_TIME_GETTIMEOFDAY #undef GETTIMEOFDAY_NEEDS_TIMEZONE #undef HAVE_TIME_GETRUSAGE #undef HAVE_TIME__FTIME /* Cache stuff */ - #undef CCTK_CACHELINE_BYTES #undef CCTK_CACHE_SIZE -/* DEPRECATED IN b13 */ -#undef CCTK_L2_CACHELINE_BYTES -#undef CCTK_L2_CACHE_SIZE - /* The name of the NULL device for redirecting things to */ - #undef NULL_DEVICE -/* The TYPE of socklen_t if it does not exist */ - -#ifdef HAVE_SOCKLEN_T -#define CCTK_SOCKLEN_T socklen_t -#else -#define CCTK_SOCKLEN_T int -#endif +/* Define the machine architecture for the build */ +#undef CCTK_BUILD_OS +#undef CCTK_BUILD_CPU +#undef CCTK_BUILD_VENDOR /******************************************************************************/ +/* Size info for various datatypes */ +#undef SIZEOF_SHORT_INT +#undef SIZEOF_INT +#undef SIZEOF_LONG_INT +#undef SIZEOF_LONG_LONG +#undef SIZEOF_LONG_DOUBLE +#undef SIZEOF_DOUBLE +#undef SIZEOF_FLOAT +#undef SIZEOF_CHAR_P + +/* The chosen CCTK precision */ + +/* Floating point precision */ +#undef CCTK_REAL_PRECISION_16 +#undef CCTK_REAL_PRECISION_8 +#undef CCTK_REAL_PRECISION_4 + +/* Integer precision */ +#undef CCTK_INTEGER_PRECISION_8 +#undef CCTK_INTEGER_PRECISION_4 +#undef CCTK_INTEGER_PRECISION_2 +#undef CCTK_INTEGER_PRECISION_1 + /* Integer sizes */ #undef CCTK_HAVE_INT8 #undef CCTK_HAVE_INT4 @@ -150,50 +122,30 @@ #ifdef CCODE -/* Integer sizes */ - -/* Define the type of an 8 byte integer */ +/* CCTK C/C++ Integer datatypes */ #undef CCTK_INT8 - -/* Define the type of a 4 byte integer */ #undef CCTK_INT4 - -/* Define the type of a 2 byte integer */ #undef CCTK_INT2 - -/* Define the type of a 1 byte integer */ #undef CCTK_INT1 -/* Float sizes */ - -/* Define the type of a 16 byte float */ +/* CCTK C/C++ Float datatypes */ #undef CCTK_REAL16 - -/* Define the type of an 8 byte float */ #undef CCTK_REAL8 - -/* Define the type of a 4 byte float */ #undef CCTK_REAL4 -/* Define the machine architecture for the build */ -#undef CCTK_BUILD_OS -#undef CCTK_BUILD_CPU -#undef CCTK_BUILD_VENDOR - /****************************************************************************/ /* C specific stuff */ /****************************************************************************/ #ifndef __cplusplus -/* Define as __inline if that's what the C compiler calls it. */ +/* Define to empty if the 'inline' keyword does not work. */ #undef inline -/* Define to empty if the keyword does not work. */ +/* Define to empty if the 'const' keyword does not work. */ #undef const +/* Define to empty if the 'restrict' keyword does not work. */ #undef CCTK_C_RESTRICT - -/* Define to empty if the keyword does not work. */ #ifdef CCTK_C_RESTRICT #define restrict CCTK_C_RESTRICT #endif @@ -206,7 +158,7 @@ #ifndef CCTK_HAVE_C_BOOL typedef enum {false, true} bool; #endif /* CCTK_HAVE_CXX_BOOL */ -#endif /* 0 */ +#endif #endif /* ! defined __cplusplus */ /****************************************************************************/ @@ -221,7 +173,7 @@ typedef enum {false, true} bool; #ifndef CCTK_HAVE_CXX_BOOL typedef enum {false, true} bool; -#endif /* CCTK_HAVE_CXX_BOOL */ +#endif /* Some C++ compilers recognise the restrict keyword */ #undef CCTK_CXX_RESTRICT @@ -232,16 +184,16 @@ typedef enum {false, true} bool; #ifdef CCTK_CXX_RESTRICT #define restrict CCTK_CXX_RESTRICT #endif -#endif /* 0 */ +#endif #endif /* __cplusplus */ /****************************************************************************/ -#endif /*CCODE */ +#endif /* CCODE */ #ifdef FCODE -#endif /*FCODE */ +#endif /* FCODE */ /* Now include the code to pick an appropriate precison for reals and ints */ #include "cctk_Types.h" diff --git a/lib/make/configure b/lib/make/configure index ebc6ef3f..3a62288a 100755 --- a/lib/make/configure +++ b/lib/make/configure @@ -581,7 +581,7 @@ if test -n "$WARN" ; then WARN=`echo $WARN | tr '[:upper:]' '[:lower:]'` - if test "$WARN" != "yes" -a "$WARN" != "no" ; then + if test "$WARN" != 'yes' -a "$WARN" != 'no' ; then { echo "configure: error: Didn't recognize setting of WARN=\"$WARN\" (should be either \"yes\" or \"no\")" 1>&2; exit 1; } fi WARN_MODE=$WARN @@ -661,20 +661,20 @@ echo "$ac_t""$host" 1>&6 # See if there are any preferred compilers for this system -CCTK_CONFIG_STAGE="preferred-compilers" +CCTK_CONFIG_STAGE='preferred-compilers' if test -r $srcdir/known-architectures/$host_os ; then -. $srcdir/known-architectures/$host_os + . $srcdir/known-architectures/$host_os else - echo "Warning: " - echo " Cactus has not been previously compiled for this architecture: " + echo 'Warning: ' + echo ' Cactus has not been previously compiled for this architecture:' echo " ($host_os)" - echo " The currently known architectures can be found in " + echo ' The currently known architectures can be found in' echo " $srcdir/known-architectures" - echo " The configuration will try to do its best to work things out." - echo " If you create a known-architectures file for this architecture, " - echo " please send it to cactusmaint@cactuscode.org and we'll include " - echo " it in the next release." + echo ' The configuration will try to do its best to work things out.' + echo ' If you create a known-architectures file for this architecture,' + echo " please send it to cactusmaint@cactuscode.org and we'll include" + echo ' it in the next release.' fi # Save these for future use. @@ -718,7 +718,7 @@ fi if test -z "$CC" ; then -for ac_prog in gcc cc cl xlc + for ac_prog in gcc cc cl xlc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -820,7 +820,7 @@ fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test "x$CXX" != "xnone" ; then +if test "x$CXX" != 'xnone' ; then if test -z "$CXX" ; then for ac_prog in c++ g++ gcc CC cxx cc++ cl xlC do @@ -1274,7 +1274,7 @@ fi if test -z "$LD" ; then - if test "x$CXX" != "xnone" ; then + if test "x$CXX" != 'xnone' ; then LD=$CXX else LD=$CC @@ -1320,12 +1320,12 @@ EOF # Create a file to put any #defines etc needed for this architecture # known architecture stuff should use CCTK_WriteLine cctk_Archdefs "foo" to append to this file. CCTK_CreateFile cctk_Archdefs.h '/* Stuff from known architectures */' -CCTK_WriteLine cctk_Archdefs.h "#ifndef _CCTK_ARCHDEFS_H_" -CCTK_WriteLine cctk_Archdefs.h "#define _CCTK_ARCHDEFS_H_" +CCTK_WriteLine cctk_Archdefs.h '#ifndef _CCTK_ARCHDEFS_H_' +CCTK_WriteLine cctk_Archdefs.h '#define _CCTK_ARCHDEFS_H_' -CCTK_CreateFile make.arch.defn "# Stuff from known architectures " +CCTK_CreateFile make.arch.defn '# Stuff from known architectures ' -CCTK_CONFIG_STAGE="misc" +CCTK_CONFIG_STAGE='misc' if test -r $srcdir/known-architectures/$host_os ; then . $srcdir/known-architectures/$host_os @@ -1339,7 +1339,7 @@ CCTK_WriteLine cctk_Archdefs.h '#endif /* _CCTK_ARCHDEFS_H_ */' # Deal with the Fortran compiler issues. # If there's a Fortran 90 compiler use that for all the Fortran. -if test "x$F90" != "x" -a "x$F90" != "xnone" -a "x$F77" != "xnone" ; then +if test "x$F90" != 'x' -a "x$F90" != 'xnone' -a "x$F77" != 'xnone' ; then F77=$F90 : {F77FLAGS=$F90FLAGS} fi @@ -1354,11 +1354,11 @@ unset LIBS KNOWN_LDFLAGS="$LDFLAGS" unset LDFLAGS -: ${LIBDIR_PREFIX="-L"} -: ${LIBDIR_SUFFIX=""} +: ${LIBDIR_PREFIX='-L'} +: ${LIBDIR_SUFFIX=''} -: ${LIBLINK_PREFIX="-l"} -: ${LIBLINK_SUFFIX=""} +: ${LIBLINK_PREFIX='-l'} +: ${LIBLINK_SUFFIX=''} @@ -1548,7 +1548,7 @@ fi -if test "x$cross_compiling" = "xno" ; then +if test "x$cross_compiling" = 'xno' ; then echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 echo "configure:1554: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then @@ -1641,7 +1641,7 @@ fi else if test -n "$ENDIAN" ; then - if test "$ENDIAN" = "big" ; then + if test "$ENDIAN" = 'big' ; then cat >> confdefs.h <<\EOF #define WORDS_BIGENDIAN 1 EOF @@ -1654,7 +1654,7 @@ fi # Check for sizes of integer types -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_LONG_LONG" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_LONG_LONG" ; then { echo "configure: error: Cross-compiling - no value set for sizeof(long long) please set SIZEOF_LONG_LONG" 1>&2; exit 1; } fi @@ -1698,7 +1698,7 @@ EOF -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_LONG_INT" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_LONG_INT" ; then { echo "configure: error: Cross-compiling - no value set for sizeof(long int) please set SIZEOF_LONG_INT" 1>&2; exit 1; } fi @@ -1742,7 +1742,7 @@ EOF -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_INT" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_INT" ; then { echo "configure: error: Cross-compiling - no value set for sizeof(int) please set SIZEOF_INT" 1>&2; exit 1; } fi @@ -1786,7 +1786,7 @@ EOF -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_SHORT_INT" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_SHORT_INT" ; then { echo "configure: error: Cross-compiling - no value set for sizeof(short int) please set SIZEOF_SHORT_INT" 1>&2; exit 1; } fi @@ -1832,7 +1832,7 @@ EOF # Check for sizes of floating point types -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_LONG_DOUBLE" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_LONG_DOUBLE" ; then { echo "configure: error: Cross-compiling - no value set for sizeof(long double) please set SIZEOF_LONG_DOUBLE" 1>&2; exit 1; } fi @@ -1876,7 +1876,7 @@ EOF -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_DOUBLE" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_DOUBLE" ; then { echo "configure: error: Cross-compiling - no value set for sizeof(double) please set SIZEOF_DOUBLE" 1>&2; exit 1; } fi @@ -1921,7 +1921,7 @@ EOF -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_FLOAT" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_FLOAT" ; then { echo "configure: error: Cross-compiling - no value set for sizeof(float) please set SIZEOF_FLOAT" 1>&2; exit 1; } fi @@ -1967,7 +1967,7 @@ EOF # Check for sizes of pointers. -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_POINTER" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_POINTER" ; then { echo "configure: error: Cross-compiling - no value set for sizeof(char *) please set SIZEOF_POINTER" 1>&2; exit 1; } fi @@ -2013,11 +2013,11 @@ EOF # See if there's a null device, and what it's called -if test "x$cross_compiling" = "xyes"; then +if test "x$cross_compiling" = 'xyes'; then if test -z "$NULL_DEVICE" ; then echo "configure: warning: Cross-compiling - no value set for location of null device please set NULL_DEVICE" 1>&2 echo "configure: warning: Defaulting to /dev/null" 1>&2 - NULL_DEVICE="/dev/null" + NULL_DEVICE='/dev/null' fi eval "cctk_cv_nulldevice=$NULL_DEVICE" cat >> confdefs.h <<EOF @@ -2455,7 +2455,7 @@ rm -f conftest* fi -if test "$cctk_cv_have_mode_t" = "yes"; then +if test "$cctk_cv_have_mode_t" = 'yes'; then cat >> confdefs.h <<\EOF #define HAVE_MODE_T 1 EOF @@ -3473,7 +3473,7 @@ rm -f conftest* fi -if test "$cctk_cv_have_socklen_t" = "yes"; then +if test "$cctk_cv_have_socklen_t" = 'yes'; then cat >> confdefs.h <<\EOF #define HAVE_SOCKLEN_T 1 EOF @@ -3523,7 +3523,7 @@ rm -f conftest* fi -if test "$cctk_cv_have_SOCKET" = "yes"; then +if test "$cctk_cv_have_SOCKET" = 'yes'; then cat >> confdefs.h <<\EOF #define HAVE_SOCKET_TYPE 1 EOF @@ -3560,8 +3560,8 @@ rm -f conftest* fi -if test "$cctk_cv_have___int64" = "yes"; then - CCTK_INT8="__int64" +if test "$cctk_cv_have___int64" = 'yes'; then + CCTK_INT8='__int64' echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 @@ -3569,7 +3569,7 @@ fi # C++ STL stuff -if test "x$CXX" != "xnone" ; then +if test "x$CXX" != 'xnone' ; then ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -3690,7 +3690,7 @@ done -if test "x$cctk_cv_header_getopt_h" = "xyes" -a "x$ac_cv_func_getopt_long_only" = "xyes"; then +if test "x$cctk_cv_header_getopt_h" = 'xyes' -a "x$ac_cv_func_getopt_long_only" = 'xyes'; then BUILD_GETOPT=no else BUILD_GETOPT=yes @@ -3698,7 +3698,7 @@ fi -if test "x$cctk_cv_header_regex_h" = "xyes" ; then +if test "x$cctk_cv_header_regex_h" = 'xyes' ; then BUILD_REGEX=no else BUILD_REGEX=yes @@ -4443,7 +4443,7 @@ done -if test "X$PTHREADS" = "Xyes"; then +if test "X$PTHREADS" = 'Xyes'; then PTHREAD_LIBS= echo $ac_n "checking for main in library c_r""... $ac_c" 1>&6 echo "configure:4450: checking for main in library c_r" >&5 @@ -4577,42 +4577,42 @@ fi # Integer types case "x$ac_cv_sizeof_long_long" in - "x8") - CCTK_INT8="long long" ;; - "x4") - CCTK_INT4="long long" ;; - "x2") - CCTK_INT2="long long" ;; + 'x8') + CCTK_INT8='long long' ;; + 'x4') + CCTK_INT4='long long' ;; + 'x2') + CCTK_INT2='long long' ;; esac case "x$ac_cv_sizeof_long_int" in - "x8") - CCTK_INT8="long int" ;; - "x4") - CCTK_INT4="long int" ;; - "x2") - CCTK_INT2="long int" ;; + 'x8') + CCTK_INT8='long int' ;; + 'x4') + CCTK_INT4='long int' ;; + 'x2') + CCTK_INT2='long int' ;; esac case "x$ac_cv_sizeof_int" in - "x8") - CCTK_INT8="int" ;; - "x4") - CCTK_INT4="int" ;; - "x2") - CCTK_INT2="int" ;; + 'x8') + CCTK_INT8='int' ;; + 'x4') + CCTK_INT4='int' ;; + 'x2') + CCTK_INT2='int' ;; esac case "x$ac_cv_sizeof_short_int" in - "x8") - CCTK_INT8="short int" ;; - "x4") - CCTK_INT4="short int" ;; - "x2") - CCTK_INT2="short int" ;; + 'x8') + CCTK_INT8='short int' ;; + 'x4') + CCTK_INT4='short int' ;; + 'x2') + CCTK_INT2='short int' ;; esac -CCTK_INT1="signed char" +CCTK_INT1='signed char' if test -n "$CCTK_INT8" ; then cat >> confdefs.h <<EOF @@ -4661,30 +4661,30 @@ fi # Float types case "x$ac_cv_sizeof_long_double" in - "x16") - CCTK_REAL16="long double" ;; - "x8") - CCTK_REAL8="long double" ;; - "x4") - CCTK_REAL4="long double" ;; + 'x16') + CCTK_REAL16='long double' ;; + 'x8') + CCTK_REAL8='long double' ;; + 'x4') + CCTK_REAL4='long double' ;; esac case "x$ac_cv_sizeof_double" in - "x16") - CCTK_REAL16="double" ;; - "x8") - CCTK_REAL8="double" ;; - "x4") - CCTK_REAL4="double" ;; + 'x16') + CCTK_REAL16='double' ;; + 'x8') + CCTK_REAL8='double' ;; + 'x4') + CCTK_REAL4='double' ;; esac case "x$ac_cv_sizeof_float" in - "x16") - CCTK_REAL16="float" ;; - "x8") - CCTK_REAL8="float" ;; - "x4") - CCTK_REAL4="float" ;; + 'x16') + CCTK_REAL16='float' ;; + 'x8') + CCTK_REAL8='float' ;; + 'x4') + CCTK_REAL4='float' ;; esac if test -n "$CCTK_REAL16" ; then @@ -4723,17 +4723,17 @@ fi # Define the default floating point and integer precisions case "x$REAL_PRECISION" in - "x16") + 'x16') cat >> confdefs.h <<\EOF #define CCTK_REAL_PRECISION_16 1 EOF ;; - "x8") + 'x8') cat >> confdefs.h <<\EOF #define CCTK_REAL_PRECISION_8 1 EOF ;; - "x4") + 'x4') cat >> confdefs.h <<\EOF #define CCTK_REAL_PRECISION_4 1 EOF @@ -4746,17 +4746,17 @@ EOF esac case "x$INTEGER_PRECISION" in - "x8") + 'x8') cat >> confdefs.h <<\EOF #define CCTK_INTEGER_PRECISION_8 1 EOF ;; - "x4") + 'x4') cat >> confdefs.h <<\EOF #define CCTK_INTEGER_PRECISION_4 1 EOF ;; - "x2") + 'x2') cat >> confdefs.h <<\EOF #define CCTK_INTEGER_PRECISION_2 1 EOF @@ -4770,9 +4770,7 @@ esac # Define any code needed before the definition of a Fortran subroutine # This is empty on most architectures. - -: ${CCTK_FCALL=""} - +: ${CCTK_FCALL=''} cat >> confdefs.h <<EOF #define CCTK_FCALL $CCTK_FCALL EOF @@ -4816,18 +4814,13 @@ EOF - # Define how to make a directory in the config.h file - cat >> confdefs.h <<EOF #define MKDIR "$MKDIR" EOF - - -: ${MKDIRFLAGS="-p"} - +: ${MKDIRFLAGS='-p'} cat >> confdefs.h <<EOF #define MKDIRFLAGS " $MKDIRFLAGS " EOF @@ -4836,10 +4829,8 @@ EOF # The perl scripts run by the make system need to have their names # changed if under cygwin - e.g. //d/foo needs to be d:/foo - PERL_CONFIGURE_SCRIPT="$srcdir/configure.pl" - -if test "$host_os" = "cygwin" ; then +if test "$host_os" = 'cygwin' ; then PERL_CONFIGURE_SCRIPT=`echo $PERL_CONFIGURE_SCRIPT | sed 's,^/cygdrive/\(.\)/,\1:/,' | sed 's,^//\(.\)/,\1:/,'` fi @@ -4862,19 +4853,13 @@ LDFLAGS="$LDFLAGS $KNOWN_LDFLAGS" #Set the compileonly flags if they've not been set by now +: ${CCOMPILEONLY='-c -o'} +: ${FCOMPILEONLY='-c -o'} -: ${CCOMPILEONLY="-c -o"} -: ${FCOMPILEONLY="-c -o"} - -# Set the debug flags if they've not been set by now - -# Define the type of debugging to use - ####################################################################### # determine DEBUG_MODE from the DEBUG option # if this option isn't set DEBUG_MODE will default to 'no' - if test -n "$DEBUG" ; then DEBUG=`echo $DEBUG | tr '[:upper:]' '[:lower:]'` @@ -4916,147 +4901,85 @@ EOF fi - DEBUG_MODE='no' if test -n "$DEBUG_FLAGS"; then DEBUG_MODE=$DEBUG_FLAGS fi +# Set the debug flags if they've not been set by now +# (using '-g' as a reasonable default) - -if test -z "$C_DEBUG_FLAGS" ; then -# This should be a reasonable default. - C_DEBUG_FLAGS='-g' -fi - - - -if test -z "$CXX_DEBUG_FLAGS" ; then -# This should be a reasonable default. - CXX_DEBUG_FLAGS='-g' -fi +: ${C_DEBUG_FLAGS='-g'} +: ${CXX_DEBUG_FLAGS='-g'} -if test -z "$F77_DEBUG_FLAGS" ; then -# This should be a reasonable default. - F77_DEBUG_FLAGS='-g' -fi +: ${F77_DEBUG_FLAGS='-g'} -if test -z "$F90_DEBUG_FLAGS" ; then -# This should be a reasonable default. - F90_DEBUG_FLAGS='-g' -fi +: ${F90_DEBUG_FLAGS='-g'} # Set the warn flags # Set the optimization flags if they've not been set by now +# (using '-O2' as a reasonable default) +: ${C_OPTIMISE_FLAGS='-O2'} -if test -z "$C_OPTIMISE_FLAGS" ; then -# This should be a reasonable default. - C_OPTIMISE_FLAGS='-O2' -fi - - - -if test -z "$CXX_OPTIMISE_FLAGS" ; then -# This should be a reasonable default. - CXX_OPTIMISE_FLAGS='-O2' -fi +: ${CXX_OPTIMISE_FLAGS='-O2'} -if test -z "$F77_OPTIMISE_FLAGS" ; then - case "$F77" in - g77) - F77_OPTIMISE_FLAGS='-O2' - ;; - *) -# Don't know a reasonable default. - F77_OPTIMISE_FLAGS='' - ;; - esac +if test -z "$F77_OPTIMISE_FLAGS" -a "$F77" = 'g77' ; then + F77_OPTIMISE_FLAGS='-O2' +else + : ${F77_OPTIMISE_FLAGS=''} fi - -if test -z "$F90_OPTIMISE_FLAGS" ; then -# Don't know a reasonable default. - F90_OPTIMISE_FLAGS='' -fi +: ${F90_OPTIMISE_FLAGS=''} # Set the warning flags if they've not been set by now +# (using GNU compiler warning flags as a reasonable default) - - -if test -z "$C_WARN_FLAGS" ; then - case "$CC" in - gcc) - C_WARN_FLAGS='-Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline' - ;; - *) -# Not sure what should be a reasonable default. - C_WARN_FLAGS='' - ;; - esac +if test -z "$C_WARN_FLAGS" -a "$CC" = 'gcc' ; then + C_WARN_FLAGS='-Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline' +else + : ${C_WARN_FLAGS=''} fi - -if test -z "$CXX_WARN_FLAGS" ; then - case "$CXX" in - c++ | g++) - CXX_WARN_FLAGS='-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Winline -Woverloaded-virtual' - ;; - *) -# Not sure what should be a reasonable default. - CXX_WARN_FLAGS='' - ;; - esac +if test -z "$CXX_WARN_FLAGS" -a \( "$CXX" = 'c++' -o "$CXX" = 'g++' \) ; then + CXX_WARN_FLAGS='-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Winline -Woverloaded-virtual' +else + : ${CXX_WARN_FLAGS=''} fi - -if test -z "$F77_WARN_FLAGS" ; then - case "$F77" in - g77) - F77_WARN_FLAGS='-Wall' - ;; - *) -# Not sure what should be a reasonable default. - F77_WARN_FLAGS='' - ;; - esac +if test -z "$F77_WARN_FLAGS" -a "$F77" = 'g77' ; then + F77_WARN_FLAGS='-Wall' +else + : ${F77_WARN_FLAGS=''} fi - -if test -z "$F90_WARN_FLAGS" ; then -# Not sure what should be a reasonable default. - F90_WARN_FLAGS='' -fi +: ${F90_WARN_FLAGS=''} # Set the createexe flag if it's not been set by now - - : ${CREATEEXE='-o'} # Set the directory seperator for this architecture - -: ${DIRSEP="/"} +: ${DIRSEP='/'} # Set the option seperator for this architecture. Hopefully it is the same for all compilers. - : ${OPTIONSEP='$(EMPTY_VAR) # a single space'} # How to name libraries for this system @@ -5067,91 +4990,58 @@ fi # How to link the cactus libraries - : ${CACTUSLIBLINKLINE='-L$(CCTK_LIBDIR) $(addprefix -l, $(ALLCACTUSLIBS))'} -# How to generate C dependency info - +# How to generate dependency info : ${C_DEPEND='$(CC) -E -M $(CPPFLAGS)'} - - : ${C_DEPEND_OUT=' > $@'} -# How to generate C++ dependency info - : ${CXX_DEPEND='$(CXX) -E -M $(CPPFLAGS)'} - - : ${CXX_DEPEND_OUT=' > $@'} -# How to generate F77 dependency info - : ${F77_DEPEND='$(FPP) -M $(FPPFLAGS)'} - - : ${F77_DEPEND_OUT=' > $@'} -# How to generate F90 dependency info - : ${F_DEPEND='$(FPP) -M $(FPPFLAGS)'} - - : ${F_DEPEND_OUT=' > $@'} # How to generate F90 dependency info for modules - : ${F_DEPEND_MODULES='$(CCTK_HOME)/lib/sbin/f_depend_modules.pl'} - - : ${F_DEPEND_MODULES_OUT=' >> $@'} # Postprocessing of object files. Most architectures don't need to do this at all. +: ${C_POSTPROCESSING=''} +: ${CXX_POSTPROCESSING=''} -: ${C_POSTPROCESSING=""} +: ${F77_POSTPROCESSING=''} +: ${F_POSTPROCESSING=''} - -: ${CXX_POSTPROCESSING=""} - - - -: ${F77_POSTPROCESSING=""} - - - -: ${F_POSTPROCESSING=""} - - - -: ${F90_POSTPROCESSING=""} +: ${F90_POSTPROCESSING=''} # How to generate an intermediate C++ name (some compilers are very picky). - - : ${CXX_WORKING_NAME='$(notdir $<)'} # What is the suffix for freeformat f90 names (some compilers are very picky). - - : ${F90_SUFFIX='f90'} # How to get the current working directory when in the shell -: ${GET_WD="pwd"} +: ${GET_WD='pwd'} # Way for Make to transofrm things like include directories # into a form suitable for the compiler. @@ -5160,7 +5050,7 @@ fi # Any additional system include directories. -: ${SYS_INC_DIRS=" "} +: ${SYS_INC_DIRS=' '} # How to link in the non-Cactus libraries @@ -5169,14 +5059,11 @@ fi # Do we need to make sure Perl makes a backup when editting in place ? - -: ${PERL_BACKUP_NECESSARY=""} +: ${PERL_BACKUP_NECESSARY=''} # Cache stuff - this will probably change - -: ${CACHELINE_BYTES="0"} -: ${CACHE_SIZE="0"} - +: ${CACHELINE_BYTES='0'} +: ${CACHE_SIZE='0'} cat >> confdefs.h <<EOF #define CCTK_CACHELINE_BYTES $CACHELINE_BYTES EOF @@ -5186,41 +5073,30 @@ cat >> confdefs.h <<EOF EOF -# DEPRECATED IN BETA 13 -cat >> confdefs.h <<EOF -#define CCTK_L2_CACHELINE_BYTES $CACHELINE_BYTES -EOF - -cat >> confdefs.h <<EOF -#define CCTK_L2_CACHE_SIZE $CACHE_SIZE -EOF - - - ######################################################################### #Check for extra stuff ######################################################################### CCTK_CreateFile cctk_Extradefs.h '/* Stuff from extra packages */' -CCTK_WriteLine cctk_Extradefs.h "#ifndef _CCTK_EXTRADEFS_H_" -CCTK_WriteLine cctk_Extradefs.h "#define _CCTK_EXTRADEFS_H_" +CCTK_WriteLine cctk_Extradefs.h '#ifndef _CCTK_EXTRADEFS_H_' +CCTK_WriteLine cctk_Extradefs.h '#define _CCTK_EXTRADEFS_H_' -CCTK_CreateFile make.extra.defn "# Stuff from extra packages " +CCTK_CreateFile make.extra.defn '# Stuff from extra packages ' for extra in `ls $srcdir/extras` do if test -d $srcdir/extras/$extra ; then if test -x $srcdir/extras/$extra/setup.sh ; then # Put some comment lines in the files. - CCTK_WriteLine cctk_Extradefs.h "" - CCTK_WriteLine cctk_Extradefs.h "/*$extra definitions*/" - CCTK_WriteLine make.extra.defn "" - CCTK_WriteLine make.extra.defn "# $extra definitions" + CCTK_WriteLine cctk_Extradefs.h '' + CCTK_WriteLine cctk_Extradefs.h '/* $extra definitions */' + CCTK_WriteLine make.extra.defn '' + CCTK_WriteLine make.extra.defn "# start of $extra definitions" # Call the setup script . $srcdir/extras/$extra/setup.sh # Put some more comments in - CCTK_WriteLine make.extra.defn "#End of $extra definitions" - CCTK_WriteLine make.extra.defn "" + CCTK_WriteLine make.extra.defn "# end of $extra definitions" + CCTK_WriteLine make.extra.defn '' fi fi done @@ -5234,11 +5110,11 @@ CCTK_WriteLine cctk_Extradefs.h '#endif /*_CCTK_EXTRADEFS_H*/' # Set default Fortran compilers if test -z "$F90" ; then - F90="none" + F90='none' fi if test -z "$F77" ; then - F77="none" + F77='none' fi CCTK_FinishFiles diff --git a/lib/make/configure.in b/lib/make/configure.in index 7663a96a..dfda8959 100644 --- a/lib/make/configure.in +++ b/lib/make/configure.in @@ -28,7 +28,7 @@ if test -n "$WARN" ; then changequote({, }) WARN=`echo $WARN | tr '[:upper:]' '[:lower:]'` changequote([, ]) - if test "$WARN" != "yes" -a "$WARN" != "no" ; then + if test "$WARN" != 'yes' -a "$WARN" != 'no' ; then AC_ERROR(Didn't recognize setting of WARN=\"$WARN\" (should be either \"yes\" or \"no\")) fi WARN_MODE=$WARN @@ -64,20 +64,20 @@ AC_CANONICAL_HOST # See if there are any preferred compilers for this system -CCTK_CONFIG_STAGE="preferred-compilers" +CCTK_CONFIG_STAGE='preferred-compilers' if test -r $srcdir/known-architectures/$host_os ; then -. $srcdir/known-architectures/$host_os + . $srcdir/known-architectures/$host_os else - echo "Warning: " - echo " Cactus has not been previously compiled for this architecture: " + echo 'Warning: ' + echo ' Cactus has not been previously compiled for this architecture:' echo " ($host_os)" - echo " The currently known architectures can be found in " + echo ' The currently known architectures can be found in' echo " $srcdir/known-architectures" - echo " The configuration will try to do its best to work things out." - echo " If you create a known-architectures file for this architecture, " - echo " please send it to cactusmaint@cactuscode.org and we'll include " - echo " it in the next release." + echo ' The configuration will try to do its best to work things out.' + echo ' If you create a known-architectures file for this architecture,' + echo " please send it to cactusmaint@cactuscode.org and we'll include" + echo ' it in the next release.' fi # Save these for future use. @@ -96,13 +96,13 @@ dnl Checks for programs. AC_PROG_MAKE_SET if test -z "$CC" ; then -AC_CHECK_PROGS(CC, gcc cc cl xlc) + AC_CHECK_PROGS(CC, gcc cc cl xlc) fi CCTK_PROG_CC_WORKS AC_PROG_CC_GNU -if test "x$CXX" != "xnone" ; then +if test "x$CXX" != 'xnone' ; then if test -z "$CXX" ; then AC_CHECK_PROGS(CXX, c++ g++ gcc CC cxx cc++ cl xlC) fi @@ -154,7 +154,7 @@ fi AC_SUBST(LD) if test -z "$LD" ; then - if test "x$CXX" != "xnone" ; then + if test "x$CXX" != 'xnone' ; then LD=$CXX else LD=$CC @@ -191,12 +191,12 @@ AC_DEFINE_UNQUOTED(CCTK_BUILD_VENDOR, "$host_vendor") # Create a file to put any #defines etc needed for this architecture # known architecture stuff should use CCTK_WriteLine cctk_Archdefs "foo" to append to this file. CCTK_CreateFile cctk_Archdefs.h '/* Stuff from known architectures */' -CCTK_WriteLine cctk_Archdefs.h "#ifndef _CCTK_ARCHDEFS_H_" -CCTK_WriteLine cctk_Archdefs.h "#define _CCTK_ARCHDEFS_H_" +CCTK_WriteLine cctk_Archdefs.h '#ifndef _CCTK_ARCHDEFS_H_' +CCTK_WriteLine cctk_Archdefs.h '#define _CCTK_ARCHDEFS_H_' -CCTK_CreateFile make.arch.defn "# Stuff from known architectures " +CCTK_CreateFile make.arch.defn '# Stuff from known architectures ' -CCTK_CONFIG_STAGE="misc" +CCTK_CONFIG_STAGE='misc' if test -r $srcdir/known-architectures/$host_os ; then . $srcdir/known-architectures/$host_os @@ -210,7 +210,7 @@ CCTK_WriteLine cctk_Archdefs.h '#endif /* _CCTK_ARCHDEFS_H_ */' # Deal with the Fortran compiler issues. # If there's a Fortran 90 compiler use that for all the Fortran. -if test "x$F90" != "x" -a "x$F90" != "xnone" -a "x$F77" != "xnone" ; then +if test "x$F90" != 'x' -a "x$F90" != 'xnone' -a "x$F77" != 'xnone' ; then F77=$F90 : {F77FLAGS=$F90FLAGS} fi @@ -225,11 +225,11 @@ unset LIBS KNOWN_LDFLAGS="$LDFLAGS" unset LDFLAGS -: ${LIBDIR_PREFIX="-L"} -: ${LIBDIR_SUFFIX=""} +: ${LIBDIR_PREFIX='-L'} +: ${LIBDIR_SUFFIX=''} -: ${LIBLINK_PREFIX="-l"} -: ${LIBLINK_SUFFIX=""} +: ${LIBLINK_PREFIX='-l'} +: ${LIBLINK_SUFFIX=''} dnl Checks for libraries. @@ -239,11 +239,11 @@ AC_HEADER_STDC dnl Checks for typedefs, structures, and compiler characteristics. -if test "x$cross_compiling" = "xno" ; then +if test "x$cross_compiling" = 'xno' ; then AC_C_BIGENDIAN else if test -n "$ENDIAN" ; then - if test "$ENDIAN" = "big" ; then + if test "$ENDIAN" = 'big' ; then AC_DEFINE(WORDS_BIGENDIAN) fi else @@ -253,25 +253,25 @@ fi # Check for sizes of integer types -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_LONG_LONG" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_LONG_LONG" ; then AC_MSG_ERROR(Cross-compiling - no value set for sizeof(long long) please set SIZEOF_LONG_LONG) fi AC_CHECK_SIZEOF(long long, $SIZEOF_LONG_LONG) -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_LONG_INT" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_LONG_INT" ; then AC_MSG_ERROR(Cross-compiling - no value set for sizeof(long int) please set SIZEOF_LONG_INT) fi AC_CHECK_SIZEOF(long int, $SIZEOF_LONG_INT) -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_INT" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_INT" ; then AC_MSG_ERROR(Cross-compiling - no value set for sizeof(int) please set SIZEOF_INT) fi AC_CHECK_SIZEOF(int, $SIZEOF_INT) -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_SHORT_INT" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_SHORT_INT" ; then AC_MSG_ERROR(Cross-compiling - no value set for sizeof(short int) please set SIZEOF_SHORT_INT) fi @@ -279,20 +279,20 @@ AC_CHECK_SIZEOF(short int, $SIZEOF_SHORT_INT) # Check for sizes of floating point types -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_LONG_DOUBLE" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_LONG_DOUBLE" ; then AC_MSG_ERROR(Cross-compiling - no value set for sizeof(long double) please set SIZEOF_LONG_DOUBLE) fi AC_CHECK_SIZEOF(long double, $SIZEOF_LONG_DOUBLE) -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_DOUBLE" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_DOUBLE" ; then AC_MSG_ERROR(Cross-compiling - no value set for sizeof(double) please set SIZEOF_DOUBLE) fi AC_CHECK_SIZEOF(double, $SIZEOF_DOUBLE) -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_FLOAT" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_FLOAT" ; then AC_MSG_ERROR(Cross-compiling - no value set for sizeof(float) please set SIZEOF_FLOAT) fi @@ -300,7 +300,7 @@ AC_CHECK_SIZEOF(float, $SIZEOF_FLOAT) # Check for sizes of pointers. -if test "x$cross_compiling" = "xyes" -a -z "$SIZEOF_POINTER" ; then +if test "x$cross_compiling" = 'xyes' -a -z "$SIZEOF_POINTER" ; then AC_MSG_ERROR(Cross-compiling - no value set for sizeof(char *) please set SIZEOF_POINTER) fi @@ -308,11 +308,11 @@ AC_CHECK_SIZEOF(char *, $SIZEOF_POINTER) # See if there's a null device, and what it's called -if test "x$cross_compiling" = "xyes"; then +if test "x$cross_compiling" = 'xyes'; then if test -z "$NULL_DEVICE" ; then AC_MSG_WARN(Cross-compiling - no value set for location of null device please set NULL_DEVICE) AC_MSG_WARN(Defaulting to /dev/null) - NULL_DEVICE="/dev/null" + NULL_DEVICE='/dev/null' fi eval "cctk_cv_nulldevice=$NULL_DEVICE" AC_DEFINE_UNQUOTED(NULL_DEVICE, "$cctk_cv_nulldevice") @@ -371,7 +371,7 @@ AC_CACHE_VAL(cctk_cv_have_mode_t, [mode_t foo; return 0], eval "cctk_cv_have_mode_t=yes", eval "cctk_cv_have_mode_t=no") ]) -if test "$cctk_cv_have_mode_t" = "yes"; then +if test "$cctk_cv_have_mode_t" = 'yes'; then AC_DEFINE(HAVE_MODE_T) AC_MSG_RESULT(yes) else @@ -445,7 +445,7 @@ AC_CACHE_VAL(cctk_cv_have_socklen_t, [socklen_t foo; return 0], eval "cctk_cv_have_socklen_t=yes", eval "cctk_cv_have_socklen_t=no") ]) -if test "$cctk_cv_have_socklen_t" = "yes"; then +if test "$cctk_cv_have_socklen_t" = 'yes'; then AC_DEFINE(HAVE_SOCKLEN_T) AC_MSG_RESULT(yes) else @@ -472,7 +472,7 @@ AC_CACHE_VAL(cctk_cv_have_SOCKET, [SOCKET foo; return 0], eval "cctk_cv_have_SOCKET=yes", eval "cctk_cv_have_SOCKET=no") ]) -if test "$cctk_cv_have_SOCKET" = "yes"; then +if test "$cctk_cv_have_SOCKET" = 'yes'; then AC_DEFINE(HAVE_SOCKET_TYPE) AC_MSG_RESULT(yes) else @@ -486,8 +486,8 @@ AC_CACHE_VAL(cctk_cv_have___int64, [__int64 foo; return 0], eval "cctk_cv_have___int64=yes", eval "cctk_cv_have___int64=no") ]) -if test "$cctk_cv_have___int64" = "yes"; then - CCTK_INT8="__int64" +if test "$cctk_cv_have___int64" = 'yes'; then + CCTK_INT8='__int64' AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -495,7 +495,7 @@ fi # C++ STL stuff -if test "x$CXX" != "xnone" ; then +if test "x$CXX" != 'xnone' ; then AC_LANG_SAVE AC_LANG_CPLUSPLUS CCTK_CHECK_HEADERS(vector vector.h) @@ -515,7 +515,7 @@ CCTK_CHECK_FUNCS(getopt_long_only) AC_SUBST(BUILD_GETOPT) -if test "x$cctk_cv_header_getopt_h" = "xyes" -a "x$ac_cv_func_getopt_long_only" = "xyes"; then +if test "x$cctk_cv_header_getopt_h" = 'xyes' -a "x$ac_cv_func_getopt_long_only" = 'xyes'; then BUILD_GETOPT=no else BUILD_GETOPT=yes @@ -523,7 +523,7 @@ fi AC_SUBST(BUILD_REGEX) -if test "x$cctk_cv_header_regex_h" = "xyes" ; then +if test "x$cctk_cv_header_regex_h" = 'xyes' ; then BUILD_REGEX=no else BUILD_REGEX=yes @@ -551,7 +551,7 @@ dnl Do we have mkstemp(3) CCTK_CHECK_FUNCS(mkstemp, , CCTK_CHECK_LIB_FUNC(c, mkstemp)) dnl Checks for availability of pthreads library. -if test "X$PTHREADS" = "Xyes"; then +if test "X$PTHREADS" = 'Xyes'; then PTHREAD_LIBS= CCTK_CHECK_LIB(c_r, main,[PTHREAD_LIBS="c_r" LIBS="$LIBS c_r"],,) CCTK_CHECK_LIB(pthread, @@ -582,42 +582,42 @@ AC_SUBST(EXE) # Integer types case "x$ac_cv_sizeof_long_long" in - "x8") - CCTK_INT8="long long" ;; - "x4") - CCTK_INT4="long long" ;; - "x2") - CCTK_INT2="long long" ;; + 'x8') + CCTK_INT8='long long' ;; + 'x4') + CCTK_INT4='long long' ;; + 'x2') + CCTK_INT2='long long' ;; esac case "x$ac_cv_sizeof_long_int" in - "x8") - CCTK_INT8="long int" ;; - "x4") - CCTK_INT4="long int" ;; - "x2") - CCTK_INT2="long int" ;; + 'x8') + CCTK_INT8='long int' ;; + 'x4') + CCTK_INT4='long int' ;; + 'x2') + CCTK_INT2='long int' ;; esac case "x$ac_cv_sizeof_int" in - "x8") - CCTK_INT8="int" ;; - "x4") - CCTK_INT4="int" ;; - "x2") - CCTK_INT2="int" ;; + 'x8') + CCTK_INT8='int' ;; + 'x4') + CCTK_INT4='int' ;; + 'x2') + CCTK_INT2='int' ;; esac case "x$ac_cv_sizeof_short_int" in - "x8") - CCTK_INT8="short int" ;; - "x4") - CCTK_INT4="short int" ;; - "x2") - CCTK_INT2="short int" ;; + 'x8') + CCTK_INT8='short int' ;; + 'x4') + CCTK_INT4='short int' ;; + 'x2') + CCTK_INT2='short int' ;; esac -CCTK_INT1="signed char" +CCTK_INT1='signed char' if test -n "$CCTK_INT8" ; then AC_DEFINE_UNQUOTED(CCTK_INT8, $CCTK_INT8) @@ -642,30 +642,30 @@ fi # Float types case "x$ac_cv_sizeof_long_double" in - "x16") - CCTK_REAL16="long double" ;; - "x8") - CCTK_REAL8="long double" ;; - "x4") - CCTK_REAL4="long double" ;; + 'x16') + CCTK_REAL16='long double' ;; + 'x8') + CCTK_REAL8='long double' ;; + 'x4') + CCTK_REAL4='long double' ;; esac case "x$ac_cv_sizeof_double" in - "x16") - CCTK_REAL16="double" ;; - "x8") - CCTK_REAL8="double" ;; - "x4") - CCTK_REAL4="double" ;; + 'x16') + CCTK_REAL16='double' ;; + 'x8') + CCTK_REAL8='double' ;; + 'x4') + CCTK_REAL4='double' ;; esac case "x$ac_cv_sizeof_float" in - "x16") - CCTK_REAL16="float" ;; - "x8") - CCTK_REAL8="float" ;; - "x4") - CCTK_REAL4="float" ;; + 'x16') + CCTK_REAL16='float' ;; + 'x8') + CCTK_REAL8='float' ;; + 'x4') + CCTK_REAL4='float' ;; esac if test -n "$CCTK_REAL16" ; then @@ -686,22 +686,22 @@ fi # Define the default floating point and integer precisions case "x$REAL_PRECISION" in - "x16") + 'x16') AC_DEFINE(CCTK_REAL_PRECISION_16) ;; - "x8") + 'x8') AC_DEFINE(CCTK_REAL_PRECISION_8) ;; - "x4") + 'x4') AC_DEFINE(CCTK_REAL_PRECISION_4) ;; *) AC_DEFINE(CCTK_REAL_PRECISION_8) ;; esac case "x$INTEGER_PRECISION" in - "x8") + 'x8') AC_DEFINE(CCTK_INTEGER_PRECISION_8) ;; - "x4") + 'x4') AC_DEFINE(CCTK_INTEGER_PRECISION_4) ;; - "x2") + 'x2') AC_DEFINE(CCTK_INTEGER_PRECISION_2) ;; *) AC_DEFINE(CCTK_INTEGER_PRECISION_4) ;; @@ -709,9 +709,7 @@ esac # Define any code needed before the definition of a Fortran subroutine # This is empty on most architectures. - -: ${CCTK_FCALL=""} - +: ${CCTK_FCALL=''} AC_DEFINE_UNQUOTED(CCTK_FCALL, $CCTK_FCALL) @@ -742,28 +740,21 @@ fi AC_DEFINE_UNQUOTED(C_LINE_DIRECTIVES, "$C_LINE_DIRECTIVES") AC_DEFINE_UNQUOTED(F_LINE_DIRECTIVES, "$F_LINE_DIRECTIVES") - AC_SUBST(C_LINE_DIRECTIVES) AC_SUBST(F_LINE_DIRECTIVES) # Define how to make a directory in the config.h file - AC_DEFINE_UNQUOTED(MKDIR, "$MKDIR") - AC_SUBST(MKDIRFLAGS) - -: ${MKDIRFLAGS="-p"} - +: ${MKDIRFLAGS='-p'} AC_DEFINE_UNQUOTED(MKDIRFLAGS, " $MKDIRFLAGS ") # The perl scripts run by the make system need to have their names # changed if under cygwin - e.g. //d/foo needs to be d:/foo - PERL_CONFIGURE_SCRIPT="$srcdir/configure.pl" - -if test "$host_os" = "cygwin" ; then +if test "$host_os" = 'cygwin' ; then PERL_CONFIGURE_SCRIPT=`echo $PERL_CONFIGURE_SCRIPT | sed 's,^/cygdrive/\(.\)/,\1:/,' | sed 's,^//\(.\)/,\1:/,'` fi @@ -784,21 +775,15 @@ LIBS="$LIBS $KNOWN_LIBS" LDFLAGS="$LDFLAGS $KNOWN_LDFLAGS" #Set the compileonly flags if they've not been set by now - AC_SUBST(CCOMPILEONLY) AC_SUBST(FCOMPILEONLY) +: ${CCOMPILEONLY='-c -o'} +: ${FCOMPILEONLY='-c -o'} -: ${CCOMPILEONLY="-c -o"} -: ${FCOMPILEONLY="-c -o"} - -# Set the debug flags if they've not been set by now - -# Define the type of debugging to use ####################################################################### # determine DEBUG_MODE from the DEBUG option # if this option isn't set DEBUG_MODE will default to 'no' - if test -n "$DEBUG" ; then changequote({, }) DEBUG=`echo $DEBUG | tr '[:upper:]' '[:lower:]'` @@ -828,147 +813,85 @@ if test -n "$DEBUG" -a "$DEBUG" != 'no' ; then fi AC_SUBST(DEBUG_MODE) - DEBUG_MODE='no' if test -n "$DEBUG_FLAGS"; then DEBUG_MODE=$DEBUG_FLAGS fi +# Set the debug flags if they've not been set by now +# (using '-g' as a reasonable default) AC_SUBST(C_DEBUG_FLAGS) - -if test -z "$C_DEBUG_FLAGS" ; then -# This should be a reasonable default. - C_DEBUG_FLAGS='-g' -fi +: ${C_DEBUG_FLAGS='-g'} AC_SUBST(CXX_DEBUG_FLAGS) - -if test -z "$CXX_DEBUG_FLAGS" ; then -# This should be a reasonable default. - CXX_DEBUG_FLAGS='-g' -fi +: ${CXX_DEBUG_FLAGS='-g'} AC_SUBST(F77_DEBUG_FLAGS) - -if test -z "$F77_DEBUG_FLAGS" ; then -# This should be a reasonable default. - F77_DEBUG_FLAGS='-g' -fi +: ${F77_DEBUG_FLAGS='-g'} AC_SUBST(F90_DEBUG_FLAGS) - -if test -z "$F90_DEBUG_FLAGS" ; then -# This should be a reasonable default. - F90_DEBUG_FLAGS='-g' -fi +: ${F90_DEBUG_FLAGS='-g'} # Set the warn flags AC_SUBST(WARN_MODE) # Set the optimization flags if they've not been set by now +# (using '-O2' as a reasonable default) AC_SUBST(OPTIMISE_MODE) AC_SUBST(C_OPTIMISE_FLAGS) - -if test -z "$C_OPTIMISE_FLAGS" ; then -# This should be a reasonable default. - C_OPTIMISE_FLAGS='-O2' -fi +: ${C_OPTIMISE_FLAGS='-O2'} AC_SUBST(CXX_OPTIMISE_FLAGS) - -if test -z "$CXX_OPTIMISE_FLAGS" ; then -# This should be a reasonable default. - CXX_OPTIMISE_FLAGS='-O2' -fi +: ${CXX_OPTIMISE_FLAGS='-O2'} AC_SUBST(F77_OPTIMISE_FLAGS) - -if test -z "$F77_OPTIMISE_FLAGS" ; then - case "$F77" in - g77) - F77_OPTIMISE_FLAGS='-O2' - ;; - *) -# Don't know a reasonable default. - F77_OPTIMISE_FLAGS='' - ;; - esac +if test -z "$F77_OPTIMISE_FLAGS" -a "$F77" = 'g77' ; then + F77_OPTIMISE_FLAGS='-O2' +else + : ${F77_OPTIMISE_FLAGS=''} fi AC_SUBST(F90_OPTIMISE_FLAGS) - -if test -z "$F90_OPTIMISE_FLAGS" ; then -# Don't know a reasonable default. - F90_OPTIMISE_FLAGS='' -fi +: ${F90_OPTIMISE_FLAGS=''} # Set the warning flags if they've not been set by now - +# (using GNU compiler warning flags as a reasonable default) AC_SUBST(C_WARN_FLAGS) - -if test -z "$C_WARN_FLAGS" ; then - case "$CC" in - gcc) - C_WARN_FLAGS='-Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline' - ;; - *) -# Not sure what should be a reasonable default. - C_WARN_FLAGS='' - ;; - esac +if test -z "$C_WARN_FLAGS" -a "$CC" = 'gcc' ; then + C_WARN_FLAGS='-Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline' +else + : ${C_WARN_FLAGS=''} fi AC_SUBST(CXX_WARN_FLAGS) - -if test -z "$CXX_WARN_FLAGS" ; then - case "$CXX" in - c++ | g++) - CXX_WARN_FLAGS='-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Winline -Woverloaded-virtual' - ;; - *) -# Not sure what should be a reasonable default. - CXX_WARN_FLAGS='' - ;; - esac +if test -z "$CXX_WARN_FLAGS" -a \( "$CXX" = 'c++' -o "$CXX" = 'g++' \) ; then + CXX_WARN_FLAGS='-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Winline -Woverloaded-virtual' +else + : ${CXX_WARN_FLAGS=''} fi AC_SUBST(F77_WARN_FLAGS) - -if test -z "$F77_WARN_FLAGS" ; then - case "$F77" in - g77) - F77_WARN_FLAGS='-Wall' - ;; - *) -# Not sure what should be a reasonable default. - F77_WARN_FLAGS='' - ;; - esac +if test -z "$F77_WARN_FLAGS" -a "$F77" = 'g77' ; then + F77_WARN_FLAGS='-Wall' +else + : ${F77_WARN_FLAGS=''} fi AC_SUBST(F90_WARN_FLAGS) - -if test -z "$F90_WARN_FLAGS" ; then -# Not sure what should be a reasonable default. - F90_WARN_FLAGS='' -fi +: ${F90_WARN_FLAGS=''} # Set the createexe flag if it's not been set by now - AC_SUBST(CREATEEXE) - : ${CREATEEXE='-o'} # Set the directory seperator for this architecture AC_SUBST(DIRSEP) - -: ${DIRSEP="/"} +: ${DIRSEP='/'} # Set the option seperator for this architecture. Hopefully it is the same for all compilers. AC_SUBST(OPTIONSEP) - : ${OPTIONSEP='$(EMPTY_VAR) # a single space'} # How to name libraries for this system @@ -979,91 +902,58 @@ AC_SUBST(LIBNAME_SUFFIX) # How to link the cactus libraries AC_SUBST(CACTUSLIBLINKLINE) - : ${CACTUSLIBLINKLINE='-L$(CCTK_LIBDIR) $(addprefix -l, $(ALLCACTUSLIBS))'} -# How to generate C dependency info +# How to generate dependency info AC_SUBST(C_DEPEND) - : ${C_DEPEND='$(CC) -E -M $(CPPFLAGS)'} - AC_SUBST(C_DEPEND_OUT) - : ${C_DEPEND_OUT=' > $@'} -# How to generate C++ dependency info AC_SUBST(CXX_DEPEND) - : ${CXX_DEPEND='$(CXX) -E -M $(CPPFLAGS)'} - AC_SUBST(CXX_DEPEND_OUT) - : ${CXX_DEPEND_OUT=' > $@'} -# How to generate F77 dependency info AC_SUBST(F77_DEPEND) - : ${F77_DEPEND='$(FPP) -M $(FPPFLAGS)'} - AC_SUBST(F77_DEPEND_OUT) - : ${F77_DEPEND_OUT=' > $@'} -# How to generate F90 dependency info AC_SUBST(F_DEPEND) - : ${F_DEPEND='$(FPP) -M $(FPPFLAGS)'} - AC_SUBST(F_DEPEND_OUT) - : ${F_DEPEND_OUT=' > $@'} # How to generate F90 dependency info for modules AC_SUBST(F_DEPEND_MODULES) - : ${F_DEPEND_MODULES='$(CCTK_HOME)/lib/sbin/f_depend_modules.pl'} - AC_SUBST(F_DEPEND_MODULES_OUT) - : ${F_DEPEND_MODULES_OUT=' >> $@'} # Postprocessing of object files. Most architectures don't need to do this at all. - AC_SUBST(C_POSTPROCESSING) - -: ${C_POSTPROCESSING=""} - +: ${C_POSTPROCESSING=''} AC_SUBST(CXX_POSTPROCESSING) - -: ${CXX_POSTPROCESSING=""} - +: ${CXX_POSTPROCESSING=''} AC_SUBST(F77_POSTPROCESSING) - -: ${F77_POSTPROCESSING=""} - +: ${F77_POSTPROCESSING=''} AC_SUBST(F_POSTPROCESSING) - -: ${F_POSTPROCESSING=""} - +: ${F_POSTPROCESSING=''} AC_SUBST(F90_POSTPROCESSING) - -: ${F90_POSTPROCESSING=""} +: ${F90_POSTPROCESSING=''} # How to generate an intermediate C++ name (some compilers are very picky). - AC_SUBST(CXX_WORKING_NAME) - : ${CXX_WORKING_NAME='$(notdir $<)'} # What is the suffix for freeformat f90 names (some compilers are very picky). - AC_SUBST(F90_SUFFIX) - : ${F90_SUFFIX='f90'} # How to get the current working directory when in the shell AC_SUBST(GET_WD) -: ${GET_WD="pwd"} +: ${GET_WD='pwd'} # Way for Make to transofrm things like include directories # into a form suitable for the compiler. @@ -1072,7 +962,7 @@ AC_SUBST(TRANSFORM_DIRS) # Any additional system include directories. AC_SUBST(SYS_INC_DIRS) -: ${SYS_INC_DIRS=" "} +: ${SYS_INC_DIRS=' '} # How to link in the non-Cactus libraries AC_SUBST(GENERAL_LIBRARIES) @@ -1081,46 +971,38 @@ AC_SUBST(GENERAL_LIBRARIES) # Do we need to make sure Perl makes a backup when editting in place ? AC_SUBST(PERL_BACKUP_NECESSARY) - -: ${PERL_BACKUP_NECESSARY=""} +: ${PERL_BACKUP_NECESSARY=''} # Cache stuff - this will probably change - -: ${CACHELINE_BYTES="0"} -: ${CACHE_SIZE="0"} - +: ${CACHELINE_BYTES='0'} +: ${CACHE_SIZE='0'} AC_DEFINE_UNQUOTED(CCTK_CACHELINE_BYTES, $CACHELINE_BYTES) AC_DEFINE_UNQUOTED(CCTK_CACHE_SIZE, $CACHE_SIZE) -# DEPRECATED IN BETA 13 -AC_DEFINE_UNQUOTED(CCTK_L2_CACHELINE_BYTES, $CACHELINE_BYTES) -AC_DEFINE_UNQUOTED(CCTK_L2_CACHE_SIZE, $CACHE_SIZE) - - ######################################################################### #Check for extra stuff ######################################################################### CCTK_CreateFile cctk_Extradefs.h '/* Stuff from extra packages */' -CCTK_WriteLine cctk_Extradefs.h "#ifndef _CCTK_EXTRADEFS_H_" -CCTK_WriteLine cctk_Extradefs.h "#define _CCTK_EXTRADEFS_H_" +CCTK_WriteLine cctk_Extradefs.h '#ifndef _CCTK_EXTRADEFS_H_' +CCTK_WriteLine cctk_Extradefs.h '#define _CCTK_EXTRADEFS_H_' -CCTK_CreateFile make.extra.defn "# Stuff from extra packages " +CCTK_CreateFile make.extra.defn '# Stuff from extra packages ' for extra in `ls $srcdir/extras` do if test -d $srcdir/extras/$extra ; then if test -x $srcdir/extras/$extra/setup.sh ; then # Put some comment lines in the files. - CCTK_WriteLine cctk_Extradefs.h "" - CCTK_WriteLine cctk_Extradefs.h "/*$extra definitions*/" - CCTK_WriteLine make.extra.defn "" - CCTK_WriteLine make.extra.defn "# $extra definitions" + CCTK_WriteLine cctk_Extradefs.h '' + CCTK_WriteLine cctk_Extradefs.h '/* $extra definitions */' + CCTK_WriteLine make.extra.defn '' + CCTK_WriteLine make.extra.defn "# start of $extra definitions" # Call the setup script . $srcdir/extras/$extra/setup.sh # Put some more comments in - CCTK_WriteLine make.extra.defn "#End of $extra definitions" - CCTK_WriteLine make.extra.defn "" + CCTK_WriteLine make.extra.defn "# end of $extra definitions" + CCTK_WriteLine make.extra.defn '' fi fi done @@ -1135,11 +1017,11 @@ AC_OUTPUT_COMMANDS(,$PERL -s $PERL_CONFIGURE_SCRIPT -compiler_f77="$F77" -opts_f # Set default Fortran compilers AC_SUBST(F90) if test -z "$F90" ; then - F90="none" + F90='none' fi AC_SUBST(F77) if test -z "$F77" ; then - F77="none" + F77='none' fi dnl Output everything |