From: bonzini Date: Thu, 26 Jan 2006 18:52:49 +0000 (+0000) Subject: 2006-01-26 Paolo Bonzini X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=c47832b1e268e7787a1ed5bf652adefbffcde4b8 2006-01-26 Paolo Bonzini * configure.in: Set with_gnu_as, with_gnu_ld, with_newlib earlier. Set md_exec_prefix. Use ACX_CHECK_INSTALLED_TARGET_TOOL to find the assembler, linker and binutils. * configure: Regenerate. 2006-01-26 Paolo Bonzini * config/acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Test $with_build_time_tools. (ACX_PATH_SEP): New. (ACX_TOOL_DIRS): Move here from the gcc directory. (ACX_CHECK_INSTALLED_TARGET_TOOL): New. (GCC_TARGET_TOOL): Do not use a host tool if we found a target tool with a complete path in either $with_build_time_tools or $exec_prefix. 2006-01-26 Paolo Bonzini * configure.ac: Expect target tools paths to be passed from the toplevel and wrap the detection into AS_SET_VAR_IF. Extract side-effects out of AS_SET_VAR_IF. * acinclude.m4 (gcc_AC_TOOL_DIRS, gcc_AC_CHECK_TOOL): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110266 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/ChangeLog b/ChangeLog index e10fbcb7b8a..c788cc720cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-01-26 Paolo Bonzini + + * configure.in: Set with_gnu_as, with_gnu_ld, with_newlib earlier. + Set md_exec_prefix. Use ACX_CHECK_INSTALLED_TARGET_TOOL to find + the assembler, linker and binutils. + * configure: Regenerate. + 2006-01-22 Dirk Mueller * MAINTAINERS (Write After Approval): Add myself. diff --git a/config/ChangeLog b/config/ChangeLog index cf60516185e..b000a8062d7 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,4 +1,14 @@ -2006-02-01 Paolo Bonzini +2006-01-26 Paolo Bonzini + + * config/acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Test + $with_build_time_tools. + (ACX_PATH_SEP): New. + (ACX_TOOL_DIRS): Move here from the gcc directory. + (ACX_CHECK_INSTALLED_TARGET_TOOL): New. + (GCC_TARGET_TOOL): Do not use a host tool if we found a target tool + with a complete path in either $with_build_time_tools or $exec_prefix. + +2006-01-02 Paolo Bonzini PR target/25259 * stdint.m4: New. diff --git a/config/acx.m4 b/config/acx.m4 index c71f39b44b8..9f0dd1e00be 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -104,7 +104,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias- #### # NCN_STRICT_CHECK_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path]) -# Like plain AC_CHECK_TOOLS, but require prefix if build!=target. +# Like plain AC_CHECK_TOOLS, but require prefix if build!=host. AC_DEFUN([NCN_STRICT_CHECK_TOOLS], [AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl @@ -135,17 +135,32 @@ fi AC_DEFUN([NCN_STRICT_CHECK_TARGET_TOOLS], [AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl -for ncn_progname in $2; do - if test -n "$ncn_target_tool_prefix"; then - AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}${ncn_progname}], - [${ncn_target_tool_prefix}${ncn_progname}], , [$4]) - fi - if test -z "$ac_cv_prog_$1" && test $build = $target ; then - AC_CHECK_PROG([$1], [${ncn_progname}], [${ncn_progname}], , [$4]) - fi - test -n "$ac_cv_prog_$1" && break -done +if test -n "$with_build_time_tools"; then + for ncn_progname in $2; do + AC_MSG_CHECKING([for ${ncn_progname} in $with_build_time_tools]) + if test -x $with_build_time_tools/$1; then + ac_cv_prog_$1=$with_build_time_tools/$1 + AC_MSG_RESULT(yes) + break + else + AC_MSG_RESULT(no) + fi + done +fi +if test -z "$ac_cv_prog_$1"; then + for ncn_progname in $2; do + if test -n "$ncn_target_tool_prefix"; then + AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}${ncn_progname}], + [${ncn_target_tool_prefix}${ncn_progname}], , [$4]) + fi + if test -z "$ac_cv_prog_$1" && test $build = $target ; then + AC_CHECK_PROG([$1], [${ncn_progname}], [${ncn_progname}], , [$4]) + fi + test -n "$ac_cv_prog_$1" && break + done +fi + if test -z "$ac_cv_prog_$1" ; then ifelse([$3],[], [set dummy $2 if test $build = $target ; then @@ -155,6 +170,124 @@ if test -z "$ac_cv_prog_$1" ; then fi], [$1="$3"]) fi ]) []dnl # NCN_STRICT_CHECK_TARGET_TOOLS + + +# Backported from Autoconf 2.5x; can go away when and if +# we switch. Put the OS path separator in $PATH_SEPARATOR. +AC_DEFUN([ACX_PATH_SEP], [ +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +]) + + +AC_DEFUN([ACX_TOOL_DIRS], [ +AC_REQUIRE([ACX_PATH_SEP]) +if test "x$exec_prefix" = xNONE; then + if test "x$prefix" = xNONE; then + gcc_cv_tool_prefix=$ac_default_prefix + else + gcc_cv_tool_prefix=$prefix + fi +else + gcc_cv_tool_prefix=$exec_prefix +fi + +# If there is no compiler in the tree, use the PATH only. In any +# case, if there is no compiler in the tree nobody should use +# AS_FOR_TARGET and LD_FOR_TARGET. +if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then + gcc_version=`cat $srcdir/gcc/BASE-VER` + gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin$PATH_SEPARATOR" +else + gcc_cv_tool_dirs= +fi + +if test x$build = x$target && test -n "$md_exec_prefix"; then + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$md_exec_prefix$PATH_SEPARATOR" +fi + +]) []dnl # ACX_TOOL_DIRS + +# ACX_HAVE_GCC_FOR_TARGET +# Check if the variable GCC_FOR_TARGET really points to a GCC binary. +AC_DEFUN([ACX_HAVE_GCC_FOR_TARGET], [ +cat > conftest.c << \EOF +#ifdef __GNUC__ + gcc_yay; +#endif +EOF +if ($GCC_FOR_TARGET -E conftest.c | grep gcc_yay) > /dev/null 2>&1; then + have_gcc_for_target=yes +else + GCC_FOR_TARGET=${ncn_target_tool_prefix}gcc + have_gcc_for_target=no +fi +rm conftest.c +]) + +# ACX_CHECK_INSTALLED_TARGET_TOOL(VAR, PROG) +# Searching for installed target binutils. We need to take extra care, +# else we may find the wrong assembler, linker, etc., and lose. +# +# First try --with-build-time-tools, if specified. +# +# For build != host, we ask the installed GCC for the name of the tool it +# uses, and accept it if it is an absolute path. This is because the +# only good choice for a compiler is the same GCC version that is being +# installed (or we couldn't make target libraries), and we assume that +# on the host system we'll have not only the same GCC version, but also +# the same binutils version. +# +# For build == host, search the same directories that the installed +# compiler will search. We used to do this for the assembler, linker, +# and nm only; for simplicity of configuration, however, we extend this +# criterion to tools (such as ar and ranlib) that are never invoked by +# the compiler, to avoid mismatches. +# +# Also note we have to check MD_EXEC_PREFIX before checking the user's path +# if build == target. This makes the most sense only when bootstrapping, +# but we also do so when build != host. In this case, we hope that the +# build and host systems will have similar contents of MD_EXEC_PREFIX. +# +# If we do not find a suitable binary, then try the user's path. + +AC_DEFUN([ACX_CHECK_INSTALLED_TARGET_TOOL], [ +AC_REQUIRE([ACX_TOOL_DIRS]) +AC_REQUIRE([ACX_HAVE_GCC_FOR_TARGET]) +if test -z "$ac_cv_path_$1" ; then + if test -n "$with_build_time_tools"; then + AC_MSG_CHECKING([for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools]) + $1=`cd $with_build_time_tools && pwd`/$1 + ac_cv_path_$1=[$]$1 + AC_MSG_RESULT([$ac_cv_path_$1]) + elif test $build != $host && test $have_gcc_for_target = yes; then + $1=`$GCC_FOR_TARGET --print-prog-name=$2` + test [$]$1=$2 && $1= + ac_cv_path_$1=[$]$1 + fi +fi +if test -z "$ac_cv_path_$1" ; then + AC_PATH_PROG([$1], [$2], [], [$gcc_cv_tool_dirs]) +fi +if test -z "$ac_cv_path_$1" ; then + NCN_STRICT_CHECK_TARGET_TOOLS([$1], [$2]) +fi +]) []dnl # ACX_CHECK_INSTALLED_TARGET_TOOL ### # AC_PROG_CPP_WERROR @@ -300,8 +433,13 @@ dnl GCC_TARGET_TOOL(PROGRAM, TARGET-VAR, HOST-VAR, IN-TREE-TOOL, LANGUAGE) AC_DEFUN([GCC_TARGET_TOOL], [AC_MSG_CHECKING(where to find the target $1) if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - AC_MSG_RESULT(pre-installed) + if expr "x[$]$2" : "x/" > /dev/null; then + # We already found the complete path + AC_MSG_RESULT(pre-installed in `dirname [$]$2`) + else + # Canadian cross, just use what we found + AC_MSG_RESULT(pre-installed) + fi else ifelse([$4],,, [ok=yes @@ -318,7 +456,10 @@ else # An in-tree tool is available and we can use it $2='$$r/$(HOST_SUBDIR)/$4' AC_MSG_RESULT(just compiled) - el])if test "x$target" = "x$host"; then + el])if expr "x[$]$2" : "x/" > /dev/null; then + # We already found the complete path + AC_MSG_RESULT(pre-installed in `dirname [$]$2`) + elif test "x$target" = "x$host"; then # We can use an host tool $2='$($3)' AC_MSG_RESULT(host tool) diff --git a/configure b/configure index 32e4e9c026e..9b8e2b30fc3 100755 --- a/configure +++ b/configure @@ -34,6 +34,9 @@ ac_help="$ac_help sub-packages for the host, target or build machine, or all sub-packages" ac_help="$ac_help + --with-build-time-tools=path + use given path to find target tools during the build" +ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" ac_help="$ac_help @@ -596,7 +599,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:600: checking host system type" >&5 +echo "configure:603: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -617,7 +620,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:621: checking target system type" >&5 +echo "configure:624: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -635,7 +638,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:639: checking build system type" >&5 +echo "configure:642: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -690,7 +693,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:694: checking for a BSD compatible install" >&5 +echo "configure:697: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -743,7 +746,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln works""... $ac_c" 1>&6 -echo "configure:747: checking whether ln works" >&5 +echo "configure:750: checking whether ln works" >&5 if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -767,7 +770,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:771: checking whether ln -s works" >&5 +echo "configure:774: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1852,7 +1855,7 @@ else # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1856: checking for $ac_word" >&5 +echo "configure:1859: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1882,7 +1885,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1886: checking for $ac_word" >&5 +echo "configure:1889: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1933,7 +1936,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1937: checking for $ac_word" >&5 +echo "configure:1940: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1965,7 +1968,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1969: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1976,12 +1979,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1980 "configure" +#line 1983 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2007,12 +2010,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2011: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2014: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2016: checking whether we are using GNU C" >&5 +echo "configure:2019: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2021,7 +2024,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2040,7 +2043,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2044: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2047: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2107,7 +2110,7 @@ fi # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2111: checking for $ac_word" >&5 +echo "configure:2114: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2139,7 +2142,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "gnatbind", so it can be a program name with args. set dummy gnatbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2143: checking for $ac_word" >&5 +echo "configure:2146: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2172,7 +2175,7 @@ fi fi echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6 -echo "configure:2176: checking whether compiler driver understands Ada" >&5 +echo "configure:2179: checking whether compiler driver understands Ada" >&5 if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2204,7 +2207,7 @@ else fi echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6 -echo "configure:2208: checking how to compare bootstrapped objects" >&5 +echo "configure:2211: checking how to compare bootstrapped objects" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2302,9 +2305,9 @@ saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $gmpinc" # Check GMP actually works echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6 -echo "configure:2306: checking for correct version of gmp.h" >&5 +echo "configure:2309: checking for correct version of gmp.h" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2328,12 +2331,12 @@ rm -f conftest* if test x"$have_gmp" = xyes; then echo $ac_n "checking for MPFR""... $ac_c" 1>&6 -echo "configure:2332: checking for MPFR" >&5 +echo "configure:2335: checking for MPFR" >&5 saved_LIBS="$LIBS" LIBS="$LIBS $gmplibs" cat > conftest.$ac_ext < #include @@ -2341,7 +2344,7 @@ int main() { mpfr_t n; mpfr_init(n); ; return 0; } EOF -if { (eval echo configure:2345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2701,6 +2704,39 @@ if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then fi fi +# Set with_gnu_as and with_gnu_ld as appropriate. +# +# This is done by determining whether or not the appropriate directory +# is available, and by checking whether or not specific configurations +# have requested that this magic not happen. +# +# The command line options always override the explicit settings in +# configure.in, and the settings in configure.in override this magic. +# +# If the default for a toolchain is to use GNU as and ld, and you don't +# want to do that, then you should use the --without-gnu-as and +# --without-gnu-ld options for the configure script. + +if test x${use_gnu_as} = x && + echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then + with_gnu_as=yes + extra_host_args="$extra_host_args --with-gnu-as" +fi + +if test x${use_gnu_ld} = x && + echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then + with_gnu_ld=yes + extra_host_args="$extra_host_args --with-gnu-ld" +fi + +# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure +# can detect this case. + +if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then + with_newlib=yes + extra_host_args="$extra_host_args --with-newlib" +fi + # Handle ${copy_dirs} set fnord ${copy_dirs} shift @@ -2732,6 +2768,55 @@ while test $# != 0 ; do shift; shift done +# Determine a target-dependent exec_prefix that the installed +# gcc will search in. Keep this list sorted by triplet, with +# the *-*-osname triplets last. +md_exec_prefix= +case "${target}" in + alpha*-*-*vms*) + md_exec_prefix=/gnu/lib/gcc-lib + ;; + i3456786-pc-msdosdjgpp*) + md_exec_prefix=/dev/env/DJDIR/bin + ;; + i3456786-*-sco3.2v5*) + if test $with_gnu_as = yes; then + md_exec_prefix=/usr/gnu/bin + else + md_exec_prefix=/usr/ccs/bin/elf + fi + ;; + + mn10300-*-* | \ + powerpc-*-chorusos* | \ + powerpc*-*-eabi* | \ + powerpc*-*-sysv* | \ + powerpc*-*-kaos* | \ + s390x-ibm-tpf*) + md_exec_prefix=/usr/ccs/bin + ;; + sparc64-*-elf*) + ;; + v850*-*-*) + md_exec_prefix=/usr/ccs/bin + ;; + xtensa-*-elf*) + ;; + + *-*-beos* | \ + *-*-elf* | \ + *-*-hpux* | \ + *-*-netware* | \ + *-*-nto-qnx* | \ + *-*-rtems* | \ + *-*-solaris2* | \ + *-*-sysv45* | \ + *-*-vxworks* | \ + *-wrs-windiss) + md_exec_prefix=/usr/ccs/bin + ;; +esac + extra_arflags_for_target= extra_nmflags_for_target= extra_ranlibflags_for_target= @@ -2789,39 +2874,6 @@ case "${enable_target_optspace}:${target}" in ;; esac -# Set with_gnu_as and with_gnu_ld as appropriate. -# -# This is done by determining whether or not the appropriate directory -# is available, and by checking whether or not specific configurations -# have requested that this magic not happen. -# -# The command line options always override the explicit settings in -# configure.in, and the settings in configure.in override this magic. -# -# If the default for a toolchain is to use GNU as and ld, and you don't -# want to do that, then you should use the --without-gnu-as and -# --without-gnu-ld options for the configure script. - -if test x${use_gnu_as} = x && - echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then - with_gnu_as=yes - extra_host_args="$extra_host_args --with-gnu-as" -fi - -if test x${use_gnu_ld} = x && - echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then - with_gnu_ld=yes - extra_host_args="$extra_host_args --with-gnu-ld" -fi - -# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure -# can detect this case. - -if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then - with_newlib=yes - extra_host_args="$extra_host_args --with-newlib" -fi - # Default to using --with-stabs for certain targets. if test x${with_stabs} = x ; then case "${target}" in @@ -3337,7 +3389,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3341: checking for $ac_word" >&5 +echo "configure:3393: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3377,7 +3429,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3381: checking for $ac_word" >&5 +echo "configure:3433: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3416,7 +3468,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3420: checking for $ac_word" >&5 +echo "configure:3472: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3455,7 +3507,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3459: checking for $ac_word" >&5 +echo "configure:3511: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3495,7 +3547,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3499: checking for $ac_word" >&5 +echo "configure:3551: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3534,7 +3586,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3538: checking for $ac_word" >&5 +echo "configure:3590: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3587,7 +3639,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3591: checking for $ac_word" >&5 +echo "configure:3643: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3628,7 +3680,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3632: checking for $ac_word" >&5 +echo "configure:3684: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3676,7 +3728,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias- # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3680: checking for $ac_word" >&5 +echo "configure:3732: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3707,7 +3759,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3711: checking for $ac_word" >&5 +echo "configure:3763: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3751,7 +3803,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3755: checking for $ac_word" >&5 +echo "configure:3807: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3782,7 +3834,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3786: checking for $ac_word" >&5 +echo "configure:3838: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3826,7 +3878,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3830: checking for $ac_word" >&5 +echo "configure:3882: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3857,7 +3909,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3861: checking for $ac_word" >&5 +echo "configure:3913: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3901,7 +3953,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3905: checking for $ac_word" >&5 +echo "configure:3957: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3932,7 +3984,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3936: checking for $ac_word" >&5 +echo "configure:3988: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3976,7 +4028,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3980: checking for $ac_word" >&5 +echo "configure:4032: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4007,7 +4059,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4011: checking for $ac_word" >&5 +echo "configure:4063: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4051,7 +4103,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4055: checking for $ac_word" >&5 +echo "configure:4107: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4082,7 +4134,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4086: checking for $ac_word" >&5 +echo "configure:4138: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4126,7 +4178,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4130: checking for $ac_word" >&5 +echo "configure:4182: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4157,7 +4209,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4161: checking for $ac_word" >&5 +echo "configure:4213: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4196,7 +4248,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4200: checking for $ac_word" >&5 +echo "configure:4252: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4227,7 +4279,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4231: checking for $ac_word" >&5 +echo "configure:4283: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4266,7 +4318,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4270: checking for $ac_word" >&5 +echo "configure:4322: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4297,7 +4349,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4301: checking for $ac_word" >&5 +echo "configure:4353: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4341,7 +4393,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4345: checking for $ac_word" >&5 +echo "configure:4397: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4372,7 +4424,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4376: checking for $ac_word" >&5 +echo "configure:4428: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4416,7 +4468,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4420: checking for $ac_word" >&5 +echo "configure:4472: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4447,7 +4499,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4451: checking for $ac_word" >&5 +echo "configure:4503: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4493,162 +4545,42 @@ fi # Target tools. - for ncn_progname in ar; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. -set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4502: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AR_FOR_TARGET"; then - ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET" -if test -n "$AR_FOR_TARGET"; then - echo "$ac_t""$AR_FOR_TARGET" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - fi - if test -z "$ac_cv_prog_AR_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. -set dummy ${ncn_progname}; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4533: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AR_FOR_TARGET"; then - ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR_FOR_TARGET="${ncn_progname}" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET" -if test -n "$AR_FOR_TARGET"; then - echo "$ac_t""$AR_FOR_TARGET" 1>&6 +# Check whether --with-build-time-tools or --without-build-time-tools was given. +if test "${with_build_time_tools+set}" = set; then + withval="$with_build_time_tools" + case x"$withval" in + x/*) ;; + *) + with_build_time_tools= + echo "configure: warning: argument to --with-build-time-tools must be an absolute path" 1>&2 + ;; + esac else - echo "$ac_t""no" 1>&6 -fi - - fi - test -n "$ac_cv_prog_AR_FOR_TARGET" && break -done - -if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then - set dummy ar - if test $build = $target ; then - AR_FOR_TARGET="$2" - else - AR_FOR_TARGET="${ncn_target_tool_prefix}$2" - fi + with_build_time_tools= fi - for ncn_progname in as; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. -set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4577: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AS_FOR_TARGET"; then - ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET" -if test -n "$AS_FOR_TARGET"; then - echo "$ac_t""$AS_FOR_TARGET" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - fi - if test -z "$ac_cv_prog_AS_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. -set dummy ${ncn_progname}; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4608: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AS_FOR_TARGET"; then - ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AS_FOR_TARGET="${ncn_progname}" + if test -n "$with_build_time_tools"; then + for ncn_progname in cc gcc; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:4567: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/CC_FOR_TARGET; then + ac_cv_prog_CC_FOR_TARGET=$with_build_time_tools/CC_FOR_TARGET + echo "$ac_t""yes" 1>&6 break + else + echo "$ac_t""no" 1>&6 fi done - IFS="$ac_save_ifs" -fi -fi -AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET" -if test -n "$AS_FOR_TARGET"; then - echo "$ac_t""$AS_FOR_TARGET" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - fi - test -n "$ac_cv_prog_AS_FOR_TARGET" && break -done - -if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then - set dummy as - if test $build = $target ; then - AS_FOR_TARGET="$2" - else - AS_FOR_TARGET="${ncn_target_tool_prefix}$2" - fi fi - for ncn_progname in cc gcc; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +if test -z "$ac_cv_prog_CC_FOR_TARGET"; then + for ncn_progname in cc gcc; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4652: checking for $ac_word" >&5 +echo "configure:4584: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4674,12 +4606,12 @@ else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_CC_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. + fi + if test -z "$ac_cv_prog_CC_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4683: checking for $ac_word" >&5 +echo "configure:4615: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4705,10 +4637,11 @@ else echo "$ac_t""no" 1>&6 fi - fi - test -n "$ac_cv_prog_CC_FOR_TARGET" && break -done - + fi + test -n "$ac_cv_prog_CC_FOR_TARGET" && break + done +fi + if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then set dummy cc gcc if test $build = $target ; then @@ -4718,12 +4651,27 @@ if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then fi fi - for ncn_progname in c++ g++ cxx gxx; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. + if test -n "$with_build_time_tools"; then + for ncn_progname in c++ g++ cxx gxx; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:4658: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/CXX_FOR_TARGET; then + ac_cv_prog_CXX_FOR_TARGET=$with_build_time_tools/CXX_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_CXX_FOR_TARGET"; then + for ncn_progname in c++ g++ cxx gxx; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4727: checking for $ac_word" >&5 +echo "configure:4675: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4749,12 +4697,12 @@ else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. + fi + if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4758: checking for $ac_word" >&5 +echo "configure:4706: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4780,10 +4728,11 @@ else echo "$ac_t""no" 1>&6 fi - fi - test -n "$ac_cv_prog_CXX_FOR_TARGET" && break -done - + fi + test -n "$ac_cv_prog_CXX_FOR_TARGET" && break + done +fi + if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then set dummy c++ g++ cxx gxx if test $build = $target ; then @@ -4793,307 +4742,851 @@ if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then fi fi - for ncn_progname in dlltool; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. + if test -n "$with_build_time_tools"; then + for ncn_progname in gcc; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:4749: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/GCC_FOR_TARGET; then + ac_cv_prog_GCC_FOR_TARGET=$with_build_time_tools/GCC_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_GCC_FOR_TARGET"; then + for ncn_progname in gcc; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4802: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then +echo "configure:4766: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$DLLTOOL_FOR_TARGET"; then - ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test. + if test -n "$GCC_FOR_TARGET"; then + ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" + ac_cv_prog_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" break fi done IFS="$ac_save_ifs" fi fi -DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET" -if test -n "$DLLTOOL_FOR_TARGET"; then - echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6 +GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET" +if test -n "$GCC_FOR_TARGET"; then + echo "$ac_t""$GCC_FOR_TARGET" 1>&6 else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. + fi + if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4833: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then +echo "configure:4797: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$DLLTOOL_FOR_TARGET"; then - ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test. + if test -n "$GCC_FOR_TARGET"; then + ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}" + ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}" break fi done IFS="$ac_save_ifs" fi fi -DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET" -if test -n "$DLLTOOL_FOR_TARGET"; then - echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6 +GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET" +if test -n "$GCC_FOR_TARGET"; then + echo "$ac_t""$GCC_FOR_TARGET" 1>&6 else echo "$ac_t""no" 1>&6 fi + fi + test -n "$ac_cv_prog_GCC_FOR_TARGET" && break + done +fi + +if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then + GCC_FOR_TARGET="${CC_FOR_TARGET}" +fi + + if test -n "$with_build_time_tools"; then + for ncn_progname in gcj; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:4835: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/GCJ_FOR_TARGET; then + ac_cv_prog_GCJ_FOR_TARGET=$with_build_time_tools/GCJ_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_GCJ_FOR_TARGET"; then + for ncn_progname in gcj; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4852: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$GCJ_FOR_TARGET"; then + ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET" +if test -n "$GCJ_FOR_TARGET"; then + echo "$ac_t""$GCJ_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_progname}; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4883: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$GCJ_FOR_TARGET"; then + ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET" +if test -n "$GCJ_FOR_TARGET"; then + echo "$ac_t""$GCJ_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break + done +fi + +if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then + set dummy gcj + if test $build = $target ; then + GCJ_FOR_TARGET="$2" + else + GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2" fi - test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break -done +fi -if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then - set dummy dlltool + if test -n "$with_build_time_tools"; then + for ncn_progname in gfortran; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:4926: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/GFORTRAN_FOR_TARGET; then + ac_cv_prog_GFORTRAN_FOR_TARGET=$with_build_time_tools/GFORTRAN_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then + for ncn_progname in gfortran; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4943: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$GFORTRAN_FOR_TARGET"; then + ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET" +if test -n "$GFORTRAN_FOR_TARGET"; then + echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_progname}; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4974: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$GFORTRAN_FOR_TARGET"; then + ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET" +if test -n "$GFORTRAN_FOR_TARGET"; then + echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break + done +fi + +if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then + set dummy gfortran if test $build = $target ; then - DLLTOOL_FOR_TARGET="$2" + GFORTRAN_FOR_TARGET="$2" else - DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2" + GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2" + fi +fi + + + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: fi + rm -f conf$$.sh +fi + + + +if test "x$exec_prefix" = xNONE; then + if test "x$prefix" = xNONE; then + gcc_cv_tool_prefix=$ac_default_prefix + else + gcc_cv_tool_prefix=$prefix + fi +else + gcc_cv_tool_prefix=$exec_prefix +fi + +# If there is no compiler in the tree, use the PATH only. In any +# case, if there is no compiler in the tree nobody should use +# AS_FOR_TARGET and LD_FOR_TARGET. +if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then + gcc_version=`cat $srcdir/gcc/BASE-VER` + gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR" + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin$PATH_SEPARATOR" +else + gcc_cv_tool_dirs= +fi + +if test x$build = x$target && test -n "$md_exec_prefix"; then + gcc_cv_tool_dirs="$gcc_cv_tool_dirs$md_exec_prefix$PATH_SEPARATOR" +fi + + + +cat > conftest.c << \EOF +#ifdef __GNUC__ + gcc_yay; +#endif +EOF +if ($GCC_FOR_TARGET -E conftest.c | grep gcc_yay) > /dev/null 2>&1; then + have_gcc_for_target=yes +else + GCC_FOR_TARGET=${ncn_target_tool_prefix}gcc + have_gcc_for_target=no +fi +rm conftest.c + + + + +if test -z "$ac_cv_path_AR_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5081: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5 + AR_FOR_TARGET=`cd $with_build_time_tools && pwd`/AR_FOR_TARGET + ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET + echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6 + elif test $build != $host && test $have_gcc_for_target = yes; then + AR_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ar` + test $AR_FOR_TARGET=ar && AR_FOR_TARGET= + ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET + fi +fi +if test -z "$ac_cv_path_AR_FOR_TARGET" ; then + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5095: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$AR_FOR_TARGET" in + /*) + ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$gcc_cv_tool_dirs" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET" +if test -n "$AR_FOR_TARGET"; then + echo "$ac_t""$AR_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 fi - for ncn_progname in gcc; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +fi +if test -z "$ac_cv_path_AR_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + for ncn_progname in ar; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5132: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/AR_FOR_TARGET; then + ac_cv_prog_AR_FOR_TARGET=$with_build_time_tools/AR_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_AR_FOR_TARGET"; then + for ncn_progname in ar; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4877: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then +echo "configure:5149: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$GCC_FOR_TARGET"; then - ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test. + if test -n "$AR_FOR_TARGET"; then + ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" + ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" break fi done IFS="$ac_save_ifs" fi fi -GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET" -if test -n "$GCC_FOR_TARGET"; then - echo "$ac_t""$GCC_FOR_TARGET" 1>&6 +AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET" +if test -n "$AR_FOR_TARGET"; then + echo "$ac_t""$AR_FOR_TARGET" 1>&6 else echo "$ac_t""no" 1>&6 fi + fi + if test -z "$ac_cv_prog_AR_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_progname}; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5180: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AR_FOR_TARGET"; then + ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AR_FOR_TARGET="${ncn_progname}" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET" +if test -n "$AR_FOR_TARGET"; then + echo "$ac_t""$AR_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + test -n "$ac_cv_prog_AR_FOR_TARGET" && break + done +fi + +if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then + set dummy ar + if test $build = $target ; then + AR_FOR_TARGET="$2" + else + AR_FOR_TARGET="${ncn_target_tool_prefix}$2" fi - if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. +fi + +fi + + + + +if test -z "$ac_cv_path_AS_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5228: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5 + AS_FOR_TARGET=`cd $with_build_time_tools && pwd`/AS_FOR_TARGET + ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET + echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6 + elif test $build != $host && test $have_gcc_for_target = yes; then + AS_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=as` + test $AS_FOR_TARGET=as && AS_FOR_TARGET= + ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET + fi +fi +if test -z "$ac_cv_path_AS_FOR_TARGET" ; then + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5242: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$AS_FOR_TARGET" in + /*) + ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$gcc_cv_tool_dirs" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET" +if test -n "$AS_FOR_TARGET"; then + echo "$ac_t""$AS_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +fi +if test -z "$ac_cv_path_AS_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + for ncn_progname in as; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5279: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/AS_FOR_TARGET; then + ac_cv_prog_AS_FOR_TARGET=$with_build_time_tools/AS_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_AS_FOR_TARGET"; then + for ncn_progname in as; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5296: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AS_FOR_TARGET"; then + ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET" +if test -n "$AS_FOR_TARGET"; then + echo "$ac_t""$AS_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + if test -z "$ac_cv_prog_AS_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4908: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then +echo "configure:5327: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$GCC_FOR_TARGET"; then - ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test. + if test -n "$AS_FOR_TARGET"; then + ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}" + ac_cv_prog_AS_FOR_TARGET="${ncn_progname}" break fi done IFS="$ac_save_ifs" fi fi -GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET" -if test -n "$GCC_FOR_TARGET"; then - echo "$ac_t""$GCC_FOR_TARGET" 1>&6 +AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET" +if test -n "$AS_FOR_TARGET"; then + echo "$ac_t""$AS_FOR_TARGET" 1>&6 else echo "$ac_t""no" 1>&6 fi + fi + test -n "$ac_cv_prog_AS_FOR_TARGET" && break + done +fi + +if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then + set dummy as + if test $build = $target ; then + AS_FOR_TARGET="$2" + else + AS_FOR_TARGET="${ncn_target_tool_prefix}$2" fi - test -n "$ac_cv_prog_GCC_FOR_TARGET" && break -done +fi -if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then - GCC_FOR_TARGET="${CC_FOR_TARGET}" fi - for ncn_progname in gcj; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. -set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 + + + +if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5375: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5 + DLLTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/DLLTOOL_FOR_TARGET + ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET + echo "$ac_t""$ac_cv_path_DLLTOOL_FOR_TARGET" 1>&6 + elif test $build != $host && test $have_gcc_for_target = yes; then + DLLTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=dlltool` + test $DLLTOOL_FOR_TARGET=dlltool && DLLTOOL_FOR_TARGET= + ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET + fi +fi +if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4947: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then +echo "configure:5389: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$GCJ_FOR_TARGET"; then - ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test. -else + case "$DLLTOOL_FOR_TARGET" in + /*) + ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a dos path. + ;; + *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do + ac_dummy="$gcc_cv_tool_dirs" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" + ac_cv_path_DLLTOOL_FOR_TARGET="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" + ;; +esac fi -fi -GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET" -if test -n "$GCJ_FOR_TARGET"; then - echo "$ac_t""$GCJ_FOR_TARGET" 1>&6 +DLLTOOL_FOR_TARGET="$ac_cv_path_DLLTOOL_FOR_TARGET" +if test -n "$DLLTOOL_FOR_TARGET"; then + echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6 else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. -set dummy ${ncn_progname}; ac_word=$2 +fi +if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + for ncn_progname in dlltool; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5426: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/DLLTOOL_FOR_TARGET; then + ac_cv_prog_DLLTOOL_FOR_TARGET=$with_build_time_tools/DLLTOOL_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then + for ncn_progname in dlltool; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4978: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then +echo "configure:5443: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$GCJ_FOR_TARGET"; then - ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test. + if test -n "$DLLTOOL_FOR_TARGET"; then + ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}" + ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" break fi done IFS="$ac_save_ifs" fi fi -GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET" -if test -n "$GCJ_FOR_TARGET"; then - echo "$ac_t""$GCJ_FOR_TARGET" 1>&6 +DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET" +if test -n "$DLLTOOL_FOR_TARGET"; then + echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6 else echo "$ac_t""no" 1>&6 fi - - fi - test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break -done - -if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then - set dummy gcj - if test $build = $target ; then - GCJ_FOR_TARGET="$2" - else - GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2" - fi -fi - for ncn_progname in gfortran; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. -set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 + fi + if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5022: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then +echo "configure:5474: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$GFORTRAN_FOR_TARGET"; then - ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test. + if test -n "$DLLTOOL_FOR_TARGET"; then + ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" + ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}" break fi done IFS="$ac_save_ifs" fi fi -GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET" -if test -n "$GFORTRAN_FOR_TARGET"; then - echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6 +DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET" +if test -n "$DLLTOOL_FOR_TARGET"; then + echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6 else echo "$ac_t""no" 1>&6 fi + + fi + test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break + done +fi + +if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then + set dummy dlltool + if test $build = $target ; then + DLLTOOL_FOR_TARGET="$2" + else + DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2" + fi +fi + +fi + + + +if test -z "$ac_cv_path_LD_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5522: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5 + LD_FOR_TARGET=`cd $with_build_time_tools && pwd`/LD_FOR_TARGET + ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET + echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6 + elif test $build != $host && test $have_gcc_for_target = yes; then + LD_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ld` + test $LD_FOR_TARGET=ld && LD_FOR_TARGET= + ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET fi - if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. -set dummy ${ncn_progname}; ac_word=$2 +fi +if test -z "$ac_cv_path_LD_FOR_TARGET" ; then + # Extract the first word of "ld", so it can be a program name with args. +set dummy ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5053: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then +echo "configure:5536: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$GFORTRAN_FOR_TARGET"; then - ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test. -else + case "$LD_FOR_TARGET" in + /*) + ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a dos path. + ;; + *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do + ac_dummy="$gcc_cv_tool_dirs" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}" + ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" + ;; +esac fi -fi -GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET" -if test -n "$GFORTRAN_FOR_TARGET"; then - echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6 +LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET" +if test -n "$LD_FOR_TARGET"; then + echo "$ac_t""$LD_FOR_TARGET" 1>&6 else echo "$ac_t""no" 1>&6 fi - - fi - test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break -done -if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then - set dummy gfortran - if test $build = $target ; then - GFORTRAN_FOR_TARGET="$2" - else - GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2" - fi +fi +if test -z "$ac_cv_path_LD_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + for ncn_progname in ld; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5573: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/LD_FOR_TARGET; then + ac_cv_prog_LD_FOR_TARGET=$with_build_time_tools/LD_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done fi - for ncn_progname in ld; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +if test -z "$ac_cv_prog_LD_FOR_TARGET"; then + for ncn_progname in ld; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5097: checking for $ac_word" >&5 +echo "configure:5590: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5119,12 +5612,12 @@ else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_LD_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. + fi + if test -z "$ac_cv_prog_LD_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5128: checking for $ac_word" >&5 +echo "configure:5621: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5150,10 +5643,11 @@ else echo "$ac_t""no" 1>&6 fi - fi - test -n "$ac_cv_prog_LD_FOR_TARGET" && break -done - + fi + test -n "$ac_cv_prog_LD_FOR_TARGET" && break + done +fi + if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then set dummy ld if test $build = $target ; then @@ -5163,12 +5657,83 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then fi fi - for ncn_progname in lipo; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +fi + + + + +if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5669: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5 + LIPO_FOR_TARGET=`cd $with_build_time_tools && pwd`/LIPO_FOR_TARGET + ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET + echo "$ac_t""$ac_cv_path_LIPO_FOR_TARGET" 1>&6 + elif test $build != $host && test $have_gcc_for_target = yes; then + LIPO_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=lipo` + test $LIPO_FOR_TARGET=lipo && LIPO_FOR_TARGET= + ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET + fi +fi +if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5683: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_LIPO_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$LIPO_FOR_TARGET" in + /*) + ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$gcc_cv_tool_dirs" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_LIPO_FOR_TARGET="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +LIPO_FOR_TARGET="$ac_cv_path_LIPO_FOR_TARGET" +if test -n "$LIPO_FOR_TARGET"; then + echo "$ac_t""$LIPO_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +fi +if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + for ncn_progname in lipo; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5720: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/LIPO_FOR_TARGET; then + ac_cv_prog_LIPO_FOR_TARGET=$with_build_time_tools/LIPO_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_LIPO_FOR_TARGET"; then + for ncn_progname in lipo; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5172: checking for $ac_word" >&5 +echo "configure:5737: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5194,12 +5759,12 @@ else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. + fi + if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5203: checking for $ac_word" >&5 +echo "configure:5768: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5225,10 +5790,11 @@ else echo "$ac_t""no" 1>&6 fi - fi - test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break -done - + fi + test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break + done +fi + if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then set dummy lipo if test $build = $target ; then @@ -5238,12 +5804,83 @@ if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then fi fi - for ncn_progname in nm; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +fi + + + + +if test -z "$ac_cv_path_NM_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5816: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5 + NM_FOR_TARGET=`cd $with_build_time_tools && pwd`/NM_FOR_TARGET + ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET + echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6 + elif test $build != $host && test $have_gcc_for_target = yes; then + NM_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=nm` + test $NM_FOR_TARGET=nm && NM_FOR_TARGET= + ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET + fi +fi +if test -z "$ac_cv_path_NM_FOR_TARGET" ; then + # Extract the first word of "nm", so it can be a program name with args. +set dummy nm; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5830: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$NM_FOR_TARGET" in + /*) + ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$gcc_cv_tool_dirs" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET" +if test -n "$NM_FOR_TARGET"; then + echo "$ac_t""$NM_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +fi +if test -z "$ac_cv_path_NM_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + for ncn_progname in nm; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5867: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/NM_FOR_TARGET; then + ac_cv_prog_NM_FOR_TARGET=$with_build_time_tools/NM_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_NM_FOR_TARGET"; then + for ncn_progname in nm; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5247: checking for $ac_word" >&5 +echo "configure:5884: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5269,12 +5906,12 @@ else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_NM_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. + fi + if test -z "$ac_cv_prog_NM_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5278: checking for $ac_word" >&5 +echo "configure:5915: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5300,10 +5937,11 @@ else echo "$ac_t""no" 1>&6 fi - fi - test -n "$ac_cv_prog_NM_FOR_TARGET" && break -done - + fi + test -n "$ac_cv_prog_NM_FOR_TARGET" && break + done +fi + if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then set dummy nm if test $build = $target ; then @@ -5313,12 +5951,83 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then fi fi - for ncn_progname in objdump; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +fi + + + + +if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:5963: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5 + OBJDUMP_FOR_TARGET=`cd $with_build_time_tools && pwd`/OBJDUMP_FOR_TARGET + ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET + echo "$ac_t""$ac_cv_path_OBJDUMP_FOR_TARGET" 1>&6 + elif test $build != $host && test $have_gcc_for_target = yes; then + OBJDUMP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objdump` + test $OBJDUMP_FOR_TARGET=objdump && OBJDUMP_FOR_TARGET= + ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET + fi +fi +if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5977: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$OBJDUMP_FOR_TARGET" in + /*) + ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$gcc_cv_tool_dirs" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_OBJDUMP_FOR_TARGET="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +OBJDUMP_FOR_TARGET="$ac_cv_path_OBJDUMP_FOR_TARGET" +if test -n "$OBJDUMP_FOR_TARGET"; then + echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +fi +if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + for ncn_progname in objdump; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:6014: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/OBJDUMP_FOR_TARGET; then + ac_cv_prog_OBJDUMP_FOR_TARGET=$with_build_time_tools/OBJDUMP_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then + for ncn_progname in objdump; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5322: checking for $ac_word" >&5 +echo "configure:6031: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5344,12 +6053,12 @@ else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. + fi + if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5353: checking for $ac_word" >&5 +echo "configure:6062: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5375,10 +6084,11 @@ else echo "$ac_t""no" 1>&6 fi - fi - test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET" && break -done - + fi + test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET" && break + done +fi + if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" ; then set dummy objdump if test $build = $target ; then @@ -5388,12 +6098,83 @@ if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" ; then fi fi - for ncn_progname in ranlib; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +fi + + + + +if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:6110: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5 + RANLIB_FOR_TARGET=`cd $with_build_time_tools && pwd`/RANLIB_FOR_TARGET + ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET + echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6 + elif test $build != $host && test $have_gcc_for_target = yes; then + RANLIB_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ranlib` + test $RANLIB_FOR_TARGET=ranlib && RANLIB_FOR_TARGET= + ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET + fi +fi +if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:6124: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$RANLIB_FOR_TARGET" in + /*) + ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$gcc_cv_tool_dirs" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET" +if test -n "$RANLIB_FOR_TARGET"; then + echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +fi +if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + for ncn_progname in ranlib; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:6161: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/RANLIB_FOR_TARGET; then + ac_cv_prog_RANLIB_FOR_TARGET=$with_build_time_tools/RANLIB_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_RANLIB_FOR_TARGET"; then + for ncn_progname in ranlib; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5397: checking for $ac_word" >&5 +echo "configure:6178: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5419,12 +6200,12 @@ else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. + fi + if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5428: checking for $ac_word" >&5 +echo "configure:6209: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5450,20 +6231,97 @@ else echo "$ac_t""no" 1>&6 fi + fi + test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break + done +fi + +if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then + set dummy ranlib + if test $build = $target ; then + RANLIB_FOR_TARGET="$2" + else + RANLIB_FOR_TARGET="${ncn_target_tool_prefix}$2" fi - test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break -done +fi -if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then - RANLIB_FOR_TARGET=":" fi - for ncn_progname in strip; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. + + + +if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:6257: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5 + STRIP_FOR_TARGET=`cd $with_build_time_tools && pwd`/STRIP_FOR_TARGET + ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET + echo "$ac_t""$ac_cv_path_STRIP_FOR_TARGET" 1>&6 + elif test $build != $host && test $have_gcc_for_target = yes; then + STRIP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=strip` + test $STRIP_FOR_TARGET=strip && STRIP_FOR_TARGET= + ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET + fi +fi +if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:6271: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$STRIP_FOR_TARGET" in + /*) + ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$gcc_cv_tool_dirs" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_STRIP_FOR_TARGET="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET" +if test -n "$STRIP_FOR_TARGET"; then + echo "$ac_t""$STRIP_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +fi +if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + for ncn_progname in strip; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:6308: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/STRIP_FOR_TARGET; then + ac_cv_prog_STRIP_FOR_TARGET=$with_build_time_tools/STRIP_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_STRIP_FOR_TARGET"; then + for ncn_progname in strip; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5467: checking for $ac_word" >&5 +echo "configure:6325: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5489,12 +6347,12 @@ else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. + fi + if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5498: checking for $ac_word" >&5 +echo "configure:6356: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5520,10 +6378,11 @@ else echo "$ac_t""no" 1>&6 fi - fi - test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break -done - + fi + test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break + done +fi + if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then set dummy strip if test $build = $target ; then @@ -5533,12 +6392,83 @@ if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then fi fi - for ncn_progname in windres; do - if test -n "$ncn_target_tool_prefix"; then - # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +fi + + + + +if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + echo $ac_n "checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:6404: checking for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools" >&5 + WINDRES_FOR_TARGET=`cd $with_build_time_tools && pwd`/WINDRES_FOR_TARGET + ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET + echo "$ac_t""$ac_cv_path_WINDRES_FOR_TARGET" 1>&6 + elif test $build != $host && test $have_gcc_for_target = yes; then + WINDRES_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=windres` + test $WINDRES_FOR_TARGET=windres && WINDRES_FOR_TARGET= + ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET + fi +fi +if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:6418: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_WINDRES_FOR_TARGET'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$WINDRES_FOR_TARGET" in + /*) + ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$gcc_cv_tool_dirs" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_WINDRES_FOR_TARGET="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +WINDRES_FOR_TARGET="$ac_cv_path_WINDRES_FOR_TARGET" +if test -n "$WINDRES_FOR_TARGET"; then + echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +fi +if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then + if test -n "$with_build_time_tools"; then + for ncn_progname in windres; do + echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6 +echo "configure:6455: checking for ${ncn_progname} in $with_build_time_tools" >&5 + if test -x $with_build_time_tools/WINDRES_FOR_TARGET; then + ac_cv_prog_WINDRES_FOR_TARGET=$with_build_time_tools/WINDRES_FOR_TARGET + echo "$ac_t""yes" 1>&6 + break + else + echo "$ac_t""no" 1>&6 + fi + done +fi + +if test -z "$ac_cv_prog_WINDRES_FOR_TARGET"; then + for ncn_progname in windres; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5542: checking for $ac_word" >&5 +echo "configure:6472: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5564,12 +6494,12 @@ else echo "$ac_t""no" 1>&6 fi - fi - if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test $build = $target ; then - # Extract the first word of "${ncn_progname}", so it can be a program name with args. + fi + if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5573: checking for $ac_word" >&5 +echo "configure:6503: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5595,10 +6525,11 @@ else echo "$ac_t""no" 1>&6 fi - fi - test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break -done - + fi + test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break + done +fi + if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then set dummy windres if test $build = $target ; then @@ -5608,14 +6539,21 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then fi fi +fi + RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET" echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6 -echo "configure:5616: checking where to find the target ar" >&5 +echo "configure:6549: checking where to find the target ar" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5627,6 +6565,9 @@ else # An in-tree tool is available and we can use it AR_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ar' echo "$ac_t""just compiled" 1>&6 + elif expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool AR_FOR_TARGET='$(AR)' @@ -5637,10 +6578,15 @@ else fi fi echo $ac_n "checking where to find the target as""... $ac_c" 1>&6 -echo "configure:5641: checking where to find the target as" >&5 +echo "configure:6582: checking where to find the target as" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5652,6 +6598,9 @@ else # An in-tree tool is available and we can use it AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gas/as-new' echo "$ac_t""just compiled" 1>&6 + elif expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool AS_FOR_TARGET='$(AS)' @@ -5662,10 +6611,15 @@ else fi fi echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6 -echo "configure:5666: checking where to find the target cc" >&5 +echo "configure:6615: checking where to find the target cc" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5677,6 +6631,9 @@ else # An in-tree tool is available and we can use it CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/' echo "$ac_t""just compiled" 1>&6 + elif expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool CC_FOR_TARGET='$(CC)' @@ -5687,10 +6644,15 @@ else fi fi echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6 -echo "configure:5691: checking where to find the target c++" >&5 +echo "configure:6648: checking where to find the target c++" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5705,6 +6667,9 @@ else # An in-tree tool is available and we can use it CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `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' echo "$ac_t""just compiled" 1>&6 + elif expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool CXX_FOR_TARGET='$(CXX)' @@ -5715,10 +6680,15 @@ else fi fi echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6 -echo "configure:5719: checking where to find the target c++ for libstdc++" >&5 +echo "configure:6684: checking where to find the target c++ for libstdc++" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5733,6 +6703,9 @@ else # An in-tree tool is available and we can use it RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' echo "$ac_t""just compiled" 1>&6 + elif expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool RAW_CXX_FOR_TARGET='$(CXX)' @@ -5743,10 +6716,15 @@ else fi fi echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6 -echo "configure:5747: checking where to find the target dlltool" >&5 +echo "configure:6720: checking where to find the target dlltool" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5758,6 +6736,9 @@ else # An in-tree tool is available and we can use it DLLTOOL_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/dlltool' echo "$ac_t""just compiled" 1>&6 + elif expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool DLLTOOL_FOR_TARGET='$(DLLTOOL)' @@ -5768,10 +6749,15 @@ else fi fi echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6 -echo "configure:5772: checking where to find the target gcc" >&5 +echo "configure:6753: checking where to find the target gcc" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5783,6 +6769,9 @@ else # An in-tree tool is available and we can use it GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/' echo "$ac_t""just compiled" 1>&6 + elif expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool GCC_FOR_TARGET='$()' @@ -5793,10 +6782,15 @@ else fi fi echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6 -echo "configure:5797: checking where to find the target gcj" >&5 +echo "configure:6786: checking where to find the target gcj" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5811,6 +6805,9 @@ else # An in-tree tool is available and we can use it GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/' echo "$ac_t""just compiled" 1>&6 + elif expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool GCJ_FOR_TARGET='$(GCJ)' @@ -5821,10 +6818,15 @@ else fi fi echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6 -echo "configure:5825: checking where to find the target gfortran" >&5 +echo "configure:6822: checking where to find the target gfortran" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5839,6 +6841,9 @@ else # An in-tree tool is available and we can use it GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/' echo "$ac_t""just compiled" 1>&6 + elif expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool GFORTRAN_FOR_TARGET='$(GFORTRAN)' @@ -5849,10 +6854,15 @@ else fi fi echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6 -echo "configure:5853: checking where to find the target ld" >&5 +echo "configure:6858: checking where to find the target ld" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5864,6 +6874,9 @@ else # An in-tree tool is available and we can use it LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/ld/ld-new' echo "$ac_t""just compiled" 1>&6 + elif expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool LD_FOR_TARGET='$(LD)' @@ -5874,12 +6887,20 @@ else fi fi echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6 -echo "configure:5878: checking where to find the target lipo" >&5 +echo "configure:6891: checking where to find the target lipo" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else - if test "x$target" = "x$host"; then + if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6 + elif test "x$target" = "x$host"; then # We can use an host tool LIPO_FOR_TARGET='$(LIPO)' echo "$ac_t""host tool" 1>&6 @@ -5889,10 +6910,15 @@ else fi fi echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6 -echo "configure:5893: checking where to find the target nm" >&5 +echo "configure:6914: checking where to find the target nm" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5904,6 +6930,9 @@ else # An in-tree tool is available and we can use it NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/nm-new' echo "$ac_t""just compiled" 1>&6 + elif expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool NM_FOR_TARGET='$(NM)' @@ -5914,10 +6943,15 @@ else fi fi echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6 -echo "configure:5918: checking where to find the target objdump" >&5 +echo "configure:6947: checking where to find the target objdump" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5929,6 +6963,9 @@ else # An in-tree tool is available and we can use it OBJDUMP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objdump' echo "$ac_t""just compiled" 1>&6 + elif expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool OBJDUMP_FOR_TARGET='$(OBJDUMP)' @@ -5939,10 +6976,15 @@ else fi fi echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6 -echo "configure:5943: checking where to find the target ranlib" >&5 +echo "configure:6980: checking where to find the target ranlib" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5954,6 +6996,9 @@ else # An in-tree tool is available and we can use it RANLIB_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ranlib' echo "$ac_t""just compiled" 1>&6 + elif expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool RANLIB_FOR_TARGET='$(RANLIB)' @@ -5964,10 +7009,15 @@ else fi fi echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6 -echo "configure:5968: checking where to find the target strip" >&5 +echo "configure:7013: checking where to find the target strip" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -5979,6 +7029,9 @@ else # An in-tree tool is available and we can use it STRIP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/strip' echo "$ac_t""just compiled" 1>&6 + elif expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool STRIP_FOR_TARGET='$(STRIP)' @@ -5989,10 +7042,15 @@ else fi fi echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6 -echo "configure:5993: checking where to find the target windres" >&5 +echo "configure:7046: checking where to find the target windres" >&5 if test "x${build}" != "x${host}" ; then - # Canadian cross, just use what we found - echo "$ac_t""pre-installed" 1>&6 + if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6 + else + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 + fi else ok=yes case " ${configdirs} " in @@ -6004,6 +7062,9 @@ else # An in-tree tool is available and we can use it WINDRES_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/windres' echo "$ac_t""just compiled" 1>&6 + elif expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6 elif test "x$target" = "x$host"; then # We can use an host tool WINDRES_FOR_TARGET='$(WINDRES)' @@ -6042,7 +7103,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:6046: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:7107: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -6167,34 +7228,15 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs # Without the "./", some shells look in PATH for config.status. @@ -6343,14 +7385,14 @@ s%@OBJCOPY@%$OBJCOPY%g s%@OBJDUMP@%$OBJDUMP%g s%@CXX@%$CXX%g s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g -s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g -s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g -s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g +s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g +s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g +s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g diff --git a/configure.in b/configure.in index 401d2dca4bf..eddb5d80a09 100644 --- a/configure.in +++ b/configure.in @@ -1496,6 +1496,39 @@ if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then fi fi +# Set with_gnu_as and with_gnu_ld as appropriate. +# +# This is done by determining whether or not the appropriate directory +# is available, and by checking whether or not specific configurations +# have requested that this magic not happen. +# +# The command line options always override the explicit settings in +# configure.in, and the settings in configure.in override this magic. +# +# If the default for a toolchain is to use GNU as and ld, and you don't +# want to do that, then you should use the --without-gnu-as and +# --without-gnu-ld options for the configure script. + +if test x${use_gnu_as} = x && + echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then + with_gnu_as=yes + extra_host_args="$extra_host_args --with-gnu-as" +fi + +if test x${use_gnu_ld} = x && + echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then + with_gnu_ld=yes + extra_host_args="$extra_host_args --with-gnu-ld" +fi + +# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure +# can detect this case. + +if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then + with_newlib=yes + extra_host_args="$extra_host_args --with-newlib" +fi + # Handle ${copy_dirs} set fnord ${copy_dirs} shift @@ -1527,6 +1560,55 @@ while test $# != 0 ; do shift; shift done +# Determine a target-dependent exec_prefix that the installed +# gcc will search in. Keep this list sorted by triplet, with +# the *-*-osname triplets last. +md_exec_prefix= +case "${target}" in + alpha*-*-*vms*) + md_exec_prefix=/gnu/lib/gcc-lib + ;; + i[34567]86-pc-msdosdjgpp*) + md_exec_prefix=/dev/env/DJDIR/bin + ;; + i[34567]86-*-sco3.2v5*) + if test $with_gnu_as = yes; then + md_exec_prefix=/usr/gnu/bin + else + md_exec_prefix=/usr/ccs/bin/elf + fi + ;; + + mn10300-*-* | \ + powerpc-*-chorusos* | \ + powerpc*-*-eabi* | \ + powerpc*-*-sysv* | \ + powerpc*-*-kaos* | \ + s390x-ibm-tpf*) + md_exec_prefix=/usr/ccs/bin + ;; + sparc64-*-elf*) + ;; + v850*-*-*) + md_exec_prefix=/usr/ccs/bin + ;; + xtensa-*-elf*) + ;; + + *-*-beos* | \ + *-*-elf* | \ + *-*-hpux* | \ + *-*-netware* | \ + *-*-nto-qnx* | \ + *-*-rtems* | \ + *-*-solaris2* | \ + *-*-sysv[45]* | \ + *-*-vxworks* | \ + *-wrs-windiss) + md_exec_prefix=/usr/ccs/bin + ;; +esac + extra_arflags_for_target= extra_nmflags_for_target= extra_ranlibflags_for_target= @@ -1584,39 +1666,6 @@ case "${enable_target_optspace}:${target}" in ;; esac -# Set with_gnu_as and with_gnu_ld as appropriate. -# -# This is done by determining whether or not the appropriate directory -# is available, and by checking whether or not specific configurations -# have requested that this magic not happen. -# -# The command line options always override the explicit settings in -# configure.in, and the settings in configure.in override this magic. -# -# If the default for a toolchain is to use GNU as and ld, and you don't -# want to do that, then you should use the --without-gnu-as and -# --without-gnu-ld options for the configure script. - -if test x${use_gnu_as} = x && - echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then - with_gnu_as=yes - extra_host_args="$extra_host_args --with-gnu-as" -fi - -if test x${use_gnu_ld} = x && - echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then - with_gnu_ld=yes - extra_host_args="$extra_host_args --with-gnu-ld" -fi - -# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure -# can detect this case. - -if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then - with_newlib=yes - extra_host_args="$extra_host_args --with-newlib" -fi - # Default to using --with-stabs for certain targets. if test x${with_stabs} = x ; then case "${target}" in @@ -2201,21 +2250,34 @@ AC_SUBST(CFLAGS_FOR_BUILD) AC_SUBST(CXXFLAGS) # Target tools. -NCN_STRICT_CHECK_TARGET_TOOLS(AR_FOR_TARGET, ar) -NCN_STRICT_CHECK_TARGET_TOOLS(AS_FOR_TARGET, as) +AC_ARG_WITH([build-time-tools], + [ --with-build-time-tools=path + use given path to find target tools during the build], + [case x"$withval" in + x/*) ;; + *) + with_build_time_tools= + AC_MSG_WARN([argument to --with-build-time-tools must be an absolute path]) + ;; + esac], + [with_build_time_tools=]) + NCN_STRICT_CHECK_TARGET_TOOLS(CC_FOR_TARGET, cc gcc) NCN_STRICT_CHECK_TARGET_TOOLS(CXX_FOR_TARGET, c++ g++ cxx gxx) -NCN_STRICT_CHECK_TARGET_TOOLS(DLLTOOL_FOR_TARGET, dlltool) NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET}) NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj) NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran) -NCN_STRICT_CHECK_TARGET_TOOLS(LD_FOR_TARGET, ld) -NCN_STRICT_CHECK_TARGET_TOOLS(LIPO_FOR_TARGET, lipo) -NCN_STRICT_CHECK_TARGET_TOOLS(NM_FOR_TARGET, nm) -NCN_STRICT_CHECK_TARGET_TOOLS(OBJDUMP_FOR_TARGET, objdump) -NCN_STRICT_CHECK_TARGET_TOOLS(RANLIB_FOR_TARGET, ranlib, :) -NCN_STRICT_CHECK_TARGET_TOOLS(STRIP_FOR_TARGET, strip) -NCN_STRICT_CHECK_TARGET_TOOLS(WINDRES_FOR_TARGET, windres) + +ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar) +ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as) +ACX_CHECK_INSTALLED_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool) +ACX_CHECK_INSTALLED_TARGET_TOOL(LD_FOR_TARGET, ld) +ACX_CHECK_INSTALLED_TARGET_TOOL(LIPO_FOR_TARGET, lipo) +ACX_CHECK_INSTALLED_TARGET_TOOL(NM_FOR_TARGET, nm) +ACX_CHECK_INSTALLED_TARGET_TOOL(OBJDUMP_FOR_TARGET, objdump) +ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :) +ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip) +ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres) RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET" diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e4902859f3b..2e0f13783b0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2006-01-26 Paolo Bonzini + + * configure.ac: Expect target tools paths to be passed from the toplevel + and wrap the detection into AS_SET_VAR_IF. Extract side-effects out of + AS_SET_VAR_IF. + * acinclude.m4 (gcc_AC_TOOL_DIRS, gcc_AC_CHECK_TOOL): Remove. + 2006-01-26 Alexandre Oliva PR c/25892 diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4 index 3893b458a5a..ec1931ce398 100644 --- a/gcc/acinclude.m4 +++ b/gcc/acinclude.m4 @@ -506,94 +506,7 @@ m4_ifdef([GCC_TARGET_TEMPLATE($1)],[],[#ifndef USED_FOR_TARGET #endif ]))]) -AC_DEFUN([gcc_AC_TOOL_DIRS], [ -# When searching for the assembler or linker, search the same directories -# that the installed compiler will search. Else we may find the wrong -# assembler or linker and lose. If we do not find a suitable binary, -# then try the user's path. -# -# Also note we have to check MD_EXEC_PREFIX before checking the user's path. -if test "x$exec_prefix" = xNONE; then - if test "x$prefix" = xNONE; then - gcc_cv_tool_prefix=/usr/local - else - gcc_cv_tool_prefix=$prefix - fi -else - gcc_cv_tool_prefix=$exec_prefix -fi - -if test x$host = x$build; then - gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version" - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical" - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical/$gcc_version" - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical" - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version" - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin" -else - gcc_cv_tool_dirs= -fi - -if test x$build = x$target; then - # Rummage through tm_files looking for MD_EXEC_PREFIX - md_dirs= - for f in ${tm_file_list}; do - if test -f $f; then - if grep '^#[ ]*undef[ ]*MD_EXEC_PREFIX' $f > /dev/null; then - md_dirs= - fi - md_dirs="$md_dirs "`sed -n -e 's@^#[ ]*define[ ]*MD_EXEC_PREFIX[ ]*"\(.*\)/"@\1@p' < $f` - fi - done - for f in ${md_dirs}; do - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$f" - done -fi]) - dnl Make sure that build_exeext is looked for AC_DEFUN([gcc_AC_BUILD_EXEEXT], [ ac_executable_extensions="$build_exeext"]) -AC_DEFUN([gcc_AC_CHECK_TOOL], [ -AC_REQUIRE([gcc_AC_TOOL_DIRS]) -AC_REQUIRE([gcc_AC_BUILD_EXEEXT]) - -dnl shut up useless "checking for..." messages -dnl we can still read them in config.log -exec AS_MESSAGE_FD([])>/dev/null - -# First try the environment variables. Handle full paths or basenames. -if test "x[$]$1" = x && test -n "[$]$4"; then - AC_PATH_PROG($1, [$]$4) -fi -if test "x[$]$1" = x && test -n "[$]$5" && test x$host = x$target; then - AC_PATH_PROG($1, [$]$5) -fi - -if test "x[$]$1" = x; then - # The AC_PATH_PROGS macro doesn't work properly when its 4th argument - # is empty. - if test "x$gcc_cv_tool_dirs" = x; then - $1= - else - AC_PATH_PROGS($1, $2, , $gcc_cv_tool_dirs) - fi -fi -if test "x[$]$1" = x; then - # If the loop above did not find a tool, then use whatever - # one we can find in the users's path. We are looking for a - # ${build} -> ${target} tool. - if test "x$program_prefix" != xNONE; then - default_tool_name=${program_prefix}$2 - elif test x$build != x$host && test x$build != x$target; then - default_tool_name=${target_noncanonical}-$2 - else - default_tool_name=`echo $2 | sed "${program_transform_name}"` - fi - AC_PATH_PROGS($1, $default_tool_name, - $gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext) -fi -test "$silent" != yes && exec AS_MESSAGE_FD([])>&1 - -$3="[$]$1" -AC_SUBST($3)]) diff --git a/gcc/configure b/gcc/configure index d7f8b1ca3de..7f357994d4f 100755 --- a/gcc/configure +++ b/gcc/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump ORIGINAL_OBJDUMP_FOR_TARGET libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' # Initialize some variables set by options. @@ -1039,7 +1039,7 @@ esac else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd $ac_popdir + cd "$ac_popdir" done fi @@ -2395,8 +2395,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2454,8 +2453,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2571,8 +2569,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2626,8 +2623,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2672,8 +2668,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2717,8 +2712,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3140,8 +3134,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3233,8 +3226,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3404,8 +3396,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3470,8 +3461,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3533,8 +3523,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3574,8 +3563,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3631,8 +3619,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3672,8 +3659,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3737,8 +3723,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3769,10 +3754,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -3884,8 +3867,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3947,8 +3929,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3988,8 +3969,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4045,8 +4025,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4086,8 +4065,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4151,8 +4129,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4183,10 +4160,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -4298,8 +4273,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4361,8 +4335,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4402,8 +4375,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4459,8 +4431,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4500,8 +4471,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4565,8 +4535,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4597,10 +4566,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -4712,8 +4679,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4775,8 +4741,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4816,8 +4781,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4873,8 +4837,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4914,8 +4877,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4979,8 +4941,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5011,10 +4972,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -5126,8 +5085,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5188,8 +5146,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5251,8 +5208,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5292,8 +5248,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5349,8 +5304,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5390,8 +5344,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5455,8 +5408,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5487,10 +5439,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -5604,8 +5554,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5666,8 +5615,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5729,8 +5677,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5770,8 +5717,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5827,8 +5773,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5868,8 +5813,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5933,8 +5877,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5965,10 +5908,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -6085,8 +6026,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6136,8 +6076,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6194,8 +6133,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6249,8 +6187,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6495,8 +6432,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7532,7 +7468,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then else ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - echo "configure:7535: version of makeinfo is $ac_prog_version" >&5 + echo "configure:7471: version of makeinfo is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_makeinfo_modern=no;; 4.[4-9]*) @@ -7787,8 +7723,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7858,8 +7793,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8024,8 +7958,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8086,8 +8019,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8157,8 +8089,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8433,8 +8364,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8507,8 +8437,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8550,8 +8479,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8608,8 +8536,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8772,8 +8699,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8847,8 +8773,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8902,8 +8827,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8981,8 +8905,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9036,8 +8959,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9105,8 +9027,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9246,8 +9167,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9368,8 +9288,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9661,8 +9580,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9779,8 +9697,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9892,8 +9809,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10051,8 +9967,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10094,18 +10009,24 @@ else ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF -/* By Ruediger Kuhlmann. */ - #include - #if HAVE_UNISTD_H - # include - #endif - /* Some systems only have a dummy stub for fork() */ - int main () - { - if (fork() < 0) - exit (1); - exit (0); - } +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* By Ruediger Kuhlmann. */ + if (fork() < 0) + exit (1); + exit (0); + + ; + return 0; +} _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -10924,8 +10845,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10975,8 +10895,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11066,8 +10985,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11136,8 +11054,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11200,8 +11117,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11319,8 +11235,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11405,8 +11320,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11475,8 +11389,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11551,8 +11464,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11635,8 +11547,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11712,8 +11623,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11779,8 +11689,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11916,8 +11825,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12226,8 +12134,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12488,8 +12395,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12543,8 +12449,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12871,19 +12776,80 @@ esac # If build != host, and we aren't building gas in-tree, we identify a # build->target assembler and hope that it will have the same features # as the host->target assembler we'll be using. -in_tree_gas=no -gcc_cv_as= gcc_cv_gas_major_version= gcc_cv_gas_minor_version= gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas + +if test "${gcc_cv_as+set}" = set; then + : +else + if test -x "$DEFAULT_ASSEMBLER"; then gcc_cv_as="$DEFAULT_ASSEMBLER" elif test -f $gcc_cv_as_gas_srcdir/configure.in \ && test -f ../gas/Makefile \ && test x$build = x$host; then + gcc_cv_as=../gas/as-new$build_exeext +elif test -x as$build_exeext; then + # Build using assembler in the current directory. + gcc_cv_as=./as$build_exeext +elif test -x $AS_FOR_TARGET; then + gcc_cv_as="$AS_FOR_TARGET" +else + # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. +set dummy $AS_FOR_TARGET; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_gcc_cv_as+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $gcc_cv_as in + [\\/]* | ?:[\\/]*) + ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +gcc_cv_as=$ac_cv_path_gcc_cv_as + +if test -n "$gcc_cv_as"; then + echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 +echo "${ECHO_T}$gcc_cv_as" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +fi + + +ORIGINAL_AS_FOR_TARGET=$gcc_cv_as + + +echo "$as_me:$LINENO: checking what assembler to use" >&5 +echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 +if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then # Single tree build which includes gas. We want to prefer it # over whatever linker top-level may have detected, since # we'll use what we're building after installation anyway. + echo "$as_me:$LINENO: result: newly built gas" >&5 +echo "${ECHO_T}newly built gas" >&6 in_tree_gas=yes gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd for f in $gcc_cv_as_bfd_srcdir/configure \ @@ -12905,7 +12871,6 @@ gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ + $gcc_cv_gas_minor_version \) \* 1000 \ + $gcc_cv_gas_patch_version` - gcc_cv_as=../gas/as-new$build_exeext in_tree_gas_is_elf=no if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ || (grep 'obj_format = multi' ../gas/Makefile \ @@ -12913,72 +12878,50 @@ gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ then in_tree_gas_is_elf=yes fi -elif test -x as$build_exeext; then - # Build using assembler in the current directory. - gcc_cv_as=./as$build_exeext +else + echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 +echo "${ECHO_T}$gcc_cv_as" >&6 + in_tree_gas=no fi - -# When searching for the assembler or linker, search the same directories -# that the installed compiler will search. Else we may find the wrong -# assembler or linker and lose. If we do not find a suitable binary, -# then try the user's path. +# Identify the linker which will work hand-in-glove with the newly +# built GCC, so that we can examine its features. This is the linker +# which will be driven by the driver program. # -# Also note we have to check MD_EXEC_PREFIX before checking the user's path. -if test "x$exec_prefix" = xNONE; then - if test "x$prefix" = xNONE; then - gcc_cv_tool_prefix=/usr/local - else - gcc_cv_tool_prefix=$prefix - fi -else - gcc_cv_tool_prefix=$exec_prefix -fi +# If build != host, and we aren't building gas in-tree, we identify a +# build->target linker and hope that it will have the same features +# as the host->target linker we'll be using. +gcc_cv_gld_major_version= +gcc_cv_gld_minor_version= +gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld +gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd -if test x$host = x$build; then - gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version" - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical" - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical/$gcc_version" - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical" - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version" - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin" +if test "${gcc_cv_ld+set}" = set; then + : else - gcc_cv_tool_dirs= -fi - -if test x$build = x$target; then - # Rummage through tm_files looking for MD_EXEC_PREFIX - md_dirs= - for f in ${tm_file_list}; do - if test -f $f; then - if grep '^#[ ]*undef[ ]*MD_EXEC_PREFIX' $f > /dev/null; then - md_dirs= - fi - md_dirs="$md_dirs "`sed -n -e 's@^#[ ]*define[ ]*MD_EXEC_PREFIX[ ]*"\(.*\)/"@\1@p' < $f` - fi - done - for f in ${md_dirs}; do - gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$f" - done -fi - - - -exec 6>/dev/null - -# First try the environment variables. Handle full paths or basenames. -if test "x$gcc_cv_as" = x && test -n "$AS_FOR_TARGET"; then - # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. -set dummy $AS_FOR_TARGET; ac_word=$2 +if test -x "$DEFAULT_LINKER"; then + gcc_cv_ld="$DEFAULT_LINKER" +elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ + && test -f ../ld/Makefile \ + && test x$build = x$host; then + gcc_cv_ld=../ld/ld-new$build_exeext +elif test -x collect-ld$build_exeext; then + # Build using linker in the current directory. + gcc_cv_ld=./collect-ld$build_exeext +elif test -x $LD_FOR_TARGET; then + gcc_cv_ld="$LD_FOR_TARGET" +else + # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. +set dummy $LD_FOR_TARGET; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_as+set}" = set; then +if test "${ac_cv_path_gcc_cv_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $gcc_cv_as in + case $gcc_cv_ld in [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. + ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -12988,7 +12931,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12998,28 +12941,77 @@ done ;; esac fi -gcc_cv_as=$ac_cv_path_gcc_cv_as +gcc_cv_ld=$ac_cv_path_gcc_cv_ld -if test -n "$gcc_cv_as"; then - echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 -echo "${ECHO_T}$gcc_cv_as" >&6 +if test -n "$gcc_cv_ld"; then + echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 +echo "${ECHO_T}$gcc_cv_ld" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi -if test "x$gcc_cv_as" = x && test -n "$AS" && test x$host = x$target; then - # Extract the first word of "$AS", so it can be a program name with args. -set dummy $AS; ac_word=$2 +fi + + +ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld + + +echo "$as_me:$LINENO: checking what linker to use" >&5 +echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 +if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then + # Single tree build which includes ld. We want to prefer it + # over whatever linker top-level may have detected, since + # we'll use what we're building after installation anyway. + echo "$as_me:$LINENO: result: newly built ld" >&5 +echo "${ECHO_T}newly built ld" >&6 + in_tree_ld=yes + in_tree_ld_is_elf=no + if (grep 'EMUL = .*elf' ../ld/Makefile \ + || grep 'EMUL = .*linux' ../ld/Makefile \ + || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then + in_tree_ld_is_elf=yes + fi + for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in + do + gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` + if test x$gcc_cv_gld_version != x; then + break + fi + done + gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` + gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` +else + echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 +echo "${ECHO_T}$gcc_cv_ld" >&6 + in_tree_ld=no +fi + +# Figure out what nm we will be using. +gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils +if test "${gcc_cv_nm+set}" = set; then + : +else + +if test -f $gcc_cv_binutils_srcdir/configure.in \ + && test -f ../binutils/Makefile; then + gcc_cv_nm=../binutils/nm-new$build_exeext +elif test -x nm$build_exeext; then + gcc_cv_nm=./nm$build_exeext +elif test -x $NM_FOR_TARGET; then + gcc_cv_nm="$NM_FOR_TARGET" +else + # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. +set dummy $NM_FOR_TARGET; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_as+set}" = set; then +if test "${ac_cv_path_gcc_cv_nm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $gcc_cv_as in + case $gcc_cv_nm in [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. + ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -13029,7 +13021,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -13039,46 +13031,70 @@ done ;; esac fi -gcc_cv_as=$ac_cv_path_gcc_cv_as +gcc_cv_nm=$ac_cv_path_gcc_cv_nm -if test -n "$gcc_cv_as"; then - echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 -echo "${ECHO_T}$gcc_cv_as" >&6 +if test -n "$gcc_cv_nm"; then + echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 +echo "${ECHO_T}$gcc_cv_nm" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi +fi -if test "x$gcc_cv_as" = x; then - # The AC_PATH_PROGS macro doesn't work properly when its 4th argument - # is empty. - if test "x$gcc_cv_tool_dirs" = x; then - gcc_cv_as= - else - for ac_prog in as -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + +echo "$as_me:$LINENO: checking what nm to use" >&5 +echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 +if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then + # Single tree build which includes binutils. + echo "$as_me:$LINENO: result: newly built nm" >&5 +echo "${ECHO_T}newly built nm" >&6 + in_tree_nm=yes +else + echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 +echo "${ECHO_T}$gcc_cv_nm" >&6 + in_tree_nm=no +fi + +ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm + + +# Figure out what objdump we will be using. +if test "${gcc_cv_objdump+set}" = set; then + : +else + +if test -f $gcc_cv_binutils_srcdir/configure.in \ + && test -f ../binutils/Makefile; then + # Single tree build which includes binutils. + gcc_cv_objdump=../binutils/objdump$build_exeext +elif test -x objdump$build_exeext; then + gcc_cv_objdump=./objdump$build_exeext +elif test -x $OBJDUMP_FOR_TARGET; then + gcc_cv_objdump="$OBJDUMP_FOR_TARGET" +else + # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. +set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_as+set}" = set; then +if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $gcc_cv_as in + case $gcc_cv_objdump in [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. + ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $gcc_cv_tool_dirs +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -13088,802 +13104,33 @@ done ;; esac fi -gcc_cv_as=$ac_cv_path_gcc_cv_as +gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump -if test -n "$gcc_cv_as"; then - echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 -echo "${ECHO_T}$gcc_cv_as" >&6 +if test -n "$gcc_cv_objdump"; then + echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 +echo "${ECHO_T}$gcc_cv_objdump" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - test -n "$gcc_cv_as" && break -done +fi +fi - fi + +echo "$as_me:$LINENO: checking what objdump to use" >&5 +echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 +if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then + # Single tree build which includes binutils. + echo "$as_me:$LINENO: result: newly built objdump" >&5 +echo "${ECHO_T}newly built objdump" >&6 +elif test x$gcc_cv_objdump = x; then + echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6 +else + echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 +echo "${ECHO_T}$gcc_cv_objdump" >&6 fi -if test "x$gcc_cv_as" = x; then - # If the loop above did not find a tool, then use whatever - # one we can find in the users's path. We are looking for a - # ${build} -> ${target} tool. - if test "x$program_prefix" != xNONE; then - default_tool_name=${program_prefix}as - elif test x$build != x$host && test x$build != x$target; then - default_tool_name=${target_noncanonical}-as - else - default_tool_name=`echo as | sed "${program_transform_name}"` - fi - for ac_prog in $default_tool_name -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_as+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_as in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_as=$ac_cv_path_gcc_cv_as - -if test -n "$gcc_cv_as"; then - echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 -echo "${ECHO_T}$gcc_cv_as" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$gcc_cv_as" && break -done -test -n "$gcc_cv_as" || gcc_cv_as="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" - -fi -test "$silent" != yes && exec 6>&1 - -ORIGINAL_AS_FOR_TARGET="$gcc_cv_as" - -echo "$as_me:$LINENO: checking what assembler to use" >&5 -echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 -case $in_tree_gas in - yes) - echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 -echo "${ECHO_T}\"newly built gas\"" >&6 - ;; - no) - echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 -echo "${ECHO_T}$gcc_cv_as" >&6 - ;; -esac - -# Identify the linker which will work hand-in-glove with the newly -# built GCC, so that we can examine its features. This is the linker -# which will be driven by the driver program. -# -# If build != host, and we aren't building gas in-tree, we identify a -# build->target linker and hope that it will have the same features -# as the host->target linker we'll be using. -in_tree_ld=no -gcc_cv_ld= -gcc_cv_gld_major_version= -gcc_cv_gld_minor_version= -gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld -gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd -if test -x "$DEFAULT_LINKER"; then - gcc_cv_ld="$DEFAULT_LINKER" -elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ - && test -f ../ld/Makefile \ - && test x$build = x$host; then - # Single tree build which includes ld. We want to prefer it - # over whatever linker top-level may have detected, since - # we'll use what we're building after installation anyway. - in_tree_ld=yes - in_tree_ld_is_elf=no - if (grep 'EMUL = .*elf' ../ld/Makefile \ - || grep 'EMUL = .*linux' ../ld/Makefile \ - || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then - in_tree_ld_is_elf=yes - fi - for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in - do - gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` - if test x$gcc_cv_gld_version != x; then - break - fi - done - gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` - gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` - gcc_cv_ld=../ld/ld-new$build_exeext -elif test -x collect-ld$build_exeext; then - # Build using linker in the current directory. - gcc_cv_ld=./collect-ld$build_exeext -fi - - - - - -exec 6>/dev/null - -# First try the environment variables. Handle full paths or basenames. -if test "x$gcc_cv_ld" = x && test -n "$LD_FOR_TARGET"; then - # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. -set dummy $LD_FOR_TARGET; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_ld in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_ld=$ac_cv_path_gcc_cv_ld - -if test -n "$gcc_cv_ld"; then - echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 -echo "${ECHO_T}$gcc_cv_ld" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test "x$gcc_cv_ld" = x && test -n "$LD" && test x$host = x$target; then - # Extract the first word of "$LD", so it can be a program name with args. -set dummy $LD; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_ld in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_ld=$ac_cv_path_gcc_cv_ld - -if test -n "$gcc_cv_ld"; then - echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 -echo "${ECHO_T}$gcc_cv_ld" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi - -if test "x$gcc_cv_ld" = x; then - # The AC_PATH_PROGS macro doesn't work properly when its 4th argument - # is empty. - if test "x$gcc_cv_tool_dirs" = x; then - gcc_cv_ld= - else - for ac_prog in ld -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_ld in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $gcc_cv_tool_dirs -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_ld=$ac_cv_path_gcc_cv_ld - -if test -n "$gcc_cv_ld"; then - echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 -echo "${ECHO_T}$gcc_cv_ld" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$gcc_cv_ld" && break -done - - fi -fi -if test "x$gcc_cv_ld" = x; then - # If the loop above did not find a tool, then use whatever - # one we can find in the users's path. We are looking for a - # ${build} -> ${target} tool. - if test "x$program_prefix" != xNONE; then - default_tool_name=${program_prefix}ld - elif test x$build != x$host && test x$build != x$target; then - default_tool_name=${target_noncanonical}-ld - else - default_tool_name=`echo ld | sed "${program_transform_name}"` - fi - for ac_prog in $default_tool_name -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_ld in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_ld=$ac_cv_path_gcc_cv_ld - -if test -n "$gcc_cv_ld"; then - echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 -echo "${ECHO_T}$gcc_cv_ld" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$gcc_cv_ld" && break -done -test -n "$gcc_cv_ld" || gcc_cv_ld="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" - -fi -test "$silent" != yes && exec 6>&1 - -ORIGINAL_LD_FOR_TARGET="$gcc_cv_ld" - -echo "$as_me:$LINENO: checking what linker to use" >&5 -echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 -case $in_tree_ld in - yes) - echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 -echo "${ECHO_T}\"newly built ld\"" >&6 - ;; - no) - echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 -echo "${ECHO_T}$gcc_cv_ld" >&6 - ;; -esac - -# Figure out what nm we will be using. -gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils -in_tree_nm=no -gcc_cv_nm= -if test -f $gcc_cv_binutils_srcdir/configure.in \ - && test -f ../binutils/Makefile; then - # Single tree build which includes binutils. - in_tree_nm=yes - gcc_cv_nm=../binutils/nm-new$build_exeext -elif test -x nm$build_exeext; then - gcc_cv_nm=./nm$build_exeext -fi - - - - - -exec 6>/dev/null - -# First try the environment variables. Handle full paths or basenames. -if test "x$gcc_cv_nm" = x && test -n "$NM_FOR_TARGET"; then - # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. -set dummy $NM_FOR_TARGET; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_nm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_nm in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_nm=$ac_cv_path_gcc_cv_nm - -if test -n "$gcc_cv_nm"; then - echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 -echo "${ECHO_T}$gcc_cv_nm" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test "x$gcc_cv_nm" = x && test -n "$NM" && test x$host = x$target; then - # Extract the first word of "$NM", so it can be a program name with args. -set dummy $NM; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_nm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_nm in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_nm=$ac_cv_path_gcc_cv_nm - -if test -n "$gcc_cv_nm"; then - echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 -echo "${ECHO_T}$gcc_cv_nm" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi - -if test "x$gcc_cv_nm" = x; then - # The AC_PATH_PROGS macro doesn't work properly when its 4th argument - # is empty. - if test "x$gcc_cv_tool_dirs" = x; then - gcc_cv_nm= - else - for ac_prog in nm -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_nm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_nm in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $gcc_cv_tool_dirs -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_nm=$ac_cv_path_gcc_cv_nm - -if test -n "$gcc_cv_nm"; then - echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 -echo "${ECHO_T}$gcc_cv_nm" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$gcc_cv_nm" && break -done - - fi -fi -if test "x$gcc_cv_nm" = x; then - # If the loop above did not find a tool, then use whatever - # one we can find in the users's path. We are looking for a - # ${build} -> ${target} tool. - if test "x$program_prefix" != xNONE; then - default_tool_name=${program_prefix}nm - elif test x$build != x$host && test x$build != x$target; then - default_tool_name=${target_noncanonical}-nm - else - default_tool_name=`echo nm | sed "${program_transform_name}"` - fi - for ac_prog in $default_tool_name -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_nm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_nm in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_nm=$ac_cv_path_gcc_cv_nm - -if test -n "$gcc_cv_nm"; then - echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 -echo "${ECHO_T}$gcc_cv_nm" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$gcc_cv_nm" && break -done -test -n "$gcc_cv_nm" || gcc_cv_nm="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" - -fi -test "$silent" != yes && exec 6>&1 - -ORIGINAL_NM_FOR_TARGET="$gcc_cv_nm" - -echo "$as_me:$LINENO: checking what nm to use" >&5 -echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 -case $in_tree_nm in - yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 -echo "${ECHO_T}\"newly built nm\"" >&6 ;; - no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 -echo "${ECHO_T}$gcc_cv_nm" >&6 ;; -esac - -# Figure out what objdump we will be using. -in_tree_objdump=no -gcc_cv_objdump= -if test -f $gcc_cv_binutils_srcdir/configure.in \ - && test -f ../binutils/Makefile; then - # Single tree build which includes binutils. - in_tree_objdump=yes - gcc_cv_objdump=../binutils/objdump$build_exeext -elif test -x objdump$build_exeext; then - gcc_cv_objdump=./objdump$build_exeext -fi - - - - - -exec 6>/dev/null - -# First try the environment variables. Handle full paths or basenames. -if test "x$gcc_cv_objdump" = x && test -n "$OBJDUMP_FOR_TARGET"; then - # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. -set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_objdump in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump - -if test -n "$gcc_cv_objdump"; then - echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 -echo "${ECHO_T}$gcc_cv_objdump" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test "x$gcc_cv_objdump" = x && test -n "$OBJDUMP" && test x$host = x$target; then - # Extract the first word of "$OBJDUMP", so it can be a program name with args. -set dummy $OBJDUMP; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_objdump in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump - -if test -n "$gcc_cv_objdump"; then - echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 -echo "${ECHO_T}$gcc_cv_objdump" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi - -if test "x$gcc_cv_objdump" = x; then - # The AC_PATH_PROGS macro doesn't work properly when its 4th argument - # is empty. - if test "x$gcc_cv_tool_dirs" = x; then - gcc_cv_objdump= - else - for ac_prog in objdump -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_objdump in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $gcc_cv_tool_dirs -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump - -if test -n "$gcc_cv_objdump"; then - echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 -echo "${ECHO_T}$gcc_cv_objdump" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$gcc_cv_objdump" && break -done - - fi -fi -if test "x$gcc_cv_objdump" = x; then - # If the loop above did not find a tool, then use whatever - # one we can find in the users's path. We are looking for a - # ${build} -> ${target} tool. - if test "x$program_prefix" != xNONE; then - default_tool_name=${program_prefix}objdump - elif test x$build != x$host && test x$build != x$target; then - default_tool_name=${target_noncanonical}-objdump - else - default_tool_name=`echo objdump | sed "${program_transform_name}"` - fi - for ac_prog in $default_tool_name -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gcc_cv_objdump in - [\\/]* | ?:[\\/]*) - ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump - -if test -n "$gcc_cv_objdump"; then - echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 -echo "${ECHO_T}$gcc_cv_objdump" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$gcc_cv_objdump" && break -done -test -n "$gcc_cv_objdump" || gcc_cv_objdump="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" - -fi -test "$silent" != yes && exec 6>&1 - -ORIGINAL_OBJDUMP_FOR_TARGET="$gcc_cv_objdump" - -echo "$as_me:$LINENO: checking what objdump to use" >&5 -echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 -case $in_tree_objdump in - yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 -echo "${ECHO_T}\"newly built objdump\"" >&6 ;; - no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 -echo "${ECHO_T}$gcc_cv_objdump" >&6 ;; -esac # Figure out what assembler alignment features are present. echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 @@ -17326,7 +16573,6 @@ s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t s,@gcc_cv_nm@,$gcc_cv_nm,;t t s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t -s,@ORIGINAL_OBJDUMP_FOR_TARGET@,$ORIGINAL_OBJDUMP_FOR_TARGET,;t t s,@libgcc_visibility@,$libgcc_visibility,;t t s,@GGC@,$GGC,;t t s,@zlibdir@,$zlibdir,;t t @@ -17564,11 +16810,6 @@ esac - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ @@ -17607,6 +16848,12 @@ echo "$as_me: error: cannot find input file: $f" >&2;} fi;; esac done` || { (exit 1); exit 1; } + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub diff --git a/gcc/configure.ac b/gcc/configure.ac index e536b0ae547..03964d6f9fe 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1813,22 +1813,38 @@ esac # If build != host, and we aren't building gas in-tree, we identify a # build->target assembler and hope that it will have the same features # as the host->target assembler we'll be using. -in_tree_gas=no -gcc_cv_as= gcc_cv_gas_major_version= gcc_cv_gas_minor_version= gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas + +m4_pattern_allow([AS_FOR_TARGET])dnl +AS_VAR_SET_IF(gcc_cv_as,, [ if test -x "$DEFAULT_ASSEMBLER"; then gcc_cv_as="$DEFAULT_ASSEMBLER" elif test -f $gcc_cv_as_gas_srcdir/configure.in \ && test -f ../gas/Makefile \ && test x$build = x$host; then + gcc_cv_as=../gas/as-new$build_exeext +elif test -x as$build_exeext; then + # Build using assembler in the current directory. + gcc_cv_as=./as$build_exeext +elif test -x $AS_FOR_TARGET; then + gcc_cv_as="$AS_FOR_TARGET" +else + AC_PATH_PROG(gcc_cv_as, $AS_FOR_TARGET) +fi]) + +ORIGINAL_AS_FOR_TARGET=$gcc_cv_as +AC_SUBST(ORIGINAL_AS_FOR_TARGET) + +AC_MSG_CHECKING(what assembler to use) +if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then # Single tree build which includes gas. We want to prefer it # over whatever linker top-level may have detected, since # we'll use what we're building after installation anyway. + AC_MSG_RESULT(newly built gas) in_tree_gas=yes _gcc_COMPUTE_GAS_VERSION - gcc_cv_as=../gas/as-new$build_exeext in_tree_gas_is_elf=no if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ || (grep 'obj_format = multi' ../gas/Makefile \ @@ -1836,23 +1852,11 @@ elif test -f $gcc_cv_as_gas_srcdir/configure.in \ then in_tree_gas_is_elf=yes fi -m4_pattern_allow([AS_FOR_TARGET])dnl -elif test -x as$build_exeext; then - # Build using assembler in the current directory. - gcc_cv_as=./as$build_exeext +else + AC_MSG_RESULT($gcc_cv_as) + in_tree_gas=no fi -gcc_AC_CHECK_TOOL(gcc_cv_as, as, ORIGINAL_AS_FOR_TARGET, AS_FOR_TARGET, AS) -AC_MSG_CHECKING(what assembler to use) -case $in_tree_gas in - yes) - AC_MSG_RESULT("newly built gas") - ;; - no) - AC_MSG_RESULT($gcc_cv_as) - ;; -esac - # Identify the linker which will work hand-in-glove with the newly # built GCC, so that we can examine its features. This is the linker # which will be driven by the driver program. @@ -1860,20 +1864,36 @@ esac # If build != host, and we aren't building gas in-tree, we identify a # build->target linker and hope that it will have the same features # as the host->target linker we'll be using. -in_tree_ld=no -gcc_cv_ld= gcc_cv_gld_major_version= gcc_cv_gld_minor_version= gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd + +AS_VAR_SET_IF(gcc_cv_ld,, [ if test -x "$DEFAULT_LINKER"; then gcc_cv_ld="$DEFAULT_LINKER" elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ && test -f ../ld/Makefile \ && test x$build = x$host; then + gcc_cv_ld=../ld/ld-new$build_exeext +elif test -x collect-ld$build_exeext; then + # Build using linker in the current directory. + gcc_cv_ld=./collect-ld$build_exeext +elif test -x $LD_FOR_TARGET; then + gcc_cv_ld="$LD_FOR_TARGET" +else + AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET) +fi]) + +ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld +AC_SUBST(ORIGINAL_LD_FOR_TARGET) + +AC_MSG_CHECKING(what linker to use) +if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then # Single tree build which includes ld. We want to prefer it # over whatever linker top-level may have detected, since # we'll use what we're building after installation anyway. + AC_MSG_RESULT(newly built ld) in_tree_ld=yes in_tree_ld_is_elf=no if (grep 'EMUL = .*elf' ../ld/Makefile \ @@ -1885,71 +1905,68 @@ elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ do changequote(,)dnl gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` -changequote([,])dnl if test x$gcc_cv_gld_version != x; then break fi done -changequote(,)dnl gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` changequote([,])dnl - gcc_cv_ld=../ld/ld-new$build_exeext -elif test -x collect-ld$build_exeext; then - # Build using linker in the current directory. - gcc_cv_ld=./collect-ld$build_exeext +else + AC_MSG_RESULT($gcc_cv_ld) + in_tree_ld=no fi -gcc_AC_CHECK_TOOL(gcc_cv_ld, ld, ORIGINAL_LD_FOR_TARGET, LD_FOR_TARGET, LD) -AC_MSG_CHECKING(what linker to use) -case $in_tree_ld in - yes) - AC_MSG_RESULT("newly built ld") - ;; - no) - AC_MSG_RESULT($gcc_cv_ld) - ;; -esac - # Figure out what nm we will be using. gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils -in_tree_nm=no -gcc_cv_nm= +AS_VAR_SET_IF(gcc_cv_nm,, [ if test -f $gcc_cv_binutils_srcdir/configure.in \ && test -f ../binutils/Makefile; then - # Single tree build which includes binutils. - in_tree_nm=yes gcc_cv_nm=../binutils/nm-new$build_exeext elif test -x nm$build_exeext; then gcc_cv_nm=./nm$build_exeext -fi +elif test -x $NM_FOR_TARGET; then + gcc_cv_nm="$NM_FOR_TARGET" +else + AC_PATH_PROG(gcc_cv_nm, $NM_FOR_TARGET) +fi]) -gcc_AC_CHECK_TOOL(gcc_cv_nm, nm, ORIGINAL_NM_FOR_TARGET, NM_FOR_TARGET, NM) AC_MSG_CHECKING(what nm to use) -case $in_tree_nm in - yes) AC_MSG_RESULT("newly built nm") ;; - no) AC_MSG_RESULT($gcc_cv_nm) ;; -esac +if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then + # Single tree build which includes binutils. + AC_MSG_RESULT(newly built nm) + in_tree_nm=yes +else + AC_MSG_RESULT($gcc_cv_nm) + in_tree_nm=no +fi + +ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm +AC_SUBST(ORIGINAL_NM_FOR_TARGET) # Figure out what objdump we will be using. -in_tree_objdump=no -gcc_cv_objdump= +AS_VAR_SET_IF(gcc_cv_objdump,, [ if test -f $gcc_cv_binutils_srcdir/configure.in \ && test -f ../binutils/Makefile; then # Single tree build which includes binutils. - in_tree_objdump=yes gcc_cv_objdump=../binutils/objdump$build_exeext elif test -x objdump$build_exeext; then gcc_cv_objdump=./objdump$build_exeext -fi +elif test -x $OBJDUMP_FOR_TARGET; then + gcc_cv_objdump="$OBJDUMP_FOR_TARGET" +else + AC_PATH_PROG(gcc_cv_objdump, $OBJDUMP_FOR_TARGET) +fi]) -gcc_AC_CHECK_TOOL(gcc_cv_objdump, objdump, ORIGINAL_OBJDUMP_FOR_TARGET, - OBJDUMP_FOR_TARGET, OBJDUMP) AC_MSG_CHECKING(what objdump to use) -case $in_tree_objdump in - yes) AC_MSG_RESULT("newly built objdump") ;; - no) AC_MSG_RESULT($gcc_cv_objdump) ;; -esac +if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then + # Single tree build which includes binutils. + AC_MSG_RESULT(newly built objdump) +elif test x$gcc_cv_objdump = x; then + AC_MSG_RESULT(not found) +else + AC_MSG_RESULT($gcc_cv_objdump) +fi # Figure out what assembler alignment features are present. gcc_GAS_CHECK_FEATURE([.balign and .p2align], gcc_cv_as_balign_and_p2align,