diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-30 11:52:51 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-30 11:52:51 +0000 |
commit | 47fe070638d424c96916d266db83986c5b8630b3 (patch) | |
tree | b75b38364e9f3474086c26670a715cda214575ee /config.if | |
parent | 5f6526e1c1d8af5b373ddab9ed2a6ef200914ad6 (diff) | |
download | gcc-47fe070638d424c96916d266db83986c5b8630b3.tar.gz |
* config.if: If gcc_version is already set, just use it. Don't set
gcc_version_trigger if it's already set, otherwise set it to
gcc/version.c, but only if the file exists. If it is not set and
gcc/version.c does not exist, try to extract the version number from
$CC.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62131 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'config.if')
-rw-r--r-- | config.if | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/config.if b/config.if index aa35a3f8140..c38b59c841e 100644 --- a/config.if +++ b/config.if @@ -22,9 +22,18 @@ fi # Set libstdcxx_incdir. # This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4. -gcc_version_trigger=${if_topsrcdir}/gcc/version.c -gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` -gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` +if test -z "$gcc_version"; then + if test -z "${gcc_version_trigger}" \ + && test -f ${if_topsrcdir}/gcc/version.c; then + gcc_version_trigger=${if_topsrcdir}/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/'` +fi libstdcxx_incdir=c++/${gcc_version} # The trickiest part is libc_interface. |