summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-02 11:05:13 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-02 11:05:13 +0000
commit14ac914460d95cc284b41bd11403d1ef2f7f5bf5 (patch)
tree474f34608ab902f9ddc5b7629c88676c03a26731 /fixincludes
parentfcb13283797f0f8a65311110397396613ab9a93b (diff)
downloadgcc-14ac914460d95cc284b41bd11403d1ef2f7f5bf5.tar.gz
Introduce and use config/gcc-version.m4.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91625 138bc75d-0d04-0410-961f-82ee72b054a4
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 bd3895f7baf..62426b9248e 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 6f1679e009a..bf22e31974d 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 257c835f376..64e7963a994 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 16d2b7e3e25..a58b1051d16 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* )