summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2010-06-29 19:55:15 -0700
committerGlenn Morris <rgm@gnu.org>2010-06-29 19:55:15 -0700
commite7586c7a671ea10004afc3d8e48718eed8c7ce26 (patch)
tree71698bc349d8e5fbd768020c5f702db6bb5b054b /configure.in
parent6259c2ec7ae4b60f59d5101c8c544d15a90540a3 (diff)
downloademacs-e7586c7a671ea10004afc3d8e48718eed8c7ce26.tar.gz
Remove last internal use of cpp and src/{m,s}/*.h files in configure.in.
* configure.in (CFLAGS, REAL_CFLAGS): Set with shell, not cpp. * configure, src/config.in: Regenerate.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in63
1 files changed, 17 insertions, 46 deletions
diff --git a/configure.in b/configure.in
index 6fcea08bb63..2e5ed9497b7 100644
--- a/configure.in
+++ b/configure.in
@@ -837,11 +837,13 @@ AC_LINK_IFELSE([main(){return 0;}],
LDFLAGS=$late_LDFLAGS
[AC_MSG_RESULT(no)])
-#### Extract some information from the operating system and machine files.
+LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
+
+
+# The value of CPP is a quoted variable reference, so we need to do this
+# to get its actual value...
+CPP=`eval "echo $CPP"`
-AC_CHECKING([the machine- and system-dependent files to find out
- - which libraries the lib-src programs will want, and
- - whether the GNU malloc routines are usable])
### First figure out CFLAGS (which we use for running the compiler here)
### and REAL_CFLAGS (which we use for real compilation).
@@ -853,50 +855,19 @@ AC_CHECKING([the machine- and system-dependent files to find out
### 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.
-tempcname="conftest.c"
-
-echo '
-#include "'${srcdir}'/src/'${opsysfile}'"
-#include "'${srcdir}'/src/'${machfile}'"
-
-#ifdef THIS_IS_CONFIGURE
-
-/* Get the CFLAGS for tests in configure. */
-#ifdef __GNUC__
-configure___ CFLAGS=-g ${C_OPTIMIZE_SWITCH} '${SPECIFIED_CFLAGS}'
-#else
-configure___ CFLAGS='${SPECIFIED_CFLAGS}'
-#endif
-
-#else /* not THIS_IS_CONFIGURE */
-
-/* Get the CFLAGS for real compilation. */
-#ifdef __GNUC__
-configure___ REAL_CFLAGS=-g ${C_OPTIMIZE_SWITCH} ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
-#else
-configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}'
-#endif
-
-#endif /* not THIS_IS_CONFIGURE */
-' > ${tempcname}
-
-LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
-
-# 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} \
- | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
+dnl C_OPTIMIZE_SWITCH unused save for gcc, so why set it for non-gcc?
+dnl Note AC_PROG_CC sets CFLAGS to -g -O2 for gcc anyway.
if test "x$SPECIFIED_CFLAGS" = x; then
- eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
- | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
+ if test x$GCC = xyes; then
+ CFLAGS="-g $C_OPTIMIZE_SWITCH"
+ REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS"
+ else
+ CFLAGS=
+ REAL_CFLAGS=
+ fi
else
- REAL_CFLAGS="$CFLAGS"
-fi]
-rm ${tempcname}
+ REAL_CFLAGS="$CFLAGS"
+fi
dnl Not used by any currently supported platform.