summaryrefslogtreecommitdiff
path: root/lib/make/configure
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-01-19 14:50:51 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-01-19 14:50:51 +0000
commit1fd1c9e06006a4a96e97afca588dd73e02bdd314 (patch)
treeab011183c22c83cdaa962b29bf3a4cee076d0da5 /lib/make/configure
parent6b159579c63e41bcc1ed9e34b91efe753886060c (diff)
Make error messages and debug information point to the real source
file instead of the preprocessed file. The options C_LINE_DIRECTIVES and F_LINE_DIRECTIVES control this behaviour. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3527 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/configure')
-rwxr-xr-xlib/make/configure33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/make/configure b/lib/make/configure
index ec34fd30..8dfaa5af 100755
--- a/lib/make/configure
+++ b/lib/make/configure
@@ -4611,6 +4611,37 @@ EOF
+# Decide whether the preprocessed C and Fortran files should contain
+# C preprocessor line directives to point to the original source file
+
+cat >> confdefs.h <<EOF
+#define C_LINE_DIRECTIVES "$C_LINE_DIRECTIVES"
+EOF
+
+cat >> confdefs.h <<EOF
+#define F_LINE_DIRECTIVES "$F_LINE_DIRECTIVES"
+EOF
+
+
+
+
+
+if test -n "$C_LINE_DIRECTIVES" ; then
+ if test "$C_LINE_DIRECTIVES" != "yes" -a "$C_LINE_DIRECTIVES" != "no" ; then
+ { echo "configure: error: Didn't recognize setting of C_LINE_DIRECTIVES=\"$C_LINE_DIRECTIVES\" (should be either \"yes\" or \"no\")" 1>&2; exit 1; }
+ fi
+else
+ C_LINE_DIRECTIVES='yes'
+fi
+if test -n "$F_LINE_DIRECTIVES" ; then
+ if test "$F_LINE_DIRECTIVES" != "yes" -a "$F_LINE_DIRECTIVES" != "no" ; then
+ { echo "configure: error: Didn't recognize setting of F_LINE_DIRECTIVES=\"$F_LINE_DIRECTIVES\" (should be either \"yes\" or \"no\")" 1>&2; exit 1; }
+ fi
+else
+ F_LINE_DIRECTIVES='yes'
+fi
+
+
# Define how to make a directory in the config.h file
cat >> confdefs.h <<EOF
@@ -5216,6 +5247,8 @@ s%@BUILD_DIR@%$BUILD_DIR%g
s%@CCTK_LIBDIR@%$CCTK_LIBDIR%g
s%@EXEDIR@%$EXEDIR%g
s%@EXE@%$EXE%g
+s%@C_LINE_DIRECTIVES@%$C_LINE_DIRECTIVES%g
+s%@F_LINE_DIRECTIVES@%$F_LINE_DIRECTIVES%g
s%@MKDIRFLAGS@%$MKDIRFLAGS%g
s%@BUILD_ACTIVETHORNS@%$BUILD_ACTIVETHORNS%g
s%@CST@%$CST%g