--- configure.in	31 Dec 2002 18:01:38 -0000	1.205
+++ configure.in	4 Jan 2003 03:58:11 -0000
@@ -23,6 +23,7 @@
 AC_ARG_PROGRAM
 
 sinclude(config/acx.m4)
+m4_pattern_allow(AS_FOR_TARGET)
 
 # clear some things potentially inherited from environment.
 
@@ -200,7 +201,7 @@
 
 # We always want to use the same name for this directory, so that dejagnu
 # can reliably find it.
-target_subdir=${target_alias}
+target_subdir=${target}
 
 if test ! -d ${target_subdir} ; then
   if mkdir ${target_subdir} ; then true
@@ -211,9 +212,9 @@
 fi
 
 build_prefix=build-
-build_subdir=${build_prefix}${build_alias}
+build_subdir=${build_prefix}${build}
 
-if test x"${build_alias}" != x"${host}" ; then
+if test x"${build}" != x"${host}" ; then
   if test ! -d ${build_subdir} ; then
     if mkdir ${build_subdir} ; then true
     else
@@ -954,7 +955,7 @@
     "") x=${prefix} ;;
     *) x=${exec_prefix} ;;
     esac
-    copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
+    copy_dirs="${copy_dirs} ${with_headers} $x/${target}/sys-include"
   fi
 fi
 
@@ -974,7 +975,7 @@
     *) x=${exec_prefix} ;;
     esac
     for l in ${with_libs}; do
-      copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
+      copy_dirs="$l $x/${target}/lib ${copy_dirs}"
     done
   fi
 fi
@@ -1642,7 +1643,7 @@
 configure_build_modules=
 # Only make build modules if build != host.
 # This should be done more generally, but at the moment it doesn't matter.
-if test ${host_alias} != ${build_alias} ; then
+if test ${host} != ${build} ; then
   all_build_modules=all-build-libiberty
   configure_build_modules=configure-build-libiberty
 fi
