X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=configure;h=7ab89f5bf8763f10e84e2c4431d122d6ff828c58;hb=f776b3c443371cb0d3ecd4d173bc6a45e7654ad0;hp=a5d82c86ab71d1a64c7df2c71b6db748a5e9482a;hpb=ed37269de624db80eff9b0f51c56f7799247e669;p=pf3gnuchains%2Fgcc-fork.git diff --git a/configure b/configure index a5d82c86ab7..7ab89f5bf87 100755 --- a/configure +++ b/configure @@ -3,7 +3,7 @@ ### 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, 1997 +# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -53,6 +53,9 @@ cache_file_option= configdirs= extraconfigdirs= diroptions= +enable_threads=no +enable_shared=no +enable_libstdcxx_v3=yes exec_prefix= exec_prefixoption= fatal= @@ -86,7 +89,7 @@ subdirs= target_alias=NOTARGET target_makefile_frag= undefs=NOUNDEFS -version="$Revision: 1.22 $" +version="$Revision: 1.35 $" x11=default bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' @@ -152,13 +155,17 @@ progname=$0 if [ -n "$PWD" ]; then PWD=`pwd`; fi case "${progname}" in -/*) ;; +/* | [A-Za-z]:[\\/]* ) ;; */*) ;; *) PATH=$PATH:${PWD=`pwd`} ; export PATH ;; esac +# Export original configure arguments for use by sub-configures. +TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@" +export TOPLEVEL_CONFIGURE_ARGUMENTS + # Loop over all args while : @@ -237,7 +244,7 @@ do esac enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` - eval "$enableopt='$optarg'" + eval "$enableopt=\$optarg" enableoptions="$enableoptions '$option'" ;; --exec-prefix* | --ex*) @@ -370,7 +377,7 @@ do esac withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` - eval $withopt="$optarg" + eval $withopt="\$optarg" withoptions="$withoptions $option" ;; --without-*) @@ -450,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 @@ -518,7 +525,8 @@ fi configsub=`echo ${progname} | sed 's/configure$/config.sub/'` moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'` -topsrcdir=`cd \`dirname ${progname}\`; pwd` +## the sed command below emulates the dirname command +topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; pwd` # this is a hack. sun4 must always be a valid host alias or this will fail. @@ -586,12 +594,12 @@ esac # 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}` + gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` 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}` + gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` case "$arguments" in *--with-gcc-version-trigger=$gcc_version_trigger* ) ;; @@ -654,8 +662,8 @@ case "${TMPDIR}" in *) ;; esac -# keep this filename short for &%*%$*# 14 char file names -tmpfile=${TMPDIR}/cONf$$ +# keep this filename short for &%*%$*# 14 char file names and 8+3 file names +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 @@ -677,8 +685,24 @@ fi ### do common part of configure.in +# If the language specific compiler does not exist, but the "gcc" directory does, +# we will skip this directory; in this case the sub-directory's common part +# of configure.in will create a small shell script "skip-this-dir" containing +# commands to completely clean up any temporary or created files. + . ${tmpfile}.com +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 + # Execute the final clean-up actions + ${config_shell} skip-this-dir + # and stop configuring this directory. + exit 0 +fi + # some sanity checks on configure.in case "${srctrigger}" in "") @@ -890,14 +914,15 @@ 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" tools="${tools} WINDRES WINDRES_FOR_TARGET YACC" + tools="${tools} OBJCOPY OBJDUMP" for var in ${tools}; do - if [ -z "`eval 'echo $'"${var}"`" ] && [ -r Makefile ]; then + if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then sed -n -e ':loop /\\$/ N s/\\\n//g @@ -906,7 +931,7 @@ t loop < Makefile > Makefile.v t=`tail -1 Makefile.v` if [ -n "${t}" ]; then - eval "${var}='${t}'" + eval "${var}=\${t}" fi rm -f Makefile.v fi @@ -924,6 +949,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}} @@ -938,6 +964,8 @@ t loop RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib} WINDRES=${WINDRES-${host_alias}-windres} WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres} + OBJCOPY=${OBJCOPY-${host_alias}-objcopy} + OBJDUMP=${OBJDUMP-${host_alias}-objdump} if [ -z "${YACC}" ]; then IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" @@ -988,6 +1016,8 @@ t loop export NM export RANLIB export WINDRES + export OBJCOPY + export OBJDUMP else # If CC is still not set, try to get gcc. if [ -z "${CC}" ]; then @@ -1046,14 +1076,12 @@ case "$host" in enable_gdbtk=no ;; *msdosdjgpp*) enable_gdbtk=no ;; - *cygwin32*) - 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" + GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" else GDB_TK="" fi @@ -1069,7 +1097,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 @@ -1295,19 +1323,19 @@ EOF case "${package_makefile_frag}" in "") ;; - /*) echo package_makefile_frag = ${package_makefile_frag} >>${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 @@ -1315,41 +1343,8 @@ EOF echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile} fi - # provide a proper gxx_include_dir to all subdirs. - # Note, if you change the default, make sure to fix both here - # and in the gcc subdirectory. - # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. - gxx_include_dir= - if test -n "${with_gxx_include_dir}"; then - case "${with_gxx_include_dir}" in - yes ) - echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2 - exit 1 - ;; - no ) - ;; - * ) - gxx_include_dir=${with_gxx_include_dir} - ;; - esac - fi - if test x${gxx_include_dir} = x; then - if test x${enable_version_specific_runtime_libs} = xyes; then - echo gxx_include_dir = '${libsubdir}/include/g++' >> ${Makefile} - else - . ${topsrcdir}/config.if - echo gxx_include_dir = '${prefix}/include/g++'-${libstdcxx_interface} >> ${Makefile} - fi - else - echo gxx_include_dir = ${gxx_include_dir} >> ${Makefile} - fi - - # record if we want to build shared libs. - if test -z "${enable_shared}"; then - echo enable_shared = no >> ${Makefile} - else - echo enable_shared = ${enable_shared} >> ${Makefile} - fi + echo enable_shared = ${enable_shared} >> ${Makefile} + echo enable_threads = ${enable_threads} >> ${Makefile} # record if we want to rumtime library stuff installed in libsubdir. if test -z "${enable_version_specific_runtime_libs}"; then echo enable_version_specific_runtime_libs = no >> ${Makefile} @@ -1416,23 +1411,26 @@ EOF s%^CXXFLAGS[ ]*=.*$%CXXFLAGS = ${CXXFLAGS}% }" \ -e "s|^SHELL[ ]*=.*$|SHELL = ${config_shell}|" \ - -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" \ -e "s|^srcdir[ ]*=.*$|srcdir = ${makesrcdir}|" \ -e "s/ //" \ -e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \ -e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \ -e "s:^program_transform_name[ ]*=.*$:program_transform_name = ${program_transform_name}:" \ -e "s|^tooldir[ ]*=.*$|tooldir = ${tooldir}|" \ + -e "s|^build_tooldir[ ]*=.*$|build_tooldir = ${tooldir}|" \ -e "s:^DEFAULT_YACC[ ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \ -e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \ -e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \ ${subdir}/Makefile.tem >> ${Makefile} + + sed -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem + mv -f ${Makefile}.tem ${Makefile} # If this is a Canadian Cross, preset the values of many more # tools. if [ "${build}" != "${host}" ]; then for var in ${tools}; do - val=`eval 'echo $'"${var}"` + eval val=\$${var} sed -e "/^${var}[ ]*=/{ :loop1 /\\\\$/ N @@ -1548,11 +1546,7 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then ### 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}" ;; @@ -1566,10 +1560,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 @@ -1582,9 +1573,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}