X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=configure;h=c5f0291340090c1e65824a5c734e0aed350218f2;hb=9e422a2e278b0a18a2553810d1c8ec20e7c2d758;hp=6521d23332ad6a9b893632fae7111c8136150987;hpb=e98fe4f7b54cbdf29aef9287bbb1bea8801dd05a;p=deliverable%2Fbinutils-gdb.git diff --git a/configure b/configure index 6521d23332..c5f0291340 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 @@ -576,15 +576,6 @@ case "${srcdir}" in fi esac -# start-sanitize-cygnus -# Don't allow builds at Cygnus to be done with srcdir==builddir. We -# can assume srcdir==. in this case, because of code above. -if test "$srcdir" = .; then - echo '***' "Cannot configure in source tree." >&2 - echo '***' "Make a parallel directory and configure there." >&2 - exit 1 -fi -# end-sanitize-cygnus # default exec_prefix case "${exec_prefixoption}" in @@ -596,12 +587,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* ) ;; @@ -664,8 +655,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 @@ -687,8 +678,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 "") @@ -895,6 +902,9 @@ do test -n "$DEFAULT_LEX" && break done +# BINUTILS LOCAL: This is included in the default CFLAGS when using gcc. +warn_cflags="-W -Wall" + if [ "${build}" != "${host}" ]; then # If we are doing a Canadian Cross, in which the host and build systems # are not the same, we set reasonable default values for the tools. @@ -928,7 +938,7 @@ t loop AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as} BISON=${BISON-bison} CC=${CC-${host_alias}-gcc} - CFLAGS=${CFLAGS-"-g -O2"} + CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"} CXX=${CXX-${host_alias}-c++} CXXFLAGS=${CXXFLAGS-"-g -O2"} CC_FOR_BUILD=${CC_FOR_BUILD-gcc} @@ -1008,10 +1018,10 @@ else CC="gcc" echo 'void f(){}' > conftest.c if test -z "`${CC} -g -c conftest.c 2>&1`"; then - CFLAGS=${CFLAGS-"-g -O2"} + CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"} CXXFLAGS=${CXXFLAGS-"-g -O2"} else - CFLAGS=${CFLAGS-"-O2"} + CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"} CXXFLAGS=${CXXFLAGS-"-O2"} fi rm -f conftest* @@ -1028,10 +1038,10 @@ else *gcc) echo 'void f(){}' > conftest.c if test -z "`${CC} -g -c conftest.c 2>&1`"; then - CFLAGS=${CFLAGS-"-g -O2"} + CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"} CXXFLAGS=${CXXFLAGS-"-g -O2"} else - CFLAGS=${CFLAGS-"-O2"} + CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"} CXXFLAGS=${CXXFLAGS-"-O2"} fi rm -f conftest* @@ -1050,7 +1060,6 @@ export CXX export CFLAGS export CXXFLAGS -# start-sanitize-gdbtk # FIXME: This should be in configure.in, not configure case "$host" in *go32*) @@ -1063,15 +1072,9 @@ esac # 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" - # start-sanitize-ide - if [ "$enable_ide" = "yes" ]; then - GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui all-libide all-libidetcl" - fi - # end-sanitize-ide else GDB_TK="" fi -# end-sanitize-gdbtk for subdir in . ${subdirs} ; do @@ -1330,35 +1333,6 @@ 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} @@ -1442,10 +1416,8 @@ EOF -e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \ ${subdir}/Makefile.tem >> ${Makefile} - # start-sanitize-gdbtk sed -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem mv -f ${Makefile}.tem ${Makefile} - # end-sanitize-gdbtk # If this is a Canadian Cross, preset the values of many more # tools.