diff options
author | manfred <manfred@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-26 02:13:51 +0000 |
---|---|---|
committer | manfred <manfred@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-26 02:13:51 +0000 |
commit | 7955e3d2af97970bfd8d26ec39dad668f8749aaa (patch) | |
tree | 51d261c8aa76a052e642e4bccf8260e143210109 /configure | |
parent | 5ddca6849a0a908cf783d6cb382f43dbc2f52bed (diff) | |
download | gcc-7955e3d2af97970bfd8d26ec39dad668f8749aaa.tar.gz |
d
egcs/ChangeLog:
1998-06-26 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (BASE_FLAGS_TO_PASS): Add gcc_version_trigger.
(Makefile): Depend on $(gcc_version_trigger).
* configure (gcc_version): Change default initializer to empty
string.
(gcc_version_trigger): New variable; pass this variable down
to subdir configures to enable them checking gcc's version
themselves. Emit make macros for both gcc_version vars.
(topsrcdir): Initialize reliably.
(recursion line): Remove --with-gcc-version=${gcc_version}.
egcs/gcc/ChangeLog:
1998-06-26 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (gcc_version, gcc_version_trigger): New macros.
(version): Initialize from $(gcc_version).
* configure.in (version): Rename to gcc_version.
(gcc_version_trigger): New variable; call AC_SUBST for it and
emit it into the generated config.status.
* configure: Regenerate.
egcs/libf2c/ChangeLog.egcs:
1998-06-26 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (gcc_version_trigger): Add new macro.
(config.status): Add dependency upon $(gcc_version_trigger).
* configure.in (gcc_version_trigger): New variable; initialize
using value from toplevel configure; add AC_SUBST for it.
(gcc_version): Change initialization to use this new variable.
* configure: Regenerate.
egcs/libio/ChangeLog:
1998-06-26 Manfred Hollstein <manfred@s-direktnet.de>
* config.shared (FLAGS_TO_PASS): Add gcc_version_trigger.
(Makefile): Add dependency upon $(gcc_version_trigger).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 63 |
1 files changed, 30 insertions, 33 deletions
diff --git a/configure b/configure index 57f8c78edc8..af334067649 100755 --- a/configure +++ b/configure @@ -56,7 +56,8 @@ exec_prefixoption= fatal= floating_point=default gas=default -gcc_version=UNKNOWN +gcc_version= +gcc_version_trigger= host_alias=NOHOST host_makefile_frag= moveifchange= @@ -458,6 +459,7 @@ fi configsub=`echo ${progname} | sed 's/configure$/config.sub/'` moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'` +topsrcdir=`cd \`dirname ${progname}\`; pwd` # this is a hack. sun4 must always be a valid host alias or this will fail. if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then @@ -520,6 +522,28 @@ case "${exec_prefixoption}" in *) ;; esac +# Define the trigger file to make sure configure will re-run whenever +# the gcc version number changes. +if [ "${with_gcc_version_trigger+set}" = set ]; then + gcc_version_trigger="$with_gcc_version_trigger" + gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${with_gcc_version_trigger}` +else + # If gcc's sources are available, define the trigger file. + if [ -f ${topsrcdir}/gcc/version.c ] ; then + gcc_version_trigger=${topsrcdir}/gcc/version.c + gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}` + case "$arguments" in + *--with-gcc-version-trigger=$gcc_version_trigger* ) + ;; + * ) + # Make sure configure.in knows about this. + arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments" + ;; + esac + withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions" + fi +fi + ### break up ${srcdir}/configure.in. case "`grep '^# per\-host:' ${srcdir}/configure.in`" in "") @@ -701,33 +725,6 @@ if [ "${program_prefix}" != "" ] ; then program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}" fi -# 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 # exists, try to extract them from it. This is to handle running # ./config.status by hand. @@ -1266,10 +1263,10 @@ EOF echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile} fi - # Emit a macro which is used to build the libsubdir macro where - # compiler specific stuff can be found/installed. - # FIXME: This works only if gcc's sources are available in a gcc - # subdirectory! + # Emit a macro which describes the file containing gcc's + # version number. + echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile} + # And emit a macro defining gcc's version number. echo gcc_version = ${gcc_version} >> ${Makefile} # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS, @@ -1478,7 +1475,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} --with-gcc-version=${gcc_version} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then + ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then true else echo Configure in `pwd` failed, exiting. 1>&2 |