summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2004-12-02 11:09:36 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2004-12-02 11:09:36 +0000
commitafdaeaab51dd74b8c2029b7f7cdfd1738ae35e5f (patch)
tree61167298c04e0475c3062d593321018383802029 /configure.in
parentf77390bbdb5b43a34436e604c1ac19a7ef621c2d (diff)
downloadcygnal-afdaeaab51dd74b8c2029b7f7cdfd1738ae35e5f.tar.gz
cygnal-afdaeaab51dd74b8c2029b7f7cdfd1738ae35e5f.tar.bz2
cygnal-afdaeaab51dd74b8c2029b7f7cdfd1738ae35e5f.zip
Introduce and use config/gcc-version.m4.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in31
1 files changed, 12 insertions, 19 deletions
diff --git a/configure.in b/configure.in
index d244a5588..274169180 100644
--- a/configure.in
+++ b/configure.in
@@ -19,6 +19,7 @@
### WARNING: this file contains embedded tabs. Do not run untabify on this file.
sinclude(config/acx.m4)
+sinclude(config/gcc-version.m4)
AC_INIT(move-if-change)
AC_PREREQ(2.13)
@@ -98,25 +99,19 @@ fi
topsrcdir=$srcpwd
extra_host_args=
+
# Define the trigger file to make sure configure will re-run whenever
# the gcc version number changes.
-if test "${with_gcc_version_trigger+set}" = set ; then
- gcc_version_trigger="$with_gcc_version_trigger"
- gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
-else
- # If gcc's sources are available, define the trigger file.
- if test -f ${topsrcdir}/gcc/version.c ; then
- gcc_version_trigger=${topsrcdir}/gcc/version.c
- gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
- case "$ac_configure_args" in
- *--with-gcc-version-trigger=$gcc_version_trigger* )
- ;;
- * )
- # Add to all subconfigure arguments: build, host, and target.
- ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
- ;;
- esac
- fi
+TL_AC_GCC_VERSION([$topsrcdir])
+if test -f $gcc_version_trigger ; then
+ case "$ac_configure_args" in
+ *--with-gcc-version-trigger=$gcc_version_trigger* )
+ ;;
+ * )
+ # Add to all subconfigure arguments: build, host, and target.
+ ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
+ ;;
+ esac
fi
### To add a new directory to the tree, first choose whether it is a target
@@ -2154,8 +2149,6 @@ AC_SUBST(SET_LIB_PATH)
AC_SUBST(RPATH_ENVVAR)
AC_SUBST(BUILD_PREFIX)
AC_SUBST(BUILD_PREFIX_1)
-AC_SUBST(gcc_version_trigger)
-AC_SUBST(gcc_version)
AC_SUBST(tooldir)
AC_SUBST(build_tooldir)
AC_SUBST(GDB_TK)