aboutsummaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2004-12-02 11:05:13 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2004-12-02 11:05:13 +0000
commitafabd8e62cdcf6935dbe819278aa0b62c0a8c291 (patch)
tree474f34608ab902f9ddc5b7629c88676c03a26731 /fixincludes
parent5191f2ba91f987277423dec3c58ac37bd76a814b (diff)
downloadgcc-afabd8e62cdcf6935dbe819278aa0b62c0a8c291.zip
gcc-afabd8e62cdcf6935dbe819278aa0b62c0a8c291.tar.gz
gcc-afabd8e62cdcf6935dbe819278aa0b62c0a8c291.tar.bz2
Introduce and use config/gcc-version.m4.
From-SVN: r91625
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog6
-rw-r--r--fixincludes/aclocal.m41
-rwxr-xr-xfixincludes/configure21
-rw-r--r--fixincludes/configure.ac6
4 files changed, 26 insertions, 8 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index bd3895f..62426b9 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-02 Richard Sandiford <rsandifo@redhat.com>
+
+ * configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
+ * aclocal.m4: Include ../config/gcc-version.m4.
+ * configure: Regenerate.
+
2004-11-26 Mark Mitchell <mark@codesourcery.com>
* inclhack.def (gnu_types): Do not use on Solaris 2.1x.
diff --git a/fixincludes/aclocal.m4 b/fixincludes/aclocal.m4
index 6f1679e..bf22e31 100644
--- a/fixincludes/aclocal.m4
+++ b/fixincludes/aclocal.m4
@@ -1,5 +1,6 @@
sinclude(../config/acx.m4)
sinclude(../config/accross.m4)
+sinclude(../config/gcc-version.m4)
sinclude(../config/gettext.m4)
sinclude(../config/progtest.m4)
diff --git a/fixincludes/configure b/fixincludes/configure
index 257c835..64e7963 100755
--- a/fixincludes/configure
+++ b/fixincludes/configure
@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT target_noncanonical TARGET gcc_version CPP EGREP MAINT LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT target_noncanonical TARGET gcc_version_trigger gcc_version_full gcc_version CPP EGREP MAINT LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -2425,8 +2425,21 @@ _ACEOF
fi
-# Get GCC's version number.
-gcc_version=`sed -n '/version_string/ { s/.*"\([^ "]*\)[^"]*".*/\1/p ; }' ${srcdir}/../gcc/version.c`
+
+if test "${with_gcc_version_trigger+set}" = set; then
+ gcc_version_trigger=$with_gcc_version_trigger
+else
+ gcc_version_trigger=$srcdir/../gcc/version.c
+fi
+if test -f "${gcc_version_trigger}"; then
+ gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
+else
+ gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
+fi
+gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
+
+
+
case $host in
@@ -4862,6 +4875,8 @@ s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@target_noncanonical@,$target_noncanonical,;t t
s,@TARGET@,$TARGET,;t t
+s,@gcc_version_trigger@,$gcc_version_trigger,;t t
+s,@gcc_version_full@,$gcc_version_full,;t t
s,@gcc_version@,$gcc_version,;t t
s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac
index 16d2b7e..a58b105 100644
--- a/fixincludes/configure.ac
+++ b/fixincludes/configure.ac
@@ -52,11 +52,7 @@ if test $TARGET = twoprocess; then
[Define if testing and fixing are done by separate process])
fi
-# Get GCC's version number.
-changequote(,)dnl
-gcc_version=`sed -n '/version_string/ { s/.*"\([^ "]*\)[^"]*".*/\1/p ; }' ${srcdir}/../gcc/version.c`
-changequote([,])dnl
-AC_SUBST(gcc_version)
+TL_AC_GCC_VERSION([$srcdir/..])
case $host in
vax-dec-bsd* )