@@ -1745,7 +1746,8 @@
 # target and nonopt.  These are the ones we might not want to pass
 # down to subconfigures.
 baseargs=`echo " ${ac_configure_args} " | \
-	sed -e 's/ --no[[^ ]]* / /' \
+	sed -e "s/'//g" \
+	    -e 's/ --no[[^ ]]* / /' \
 	    -e 's/ --cache[[a-z-]]*=[[^ ]]* / /' \
 	    -e 's/ --sr[[a-z-]]*=[[^ ]]* / /' \
 	    -e 's/ --ho[[a-z-]]*=[[^ ]]* / /' \
@@ -1757,7 +1759,7 @@
 # For the build-side libraries, we just need to pretend we're native,
 # and not use the same cache file.  Multilibs are neither needed nor
 # desired.
-build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
+build_configargs="--build=${build} --host=${build} ${baseargs}"
 
 # For host modules, accept cache file option, or specification as blank.
 case "${cache_file}" in
@@ -1769,7 +1771,7 @@
   cache_file_option="--cache-file=../${cache_file}" ;;
 esac
 
-host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
+host_configargs="${cache_file_option} --build=${build} --host=${host} --target=${target} ${extra_host_args} ${baseargs}"
 
 target_configargs=${baseargs}
 
@@ -1779,7 +1781,7 @@
 # sorts of decisions they want to make on this basis.  Please consider
 # this option to be deprecated.  FIXME.
 if test x${is_cross_compiler} = xyes ; then
-  target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
+  target_configargs="--with-cross-host=${host} ${target_configargs}"
 fi
 
 # Default to --enable-multilib.
@@ -1793,8 +1795,8 @@
   target_configargs="--with-newlib ${target_configargs}"
 fi
 
-# Pass the appropriate --host, --build, and --cache-file arguments.
-target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
+# Pass the appropriate --host and --build arguments
+target_configargs="--host=${target} --build=${build} ${target_configargs}"
 
 # provide a proper gxx_include_dir.
 # Note, if you change the default, make sure to fix both here and in
@@ -1914,8 +1916,8 @@
 GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
 
 # Don't use libstdc++-v3's flags to configure/build itself.
-libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
-raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
+libstdcxx_flags='`if test -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags; then $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes; echo -n " "; fi`-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
+raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
 
 if test "x${CXX_FOR_TARGET+set}" = xset; then
   :
--- config.if   27 Jun 2002 10:19:53 -0000      1.8
+++ config.if   2 Jan 2003 02:03:52 -0000
@@ -32,7 +32,7 @@
 then
   case ${target_os} in
   *linux*libc1*|*linux*libc5*)
-    case ${target_alias} in
+    case ${target} in
     *alpha*|*powerpc*)
       libc_interface=-libc5.9-
       ;;
@@ -43,7 +43,7 @@
     ;;
   *linux*gnu*)
     # We have to work harder to figure it out.
-    if [ ${target_alias} = ${build_alias} ]
+    if [ "${target}" = "${build}" ]
     then
       dummy=if$$
       cat >$dummy.c <<EOF
--- Makefile.tpl	2002-12-18 21:40:58.000000000 -0500
+++ Makefile.tpl	2002-12-28 00:48:32.000000000 -0500
@@ -808,7 +808,7 @@
 	    NM="$(NM_FOR_BUILD)"; export NM; \
 	    RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
 	    WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
-	    echo Configuring in $(BUILD_SUBDIR)/[+module+]; \
+	    echo configuring in $(BUILD_SUBDIR)/[+module+]; \
 	    cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \
 	    case $(srcdir) in \
 	    /* | [A-Za-z]:[\\/]*) \
@@ -844,6 +844,9 @@
 	      libsrcdir="$$s/[+module+]"; \
 	    fi; \
 	    rm -f no-such-file || : ; \
+	    echo running CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+	      $(BUILD_CONFIGARGS) $${srcdiroption} \
+	      --with-build-subdir="$(BUILD_SUBDIR)"; \
 	    CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
 	      $(BUILD_CONFIGARGS) $${srcdiroption} \
 	      --with-build-subdir="$(BUILD_SUBDIR)" \
@@ -878,13 +881,14 @@
 	  CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
 	  DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
 	  LD="$(LD)"; export LD; \
+	  LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
 	  NM="$(NM)"; export NM; \
 	  RANLIB="$(RANLIB)"; export RANLIB; \
 	  WINDRES="$(WINDRES)"; export WINDRES; \
 	  OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
 	  OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
 	fi; \
-	echo Configuring in [+module+]; \
+	echo configuring in [+module+]; \
 	cd [+module+] || exit 1; \
 	case $(srcdir) in \
 	  \.) \
@@ -897,6 +901,8 @@
 	    srcdiroption="--srcdir=../$(srcdir)/[+module+]"; \
 	    libsrcdir="$$s/[+module+]";; \
 	esac; \
+	echo running $(SHELL) $${libsrcdir}/configure \
+	  $(HOST_CONFIGARGS) $${srcdiroption}; \
 	$(SHELL) $${libsrcdir}/configure \
 	  $(HOST_CONFIGARGS) $${srcdiroption} \
 	  || exit 1
@@ -997,7 +1003,7 @@
 	    NM="$(NM_FOR_TARGET)"; export NM; \
 	    RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
 	    WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
-	    echo Configuring in $(TARGET_SUBDIR)/[+module+]; \
+	    echo configuring in $(TARGET_SUBDIR)/[+module+]; \
 	    cd "$(TARGET_SUBDIR)/[+module+]" || exit 1; \
 	    case $(srcdir) in \
 	    /* | [A-Za-z]:[\\/]*) \
@@ -1033,6 +1039,9 @@
 	      libsrcdir="$$s/[+module+]"; \
 	    fi; \
 	    rm -f no-such-file || : ; \
+	    echo running CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+	      $(TARGET_CONFIGARGS) $${srcdiroption} \
+	      --with-target-subdir="$(TARGET_SUBDIR)"; \
 	    CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
 	      $(TARGET_CONFIGARGS) $${srcdiroption} \
 	      --with-target-subdir="$(TARGET_SUBDIR)" \
@@ -1110,6 +1119,7 @@
 	  CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
 	  DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
 	  LD="$(LD)"; export LD; \
+	  LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
 	  NM="$(NM)"; export NM; \
 	  RANLIB="$(RANLIB)"; export RANLIB; \
 	  WINDRES="$(WINDRES)"; export WINDRES; \
@@ -1129,6 +1139,8 @@
 	    srcdiroption="--srcdir=../$(srcdir)/gcc"; \
 	    libsrcdir="$$s/gcc";; \
 	esac; \
+	echo running $(SHELL) $${libsrcdir}/configure \
+	  $(HOST_CONFIGARGS) $${srcdiroption}; \
 	$(SHELL) $${libsrcdir}/configure \
 	  $(HOST_CONFIGARGS) $${srcdiroption} \
 	  || exit 1
--- .cvsignore	2002-12-04 12:16:15.000000000 -0500
+++ .cvsignore	2002-12-04 23:18:08.000000000 -0500
@@ -6,6 +6,7 @@
 *-src
 *-stamp-*
 *-tagged
+autom4te.cache
 blockit
 cfg-paper.info
 config.status
