X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=configure.in;h=bfbb6a1b0e77e43d32e0851532378b8222cd653b;hb=10fc94a43ff647ddf1682bc242162e1ec40c44c3;hp=ae3ff2ae8c866f1d426992266b52acd15e8e6d58;hpb=21998d122f2bd5ac3fb250b0e6329801b8882818;p=deliverable%2Fbinutils-gdb.git diff --git a/configure.in b/configure.in index ae3ff2ae8c..bfbb6a1b0e 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, -# 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,19 +67,13 @@ progname=$0 if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi # Export original configure arguments for use by sub-configures. These -# will be expanded once by make, and once by the shell, so they need to -# have '$' quoted for make, and then each argument quoted for the shell. -# What's more, the 'echo' below might expand backslashes. -cat <<\EOF_SED > conftestsed -s,\\,\\\\,g; s,\$,$$,g +# will be expanded by make, so quote '$'. +tmp="$progname $@" +sed -e 's,\$,$$,g' < conftestsed.out +$tmp EOF_SED -tmp="'$progname'" -for ac_arg -do - tmp="$tmp '"`echo "$ac_arg" | sed -f conftestsed` -done -rm -f conftestsed -TOPLEVEL_CONFIGURE_ARGUMENTS="$tmp" +TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out` +rm -f conftestsed.out AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS) moveifchange=${srcdir}/move-if-change @@ -157,7 +151,8 @@ target_libraries="target-libiberty \ target-libstdc++-v3 \ target-libf2c \ ${libgcj} \ - target-libobjc" + target-libobjc \ + target-libada" # these tools are built using the target libraries, and are intended to # run only in the target environment @@ -283,26 +278,26 @@ case "${host}" in noconfigdirs="$noconfigdirs byacc" ;; i[[3456789]]86-*-vsta) - noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext" + noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext" ;; i[[3456789]]86-*-go32* | i[[3456789]]86-*-msdosdjgpp*) - noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi" + noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi" ;; i[[3456789]]86-*-mingw32*) # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv" - noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool" + noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool" ;; i[[3456789]]86-*-beos*) noconfigdirs="$noconfigdirs tk itcl tix libgui gdb" ;; *-*-cygwin*) - noconfigdirs="autoconf automake send-pr rcs guile perl" + noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl" ;; *-*-netbsd*) - noconfigdirs="rcs" + noconfigdirs="$noconfigdirs rcs" ;; ppc*-*-pe) - noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv" + noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv" ;; powerpc-*-beos*) noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline" @@ -312,6 +307,14 @@ case "${host}" in ;; esac +AC_ARG_ENABLE(libada, +[ --enable-libada Builds libada directory], +ENABLE_LIBADA=$enableval, +ENABLE_LIBADA=yes) +if test "${ENABLE_LIBADA}" != "yes" ; then + noconfigdirs="$noconfigdirs target-libada" +fi + # Save it here so that, even in case of --enable-libgcj, if the Java # front-end isn't enabled, we still get libgcj disabled. libgcj_saved=$libgcj @@ -375,8 +378,11 @@ case "${target}" in *) ;; esac ;; + *-*-uclinux*) + noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}" + ;; *-*-vxworks*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj}" ;; alpha*-dec-osf*) # ld works, but does not support shared libraries. @@ -507,7 +513,7 @@ case "${target}" in ;; ia64*-**-hpux*) # No gdb or ld support yet. - noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld" + noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld" ;; i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) noconfigdirs="$noconfigdirs ${libgcj}" @@ -606,7 +612,7 @@ case "${target}" in ;; powerpc-*-aix*) # copied from rs6000-*-* entry - noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}" ;; powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe) target_configdirs="$target_configdirs target-winsup" @@ -628,7 +634,7 @@ case "${target}" in noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}" ;; rs6000-*-aix*) - noconfigdirs="$noconfigdirs gprof ${libgcj}" + noconfigdirs="$noconfigdirs gprof target-libada target-libgloss ${libgcj}" ;; rs6000-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" @@ -1253,7 +1259,7 @@ fi # Default to using --with-stabs for certain targets. if test x${with_stabs} = x ; then case "${target}" in - mips*-*-irix6*) + mips*-*-irix[[56]]*) ;; mips*-*-* | alpha*-*-osf*) with_stabs=yes; @@ -1766,7 +1772,14 @@ AC_SUBST_FILE(serialization_dependencies) # Base args. Strip norecursion, cache-file, srcdir, host, build, # target and nonopt. These are the ones we might not want to pass -# down to subconfigures. +# down to subconfigures. Also strip program-prefix, program-suffix, +# and program-transform-name, so that we can pass down a consistent +# program-transform-name. If autoconf has put single quotes around +# any of these arguments (because they contain shell metacharacters) +# then this will fail; in practice this only happens for +# --program-transform-name, so be sure to override --program-transform-name +# at the end of the argument list. +# These will be expanded by make, so quote '$'. cat <<\EOF_SED > conftestsed s/ --no[[^ ]]* / / s/ --c[[a-z-]]*[[= ]][[^ ]]* / / @@ -1774,17 +1787,38 @@ s/ --sr[[a-z-]]*[[= ]][[^ ]]* / / s/ --ho[[a-z-]]*[[= ]][[^ ]]* / / s/ --bu[[a-z-]]*[[= ]][[^ ]]* / / s/ --t[[a-z-]]*[[= ]][[^ ]]* / / +s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* / / s/ -cache-file[[= ]][[^ ]]* / / s/ -srcdir[[= ]][[^ ]]* / / s/ -host[[= ]][[^ ]]* / / s/ -build[[= ]][[^ ]]* / / s/ -target[[= ]][[^ ]]* / / +s/ -program-prefix[[= ]][[^ ]]* / / +s/ -program-suffix[[= ]][[^ ]]* / / +s/ -program-transform-name[[= ]][[^ ]]* / / s/ [[^' -][^ ]*] / / s/^ *//;s/ *$// -s,\\,\\\\,g; s,\$,$$,g +s,\$,$$,g +EOF_SED +sed -f conftestsed < conftestsed.out + ${ac_configure_args} EOF_SED -baseargs=`echo " ${ac_configure_args} " | sed -f conftestsed` -rm -f conftestsed +baseargs=`cat conftestsed.out` +rm -f conftestsed conftestsed.out + +# Add in --program-transform-name, after --program-prefix and +# --program-suffix have been applied to it. Autoconf has already +# doubled dollar signs and backslashes in program_transform_name; we want +# the backslashes un-doubled, and then the entire thing wrapped in single +# quotes, because this will be expanded first by make and then by the shell. +# Also, because we want to override the logic in subdir configure scripts to +# choose program_transform_name, replace any s,x,x, with s,y,y,. +sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" < conftestsed.out +${program_transform_name} +EOF_SED +gcc_transform_name=`cat conftestsed.out` +rm -f conftestsed.out +baseargs="$baseargs --program-transform-name='${gcc_transform_name}'" # For the build-side libraries, we just need to pretend we're native, # and not use the same cache file. Multilibs are neither needed nor @@ -1801,7 +1835,9 @@ case "${cache_file}" in cache_file_option="--cache-file=../${cache_file}" ;; esac -host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}" +# Host dirs don't like to share a cache file either, horribly enough. +# This seems to be due to autoconf 2.5x stupidity. +host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}" target_configargs=${baseargs} @@ -1825,8 +1861,17 @@ if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib target_configargs="--with-newlib ${target_configargs}" fi +# Different target subdirs use different values of certain variables +# (notably CXX). Worse, multilibs use *lots* of different values. +# Worse yet, autoconf 2.5x makes some of these 'precious', meaning that +# it doesn't automatically accept command-line overrides of them. +# This means it's not safe for target subdirs to share a cache file, +# which is disgusting, but there you have it. Hopefully this can be +# fixed in future. It's still worthwhile to use a cache file for each +# directory. I think. + # Pass the appropriate --host, --build, and --cache-file arguments. -target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}" +target_configargs="--cache-file=./config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}" # provide a proper gxx_include_dir. # Note, if you change the default, make sure to fix both here and in @@ -1897,6 +1942,10 @@ case " $target_configdirs " in ;; esac +# Allow the user to override the flags for +# our build compiler if desired. +CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} + # On Canadian crosses, we'll be searching the right directories for # the previously-installed cross compiler, so don't bother to add # flags for directories within the install tree of the compiler @@ -1936,7 +1985,7 @@ GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)' # Don't use libstdc++-v3's flags to configure/build itself. libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' -raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' +raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' if test "x${CXX_FOR_TARGET+set}" = xset; then if test "x${RAW_CXX_FOR_TARGET+set}" != xset; then @@ -2038,6 +2087,7 @@ NCN_STRICT_CHECK_TOOL(OBJDUMP, objdump) AC_SUBST(CC) AC_SUBST(CXX) AC_SUBST(CFLAGS) +AC_SUBST(CFLAGS_FOR_BUILD) AC_SUBST(CXXFLAGS) AC_SUBST(DEFAULT_YACC) AC_SUBST(DEFAULT_LEX)