diff options
author | manfred <manfred@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-24 06:16:19 +0000 |
---|---|---|
committer | manfred <manfred@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-24 06:16:19 +0000 |
commit | c2544360b7028b3c80e262ee106a96fee3147917 (patch) | |
tree | 3409e844fbcc8a605cb26bbf1a75caad955bf377 /configure | |
parent | d9f2c557d626e783c2fb942ec252bffaf2f97019 (diff) | |
download | gcc-c2544360b7028b3c80e262ee106a96fee3147917.tar.gz |
d
egcs/ChangeLog:
1998-06-24 Manfred Hollstein <manfred@s-direktnet.de>
* configure (gcc_version): Initialize properly depending on
how and where configure is started.
(recursion line): Pass a --with-gcc-version=${gcc_version}
to configures in subdirs.
egcs/libf2c/ChangeLog.egcs:
1998-06-24 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (version): Rename to gcc_version.
* configure.in (version): Likewise.
(gcc_version): Add code to use an option passed from parent configure.
* configure: Regenerate.
egcs/libio/ChangeLog:
1998-06-24 Manfred Hollstein <manfred@s-direktnet.de>
* config.shared (FLAGS_TO_PASS): Add gcc_version.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20687 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/configure b/configure index 88888670426..fdbaef7575d 100755 --- a/configure +++ b/configure @@ -701,10 +701,31 @@ if [ "${program_prefix}" != "" ] ; then program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}" fi -# If gcc's sources are available, extract its version number which is used by -# $libsubdir. -if [ -f $srcdir/gcc/version.c ]; then - gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/gcc/version.c` +# Check whether --with-gcc-version was given. +if [ "${with_gcc_version+set}" = set ]; then + gcc_version="$with_gcc_version" +else + if [ "${srcdir}" = "." ] ; then + if [ "${with_target_subdir}" != "." ] ; then + topsrcdir=${with_multisrctop}../.. + else + topsrcdir=${with_multisrctop}.. + fi + else + case ${srcdir} in + */*/* ) # Need to do this only in subdirectories. + topsrcdir=${srcdir}/.. + ;; + * ) # We are already in the topsrcdir. + topsrcdir=${srcdir} + ;; + esac + fi + # If gcc's sources are available, extract its version number which is used by + # $libsubdir. + if [ -f ${topsrcdir}/gcc/version.c ] ; then + gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${topsrcdir}/gcc/version.c` + fi fi # If CC and CXX are not set in the environment, and the Makefile @@ -1447,7 +1468,7 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then if [ ! -z "${recprog}" ] ; then if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \ ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \ - ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then + ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} --with-gcc-version=${gcc_version} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then true else echo Configure in `pwd` failed, exiting. 1>&2 |