summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-12-17 18:21:55 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-12-17 18:21:55 +0000
commit1de948e828be6804da203cdea6c3f2114760fa7d (patch)
tree4200d5c1b3231ff897a0623b6c58b6c58c309503
parentb212fc753533a0ff2bcf325be67fd68cddf07ed1 (diff)
Turn "WARN={yes|no}" into a configuration option also (still changeable at
compile time). git-svn-id: http://svn.cactuscode.org/flesh/trunk@3477 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rwxr-xr-xlib/make/configure61
-rw-r--r--lib/make/configure.in12
-rw-r--r--lib/make/make.config.defn.in126
3 files changed, 106 insertions, 93 deletions
diff --git a/lib/make/configure b/lib/make/configure
index 2c95feca..05d351ae 100755
--- a/lib/make/configure
+++ b/lib/make/configure
@@ -1584,12 +1584,12 @@ else
#line 1585 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+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:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1628,12 +1628,12 @@ else
#line 1629 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+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:1640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1672,12 +1672,12 @@ else
#line 1673 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+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:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1716,12 +1716,12 @@ else
#line 1717 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+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:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1762,12 +1762,12 @@ else
#line 1763 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+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:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1806,12 +1806,12 @@ else
#line 1807 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+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:1818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1851,12 +1851,12 @@ else
#line 1852 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+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:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -1897,12 +1897,12 @@ else
#line 1898 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main()
+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:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
@@ -4682,6 +4682,18 @@ if test -z "$F90_DEBUG_FLAGS" ; then
F90_DEBUG_FLAGS="-g"
fi
+# Set the warn flags
+
+
+if test -n "$WARN" ; 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
+else
+ WARN_MODE='no'
+fi
+
# Set the optimization flags if they've not been set by now
@@ -5151,6 +5163,7 @@ s%@C_DEBUG_FLAGS@%$C_DEBUG_FLAGS%g
s%@CXX_DEBUG_FLAGS@%$CXX_DEBUG_FLAGS%g
s%@F77_DEBUG_FLAGS@%$F77_DEBUG_FLAGS%g
s%@F90_DEBUG_FLAGS@%$F90_DEBUG_FLAGS%g
+s%@WARN_MODE@%$WARN_MODE%g
s%@OPTIMISE_MODE@%$OPTIMISE_MODE%g
s%@C_OPTIMISE_FLAGS@%$C_OPTIMISE_FLAGS%g
s%@CXX_OPTIMISE_FLAGS@%$CXX_OPTIMISE_FLAGS%g
diff --git a/lib/make/configure.in b/lib/make/configure.in
index 78db70cb..a4204cca 100644
--- a/lib/make/configure.in
+++ b/lib/make/configure.in
@@ -770,6 +770,18 @@ if test -z "$F90_DEBUG_FLAGS" ; then
F90_DEBUG_FLAGS="-g"
fi
+# Set the warn flags
+AC_SUBST(WARN_MODE)
+
+if test -n "$WARN" ; 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
+else
+ WARN_MODE='no'
+fi
+
# Set the optimization flags if they've not been set by now
AC_SUBST(OPTIMISE_MODE)
diff --git a/lib/make/make.config.defn.in b/lib/make/make.config.defn.in
index 6955cdcf..ff0fb662 100644
--- a/lib/make/make.config.defn.in
+++ b/lib/make/make.config.defn.in
@@ -1,67 +1,62 @@
# /*@@
-# @file make.config.defn.in
-# @date Sun Jan 17 22:33:51 1999
-# @author Tom Goodale
-# @desc
-# Make definition file for a configuration
-# Defines the compilers, etc.
+# @file make.config.defn.in
+# @date Sun Jan 17 22:33:51 1999
+# @author Tom Goodale
+# @desc
+# Make definition file for a configuration
+# Defines the compilers, etc.
#
-# Should be run through autoconf to produce make.config.defn
-# @enddesc
-# @version $Id$
+# Should be run through autoconf to produce make.config.defn
+# @enddesc
+# @version $Header$
# @@*/
# Include stuff defined by optional extra arrangements
-
include $(TOP)/config-data/make.extra.defn
# Compiler/executable info
-
-SHELL = @SHELL@
-MKDIR = @MKDIR@
-CC = @CC@
-CXX = @CXX@
-F90 = @F90@
-F77 = @F77@
-CPP = @CPP@
-LD = @LD@
-AR = @AR@
-RANLIB = @RANLIB@
-PERL = @PERL@
-
-CFLAGS = @CFLAGS@
-CXXFLAGS = @CXXFLAGS@
-F90FLAGS = @F90FLAGS@
-F77FLAGS = @F77FLAGS@
-
-MKDIRFLAGS = @MKDIRFLAGS@
-
-LDFLAGS = @LDFLAGS@
-
-ARFLAGS = @ARFLAGS@
-RANLIBFLAGS = @RANLIBFLAGS@
+SHELL = @SHELL@
+MKDIR = @MKDIR@
+CC = @CC@
+CXX = @CXX@
+F90 = @F90@
+F77 = @F77@
+CPP = @CPP@
+LD = @LD@
+AR = @AR@
+RANLIB = @RANLIB@
+PERL = @PERL@
+
+CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
+F90FLAGS = @F90FLAGS@
+F77FLAGS = @F77FLAGS@
+
+MKDIRFLAGS = @MKDIRFLAGS@
+
+LDFLAGS = @LDFLAGS@
+
+ARFLAGS = @ARFLAGS@
+RANLIBFLAGS = @RANLIBFLAGS@
# Debug flags
-
-C_DEBUG_FLAGS = @C_DEBUG_FLAGS@
-CXX_DEBUG_FLAGS = @CXX_DEBUG_FLAGS@
-F90_DEBUG_FLAGS = @F90_DEBUG_FLAGS@
-F77_DEBUG_FLAGS = @F77_DEBUG_FLAGS@
+C_DEBUG_FLAGS = @C_DEBUG_FLAGS@
+CXX_DEBUG_FLAGS = @CXX_DEBUG_FLAGS@
+F90_DEBUG_FLAGS = @F90_DEBUG_FLAGS@
+F77_DEBUG_FLAGS = @F77_DEBUG_FLAGS@
# Optimisation flags
-
-C_OPTIMISE_FLAGS = @C_OPTIMISE_FLAGS@
-CXX_OPTIMISE_FLAGS = @CXX_OPTIMISE_FLAGS@
-F90_OPTIMISE_FLAGS = @F90_OPTIMISE_FLAGS@
-F77_OPTIMISE_FLAGS = @F77_OPTIMISE_FLAGS@
+C_OPTIMISE_FLAGS = @C_OPTIMISE_FLAGS@
+CXX_OPTIMISE_FLAGS = @CXX_OPTIMISE_FLAGS@
+F90_OPTIMISE_FLAGS = @F90_OPTIMISE_FLAGS@
+F77_OPTIMISE_FLAGS = @F77_OPTIMISE_FLAGS@
# Warning flags
-
-C_WARN_FLAGS = @C_WARN_FLAGS@
-CXX_WARN_FLAGS = @CXX_WARN_FLAGS@
-F90_WARN_FLAGS = @F90_WARN_FLAGS@
-F77_WARN_FLAGS = @F77_WARN_FLAGS@
+C_WARN_FLAGS = @C_WARN_FLAGS@
+CXX_WARN_FLAGS = @CXX_WARN_FLAGS@
+F90_WARN_FLAGS = @F90_WARN_FLAGS@
+F77_WARN_FLAGS = @F77_WARN_FLAGS@
# Most compilers use -c -o to compile only, some do something different
CCOMPILEONLY = @CCOMPILEONLY@
@@ -70,7 +65,7 @@ FCOMPILEONLY = @FCOMPILEONLY@
# Most compilers use -o for naming the executable, alas some don't
CREATEEXE = @CREATEEXE@
-# On Unix a /
+# On Unix a /
DIRSEP = @DIRSEP@
EMPTY_VAR = # Nothing. Leading space is removed.
@@ -79,12 +74,12 @@ EMPTY_VAR = # Nothing. Leading space is removed.
OPTIONSEP = @OPTIONSEP@
# Some architectures need to do something special for linking in libraries
+LIBNAME_PREFIX = @LIBNAME_PREFIX@# Make sure there is no space at end.
+LIBNAME_SUFFIX = @LIBNAME_SUFFIX@
-LIBNAME_PREFIX= @LIBNAME_PREFIX@# Make sure there is no space at end.
-LIBNAME_SUFFIX= @LIBNAME_SUFFIX@
-
-CACTUSLIBLINKLINE= @CACTUSLIBLINKLINE@
+CACTUSLIBLINKLINE = @CACTUSLIBLINKLINE@
+# Dependency file generation
C_DEPEND = @C_DEPEND@
CXX_DEPEND = @CXX_DEPEND@
F_DEPEND = @F_DEPEND@
@@ -96,11 +91,9 @@ F_DEPEND_OUT = @F_DEPEND_OUT@
F77_DEPEND_OUT = @F77_DEPEND_OUT@
# Some compilers are very picky about the names of C++ files
-
CXX_WORKING_NAME = @CXX_WORKING_NAME@
# Some compilers are very picky about the suffix for fortran files
-
F90_SUFFIX = @F90_SUFFIX@
# How to postprocess object files
@@ -111,18 +104,15 @@ F_POSTPROCESSING = @F_POSTPROCESSING@
F90_POSTPROCESSING = @F90_POSTPROCESSING@
# Do we need to use ranlib ?
-
USE_RANLIB = @USE_RANLIB@
# Exclude some files from the dependency lists
-
DEP_EXCLUDE_FILES = cctk_Functions\.h|CParameterStructNames\.h|cctk_Arguments\.h|definethisthorn\.h|FParameters.h|CParameters\.h
# Command used to get the working directory
GET_WD = @GET_WD@
# Library info
-
LIBS += @LIBS@
LIBDIRS += @LIBDIRS@
@@ -130,26 +120,21 @@ LIBDIRS += @LIBDIRS@
GENERAL_LIBRARIES = @GENERAL_LIBRARIES@
# System include directories
-
SYS_INC_DIRS += @SYS_INC_DIRS@
# Annoying stuff for some file systems.
-
PERL_BACKUP_NECESSARY = @PERL_BACKUP_NECESSARY@
# Stuff for the architecture
-
OS = @host_os@
CPU = @host_cpu@
VENDOR = @host_vendor@
# X stuff
-
X_LIB_DIR = @X_LIB_DIR@
X_INC_DIR = @X_INC_DIR@
# GNU stuff
-
BUILD_GETOPT = @BUILD_GETOPT@
BUILD_REGEX = @BUILD_REGEX@
@@ -158,7 +143,7 @@ PACKAGE_DIR = $(CCTK_HOME)/@PACKAGE_DIR@
BUILD_DIR = $(TOP)/@BUILD_DIR@
CCTK_LIBDIR = $(TOP)/@CCTK_LIBDIR@
-#The perl scripts run by the make system
+# The perl scripts run by the make system
BUILD_ACTIVETHORNS = @BUILD_ACTIVETHORNS@
CST = @CST@
@@ -173,7 +158,6 @@ EXE = @EXE@
# Is this a debug configuration ?
-
CCTK_DEBUG_MODE = @DEBUG_MODE@
ifeq ($(strip $(CCTK_DEBUG_MODE)),yes)
@@ -183,8 +167,7 @@ ifeq ($(strip $(CCTK_DEBUG_MODE)),yes)
F90FLAGS += $(F90_DEBUG_FLAGS)
endif
-# Is this a optimising configuration ?
-
+# Is this an optimising configuration ?
CCTK_OPTIMISE_MODE = @OPTIMISE_MODE@
ifeq ($(strip $(CCTK_OPTIMISE_MODE)),yes)
@@ -195,6 +178,12 @@ ifeq ($(strip $(CCTK_OPTIMISE_MODE)),yes)
endif
# Are we building with all warnings switched on ?
+# This option may be overwritten at compile time.
+ifeq ($(WARN),)
+ CCTK_WARN_MODE = @WARN_MODE@
+else
+ CCTK_WARN_MODE = $(WARN)
+endif
ifeq ($(strip $(CCTK_WARN_MODE)),yes)
CFLAGS += $(C_WARN_FLAGS)
@@ -204,5 +193,4 @@ ifeq ($(strip $(CCTK_WARN_MODE)),yes)
endif
# Stuff specific to an architecture.
-
include $(TOP)/config-data/make.arch.defn