X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=configure;h=2f659fe98664c56848c313ec2140b1b73f839fc4;hb=6cddbfd4d2197fb9ea16067964944354f8fd127a;hp=55c5ca44c2ab6d17508f9e472268f649cba34d62;hpb=9371935c7b577de774e27b01074de1aed9d90684;p=pf3gnuchains%2Fgcc-fork.git diff --git a/configure b/configure index 55c5ca44c2a..2f659fe9866 100755 --- a/configure +++ b/configure @@ -3,8 +3,8 @@ ### WARNING: this file contains embedded tabs. Do not run untabify on this file. # Configuration script -# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 -# Free Software Foundation, Inc. +# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001, +# 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -89,7 +89,7 @@ subdirs= target_alias=NOTARGET target_makefile_frag= undefs=NOUNDEFS -version="$Revision: 1.31 $" +version="$Revision: 1.41 $" x11=default bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' @@ -152,13 +152,13 @@ NO_EDIT="This file was generated automatically by configure. Do not edit." progname=$0 # if PWD already has a value, it is probably wrong. -if [ -n "$PWD" ]; then PWD=`pwd`; fi +if [ -n "$PWD" ]; then PWD=`${PWDCMD-pwd}`; fi case "${progname}" in -/*) ;; +/* | [A-Za-z]:[\\/]* ) ;; */*) ;; *) - PATH=$PATH:${PWD=`pwd`} ; export PATH + PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH ;; esac @@ -457,7 +457,7 @@ case "${fatal}" in fi ;; esac - echo "Configuring for a ${host_alias} host." 1>&2 + echo "Configuring for a ${host_alias} host." arguments="--host=$host_alias $arguments" else echo 'Config.guess failed to determine the host type. You need to specify one.' 1>&2 @@ -526,7 +526,7 @@ fi configsub=`echo ${progname} | sed 's/configure$/config.sub/'` moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'` ## the sed command below emulates the dirname command -topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; pwd` +topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; ${PWDCMD-pwd}` # this is a hack. sun4 must always be a valid host alias or this will fail. @@ -566,8 +566,8 @@ case "${srcdir}" in echo "Invalid source directory ${srcdir}" >&2 exit 1 fi - pwd=`pwd` - srcpwd=`cd ${srcdir} ; pwd` + pwd=`${PWDCMD-pwd}` + srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` if [ "${pwd}" = "${srcpwd}" ] ; then srcdir=. fi @@ -579,7 +579,7 @@ case "${srcdir}" in ".") ;; *) if [ -f ${srcdir}/config.status ] ; then - echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2 + echo '***' Cannot configure here in \"${PWD=`${PWDCMD-pwd}`}\" when \"${srcdir}\" is currently configured. 1>&2 exit 1 fi esac @@ -663,13 +663,15 @@ case "${TMPDIR}" in esac # keep this filename short for &%*%$*# 14 char file names and 8+3 file names -tmpfile=${TMPDIR}/cNf$$ +tmpdir=${TMPDIR}/cNf$$ +mkdir ${tmpdir} || exit 1 +tmpfile=${tmpdir}/cNf$$ # Note that under many versions of sh a trap handler for 0 will *override* any # exit status you explicitly specify! At this point, the only non-error exit # is at the end of the script; these actions are duplicated there, minus # the "exit 1". Don't use "exit 0" anywhere after this without resetting the # trap handler, or you'll lose. -trap "rm -f Makefile.tem ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos; exit 1" 0 1 2 15 +trap "rm -rf Makefile.tem ${tmpdir}; exit 1" 0 1 2 15 # split ${srcdir}/configure.in into common, per-host, per-target, # and post-target parts. Post-target is optional. @@ -696,7 +698,7 @@ if test -f skip-this-dir; then # Perform the same cleanup as the trap handler, minus the "exit 1" of course, # and reset the trap handler. trap 0 - rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos + rm -rf Makefile* ${tmpdir} # Execute the final clean-up actions ${config_shell} skip-this-dir # and stop configuring this directory. @@ -706,7 +708,7 @@ fi # some sanity checks on configure.in case "${srctrigger}" in "") - echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in. 1>&2 + echo '***' srctrigger not set in ${PWD=`${PWDCMD-pwd}`}/configure.in. 1>&2 exit 1 ;; *) ;; @@ -776,8 +778,8 @@ esac if [ ! -r ${srcdir}/${srctrigger} ] ; then case "${srcdirdefaulted}" in - "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;; - *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;; + "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/${srcdir}" 1>&2 ;; + *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/. or ${PWD=`${PWDCMD-pwd}`}/.." 1>&2 ;; esac echo '***' \(At least ${srctrigger} is missing.\) 1>&2 @@ -914,7 +916,7 @@ if [ "${build}" != "${host}" ]; then # are not the same, we set reasonable default values for the tools. tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD" - tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET" + tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET" tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET HOST_PREFIX" tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM" tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET" @@ -949,6 +951,7 @@ t loop CC_FOR_BUILD=${CC_FOR_BUILD-gcc} CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc} CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++} + GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj} DLLTOOL=${DLLTOOL-${host_alias}-dlltool} DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool} GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}} @@ -1069,20 +1072,10 @@ export CXX export CFLAGS export CXXFLAGS -# FIXME: This should be in configure.in, not configure -case "$host" in - *go32*) - enable_gdbtk=no ;; - *msdosdjgpp*) - enable_gdbtk=no ;; -esac - -# FIXME: This should be in configure.in, not configure -# Determine whether gdb needs tk/tcl or not. -if [ "$enable_gdbtk" != "no" ]; then - GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" -else - GDB_TK="" +all_build_modules= +if test x"${build_alias}" != x"${host_alias}" +then + all_build_modules='$(ALL_BUILD_MODULES_LIST)' fi for subdir in . ${subdirs} ; do @@ -1096,7 +1089,7 @@ for subdir in . ${subdirs} ; do case "${srcdir}" in ".") # no -srcdir option. We're building in place. makesrcdir=. ;; - /*) # absolute path + /* | [A-Za-z]:[\\/]* ) # absolute path makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'` ;; *) # otherwise relative @@ -1115,7 +1108,7 @@ for subdir in . ${subdirs} ; do if mkdir ${subdir} ; then true else - echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2 + echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${subdir}" 1>&2 exit 1 fi fi @@ -1214,7 +1207,7 @@ EOF sed -e "/^####/ r ${package_makefile_rules_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem else echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2 - echo '***' is missing in ${PWD=`pwd`}. 1>&2 + echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2 cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem fi esac @@ -1250,7 +1243,7 @@ EOF sed -e "/^####/ r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem else echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2 - echo '***' is missing in ${PWD=`pwd`}. 1>&2 + echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2 mv ${Makefile} ${subdir}/Makefile.tem fi esac @@ -1286,13 +1279,13 @@ EOF sed -e "/^####/ r ${package_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem else echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2 - echo '***' is missing in ${PWD=`pwd`}. 1>&2 + echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2 mv ${Makefile} ${subdir}/Makefile.tem fi esac # real copy now in ${subdir}/Makefile.tem - # prepend warning about editting, and a bunch of variables. + # prepend warning about editing, and a bunch of variables. rm -f ${Makefile} cat > ${Makefile} <>${Makefile} ;; + /* | [A-Za-z]:[\\/]* ) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;; *) echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;; esac case "${target_makefile_frag}" in "") ;; - /*) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;; + /* | [A-Za-z]:[\\/]* ) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;; *) echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;; esac case "${host_makefile_frag}" in "") ;; - /*) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;; + /* | [A-Za-z]:[\\/]* ) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;; *) echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;; esac @@ -1361,9 +1354,14 @@ EOF # remove any form feeds. if [ -z "${subdirs}" ]; then rm -f ${subdir}/Makefile.tm2 - sed -e "s:^SUBDIRS[ ]*=.*$:SUBDIRS = ${configdirs}:" \ - -e "s:^NONSUBDIRS[ ]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \ + sedtemp=sed.$$ + cat >$sedtemp < ${subdir}/Makefile.tm2 + rm -f $sedtemp rm -f ${subdir}/Makefile.tem mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem fi @@ -1381,6 +1379,7 @@ EOF -e "s|^oldincludedir[ ]*=.*$|oldincludedir = ${oldincludedir}|" \ -e "s|^infodir[ ]*=.*$|infodir = ${infodir}|" \ -e "s|^mandir[ ]*=.*$|mandir = ${mandir}|" \ + -e "s|^ALL_BUILD_MODULES =.*|ALL_BUILD_MODULES =${all_build_modules}|" \ -e "/^CC[ ]*=/{ :loop1 /\\\\$/ N @@ -1466,7 +1465,7 @@ EOF newusing=`echo "${using}" | sed 's/and/using/'` using=${newusing} - echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using} + echo "Created \"${Makefile}\" in" ${PWD=`${PWDCMD-pwd}`} ${using} . ${tmpfile}.pos @@ -1532,24 +1531,20 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then if mkdir ./${bld_dir} ; then true else - echo '***' "${progname}: could not make ${PWD=`pwd`}/${bld_dir}" 1>&2 + echo '***' "${progname}: could not make ${PWD=`${PWDCMD-pwd}`}/${bld_dir}" 1>&2 exit 1 fi fi ;; esac - POPDIR=${PWD=`pwd`} + POPDIR=${PWD=`${PWDCMD-pwd}`} cd ${bld_dir} ### figure out what to do with srcdir case "${srcdir}" in ".") newsrcdir=${srcdir} ;; # no -srcdir option. We're building in place. - /*) # absolute path - newsrcdir=${srcdir}/${cfg_dir} - srcdiroption="--srcdir=${newsrcdir}" - ;; - ?:*) # absolute path on win32 + /* | [A-Za-z]:[\\/]* ) # absolute path newsrcdir=${srcdir}/${cfg_dir} srcdiroption="--srcdir=${newsrcdir}" ;; @@ -1563,10 +1558,7 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then case "${cache_file}" in "") # empty ;; - /*) # absolute path - cache_file_option="--cache-file=${cache_file}" - ;; - ?:*) # absolute path on win32 + /* | [A-Za-z]:[\\/]* ) # absolute path cache_file_option="--cache-file=${cache_file}" ;; *) # relative path @@ -1579,9 +1571,8 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then recprog=${newsrcdir}/configure elif [ -f ${newsrcdir}/configure.in ] ; then case "${progname}" in - /*) recprog=${progname} ;; - ?:*) recprog=${progname} ;; - *) recprog=../${progname} ;; + /* | [A-Za-z]:[\\/]* ) recprog=${progname} ;; + *) recprog=../${progname} ;; esac else eval echo No configuration information in ${cfg_dir} ${redirect} @@ -1595,7 +1586,7 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then ${srcdiroption} ${diroptions} ${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 + echo Configure in `${PWDCMD-pwd}` failed, exiting. 1>&2 exit 1 fi fi @@ -1607,7 +1598,7 @@ fi # Perform the same cleanup as the trap handler, minus the "exit 1" of course, # and reset the trap handler. -rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos +rm -rf ${tmpdir} trap 0 exit 0