summaryrefslogtreecommitdiff
path: root/configure1.in
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-07-13 05:08:26 +0000
committerRichard M. Stallman <rms@gnu.org>1994-07-13 05:08:26 +0000
commit02366d6b2d940e0bc777a1ee5d76c5eb22bbd2d9 (patch)
tree0208ef68080cc603a4c17aca4a2afa3578b10626 /configure1.in
parent745620536328bd27f8774a0770e471940d42af6d (diff)
downloademacs-02366d6b2d940e0bc777a1ee5d76c5eb22bbd2d9.tar.gz
(CFLAGS): If the envvar was specified, use that.
And set REAL_CFLAGS from it too.
Diffstat (limited to 'configure1.in')
-rwxr-xr-xconfigure1.in19
1 files changed, 13 insertions, 6 deletions
diff --git a/configure1.in b/configure1.in
index 9ec184ec444..fef4fd1da1c 100755
--- a/configure1.in
+++ b/configure1.in
@@ -1332,6 +1332,9 @@ echo " - whether the GNU malloc routines are usable."
### GCC 2.5 on Linux needs them to be different because it treats -g
### as implying static linking.
+### If the CFLAGS env var is specified, we use that value
+### instead of the default.
+
### It's not important that this name contain the PID; you can't run
### two configures in the same directory and have anything work
### anyway.
@@ -1412,12 +1415,16 @@ configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${CFLAGS}'
# The value of CPP is a quoted variable reference, so we need to do this
# to get its actual value...
CPP=`eval "echo $CPP"`
-eval `${CPP} -Isrc ${tempcname} \
- | grep 'configure___' \
- | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
-eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
- | grep 'configure___' \
- | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
+if [ "x$CFLAGS" = x ]; then
+ eval `${CPP} -Isrc ${tempcname} \
+ | grep 'configure___' \
+ | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
+ eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
+ | grep 'configure___' \
+ | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
+else
+ REAL_CFLAGS="$CFLAGS"
+fi
rm ${tempcname}
### Compute the unexec source name from the object name.