diff options
author | Manfred Hollstein <manfred@gcc.gnu.org> | 1998-06-24 06:16:19 +0000 |
---|---|---|
committer | Manfred Hollstein <manfred@gcc.gnu.org> | 1998-06-24 06:16:19 +0000 |
commit | 6174dcf37580c05ea846cfe0659a61574f7ae71c (patch) | |
tree | 3409e844fbcc8a605cb26bbf1a75caad955bf377 /configure | |
parent | 50c4c9f7bd041492d7c736f51ef0622a67e7c8b1 (diff) | |
download | gcc-6174dcf37580c05ea846cfe0659a61574f7ae71c.tar.gz |
configure (gcc_version): Initialize properly depending on how and where configure is started.
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.
From-SVN: r20687
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 |