OSDN Git Service

* configure.in (--enable-new-gxx-abi): New option.
[pf3gnuchains/gcc-fork.git] / gcc / configure
index aa43c5a..3bde398 100755 (executable)
@@ -29,7 +29,11 @@ ac_help="$ac_help
   --with-gxx-include-dir=DIR
                           specifies directory to put g++ header files."
 ac_help="$ac_help
-  --enable-checking       enable expensive run-time checks."
+  --enable-checking[=LIST]
+                         enable expensive run-time checks.  With LIST,
+                         enable only specific categories of checks.
+                         Categories are: misc,tree,rtl,gc,gcac; default
+                         is misc,tree,rtl"
 ac_help="$ac_help
   --disable-cpp           don't provide a user-visible C preprocessor."
 ac_help="$ac_help
@@ -42,15 +46,11 @@ ac_help="$ac_help
   --enable-c-cpplib       link cpplib directly into C and C++ compilers
                           (EXPERIMENTAL) (implies --enable-cpplib)."
 ac_help="$ac_help
-  --enable-c-mbchar       enable multibyte characters for C and C++."
-ac_help="$ac_help
   --disable-fast-fixincludes
                          Disable the new fast fixincludes.
                          Run the old fixincludes script unconditionally"
 ac_help="$ac_help
-  --enable-haifa          use the experimental scheduler.
-  --disable-haifa         don't use the experimental scheduler for the
-                          targets which normally enable it."
+  --enable-c-mbchar       Enable multibyte characters for C and C++."
 ac_help="$ac_help
   --enable-threads        enable thread usage for target GCC.
   --enable-threads=LIB    use LIB thread package for target GCC."
@@ -58,8 +58,6 @@ ac_help="$ac_help
   --enable-objc-gc       enable the use of Boehm's garbage collector with
                          the GNU Objective-C runtime."
 ac_help="$ac_help
-  --enable-java-gc=TYPE   choose garbage collector [boehm]"
-ac_help="$ac_help
   --enable-dwarf2        enable DWARF2 debugging as default."
 ac_help="$ac_help
   --enable-nls            use Native Language Support (disabled by default)"
@@ -69,6 +67,22 @@ ac_help="$ac_help
   --with-included-gettext use the GNU gettext library included here"
 ac_help="$ac_help
   --with-catgets          use catgets functions if available"
+ac_help="$ac_help
+  --disable-win32-registry
+                          Disable lookup of installation paths in the
+                         Registry on Windows hosts.
+  --enable-win32-registry Enable registry lookup (default).
+  --enable-win32-registry=KEY
+                          Use KEY instead of GCC version as the last portion
+                         of the registry key."
+ac_help="$ac_help
+  --with-gc={simple,page} Choose the garbage collection mechanism to use
+                           with the compiler."
+ac_help="$ac_help
+  --enable-new-gxx-abi
+                         select the new abi for g++. You must select an ABI
+                         at configuration time, so that the correct runtime
+                         support is built. You cannot mix ABIs."
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -595,7 +609,7 @@ copy=cp
 # - two terminals occur directly after each other
 # - the path contains an element with a dot in it
 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
-echo "configure:599: checking LIBRARY_PATH variable" >&5
+echo "configure:613: checking LIBRARY_PATH variable" >&5
 case ${LIBRARY_PATH} in
   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
     library_path_setting="contains current directory"
@@ -608,7 +622,7 @@ echo "$ac_t""$library_path_setting" 1>&6
 if test "$library_path_setting" != "ok"; then
 { echo "configure: error: 
 *** LIBRARY_PATH shouldn't contain the current directory when
-*** building egcs. Please change the environment variable
+*** building gcc. Please change the environment variable
 *** and run configure again." 1>&2; exit 1; }
 fi
 
@@ -620,7 +634,7 @@ fi
 # - two terminals occur directly after each other
 # - the path contains an element with a dot in it
 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
-echo "configure:624: checking GCC_EXEC_PREFIX variable" >&5
+echo "configure:638: checking GCC_EXEC_PREFIX variable" >&5
 case ${GCC_EXEC_PREFIX} in
   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
     gcc_exec_prefix_setting="contains current directory"
@@ -633,7 +647,7 @@ echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
 if test "$gcc_exec_prefix_setting" != "ok"; then
 { echo "configure: error: 
 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
-*** building egcs. Please change the environment variable
+*** building gcc. Please change the environment variable
 *** and run configure again." 1>&2; exit 1; }
 fi
 
@@ -767,9 +781,46 @@ if test "${enable_checking+set}" = set; then
 yes)   cat >> confdefs.h <<\EOF
 #define ENABLE_CHECKING 1
 EOF
- ;;
+
+       cat >> confdefs.h <<\EOF
+#define ENABLE_TREE_CHECKING 1
+EOF
+
+       cat >> confdefs.h <<\EOF
+#define ENABLE_RTL_CHECKING 1
+EOF
+       ;;
 no)    ;;
-*)     { echo "configure: error: bad value ${enableval} given for checking option" 1>&2; exit 1; } ;;
+*)     ac_save_IFS="$IFS" IFS="$IFS,"
+       set fnord $enableval; shift
+       IFS="$ac_save_IFS"
+       for check
+       do
+               case $check in
+               misc)   cat >> confdefs.h <<\EOF
+#define ENABLE_CHECKING 1
+EOF
+               ;;
+               tree)   cat >> confdefs.h <<\EOF
+#define ENABLE_TREE_CHECKING 1
+EOF
+               ;;
+               rtl)    cat >> confdefs.h <<\EOF
+#define ENABLE_RTL_CHECKING 1
+EOF
+               ;;
+               gc)     cat >> confdefs.h <<\EOF
+#define ENABLE_GC_CHECKING 1
+EOF
+               ;;
+               gcac)   cat >> confdefs.h <<\EOF
+#define ENABLE_GC_ALWAYS_COLLECT 1
+EOF
+       ;;
+               *)      { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
+               esac
+       done
+       ;;
 esac
 fi
 
@@ -818,16 +869,6 @@ fi
 fi
 
 
-# Enable Multibyte Characters for C/C++
-# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
-if test "${enable_c_mbchar+set}" = set; then
-  enableval="$enable_c_mbchar"
-  if test x$enable_c_mbchar != xno; then
-  extra_c_flags=-DMULTIBYTE_CHARS=1
-fi
-fi
-
-
 # Disable fast fixincludes
 # Check whether --enable-fast-fixincludes or --disable-fast-fixincludes was given.
 if test "${enable_fast_fixincludes+set}" = set; then
@@ -838,14 +879,16 @@ fi
 fi
 
 
-# Enable Haifa scheduler.
-# Check whether --enable-haifa or --disable-haifa was given.
-if test "${enable_haifa+set}" = set; then
-  enableval="$enable_haifa"
-  :
+# Enable Multibyte Characters for C/C++
+# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
+if test "${enable_c_mbchar+set}" = set; then
+  enableval="$enable_c_mbchar"
+  if test x$enable_c_mbchar != xno; then
+  extra_c_flags="${extra_c_flags} -DMULTIBYTE_CHARS=1"
+fi
 fi
 
-
+  
 # Enable threads
 # Pass with no value to take the default
 # Pass with a value to specify a thread package
@@ -884,7 +927,7 @@ esac
 # Check whether --enable-objc-gc or --disable-objc-gc was given.
 if test "${enable_objc_gc+set}" = set; then
   enableval="$enable_objc_gc"
-  if [ x$enable_objc_gc = xno ]; then
+  if test x$enable_objc_gc = xno; then
        objc_boehm_gc=''
 else
        objc_boehm_gc=1
@@ -894,16 +937,6 @@ else
 fi
 
 
-# Check whether --enable-java-gc or --disable-java-gc was given.
-if test "${enable_java_gc+set}" = set; then
-  enableval="$enable_java_gc"
-  
-  JAVAGC=$enableval
-else
-  JAVAGC=boehm
-fi
-
-
 # Check whether --with-dwarf2 or --without-dwarf2 was given.
 if test "${with_dwarf2+set}" = set; then
   withval="$with_dwarf2"
@@ -961,7 +994,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:965: checking host system type" >&5
+echo "configure:998: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -982,7 +1015,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:986: checking target system type" >&5
+echo "configure:1019: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1000,7 +1033,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:1004: checking build system type" >&5
+echo "configure:1037: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1027,7 +1060,7 @@ test "$host_alias" != "$target_alias" &&
 # 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:1031: checking for $ac_word" >&5
+echo "configure:1064: 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
@@ -1057,7 +1090,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:1061: checking for $ac_word" >&5
+echo "configure:1094: 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
@@ -1108,7 +1141,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:1112: checking for $ac_word" >&5
+echo "configure:1145: 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
@@ -1140,7 +1173,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1144: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1177: 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.
@@ -1151,12 +1184,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1155 "configure"
+#line 1188 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1193: \"$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
@@ -1182,12 +1215,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:1186: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1219: 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:1191: checking whether we are using GNU C" >&5
+echo "configure:1224: 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
@@ -1196,7 +1229,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1200: \"$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:1233: \"$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
@@ -1215,7 +1248,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:1219: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1252: 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
@@ -1246,6 +1279,46 @@ else
   fi
 fi
 
+echo $ac_n "checking for long double""... $ac_c" 1>&6
+echo "configure:1284: checking for long double" >&5
+if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$GCC" = yes; then
+  gcc_cv_c_long_double=yes
+else
+cat > conftest.$ac_ext <<EOF
+#line 1292 "configure"
+#include "confdefs.h"
+
+int main() {
+/* The Stardent Vistra knows sizeof(long double), but does not support it.  */
+long double foo = 0.0;
+/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
+; return 0; }
+EOF
+if { (eval echo configure:1302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gcc_cv_c_long_double=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gcc_cv_c_long_double=no
+fi
+rm -f conftest*
+fi
+fi
+
+echo "$ac_t""$gcc_cv_c_long_double" 1>&6
+if test $gcc_cv_c_long_double = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_LONG_DOUBLE 1
+EOF
+
+fi
+
 
 # If the native compiler is GCC, we can enable warnings even in stage1.  
 # That's useful for people building cross-compilers, or just running a
@@ -1258,7 +1331,7 @@ fi
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1262: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1335: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1286,7 +1359,7 @@ fi
 
 
 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
-echo "configure:1290: checking whether a default assembler was specified" >&5
+echo "configure:1363: checking whether a default assembler was specified" >&5
 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
     if test x"$gas_flag" = x"no"; then
        echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
@@ -1298,7 +1371,7 @@ else
 fi
 
 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
-echo "configure:1302: checking whether a default linker was specified" >&5
+echo "configure:1375: checking whether a default linker was specified" >&5
 if test x"${DEFAULT_LINKER+set}" = x"set"; then
     if test x"$gnu_ld_flag" = x"no"; then
        echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
@@ -1310,12 +1383,12 @@ else
 fi
 
 # Find some useful tools
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
 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:1319: checking for $ac_word" >&5
+echo "configure:1392: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1347,7 +1420,7 @@ done
 # Extract the first word of "flex", so it can be a program name with args.
 set dummy flex; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1351: checking for $ac_word" >&5
+echo "configure:1424: 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
@@ -1381,7 +1454,7 @@ then
   *) ac_lib=l ;;
   esac
   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:1385: checking for yywrap in -l$ac_lib" >&5
+echo "configure:1458: checking for yywrap in -l$ac_lib" >&5
 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1389,7 +1462,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$ac_lib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1393 "configure"
+#line 1466 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1400,7 +1473,7 @@ int main() {
 yywrap()
 ; return 0; }
 EOF
-if { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1423,7 +1496,7 @@ fi
 fi
 
 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
-echo "configure:1427: checking whether ln works" >&5
+echo "configure:1500: checking whether ln works" >&5
 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1455,7 +1528,7 @@ else
 fi
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1459: checking whether ln -s works" >&5
+echo "configure:1532: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1487,19 +1560,19 @@ else
 fi
 
 echo $ac_n "checking for volatile""... $ac_c" 1>&6
-echo "configure:1491: checking for volatile" >&5
+echo "configure:1564: checking for volatile" >&5
 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1496 "configure"
+#line 1569 "configure"
 #include "confdefs.h"
 
 int main() {
 volatile int foo;
 ; return 0; }
 EOF
-if { (eval echo configure:1503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gcc_cv_c_volatile=yes
 else
@@ -1522,7 +1595,7 @@ fi
 # 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:1526: checking for $ac_word" >&5
+echo "configure:1599: 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
@@ -1554,7 +1627,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:1558: checking for $ac_word" >&5
+echo "configure:1631: 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
@@ -1595,7 +1668,7 @@ test -n "$YACC" || YACC="yacc"
 # 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:1599: checking for a BSD compatible install" >&5
+echo "configure:1672: 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
@@ -1646,7 +1719,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1650: checking how to run the C preprocessor" >&5
+echo "configure:1723: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1661,13 +1734,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1665 "configure"
+#line 1738 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1678,13 +1751,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1682 "configure"
+#line 1755 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1695,13 +1768,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1699 "configure"
+#line 1772 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1726,12 +1799,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1730: checking for ANSI C header files" >&5
+echo "configure:1803: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1735 "configure"
+#line 1808 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1739,7 +1812,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1756,7 +1829,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1760 "configure"
+#line 1833 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1774,7 +1847,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1778 "configure"
+#line 1851 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1795,7 +1868,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1799 "configure"
+#line 1872 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1806,7 +1879,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1830,12 +1903,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1834: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1907: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1839 "configure"
+#line 1912 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1844,7 +1917,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:1848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -1865,12 +1938,12 @@ EOF
 fi
 
 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
-echo "configure:1869: checking whether string.h and strings.h may both be included" >&5
+echo "configure:1942: checking whether string.h and strings.h may both be included" >&5
 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1874 "configure"
+#line 1947 "configure"
 #include "confdefs.h"
 #include <string.h>
 #include <strings.h>
@@ -1878,7 +1951,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gcc_cv_header_string=yes
 else
@@ -1899,12 +1972,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1903: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1976: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1908 "configure"
+#line 1981 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1920,7 +1993,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1940,21 +2013,24 @@ EOF
 
 fi
 
-for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h sys/stat.h direct.h
+for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
+                fcntl.h unistd.h stab.h sys/file.h sys/time.h \
+                sys/resource.h sys/param.h sys/times.h sys/stat.h \
+                direct.h malloc.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1948: checking for $ac_hdr" >&5
+echo "configure:2024: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1953 "configure"
+#line 2029 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1984,17 +2060,17 @@ done
 # Check for thread headers.
 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
-echo "configure:1988: checking for thread.h" >&5
+echo "configure:2064: checking for thread.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1993 "configure"
+#line 2069 "configure"
 #include "confdefs.h"
 #include <thread.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2018,17 +2094,17 @@ fi
 
 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
-echo "configure:2022: checking for pthread.h" >&5
+echo "configure:2098: checking for pthread.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2027 "configure"
+#line 2103 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2055,7 +2131,7 @@ fi
 # 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:2059: checking for $ac_word" >&5
+echo "configure:2135: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2083,51 +2159,55 @@ else
 fi
 
 
-# See if the system preprocessor understands the ANSI C preprocessor
-# stringification operator.
-echo $ac_n "checking whether cpp understands the stringify operator""... $ac_c" 1>&6
-echo "configure:2090: checking whether cpp understands the stringify operator" >&5
-if eval "test \"`echo '$''{'gcc_cv_c_have_stringify'+set}'`\" = set"; then
+# See if the stage1 system preprocessor understands the ANSI C
+# preprocessor stringification operator.
+
+
+echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
+echo "configure:2168: checking for preprocessor stringizing operator" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2095 "configure"
+#line 2173 "configure"
 #include "confdefs.h"
 
-int main() {
-#define S(x)   #x
-char *test = S(foo);
-; return 0; }
+#define x(y) #y
+
+char *s = x(teststring);
+
 EOF
-if { (eval echo configure:2103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "#teststring" >/dev/null 2>&1; then
   rm -rf conftest*
-  gcc_cv_c_have_stringify=yes
+  ac_cv_c_stringize=no
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gcc_cv_c_have_stringify=no
+  ac_cv_c_stringize=yes
 fi
 rm -f conftest*
+
 fi
 
-echo "$ac_t""$gcc_cv_c_have_stringify" 1>&6
-if test $gcc_cv_c_have_stringify = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_CPP_STRINGIFY 1
+if test "${ac_cv_c_stringize}" = yes
+then
+        cat >> confdefs.h <<\EOF
+#define HAVE_STRINGIZE 1
 EOF
 
 fi
+echo "$ac_t""${ac_cv_c_stringize}" 1>&6
+
 
 # Use <inttypes.h> only if it exists,
 # doesn't clash with <sys/types.h>, and declares intmax_t.
 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
-echo "configure:2126: checking for inttypes.h" >&5
+echo "configure:2206: checking for inttypes.h" >&5
 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2131 "configure"
+#line 2211 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <inttypes.h>
@@ -2135,7 +2215,7 @@ int main() {
 intmax_t i = -1;
 ; return 0; }
 EOF
-if { (eval echo configure:2139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gcc_cv_header_inttypes_h=yes
 else
@@ -2158,15 +2238,15 @@ fi
 for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \
        index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
        sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
-       fputs_unlocked
+       fputs_unlocked getrusage valloc
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2165: checking for $ac_func" >&5
+echo "configure:2245: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2170 "configure"
+#line 2250 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2189,7 +2269,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2218,12 +2298,12 @@ done
 #AC_CHECK_TYPE(wchar_t, unsigned int)
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2222: checking for vprintf" >&5
+echo "configure:2302: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2227 "configure"
+#line 2307 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -2246,7 +2326,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -2270,12 +2350,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2274: checking for _doprnt" >&5
+echo "configure:2354: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2279 "configure"
+#line 2359 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -2298,7 +2378,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -2334,7 +2414,7 @@ fi
 
 
 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
-echo "configure:2338: checking whether the printf functions support %p" >&5
+echo "configure:2418: checking whether the printf functions support %p" >&5
 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2342,7 +2422,7 @@ else
   gcc_cv_func_printf_ptr=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2346 "configure"
+#line 2426 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 
@@ -2355,7 +2435,7 @@ main()
   exit (p != q);
 }
 EOF
-if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gcc_cv_func_printf_ptr=yes
 else
@@ -2388,12 +2468,12 @@ case "${host}" in
   ;;
 esac
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2392: checking for pid_t" >&5
+echo "configure:2472: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2397 "configure"
+#line 2477 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2422,17 +2502,17 @@ fi
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2426: checking for vfork.h" >&5
+echo "configure:2506: checking for vfork.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2431 "configure"
+#line 2511 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2457,18 +2537,18 @@ else
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2461: checking for working vfork" >&5
+echo "configure:2541: checking for working vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2467: checking for vfork" >&5
+echo "configure:2547: checking for vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2472 "configure"
+#line 2552 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vfork(); below.  */
@@ -2491,7 +2571,7 @@ vfork();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vfork=yes"
 else
@@ -2513,7 +2593,7 @@ fi
 ac_cv_func_vfork_works=$ac_cv_func_vfork
 else
   cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
+#line 2597 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -2608,7 +2688,7 @@ main() {
   }
 }
 EOF
-if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_vfork_works=yes
 else
@@ -2630,194 +2710,503 @@ EOF
 
 fi
 
-
-for ac_func in malloc realloc calloc free bcopy bzero bcmp \
-       index rindex getenv atol sbrk abort atof strerror getcwd getwd \
-       strsignal putc_unlocked fputs_unlocked
+for ac_hdr in unistd.h
 do
-echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
-echo "configure:2640: checking whether $ac_func must be declared" >&5
-if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2718: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2645 "configure"
+#line 2723 "configure"
 #include "confdefs.h"
-
-#include <stdio.h>
-#ifdef STRING_WITH_STRINGS
-# include <string.h>
-# include <strings.h>
-#else
-# ifdef HAVE_STRING_H
-#  include <string.h>
-# else
-#  ifdef HAVE_STRINGS_H
-#   include <strings.h>
-#  endif
-# endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifndef HAVE_RINDEX
-#define rindex strrchr
-#endif
-#ifndef HAVE_INDEX
-#define index strchr
-#endif
-
-int main() {
-char *(*pfn) = (char *(*)) $ac_func
-; return 0; }
+#include <$ac_hdr>
 EOF
-if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
   rm -rf conftest*
-  eval "gcc_cv_decl_needed_$ac_func=no"
+  eval "ac_cv_header_$ac_safe=yes"
 else
+  echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "gcc_cv_decl_needed_$ac_func=yes"
+  eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
 fi
-
-if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
   cat >> confdefs.h <<EOF
-#define $gcc_tr_decl 1
+#define $ac_tr_hdr 1
 EOF
-
 else
   echo "$ac_t""no" 1>&6
 fi
-
 done
 
-
-for ac_func in getrlimit setrlimit
+for ac_func in getpagesize
 do
-echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
-echo "configure:2707: checking whether $ac_func must be declared" >&5
-if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2757: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2712 "configure"
+#line 2762 "configure"
 #include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
 
-#include <stdio.h>
-#ifdef STRING_WITH_STRINGS
-# include <string.h>
-# include <strings.h>
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
 #else
-# ifdef HAVE_STRING_H
-#  include <string.h>
-# else
-#  ifdef HAVE_STRINGS_H
-#   include <strings.h>
-#  endif
-# endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifndef HAVE_RINDEX
-#define rindex strrchr
-#endif
-#ifndef HAVE_INDEX
-#define index strchr
-#endif
-#include <sys/types.h>
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
+$ac_func();
 #endif
 
-int main() {
-char *(*pfn) = (char *(*)) $ac_func
 ; return 0; }
 EOF
-if { (eval echo configure:2749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "gcc_cv_decl_needed_$ac_func=no"
+  eval "ac_cv_func_$ac_func=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "gcc_cv_decl_needed_$ac_func=yes"
+  eval "ac_cv_func_$ac_func=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
   cat >> confdefs.h <<EOF
-#define $gcc_tr_decl 1
+#define $ac_tr_func 1
 EOF
-
 else
   echo "$ac_t""no" 1>&6
 fi
-
 done
 
-
-echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:2776: checking for sys_siglist declaration in signal.h or unistd.h" >&5
-if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2810: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_mmap_fixed_mapped=no
+else
   cat > conftest.$ac_ext <<EOF
-#line 2781 "configure"
+#line 2818 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-/* NetBSD declares sys_siglist in unistd.h.  */
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-int main() {
-char *msg = *(sys_siglist + 1);
-; return 0; }
-EOF
-if { (eval echo configure:2793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_decl_sys_siglist=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_decl_sys_siglist=no
-fi
-rm -f conftest*
-fi
 
-echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
-if test $ac_cv_decl_sys_siglist = yes; then
-  cat >> confdefs.h <<\EOF
-#define SYS_SIGLIST_DECLARED 1
-EOF
+/* Thanks to Mike Haertel and Jim Avera for this test.
+   Here is a matrix of mmap possibilities:
+       mmap private not fixed
+       mmap private fixed at somewhere currently unmapped
+       mmap private fixed at somewhere already mapped
+       mmap shared not fixed
+       mmap shared fixed at somewhere currently unmapped
+       mmap shared fixed at somewhere already mapped
+   For private mappings, we should verify that changes cannot be read()
+   back from the file, nor mmap's back from the file at a different
+   address.  (There have been systems where private was not correctly
+   implemented like the infamous i386 svr4.0, and systems where the
+   VM page cache was not coherent with the filesystem buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propogated back to all the places they're supposed to be.
 
-fi
+   Grep wants private fixed already mapped.
+   The main things grep needs to know about mmap are:
+   * does it exist and is it safe to write into the mmap'd area
+   * how to use it (BSD variants)  */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h.  */
+# ifndef HAVE_SYS_PARAM_H
+#  define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192  /* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+       char *data, *data2, *data3;
+       int i, pagesize;
+       int fd;
+
+       pagesize = getpagesize();
+
+       /*
+        * First, make a file with some known garbage in it.
+        */
+       data = malloc(pagesize);
+       if (!data)
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               *(data + i) = rand();
+       umask(0);
+       fd = creat("conftestmmap", 0600);
+       if (fd < 0)
+               exit(1);
+       if (write(fd, data, pagesize) != pagesize)
+               exit(1);
+       close(fd);
+
+       /*
+        * Next, try to mmap the file at a fixed address which
+        * already has something else allocated at it.  If we can,
+        * also make sure that we see the same garbage.
+        */
+       fd = open("conftestmmap", O_RDWR);
+       if (fd < 0)
+               exit(1);
+       data2 = malloc(2 * pagesize);
+       if (!data2)
+               exit(1);
+       data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+       if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+           MAP_PRIVATE | MAP_FIXED, fd, 0L))
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               if (*(data + i) != *(data2 + i))
+                       exit(1);
+
+       /*
+        * Finally, make sure that changes to the mapped area
+        * do not percolate back to the file as seen by read().
+        * (This is a bug on some variants of i386 svr4.0.)
+        */
+       for (i = 0; i < pagesize; ++i)
+               *(data2 + i) = *(data2 + i) + 1;
+       data3 = malloc(pagesize);
+       if (!data3)
+               exit(1);
+       if (read(fd, data3, pagesize) != pagesize)
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               if (*(data + i) != *(data3 + i))
+                       exit(1);
+       close(fd);
+       unlink("conftestmmap");
+       exit(0);
+}
+
+EOF
+if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+for ac_func in bcopy bzero bcmp \
+       index rindex getenv atol sbrk abort atof strerror getcwd getwd \
+       strsignal putc_unlocked fputs_unlocked strstr environ
+do
+echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
+echo "configure:2986: checking whether $ac_func must be declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2991 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef STRING_WITH_STRINGS
+# include <string.h>
+# include <strings.h>
+#else
+# ifdef HAVE_STRING_H
+#  include <string.h>
+# else
+#  ifdef HAVE_STRINGS_H
+#   include <strings.h>
+#  endif
+# endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef HAVE_RINDEX
+#ifndef rindex
+#define rindex strrchr
+#endif
+#endif
+#ifndef HAVE_INDEX
+#ifndef index
+#define index strchr
+#endif
+#endif
+
+int main() {
+char *(*pfn) = (char *(*)) $ac_func
+; return 0; }
+EOF
+if { (eval echo configure:3028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  eval "gcc_cv_decl_needed_$ac_func=no"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "gcc_cv_decl_needed_$ac_func=yes"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $gcc_tr_decl 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+done
+
+
+for ac_func in malloc realloc calloc free
+do
+echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
+echo "configure:3057: checking whether $ac_func must be declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3062 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef STRING_WITH_STRINGS
+# include <string.h>
+# include <strings.h>
+#else
+# ifdef HAVE_STRING_H
+#  include <string.h>
+# else
+#  ifdef HAVE_STRINGS_H
+#   include <strings.h>
+#  endif
+# endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef HAVE_RINDEX
+#ifndef rindex
+#define rindex strrchr
+#endif
+#endif
+#ifndef HAVE_INDEX
+#ifndef index
+#define index strchr
+#endif
+#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
+int main() {
+char *(*pfn) = (char *(*)) $ac_func
+; return 0; }
+EOF
+if { (eval echo configure:3102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  eval "gcc_cv_decl_needed_$ac_func=no"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "gcc_cv_decl_needed_$ac_func=yes"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $gcc_tr_decl 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+done
+
+
+for ac_func in getrlimit setrlimit getrusage
+do
+echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
+echo "configure:3131: checking whether $ac_func must be declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3136 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef STRING_WITH_STRINGS
+# include <string.h>
+# include <strings.h>
+#else
+# ifdef HAVE_STRING_H
+#  include <string.h>
+# else
+#  ifdef HAVE_STRINGS_H
+#   include <strings.h>
+#  endif
+# endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef HAVE_RINDEX
+#ifndef rindex
+#define rindex strrchr
+#endif
+#endif
+#ifndef HAVE_INDEX
+#ifndef index
+#define index strchr
+#endif
+#endif
+#include <sys/types.h>
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
+int main() {
+char *(*pfn) = (char *(*)) $ac_func
+; return 0; }
+EOF
+if { (eval echo configure:3177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  eval "gcc_cv_decl_needed_$ac_func=no"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "gcc_cv_decl_needed_$ac_func=yes"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $gcc_tr_decl 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+done
 
 
 # mkdir takes a single argument on some systems. 
 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
-echo "configure:2816: checking if mkdir takes one argument" >&5
+echo "configure:3205: checking if mkdir takes one argument" >&5
 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2821 "configure"
+#line 3210 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2834,7 +3223,7 @@ int main() {
 mkdir ("foo", 0);
 ; return 0; }
 EOF
-if { (eval echo configure:2838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gcc_cv_mkdir_takes_one_arg=no
 else
@@ -2913,8 +3302,9 @@ for machine in $build $host $target; do
        gnu_ld="$gnu_ld_flag"
        enable_threads=$enable_threads_flag
 
-       # Set default cpu_type, tm_file and xm_file so it can be updated in
-       # each machine entry.
+       # Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
+       # updated in each machine entry.
+       tm_p_file=
        cpu_type=`echo $machine | sed 's/-.*$//'`
        case $machine in
        alpha*-*-*)
@@ -2938,6 +3328,9 @@ for machine in $build $host $target; do
        mips*-*-*)
                cpu_type=mips
                ;;
+       pj*-*-*)
+               cpu_type=pj
+               ;;
        powerpc*-*-*)
                cpu_type=rs6000
                ;;
@@ -2951,7 +3344,17 @@ for machine in $build $host $target; do
 
        tm_file=${cpu_type}/${cpu_type}.h
        xm_file=${cpu_type}/xm-${cpu_type}.h
-       
+       if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h;
+       then
+               tm_p_file=${cpu_type}/${cpu_type}-protos.h;
+       fi
+       # On a.out targets, we need to use collect2.
+       case $machine in
+       *-*-*aout*)
+               use_collect2=yes
+               ;;
+       esac    
+
        # Common parts for linux-gnu and openbsd systems
        case $machine in
        *-*-linux-gnu*)
@@ -3019,7 +3422,7 @@ for machine in $build $host $target; do
 
                xm_file="alpha/xm-alpha-interix.h xm-interix.h"
                xmake_file="x-interix alpha/t-pe"
-               tmake_file="alpha/t-interix"
+               tmake_file="alpha/t-interix alpha/t-ieee"
                if test x$enable_threads = xyes ; then
                        thread_file='posix'
                fi
@@ -3032,6 +3435,7 @@ for machine in $build $host $target; do
        alpha*-*-linux-gnuecoff*)
                tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
                target_cpu_default="MASK_GAS"
+               tmake_file="alpha/t-ieee"
                gas=no
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -3039,7 +3443,7 @@ for machine in $build $host $target; do
        alpha*-*-linux-gnulibc1*)
                tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
                target_cpu_default="MASK_GAS"
-               tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
+               tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe alpha/t-ieee"
                extra_parts="crtbegin.o crtend.o"
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -3050,7 +3454,7 @@ for machine in $build $host $target; do
        alpha*-*-linux-gnu*)
                tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
                target_cpu_default="MASK_GAS"
-               tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
+               tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-ieee"
                extra_parts="crtbegin.o crtend.o"
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -3061,7 +3465,7 @@ for machine in $build $host $target; do
        alpha*-*-netbsd*)
                tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
                target_cpu_default="MASK_GAS"
-               tmake_file="alpha/t-crtbe"
+               tmake_file="alpha/t-crtbe alpha/t-ieee"
                extra_parts="crtbegin.o crtend.o"
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -3070,6 +3474,7 @@ for machine in $build $host $target; do
        alpha*-*-openbsd*)
                # default x-alpha is only appropriate for dec-osf.
                target_cpu_default="MASK_GAS"
+               tmake_file="alpha/t-ieee"
                ;;
                
        alpha*-dec-osf*)
@@ -3082,6 +3487,7 @@ for machine in $build $host $target; do
                        extra_passes="mips-tfile mips-tdump"
                fi
                use_collect2=yes
+               tmake_file="alpha/t-ieee"
                case $machine in
                  *-*-osf1*)
                    tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
@@ -3095,6 +3501,9 @@ for machine in $build $host $target; do
                    # a broken tar, so we use cpio instead.
                    install_headers_dir=install-headers-cpio
                    ;;
+                 *-*-osf5*)
+                   tm_file="${tm_file} alpha/osf.h"
+                   ;;
                esac
                case $machine in
                  *-*-osf4.0[b-z] | *-*-osf4.[1-9]*)
@@ -3104,6 +3513,7 @@ for machine in $build $host $target; do
                ;;
        alpha*-*-vxworks*)
                tm_file="${tm_file} dbx.h alpha/vxworks.h"
+               tmake_file="alpha/t-ieee"
                if  x$gas != xyes 
                then
                        extra_passes="mips-tfile mips-tdump"
@@ -3114,7 +3524,7 @@ for machine in $build $host $target; do
        alpha*-*-winnt*)
                tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
                xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
-               tmake_file=t-libc-ok
+               tmake_file="t-libc-ok alpha/t-ieee"
                xmake_file=winnt/x-winnt
                extra_host_objs=oldnames.o
                extra_gcc_objs="spawnv.o oldnames.o"
@@ -3129,7 +3539,7 @@ for machine in $build $host $target; do
        alpha*-dec-vms*)
                tm_file=alpha/vms.h
                xm_file="${xm_file} alpha/xm-vms.h"
-               tmake_file=alpha/t-vms
+               tmake_file="alpha/t-vms alpha/t-ieee"
                ;;
        arc-*-elf*)
                extra_parts="crtinit.o crtfini.o"
@@ -3168,7 +3578,6 @@ for machine in $build $host $target; do
                ;;
        arm*-*-netbsd*)
                tm_file=arm/netbsd.h
-               xm_file="arm/xm-netbsd.h ${xm_file}"
                tmake_file="t-netbsd arm/t-netbsd"
        use_collect2=yes
                ;;
@@ -3179,15 +3588,31 @@ for machine in $build $host $target; do
                tmake_file=arm/t-linux
                gnu_ld=yes
                ;;
-       arm*-*-linux-gnu*)              # ARM GNU/Linux with ELF
+       arm*-*-linux-gnuoldld*)         # ARM GNU/Linux with old ELF linker
                xm_file=arm/xm-linux.h
                xmake_file=x-linux
+               tm_file="arm/linux-oldld.h arm/linux-elf.h"
                case $machine in
                armv2*-*-*)
-                       tm_file=arm/linux-elf26.h
+                       tm_file="arm/linux-elf26.h $tm_file"
                        ;;
-               *)
-                       tm_file=arm/linux-elf.h
+               esac
+               tmake_file="t-linux arm/t-linux"
+               extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+               gnu_ld=yes
+               case x${enable_threads} in
+               x | xyes | xpthreads | xposix)
+                       thread_file='posix'
+                       ;;
+               esac
+               ;;
+       arm*-*-linux-gnu*)              # ARM GNU/Linux with ELF
+               xm_file=arm/xm-linux.h
+               xmake_file=x-linux
+               tm_file="arm/linux-elf.h"
+               case $machine in
+               armv2*-*-*)
+                       tm_file="arm/linux-elf26.h $tm_file"
                        ;;
                esac
                tmake_file="t-linux arm/t-linux"
@@ -3199,6 +3624,10 @@ for machine in $build $host $target; do
                        ;;
                esac
                ;;
+       arm*-*-uclinux*)                # ARM ucLinux
+               tm_file=arm/uclinux-elf.h
+               tmake_file=arm/t-arm-elf
+               ;;
        arm*-*-aout)
                tm_file=arm/aout.h
                tmake_file=arm/t-bare
@@ -3215,6 +3644,11 @@ for machine in $build $host $target; do
                tm_file=arm/unknown-elf-oabi.h
                tmake_file=arm/t-arm-elf
                ;;
+       arm-*-pe*)
+               tm_file=arm/pe.h
+               tmake_file=arm/t-pe
+               extra_objs=pe.o
+               ;;
        c1-convex-*)                    # Convex C1
                target_cpu_default=1
                use_collect2=yes
@@ -3252,44 +3686,64 @@ for machine in $build $host $target; do
        elxsi-elxsi-*)
                use_collect2=yes
                ;;
+       fr30-*-elf)
+               tm_file="fr30/fr30.h"
+               tmake_file=fr30/t-fr30
+               extra_parts="crti.o crtn.o crtbegin.o crtend.o"
+               ;;
 # This hasn't been upgraded to GCC 2.
 #      fx80-alliant-*)                 # Alliant FX/80
 #              ;;
        h8300-*-*)
                float_format=i32
                ;;
+       hppa*-*-linux*)
+               target_cpu_default="(MASK_PA_11 | MASK_GAS | MASK_JUMP_IN_DELAY)"
+               tm_file="${tm_file} pa/elf.h linux.h pa/pa-linux.h"
+               tmake_file="t-linux pa/t-linux"
+               extra_parts="crtbegin.o crtend.o"
+               xmake_file=none
+               gas=yes gnu_ld=yes
+               if test x$enable_threads = xyes; then
+                       thread_file='posix'
+               fi
+               ;;
        hppa*-*-openbsd*)
                target_cpu_default="MASK_PA_11"
                tmake_file=pa/t-openbsd
                ;;
        hppa1.1-*-pro*)
-               tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
+               target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
+               tm_file="${tm_file} elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
                xm_file=pa/xm-papro.h
                tmake_file=pa/t-pro
                ;;
        hppa1.1-*-osf*)
                target_cpu_default="MASK_PA_11"
-               tm_file="${tm_file} pa/pa-osf.h"
+               tm_file="${tm_file} pa/som.h pa/pa-osf.h"
                use_collect2=yes
                ;;
        hppa1.1-*-rtems*)
-               tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
+               target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
+               tm_file="${tm_file} elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h"
                xm_file=pa/xm-papro.h
                tmake_file=pa/t-pro
                ;;
        hppa1.0-*-osf*)
-               tm_file="${tm_file} pa/pa-osf.h"
+               tm_file="${tm_file} pa/som.h pa/pa-osf.h"
                use_collect2=yes
                ;;
        hppa1.1-*-bsd*)
+               tm_file="${tm_file} pa/som.h"
                target_cpu_default="MASK_PA_11"
                use_collect2=yes
                ;;
        hppa1.0-*-bsd*)
+               tm_file="${tm_file} pa/som.h"
                use_collect2=yes
                ;;
        hppa1.0-*-hpux7*)
-               tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
+               tm_file="pa/pa-oldas.h ${tm_file} pa/som.h pa/pa-hpux7.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -3300,7 +3754,7 @@ for machine in $build $host $target; do
                use_collect2=yes
                ;;
        hppa1.0-*-hpux8.0[0-2]*)
-               tm_file="${tm_file} pa/pa-hpux.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -3314,7 +3768,7 @@ for machine in $build $host $target; do
                ;;
        hppa1.1-*-hpux8.0[0-2]*)
                target_cpu_default="MASK_PA_11"
-               tm_file="${tm_file} pa/pa-hpux.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -3328,7 +3782,7 @@ for machine in $build $host $target; do
                ;;
        hppa1.1-*-hpux8*)
                target_cpu_default="MASK_PA_11"
-               tm_file="${tm_file} pa/pa-hpux.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -3339,7 +3793,7 @@ for machine in $build $host $target; do
                use_collect2=yes
                ;;
        hppa1.0-*-hpux8*)
-               tm_file="${tm_file} pa/pa-hpux.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -3351,7 +3805,7 @@ for machine in $build $host $target; do
                ;;
        hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
                target_cpu_default="MASK_PA_11"
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                tmake_file=pa/t-pa
@@ -3370,7 +3824,7 @@ for machine in $build $host $target; do
                use_collect2=yes
                ;;
        hppa1.0-*-hpux10*)
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                tmake_file=pa/t-pa
@@ -3388,9 +3842,47 @@ for machine in $build $host $target; do
                install_headers_dir=install-headers-cpio
                use_collect2=yes
                ;;
+       hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
+               target_cpu_default="MASK_PA_11"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
+               xm_file=pa/xm-pahpux.h
+               xmake_file=pa/x-pa-hpux
+               tmake_file=pa/t-pa
+               if test x$gas = xyes
+               then
+                       tm_file="${tm_file} pa/pa-gas.h"
+               fi
+#              if test x$enable_threads = x; then
+#                  enable_threads=$have_pthread_h
+#              fi
+#              if test x$enable_threads = xyes; then
+#                      thread_file='dce'
+#                      tmake_file="${tmake_file} pa/t-dce-thr"
+#              fi
+               install_headers_dir=install-headers-cpio
+               use_collect2=yes
+               ;;
+       hppa1.0-*-hpux11*)
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
+               xm_file=pa/xm-pahpux.h
+               xmake_file=pa/x-pa-hpux
+               if test x$gas = xyes
+               then
+                       tm_file="${tm_file} pa/pa-gas.h"
+               fi
+#              if test x$enable_threads = x; then
+#                  enable_threads=$have_pthread_h
+#              fi
+#              if test x$enable_threads = xyes; then
+#                      thread_file='dce'
+#                      tmake_file="${tmake_file} pa/t-dce-thr"
+#              fi
+               install_headers_dir=install-headers-cpio
+               use_collect2=yes
+               ;;
        hppa1.1-*-hpux* | hppa2*-*-hpux*)
                target_cpu_default="MASK_PA_11"
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -3401,7 +3893,7 @@ for machine in $build $host $target; do
                use_collect2=yes
                ;;
        hppa1.0-*-hpux*)
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -3413,7 +3905,7 @@ for machine in $build $host $target; do
                ;;
        hppa1.1-*-hiux* | hppa2*-*-hiux*)
                target_cpu_default="MASK_PA_11"
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -3424,7 +3916,7 @@ for machine in $build $host $target; do
                use_collect2=yes
                ;;
        hppa1.0-*-hiux*)
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -3435,10 +3927,53 @@ for machine in $build $host $target; do
                use_collect2=yes
                ;;
        hppa*-*-lites*)
+               tm_file="${tm_file} elfos.h pa/elf.h"
                target_cpu_default="MASK_PA_11"
                use_collect2=yes
                ;;
+       hppa*-*-mpeix*)
+               tm_file="${tm_file} pa/pa-mpeix.h"
+               xm_file=pa/xm-pampeix.h 
+               xmake_file=pa/x-pa-mpeix 
+               echo "You must use gas. Assuming it is already installed." 
+               install_headers_dir=install-headers-tar
+               fixincludes=Makefile.in
+               use_collect2=yes 
+               ;; 
+       i370-*-opened*)                  # IBM 360/370/390 Architecture
+               xm_file=i370/xm-oe.h
+               tm_file=i370/oe.h
+               xmake_file=i370/x-oe
+               tmake_file=i370/t-oe
+               fixincludes=Makefile.in # Headers are wierd, don't mess with
+               ;;
        i370-*-mvs*)
+               xm_file=i370/xm-mvs.h
+               tm_file=i370/mvs.h
+               tmake_file=i370/t-mvs
+               fixincludes=Makefile.in # Headers are wierd, don't mess with
+               ;;
+       i370-*-linux*)
+               xm_file="xm-linux.h i370/xm-linux.h"
+               xmake_file=x-linux
+               tm_file="i370/linux.h ${tm_file}"
+               tmake_file="t-linux i370/t-linux"
+               fixincludes=Makefile.in # The headers are ok already.
+               # broken_install=yes
+               extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+               # extra_parts="crtbegin.o crtend.o"
+               gnu_ld=yes
+               gas=yes
+               elf=yes
+               if test x$enable_threads = xyes; then
+                       thread_file='posix'
+               fi
+               ;;
+       i[34567]86-*-elf*)
+               xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h"
+               tm_file=i386/i386elf.h
+               tmake_file=i386/t-i386elf
+               xmake_file=x-svr4
                ;;
        i[34567]86-ibm-aix*)            # IBM PS/2 running AIX
                 if test x$gas = xyes
@@ -3455,7 +3990,7 @@ for machine in $build $host $target; do
                xmake_file=i386/x-aix
                ;;
        i[34567]86-ncr-sysv4*)          # NCR 3000 - ix86 running system V.4
-               xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
+               xm_file="xm-alloca.h ${xm_file}"
                xm_defines="USG POSIX SMALL_ARG_MAX"
                xmake_file=i386/x-ncr3000
                if test x$stabs = xyes -a x$gas = xyes
@@ -3504,7 +4039,7 @@ for machine in $build $host $target; do
                install_headers_dir=install-headers-cpio
                ;;
        i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
-               xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
+               xm_file="xm-alloca.h ${xm_file}"
                xm_defines="USG POSIX SMALL_ARG_MAX"
                xmake_file=x-svr4
                tm_file=i386/ptx4-i.h
@@ -3526,6 +4061,23 @@ for machine in $build $host $target; do
                tm_file=i386/i386-aout.h
                tmake_file=i386/t-i386bare
                ;;
+       i[34567]86-*-beospe*)
+               xm_file=i386/xm-beos.h
+               xm_defines="USE_C_ALLOCA"
+               tmake_file=i386/t-beos
+               tm_file=i386/beos-pe.h
+               xmake_file=i386/x-beos
+               extra_objs=winnt.o
+               ;;
+       i[34567]86-*-beoself* | i[34567]86-*-beos*)
+               xm_file=i386/xm-beos.h
+               tmake_file='i386/t-beos i386/t-crtpic'
+               tm_file=i386/beos-elf.h
+               xmake_file=i386/x-beos
+               extra_objs=winnt.o
+               extra_parts='crtbegin.o crtend.o'
+               fixincludes=Makefile.in
+               ;;
        i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
                tm_file=i386/bsd386.h
 #              tmake_file=t-libc-ok
@@ -3537,16 +4089,22 @@ for machine in $build $host $target; do
 #              use_collect2=yes
                ;;
        i[34567]86-*-freebsdelf*)
-               tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
+               tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd-elf.h i386/perform.h"
                extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
-               tmake_file=i386/t-freebsd
+               tmake_file=t-freebsd
                gas=yes
                gnu_ld=yes
                stabs=yes
+               case x${enable_threads} in
+               xyes | xpthreads | xposix)
+                       thread_file='posix'
+                       tmake_file="${tmake_file} t-freebsd-thread"
+                       ;;
+               esac
                ;;
        i[34567]86-*-freebsd*)
-               tm_file=i386/freebsd.h
-               tmake_file=i386/t-freebsd
+               tm_file="i386/freebsd.h i386/perform.h"
+               tmake_file=t-freebsd
                ;;
        i[34567]86-*-netbsd*)
                tm_file=i386/netbsd.h
@@ -3685,18 +4243,19 @@ for machine in $build $host $target; do
                tm_file=i386/go32-rtems.h
                tmake_file="i386/t-go32 t-rtems"
                ;;
-       i[34567]86-*-rtemself*)
+       i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
                cpu_type=i386
                tm_file=i386/rtemself.h
-               tmake_file="i386/t-i386bare t-rtems"
+               extra_parts="crtbegin.o crtend.o crti.o crtn.o"
+               tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
                ;;
-       i[34567]86-*-rtems*)
+       i[34567]86-*-rtemscoff*)
                cpu_type=i386
                tm_file=i386/rtems.h
                tmake_file="i386/t-i386bare t-rtems"
                ;;
        i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
-               xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
+               xm_file="xm-alloca.h ${xm_file} i386/xm-sco5.h"
                xm_defines="USG SVR3"
                xmake_file=i386/x-sco5
                install_headers_dir=install-headers-cpio
@@ -3712,7 +4271,7 @@ for machine in $build $host $target; do
                ;;
        i[34567]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
                xm_file="${xm_file} i386/xm-sco.h"
-               xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
+               xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX"
                xmake_file=i386/x-sco4
                install_headers_dir=install-headers-cpio
                 if test x$stabs = xyes
@@ -3725,7 +4284,10 @@ for machine in $build $host $target; do
                        tmake_file=i386/t-crtstuff
                        extra_parts="crtbegin.o crtend.o"
                fi
-               truncate_target=yes
+               # The default EAFS filesystem supports long file names.
+               # Truncating the target makes $host != $target which
+               # makes gcc think it is doing a cross-compile.
+               # truncate_target=yes
                ;;
        i[34567]86-*-sco*)              # 80386 running SCO system
                xm_file=i386/xm-sco.h
@@ -3744,23 +4306,32 @@ for machine in $build $host $target; do
                truncate_target=yes
                ;;
        i[34567]86-*-solaris2*)
-               xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
+               xm_file="xm-alloca.h ${xm_file}"
                xm_defines="USG POSIX SMALL_ARG_MAX"
-               if test x$stabs = xyes
-               then
-                       tm_file=i386/sol2dbg.h
-               else
-                       tm_file=i386/sol2.h
+               tm_file=i386/sol2.h
+               if test x$gas = xyes; then
+                       # Only needed if gas does not support -s
+                       tm_file="i386/sol2gas.h ${tm_file}"
                fi
                tmake_file=i386/t-sol2
                extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
                xmake_file=x-svr4
-               if test x$enable_threads = xyes; then
+               if test x${enable_threads} = x; then
+                   enable_threads=$have_pthread_h
+                   if test x${enable_threads} = x; then
+                       enable_threads=$have_thread_h
+                   fi
+               fi
+               if test x${enable_threads} = xyes; then
+                   if test x${have_pthread_h} = xyes; then
+                       thread_file='posix'
+                   else
                        thread_file='solaris'
+                   fi
                fi
                ;;
        i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
-               xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
+               xm_file="xm-alloca.h ${xm_file}"
                xm_defines="USG POSIX"
                tm_file=i386/sysv5.h
                if test x$stabs = xyes
@@ -3775,7 +4346,7 @@ for machine in $build $host $target; do
               fi
                ;;
        i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
-               xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
+               xm_file="xm-alloca.h ${xm_file}"
                xm_defines="USG POSIX SMALL_ARG_MAX"
                tm_file=i386/sysv4.h
                if test x$stabs = xyes
@@ -3787,7 +4358,7 @@ for machine in $build $host $target; do
                extra_parts="crtbegin.o crtend.o"
                ;;
        i[34567]86-*-udk*)      # Intel x86 on SCO UW/OSR5 Dev Kit
-               xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
+               xm_file="xm-alloca.h ${xm_file}"
                xm_defines="USG POSIX"
                tm_file=i386/udk.h
                tmake_file="i386/t-crtpic i386/t-udk"
@@ -3879,7 +4450,7 @@ for machine in $build $host $target; do
        i[34567]86-*-uwin*)
                tm_file=i386/uwin.h
                xm_file="${xm_file} i386/xm-uwin.h"
-               xm_defines="USG NO_STAB_H NO_SYS_SIGLIST"
+               xm_defines="USG NO_STAB_H"
                tmake_file="i386/t-cygwin i386/t-uwin"
                extra_objs=winnt.o
                xmake_file=i386/x-cygwin
@@ -3891,7 +4462,7 @@ for machine in $build $host $target; do
        i[34567]86-*-interix*)
                tm_file="i386/i386-interix.h interix.h"
                xm_file="i386/xm-i386-interix.h xm-interix.h"
-               xm_defines="USG NO_SYS_SIGLIST"
+               xm_defines="USG"
                tmake_file="i386/t-interix"
                extra_objs=interix.o
                xmake_file=x-interix
@@ -3919,7 +4490,7 @@ for machine in $build $host $target; do
                fi
                ;;
        i[34567]86-dg-dgux*)
-               xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
+               xm_file="xm-alloca.h ${xm_file}"
                xm_defines="USG POSIX"
                out_file=i386/dgux.c
                tm_file=i386/dgux.h
@@ -4012,8 +4583,8 @@ for machine in $build $host $target; do
                extra_headers=math-68881.h
                ;;
        m68000-hp-hpux*)                # HP 9000 series 300
-               xm_file="xm_alloca.h ${xm_file}"
-               xm_defines="USG NO_SYS_SIGLIST"
+               xm_file="xm-alloca.h ${xm_file}"
+               xm_defines="USG"
                if test x$gas = xyes
                then
                        xmake_file=m68k/x-hp320g
@@ -4118,7 +4689,6 @@ for machine in $build $host $target; do
        m68k-motorola-sysv*)
                tm_file=m68k/mot3300.h
                xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
-               xm_defines=NO_SYS_SIGLIST
                if test x$gas = xyes
                then
                        xmake_file=m68k/x-mot3300-gas
@@ -4214,8 +4784,8 @@ for machine in $build $host $target; do
                extra_headers=math-68881.h
                ;;
        m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
-               xm_file="xm_alloca.h ${xm_file}"
-               xm_defines="USG NO_SYS_SIGLIST"
+               xm_file="xm-alloca.h ${xm_file}"
+               xm_defines="USG"
                if test x$gas = xyes
                then
                        xmake_file=m68k/x-hp320g
@@ -4230,8 +4800,8 @@ for machine in $build $host $target; do
                float_format=m68k
                ;;
        m68k-hp-hpux*)  # HP 9000 series 300
-               xm_file="xm_alloca.h ${xm_file}"
-               xm_defines="USG NO_SYS_SIGLIST"
+               xm_file="xm-alloca.h ${xm_file}"
+               xm_defines="USG"
                if test x$gas = xyes
                then
                        xmake_file=m68k/x-hp320g
@@ -4283,7 +4853,7 @@ for machine in $build $host $target; do
                use_collect2=yes
                float_format=m68k
                 ;;
-       m68k-next-nextstep3*)
+       m68k-next-nextstep[34]*)
                tm_file=m68k/next.h
                xm_file="m68k/xm-next.h ${xm_file}"
                tmake_file=m68k/t-next
@@ -4338,7 +4908,7 @@ for machine in $build $host $target; do
                float_format=m68k
                ;;
        m68020-*-elf* | m68k-*-elf*)
-               tm_file="m68k/m68020-elf.h libgloss.h"
+               tm_file="m68k/m68020-elf.h"
                xm_file=m68k/xm-m68kv.h
                tmake_file=m68k/t-m68kelf
                header_files=math-68881.h
@@ -4424,13 +4994,18 @@ for machine in $build $host $target; do
                extra_headers=math-68881.h
                float_format=m68k
                ;;
-       m68k-*-rtems*)
+       m68k-*-rtemscoff*)
                tmake_file="m68k/t-m68kbare t-rtems"
                tm_file=m68k/rtems.h
                extra_headers=math-68881.h
                float_format=m68k
                ;;
-
+       m68k-*-rtemself*|m68k-*-rtems*)
+               tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
+               tm_file=m68k/rtemself.h
+               extra_headers=math-68881.h
+               float_format=m68k
+               ;;
        m88k-dg-dgux*)
                case $machine in
                  m88k-dg-dguxbcs*)
@@ -4506,16 +5081,21 @@ for machine in $build $host $target; do
                tmake_file=m88k/t-sysv4
                ;;
        mips-sgi-irix6*)                # SGI System V.4., IRIX 6
-               tm_file=mips/iris6.h
+               if test "x$gnu_ld" = xyes
+               then
+                       tm_file="mips/iris6.h mips/iris6gld.h"
+               else
+                       tm_file=mips/iris6.h
+               fi
+               tmake_file=mips/t-iris6
                xm_file=mips/xm-iris6.h
                xmake_file=mips/x-iris6
-               tmake_file=mips/t-iris6
 #              if test x$enable_threads = xyes; then
 #                      thread_file='irix'
 #              fi
                ;;
        mips-wrs-vxworks)
-               tm_file="mips/elf.h libgloss.h mips/vxworks.h"
+               tm_file="mips/elf.h mips/vxworks.h"
                tmake_file=mips/t-ecoff
                gas=yes
                gnu_ld=yes
@@ -4682,22 +5262,23 @@ for machine in $build $host $target; do
                ;;
        mips*-*-linux*)                         # Linux MIPS, either endian.
                xmake_file=x-linux
-               xm_file="xm-siglist.h ${xm_file}"
                case $machine in
                        mipsel-*)  tm_file="mips/elfl.h mips/linux.h" ;;
                        *)         tm_file="mips/elf.h mips/linux.h" ;;
                esac
-               extra_parts="crtbegin.o crtend.o"
+               extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
                gnu_ld=yes
                gas=yes
+               if test x$enable_threads = xyes; then
+                       thread_file='posix'
+               fi
                ;;
        mips*el-*-openbsd*)     # mips little endian
                target_cpu_default="MASK_GAS|MASK_ABICALLS"
-               tm_file=mips/openbsd.h
                ;;
        mips*-*-openbsd*)               # mips big endian
                target_cpu_default="MASK_GAS|MASK_ABICALLS"
-               tm_file=mips/openbsd-be.h
+               tm_file="mips/openbsd-be.h ${tm_file}"
                ;;
        mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
                tm_file="mips/news4.h ${tm_file}"
@@ -4723,7 +5304,6 @@ for machine in $build $host $target; do
                if test x$stabs = xyes; then
                        tm_file="${tm_file} dbx.h"
                fi
-               xm_file="xm-siglist.h ${xm_file}"
                xm_defines=USG
                if test x$gas = xyes
                then
@@ -4741,7 +5321,6 @@ for machine in $build $host $target; do
                if test x$stabs = xyes; then
                        tm_file="${tm_file} dbx.h"
                fi
-               xm_file="xm-siglist.h ${xm_file}"
                xm_defines=USG
                xmake_file=mips/x-sysv
                if test x$gas = xyes
@@ -4814,7 +5393,6 @@ for machine in $build $host $target; do
                if test x$stabs = xyes; then
                        tm_file="${tm_file} dbx.h"
                fi
-               xm_file="xm-siglist.h ${xm_file}"
                xmake_file=mips/x-sysv
                if test x$gas = xyes
                then
@@ -4918,7 +5496,7 @@ for machine in $build $host $target; do
                tmake_file=mips/t-ecoff
                ;;
        mipsel-*-elf*)
-               tm_file="mips/elfl.h libgloss.h"
+               tm_file="mips/elfl.h"
                tmake_file=mips/t-elf
                ;;
        mips-*-elf*)
@@ -4930,7 +5508,7 @@ for machine in $build $host $target; do
                tmake_file=mips/t-elf
                ;;
        mips64orionel-*-elf*)
-               tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
+               tm_file="mips/elforion.h mips/elfl64.h"
                tmake_file=mips/t-elf
                ;;
        mips64-*-elf*)
@@ -4938,12 +5516,12 @@ for machine in $build $host $target; do
                tmake_file=mips/t-elf
                ;;
        mips64orion-*-elf*)
-               tm_file="mips/elforion.h mips/elf64.h libgloss.h"
+               tm_file="mips/elforion.h mips/elf64.h"
                tmake_file=mips/t-elf
                ;;
        mips64orion-*-rtems*)
                tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
-               tmake_file="mips/t-ecoff t-rtems"
+               tmake_file="mips/t-elf t-rtems"
                ;;
        mipstx39el-*-elf*)
                tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
@@ -4969,6 +5547,7 @@ for machine in $build $host $target; do
                fi
                ;;
        mn10200-*-*)
+               float_format=i32
                cpu_type=mn10200
                tm_file="mn10200/mn10200.h"
                if test x$stabs = xyes
@@ -5038,11 +5617,22 @@ for machine in $build $host $target; do
        ns32k-*-openbsd*)
                # Nothing special
                ;;
-       pyramid-*-*)
-               cpu_type=pyr
-               xmake_file=pyr/x-pyr
-               use_collect2=yes
-               ;;
+# This has not been updated to GCC 2.
+#      pyramid-*-*)
+#              cpu_type=pyr
+#              xmake_file=pyr/x-pyr
+#              use_collect2=yes
+#              ;;
+
+       pj*-linux*)
+               tm_file="svr4.h pj/linux.h ${tm_file}"
+               ;;
+       pj-*)
+               ;;
+       pjl-*)
+               tm_file="svr4.h pj/pjl.h ${tm_file}"
+               ;;
+
        romp-*-aos*)
                use_collect2=yes
                ;;
@@ -5065,7 +5655,7 @@ for machine in $build $host $target; do
                ;;
        powerpc-*-sysv* | powerpc-*-elf*)
                tm_file=rs6000/sysv4.h
-               xm_file="xm-siglist.h rs6000/xm-sysv4.h"
+               xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG POSIX"
                extra_headers=ppc-asm.h
                if test x$gas = xyes
@@ -5125,7 +5715,7 @@ for machine in $build $host $target; do
                ;;
        powerpc-*-linux-gnu*)
                tm_file=rs6000/linux.h
-               xm_file="xm-siglist.h rs6000/xm-sysv4.h"
+               xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG ${xm_defines}"
                out_file=rs6000/rs6000.c
                if test x$gas = xyes
@@ -5143,7 +5733,7 @@ for machine in $build $host $target; do
                ;;
         powerpc-wrs-vxworks*)
                 cpu_type=rs6000
-               xm_file="xm-siglist.h rs6000/xm-sysv4.h"
+               xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG POSIX"
                 tm_file=rs6000/vxppc.h
                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
@@ -5152,7 +5742,7 @@ for machine in $build $host $target; do
                 ;;
        powerpcle-*-sysv* | powerpcle-*-elf*)
                tm_file=rs6000/sysv4le.h
-               xm_file="xm-siglist.h rs6000/xm-sysv4.h"
+               xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG POSIX"
                if test x$gas = xyes
                then
@@ -5201,7 +5791,7 @@ for machine in $build $host $target; do
                ;;
        powerpcle-*-solaris2*)
                tm_file=rs6000/sol2.h
-               xm_file="xm-siglist.h rs6000/xm-sysv4.h"
+               xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG POSIX"
                if test x$gas = xyes
                then
@@ -5241,12 +5831,12 @@ for machine in $build $host $target; do
                then
                        xmake_file=rs6000/x-aix41-gld
                else
-                       xmake_file=rx6000/x-aix41
+                       xmake_file=rs6000/x-aix41
                fi
                float_format=none
                use_collect2=yes
                ;;
-       rs6000-ibm-aix4.[3456789].* | powerpc-ibm-aix4.[3456789].*)
+       rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
                tm_file=rs6000/aix43.h
                if test x$host != x$target
                then
@@ -5355,6 +5945,7 @@ for machine in $build $host $target; do
                tmake_file="t-linux t-linux-gnulibc1"
                extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
                gnu_ld=yes
+               float_format=sparc
                ;;
        sparc-*-linux-gnu*)             # Sparc's running GNU/Linux, libc6
                xm_file="${xm_file} sparc/xm-linux.h"
@@ -5366,6 +5957,7 @@ for machine in $build $host $target; do
                if test x$enable_threads = xyes; then
                        thread_file='posix'
                fi
+               float_format=sparc
                ;;
        sparc-*-lynxos*)
                if test x$gas = xyes
@@ -5378,12 +5970,24 @@ for machine in $build $host $target; do
                tmake_file=sparc/t-sunos41
                xmake_file=x-lynx
                ;;
-       sparc-*-rtems*)
+       sparc-*-rtemsaout*)
                tmake_file="sparc/t-sparcbare t-rtems"
                tm_file=sparc/rtems.h
                ;;
+       sparc-*-rtems*|sparc-*-rtemself*)
+               tm_file="sparc/rtemself.h"
+               tmake_file="sparc/t-elf t-rtems"
+               extra_parts="crti.o crtn.o crtbegin.o crtend.o"
+               #float_format=i128
+               float_format=i64
+               ;;
        sparcv9-*-solaris2*)
-               tm_file=sparc/sol2-sld-64.h
+               if test x$gnu_ld = xyes
+               then
+                       tm_file=sparc/sol2-64.h
+               else
+                       tm_file=sparc/sol2-sld-64.h
+               fi
                xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
                xm_defines="USG POSIX"
                tmake_file="sparc/t-sol2 sparc/t-sol2-64"
@@ -5405,12 +6009,21 @@ for machine in $build $host $target; do
                fi
                ;;
         sparc-hal-solaris2*)
-                xm_file=sparc/xm-sol2.h
+                xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
+                xm_defines="USG POSIX"
                 tm_file="sparc/sol2.h sparc/hal.h"
                 tmake_file="sparc/t-halos sparc/t-sol2"
                 xmake_file=sparc/x-sysv4
                 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
-                broken_install=yes
+                case $machine in
+                *-*-solaris2.0-4)
+                        float_format=i128
+                ;;
+                *)
+                        float_format=none
+                        ;;
+                esac
+               thread_file='solaris'
                 ;;
        sparc-*-solaris2*)
                if test x$gnu_ld = xyes
@@ -5419,12 +6032,24 @@ for machine in $build $host $target; do
                else
                        tm_file=sparc/sol2-sld.h
                fi
-               xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
+               xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
                xm_defines="USG POSIX"
                tmake_file=sparc/t-sol2
                xmake_file=sparc/x-sysv4
                extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
                case $machine in
+               *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
+               *-*-solaris2*)
+                       if test x$gnu_ld = xyes
+                       then
+                               tm_file=sparc/sol2-64.h
+                       else
+                               tm_file=sparc/sol2-sld-64.h
+                       fi
+                       tmake_file="$tmake_file sparc/t-sol2-64"
+                       ;;
+               esac
+               case $machine in
                *-*-solaris2.[0-4])
                        float_format=i128
                        ;;
@@ -5465,14 +6090,14 @@ for machine in $build $host $target; do
                ;;
        sparc-*-sysv4*)
                tm_file=sparc/sysv4.h
-               xm_file="xm-siglist.h sparc/xm-sysv4.h"
+               xm_file="sparc/xm-sysv4.h"
                xm_defines="USG POSIX"
                tmake_file=t-svr4
                xmake_file=sparc/x-sysv4
                extra_parts="crtbegin.o crtend.o"
                ;;
        sparc-*-vxsim*)
-               xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
+               xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
                xm_defines="USG POSIX"
                tm_file=sparc/vxsim.h
                tmake_file=sparc/t-vxsparc
@@ -5490,6 +6115,20 @@ for machine in $build $host $target; do
                tm_file="sparc/lite.h aoutos.h libgloss.h"
                tmake_file=sparc/t-sparclite
                ;;
+       sparclite-*-elf*)
+               tm_file="sparc/liteelf.h"
+               tmake_file=sparc/t-sparclite
+                extra_parts="crtbegin.o crtend.o"
+               ;;
+       sparc86x-*-aout*)
+               tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
+               tmake_file=sparc/t-sp86x
+               ;;
+       sparc86x-*-elf*)        
+               tm_file="sparc/sp86x-elf.h"
+               tmake_file=sparc/t-sp86x
+                extra_parts="crtbegin.o crtend.o"
+               ;;
        sparc64-*-aout*)
                tmake_file=sparc/t-sp64
                tm_file=sparc/sp64-aout.h
@@ -5506,6 +6145,10 @@ for machine in $build $host $target; do
                xmake_file=x-linux
                extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
                gnu_ld=yes
+               if test x$enable_threads = xyes; then
+                       thread_file='posix'
+               fi
+               float_format=sparc
                ;;
 # This hasn't been upgraded to GCC 2.
 #      tahoe-harris-*)                 # Harris tahoe, using COFF.
@@ -5520,6 +6163,27 @@ for machine in $build $host $target; do
                md_file=arm/thumb.md
                tmake_file=arm/t-thumb
                ;;
+       thumb-*-elf* | thumbel-*-elf*)
+               tm_file=arm/telf.h
+               out_file=arm/thumb.c
+               xm_file=arm/xm-thumb.h
+               md_file=arm/thumb.md
+               tmake_file=arm/t-thumb-elf
+               ;;
+       thumb-*-linux-gnu*)
+               tm_file=arm/linux-telf.h
+               out_file=arm/thumb.c
+               xm_file=arm/xm-thumb.h
+               md_file=arm/thumb.md
+               tmake_file=arm/t-thumb-linux
+               ;;
+       thumb-*-uclinux*)
+               tm_file=arm/uclinux-telf.h
+               out_file=arm/thumb.c
+               md_file=arm/thumb.md
+               tmake_file=arm/t-thumb-linux
+               xm_file=arm/xm-thumb.h
+               ;;
        thumb-wrs-vxworks)
                tm_file=arm/tcoff.h
                out_file=arm/thumb.c
@@ -5528,12 +6192,32 @@ for machine in $build $host $target; do
                tmake_file=arm/t-thumb
                thread_file='vxworks'
                ;;
+       thumb-*-pe)
+               tm_file=arm/tpe.h
+               out_file=arm/thumb.c
+               xm_file=arm/xm-thumb.h
+               md_file=arm/thumb.md
+               tmake_file=arm/t-pe-thumb
+               extra_objs=pe.o
+               ;;
 # This hasn't been upgraded to GCC 2.
 #      tron-*-*)
 #              cpu_type=gmicro
 #              use_collect2=yes
 #              ;;
+       v850-*-rtems*)
+               cpu_type=v850
+               tm_file="v850/rtems.h"
+               xm_file="v850/xm-v850.h"
+               tmake_file="v850/t-v850 t-rtems"
+               if test x$stabs = xyes
+               then
+                       tm_file="${tm_file} dbx.h"
+               fi
+               use_collect2=no
+               ;;
        v850-*-*)
+               target_cpu_default="TARGET_CPU_generic"
                cpu_type=v850
                tm_file="v850/v850.h"
                xm_file="v850/xm-v850.h"
@@ -5635,6 +6319,9 @@ for machine in $build $host $target; do
                ;;
        alpha*-*-*)
                case $machine in
+                       alphaev6[78]*)
+                               target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
+                               ;;
                        alphaev6*)
                                target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
                                ;;
@@ -5668,7 +6355,7 @@ for machine in $build $host $target; do
 
                        # Distinguish cores, and major variants
                        # arm7m doesn't exist, but D & I don't affect code
-                       xarm23678 | xarm250 | xarm67010 \
+                       xarm[23678] | xarm250 | xarm[67][01]0 \
                        | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
                        | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
                        | xstrongarm | xstrongarm110 | xstrongarm1100)
@@ -5840,14 +6527,6 @@ then float_h_file=Makefile.in
 else float_h_file=float-$float_format.h
 fi
 
-if test x$enable_haifa = x
-then
-  case $target in
-    alpha*-* | hppa*-* | powerpc*-* | rs6000-* | *sparc*-* | m32r*-*)
-      enable_haifa=yes;;
-  esac
-fi
-
 # Handle cpp installation.
 if test x$enable_cpp != xno
 then
@@ -5948,9 +6627,9 @@ fi
 xm_file="gansidecl.h ${xm_file}"
 tm_file="gansidecl.h ${tm_file}"
 
-vars="host_xm_file tm_file xm_file build_xm_file"
-links="config.h tm.h tconfig.h hconfig.h"
-defines="host_xm_defines null_defines xm_defines build_xm_defines"
+vars="host_xm_file tm_file tm_p_file xm_file build_xm_file"
+links="config.h tm.h tm_p.h tconfig.h hconfig.h"
+defines="host_xm_defines null_defines null_defines xm_defines build_xm_defines"
 
 rm -f config.bak
 if test -f config.status; then mv -f config.status config.bak; fi
@@ -5963,6 +6642,8 @@ do
        set $defines; define=$1; shift; defines=$*
 
        rm -f $link
+       # Make sure the file is created, even if it is empty.
+       echo >$link
 
        # Define TARGET_CPU_DEFAULT if the system wants one.
        # This substitutes for lots of *.h files.
@@ -6037,7 +6718,7 @@ fi
 
 
         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:6041: checking for strerror in -lcposix" >&5
+echo "configure:6722: checking for strerror in -lcposix" >&5
 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6045,7 +6726,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6049 "configure"
+#line 6730 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6056,7 +6737,7 @@ int main() {
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6079,12 +6760,12 @@ fi
   
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:6083: checking for working const" >&5
+echo "configure:6764: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6088 "configure"
+#line 6769 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -6133,7 +6814,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:6137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -6154,21 +6835,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:6158: checking for inline" >&5
+echo "configure:6839: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 6165 "configure"
+#line 6846 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:6172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -6194,12 +6875,12 @@ EOF
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:6198: checking for off_t" >&5
+echo "configure:6879: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6203 "configure"
+#line 6884 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6213,548 +6894,282 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   ac_cv_type_off_t=yes
 else
   rm -rf conftest*
-  ac_cv_type_off_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
-  cat >> confdefs.h <<\EOF
-#define off_t long
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:6231: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6236 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_size_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
-  cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-fi
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments.  Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:6266: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6271 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:6278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_header_alloca_h=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-
-fi
-
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:6299: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6304 "configure"
-#include "confdefs.h"
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
-# else
-#  if HAVE_ALLOCA_H
-#   include <alloca.h>
-#  else
-#   ifdef _AIX
- #pragma alloca
-#   else
-#    ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#    endif
-#   endif
-#  endif
-# endif
-#endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_func_alloca_works=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-
-fi
-
-if test $ac_cv_func_alloca_works = no; then
-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-  # that cause trouble.  Some versions do not even contain alloca or
-  # contain a buggy version.  If you still want to use their alloca,
-  # use ar to extract alloca.o from them instead of compiling alloca.c.
-  ALLOCA=alloca.${ac_objext}
-  cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:6364: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6369 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "webecray" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_os_cray=yes
-else
-  rm -rf conftest*
-  ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
-  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6394: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6399 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:6422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  ac_cv_type_off_t=no
 fi
 rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
 
-  break
-else
-  echo "$ac_t""no" 1>&6
 fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+  cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
 
-done
 fi
 
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:6449: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:6912: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-  ac_cv_c_stack_direction=0
-else
   cat > conftest.$ac_ext <<EOF
-#line 6457 "configure"
+#line 6917 "configure"
 #include "confdefs.h"
-find_stack_direction ()
-{
-  static char *addr = 0;
-  auto char dummy;
-  if (addr == 0)
-    {
-      addr = &dummy;
-      return find_stack_direction ();
-    }
-  else
-    return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
-  exit (find_stack_direction() < 0);
-}
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
 EOF
-if { (eval echo configure:6476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_c_stack_direction=1
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_size_t=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  ac_cv_type_size_t=no
 fi
+rm -f conftest*
 
 fi
-
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+  cat >> confdefs.h <<\EOF
+#define size_t unsigned
 EOF
 
 fi
 
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6501: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
+echo "configure:6947: checking for working alloca.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6506 "configure"
+#line 6952 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+if { (eval echo configure:6959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+  ac_cv_header_alloca_h=yes
 else
-  echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  ac_cv_header_alloca_h=no
 fi
 rm -f conftest*
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
 EOF
-else
-  echo "$ac_t""no" 1>&6
+
 fi
-done
 
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6540: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:6980: checking for alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6545 "configure"
+#line 6985 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
+#ifdef __GNUC__
+# define alloca __builtin_alloca
 #else
-$ac_func();
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
 #endif
 
+int main() {
+char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:6568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  ac_cv_func_alloca_works=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  ac_cv_func_alloca_works=no
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
 EOF
-else
-  echo "$ac_t""no" 1>&6
+
 fi
-done
 
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6593: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+if test $ac_cv_func_alloca_works = no; then
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+  # that cause trouble.  Some versions do not even contain alloca or
+  # contain a buggy version.  If you still want to use their alloca,
+  # use ar to extract alloca.o from them instead of compiling alloca.c.
+  ALLOCA=alloca.${ac_objext}
+  cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:7045: checking whether alloca needs Cray hooks" >&5
+if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_fixed_mapped=no
-else
   cat > conftest.$ac_ext <<EOF
-#line 6601 "configure"
+#line 7050 "configure"
 #include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
 
-/* Thanks to Mike Haertel and Jim Avera for this test.
-   Here is a matrix of mmap possibilities:
-       mmap private not fixed
-       mmap private fixed at somewhere currently unmapped
-       mmap private fixed at somewhere already mapped
-       mmap shared not fixed
-       mmap shared fixed at somewhere currently unmapped
-       mmap shared fixed at somewhere already mapped
-   For private mappings, we should verify that changes cannot be read()
-   back from the file, nor mmap's back from the file at a different
-   address.  (There have been systems where private was not correctly
-   implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the filesystem buffer cache
-   like early versions of FreeBSD and possibly contemporary NetBSD.)
-   For shared mappings, we should conversely verify that changes get
-   propogated back to all the places they're supposed to be.
-
-   Grep wants private fixed already mapped.
-   The main things grep needs to know about mmap are:
-   * does it exist and is it safe to write into the mmap'd area
-   * how to use it (BSD variants)  */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h.  */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
-
-/* Assume that all systems that can run configure have sys/param.h.  */
-# ifndef HAVE_SYS_PARAM_H
-#  define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-#  define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-#  ifdef HAVE_SYS_PARAM_H
-#   include <sys/param.h>
-#   ifdef EXEC_PAGESIZE
-#    define getpagesize() EXEC_PAGESIZE
-#   else /* no EXEC_PAGESIZE */
-#    ifdef NBPG
-#     define getpagesize() NBPG * CLSIZE
-#     ifndef CLSIZE
-#      define CLSIZE 1
-#     endif /* no CLSIZE */
-#    else /* no NBPG */
-#     ifdef NBPC
-#      define getpagesize() NBPC
-#     else /* no NBPC */
-#      ifdef PAGESIZE
-#       define getpagesize() PAGESIZE
-#      endif /* PAGESIZE */
-#     endif /* no NBPC */
-#    endif /* no NBPG */
-#   endif /* no EXEC_PAGESIZE */
-#  else /* no HAVE_SYS_PARAM_H */
-#   define getpagesize() 8192  /* punt totally */
-#  endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "webecray" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_os_cray=yes
+else
+  rm -rf conftest*
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
 
-#endif /* no HAVE_GETPAGESIZE */
+fi
 
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
+echo "$ac_t""$ac_cv_os_cray" 1>&6
+if test $ac_cv_os_cray = yes; then
+for ac_func in _getb67 GETB67 getb67; do
+  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7075: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7080 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
 #else
-char *malloc();
+$ac_func();
 #endif
 
-int
-main()
-{
-       char *data, *data2, *data3;
-       int i, pagesize;
-       int fd;
+; return 0; }
+EOF
+if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
-       pagesize = getpagesize();
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
 
-       /*
-        * First, make a file with some known garbage in it.
-        */
-       data = malloc(pagesize);
-       if (!data)
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               *(data + i) = rand();
-       umask(0);
-       fd = creat("conftestmmap", 0600);
-       if (fd < 0)
-               exit(1);
-       if (write(fd, data, pagesize) != pagesize)
-               exit(1);
-       close(fd);
+  break
+else
+  echo "$ac_t""no" 1>&6
+fi
 
-       /*
-        * Next, try to mmap the file at a fixed address which
-        * already has something else allocated at it.  If we can,
-        * also make sure that we see the same garbage.
-        */
-       fd = open("conftestmmap", O_RDWR);
-       if (fd < 0)
-               exit(1);
-       data2 = malloc(2 * pagesize);
-       if (!data2)
-               exit(1);
-       data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
-       if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
-           MAP_PRIVATE | MAP_FIXED, fd, 0L))
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               if (*(data + i) != *(data2 + i))
-                       exit(1);
+done
+fi
 
-       /*
-        * Finally, make sure that changes to the mapped area
-        * do not percolate back to the file as seen by read().
-        * (This is a bug on some variants of i386 svr4.0.)
-        */
-       for (i = 0; i < pagesize; ++i)
-               *(data2 + i) = *(data2 + i) + 1;
-       data3 = malloc(pagesize);
-       if (!data3)
-               exit(1);
-       if (read(fd, data3, pagesize) != pagesize)
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               if (*(data + i) != *(data3 + i))
-                       exit(1);
-       close(fd);
-       unlink("conftestmmap");
-       exit(0);
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:7130: checking stack direction for C alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_stack_direction=0
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7138 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+  exit (find_stack_direction() < 0);
 }
-
 EOF
-if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  ac_cv_func_mmap_fixed_mapped=yes
+  ac_cv_c_stack_direction=1
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  ac_cv_func_mmap_fixed_mapped=no
+  ac_cv_c_stack_direction=-1
 fi
 rm -fr conftest*
 fi
 
 fi
 
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
 EOF
 
 fi
@@ -6765,17 +7180,17 @@ unistd.h sys/param.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6769: checking for $ac_hdr" >&5
+echo "configure:7184: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6774 "configure"
+#line 7189 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6805,12 +7220,12 @@ done
 strdup __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6809: checking for $ac_func" >&5
+echo "configure:7224: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6814 "configure"
+#line 7229 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6833,7 +7248,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6862,12 +7277,12 @@ done
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6866: checking for $ac_func" >&5
+echo "configure:7281: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6871 "configure"
+#line 7286 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6890,7 +7305,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6924,19 +7339,19 @@ EOF
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:6928: checking for LC_MESSAGES" >&5
+echo "configure:7343: checking for LC_MESSAGES" >&5
 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6933 "configure"
+#line 7348 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_val_LC_MESSAGES=yes
 else
@@ -6957,7 +7372,7 @@ EOF
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:6961: checking whether NLS is requested" >&5
+echo "configure:7376: checking whether NLS is requested" >&5
         # Check whether --enable-nls or --disable-nls was given.
 if test "${enable_nls+set}" = set; then
   enableval="$enable_nls"
@@ -6977,7 +7392,7 @@ fi
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:6981: checking whether included gettext is requested" >&5
+echo "configure:7396: checking whether included gettext is requested" >&5
       # Check whether --with-included-gettext or --without-included-gettext was given.
 if test "${with_included_gettext+set}" = set; then
   withval="$with_included_gettext"
@@ -6996,17 +7411,17 @@ fi
 
        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:7000: checking for libintl.h" >&5
+echo "configure:7415: checking for libintl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7005 "configure"
+#line 7420 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7023,19 +7438,19 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:7027: checking for gettext in libc" >&5
+echo "configure:7442: checking for gettext in libc" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7032 "configure"
+#line 7447 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:7039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libc=yes
 else
@@ -7051,7 +7466,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
 
           if test "$gt_cv_func_gettext_libc" != "yes"; then
             echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:7055: checking for bindtextdomain in -lintl" >&5
+echo "configure:7470: checking for bindtextdomain in -lintl" >&5
 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7059,7 +7474,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7063 "configure"
+#line 7478 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7070,7 +7485,7 @@ int main() {
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:7074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7086,12 +7501,12 @@ fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:7090: checking for gettext in libintl" >&5
+echo "configure:7505: checking for gettext in libintl" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
-echo "configure:7095: checking for gettext in -lintl" >&5
+echo "configure:7510: checking for gettext in -lintl" >&5
 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7099,7 +7514,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7103 "configure"
+#line 7518 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7110,7 +7525,7 @@ int main() {
 gettext()
 ; return 0; }
 EOF
-if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7149,7 +7564,7 @@ EOF
              # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7153: checking for $ac_word" >&5
+echo "configure:7568: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7183,12 +7598,12 @@ fi
                for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7187: checking for $ac_func" >&5
+echo "configure:7602: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7192 "configure"
+#line 7607 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7211,7 +7626,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7238,7 +7653,7 @@ done
                # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7242: checking for $ac_word" >&5
+echo "configure:7657: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7274,7 +7689,7 @@ fi
                # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7278: checking for $ac_word" >&5
+echo "configure:7693: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7306,7 +7721,7 @@ else
 fi
 
                cat > conftest.$ac_ext <<EOF
-#line 7310 "configure"
+#line 7725 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -7314,7 +7729,7 @@ extern int _nl_msg_cat_cntr;
                               return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:7318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
                   DATADIRNAME=share
@@ -7337,7 +7752,7 @@ fi
 
         if test "$CATOBJEXT" = "NONE"; then
          echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
-echo "configure:7341: checking whether catgets can be used" >&5
+echo "configure:7756: checking whether catgets can be used" >&5
          # Check whether --with-catgets or --without-catgets was given.
 if test "${with_catgets+set}" = set; then
   withval="$with_catgets"
@@ -7350,7 +7765,7 @@ fi
 
          if test "$nls_cv_use_catgets" = "yes"; then
                    echo $ac_n "checking for main in -li""... $ac_c" 1>&6
-echo "configure:7354: checking for main in -li" >&5
+echo "configure:7769: checking for main in -li" >&5
 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7358,14 +7773,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-li  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7362 "configure"
+#line 7777 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7393,12 +7808,12 @@ else
 fi
 
            echo $ac_n "checking for catgets""... $ac_c" 1>&6
-echo "configure:7397: checking for catgets" >&5
+echo "configure:7812: checking for catgets" >&5
 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7402 "configure"
+#line 7817 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char catgets(); below.  */
@@ -7421,7 +7836,7 @@ catgets();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_catgets=yes"
 else
@@ -7443,7 +7858,7 @@ EOF
               # Extract the first word of "gencat", so it can be a program name with args.
 set dummy gencat; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7447: checking for $ac_word" >&5
+echo "configure:7862: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7479,7 +7894,7 @@ fi
                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7483: checking for $ac_word" >&5
+echo "configure:7898: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7516,7 +7931,7 @@ fi
                   # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7520: checking for $ac_word" >&5
+echo "configure:7935: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7551,7 +7966,7 @@ fi
                 # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7555: checking for $ac_word" >&5
+echo "configure:7970: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7609,7 +8024,7 @@ fi
         # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7613: checking for $ac_word" >&5
+echo "configure:8028: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7643,7 +8058,7 @@ fi
         # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7647: checking for $ac_word" >&5
+echo "configure:8062: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7679,7 +8094,7 @@ fi
         # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7683: checking for $ac_word" >&5
+echo "configure:8098: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7772,7 +8187,7 @@ fi
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:7776: checking for catalogs to be installed" >&5
+echo "configure:8191: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -7800,17 +8215,17 @@ echo "configure:7776: checking for catalogs to be installed" >&5
    if test "$CATOBJEXT" = ".cat"; then
      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:7804: checking for linux/version.h" >&5
+echo "configure:8219: checking for linux/version.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7809 "configure"
+#line 8224 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7876,6 +8291,52 @@ fi
   
 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
 
+# Windows32 Registry support for specifying GCC installation paths.
+# Check whether --enable-win32-registry or --disable-win32-registry was given.
+if test "${enable_win32_registry+set}" = set; then
+  enableval="$enable_win32_registry"
+  :
+fi
+
+
+echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
+echo "configure:8304: checking whether windows registry support is requested" >&5
+if test x$enable_win32_registry != xno; then
+  cat >> confdefs.h <<\EOF
+#define ENABLE_WIN32_REGISTRY 1
+EOF
+
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+# Check if user specified a different registry key.
+case x${enable_win32_registry} in
+x | xyes)
+  # default.
+  gcc_cv_win32_registry_key="$VERSION"
+  ;;
+xno)
+  # no registry lookup.
+  gcc_cv_win32_registry_key=''
+  ;;
+*)
+  # user-specified key.
+  gcc_cv_win32_registry_key="$enable_win32_registry"
+  ;;
+esac
+
+if test x$enable_win32_registry != xno; then
+  echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
+echo "configure:8333: checking registry key on windows hosts" >&5
+  cat >> confdefs.h <<EOF
+#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
+EOF
+
+  echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
+fi
+
 # Get an absolute path to the GCC top-level source directory
 holddir=`pwd`
 cd $srcdir
@@ -8044,7 +8505,7 @@ fi
 
 # Figure out what assembler alignment features are present.
 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
-echo "configure:8048: checking assembler alignment features" >&5
+echo "configure:8509: checking assembler alignment features" >&5
 gcc_cv_as=
 gcc_cv_as_alignment_features=
 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
@@ -8165,7 +8626,7 @@ fi
 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
 
 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
-echo "configure:8169: checking assembler subsection support" >&5
+echo "configure:8630: checking assembler subsection support" >&5
 gcc_cv_as_subsections=
 if test x$gcc_cv_as != x; then
        # Check if we have .subsection
@@ -8204,10 +8665,126 @@ EOF
 fi
 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
 
-echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
-echo "configure:8209: checking assembler instructions" >&5
-gcc_cv_as_instructions=
-if test x$gcc_cv_as != x; then
+case "$target" in 
+  sparc*-*-*)
+    echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
+echo "configure:8672: checking assembler .register pseudo-op support" >&5
+if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       gcc_cv_as_register_pseudo_op=unknown
+       if test x$gcc_cv_as != x; then
+           # Check if we have .register
+           echo ".register %g2, #scratch" > conftest.s
+           if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+               gcc_cv_as_register_pseudo_op=yes
+           else
+               gcc_cv_as_register_pseudo_op=no
+           fi
+           rm -f conftest.s conftest.o
+       fi
+    
+fi
+
+echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
+    if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_AS_REGISTER_PSEUDO_OP 1
+EOF
+
+    fi
+
+    case "$tm_file" in
+    *64*)
+       echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
+echo "configure:8702: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
+if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               if test -n "$gcc_cv_as"; then
+                   echo ".xword foo" > conftest.s
+                   gcc_cv_as_flags64=no
+                   for flag in "-xarch=v9" "-64 -Av9"; do
+                       if $gcc_cv_as $flag -o conftest.o conftest.s \
+                           > /dev/null 2>&1; then
+                           gcc_cv_as_flags64=$flag
+                           break
+                       fi
+                   done
+                   rm -f conftest.s conftest.o
+               else
+                   if test "$gas" = yes; then
+                       gcc_cv_as_flags64="-64 -Av9"
+                   else
+                       gcc_cv_as_flags64="-xarch=v9"
+                   fi
+               fi
+       
+fi
+
+echo "$ac_t""$gcc_cv_as_flags64" 1>&6
+       if test "x$gcc_cv_as_flags64" = xno; then
+
+           tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
+           dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
+
+       else
+           cat >> confdefs.h <<EOF
+#define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
+EOF
+
+       fi
+       ;;
+    *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
+       ;;
+    esac
+
+    if test "x$gcc_cv_as_flags64" != xno; then
+       echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
+echo "configure:8747: checking for assembler offsetable %lo() support" >&5
+if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+           gcc_cv_as_offsetable_lo10=unknown
+           if test "x$gcc_cv_as" != x; then
+               # Check if assembler has offsetable %lo()
+               echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
+               echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
+               if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
+                       > /dev/null 2>&1 &&
+                  $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
+                       > /dev/null 2>&1; then
+                   if cmp conftest.o conftest1.o > /dev/null 2>&1; then
+                       gcc_cv_as_offsetable_lo10=no
+                   else
+                       gcc_cv_as_offsetable_lo10=yes
+                   fi
+               else
+                   gcc_cv_as_offsetable_lo10=no
+               fi
+               rm -f conftest.s conftest.o conftest1.s conftest1.o
+           fi
+       
+fi
+
+echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
+       if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
+           cat >> confdefs.h <<\EOF
+#define HAVE_AS_OFFSETABLE_LO10 1
+EOF
+
+       fi
+    fi
+    ;;
+
+  i[34567]86-*-*)
+    echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
+echo "configure:8786: checking assembler instructions" >&5
+    gcc_cv_as_instructions=
+    if test x$gcc_cv_as != x; then
        set "filds fists" "filds mem; fists mem"
        while test $# -gt 0
        do
@@ -8222,8 +8799,10 @@ EOF
                shift 2
        done
        rm -f conftest.s conftest.o
-fi
-echo "$ac_t""$gcc_cv_as_instructions" 1>&6
+    fi
+    echo "$ac_t""$gcc_cv_as_instructions" 1>&6
+    ;;
+esac
 
 # Figure out what language subdirectories are present.
 # Look if the user specified --enable-languages="..."; if not, use
@@ -8288,6 +8867,46 @@ if test $thread_file != single; then
 fi
 
 
+# Find out what GC implementation we want, or may, use.
+# Check whether --with-gc or --without-gc was given.
+if test "${with_gc+set}" = set; then
+  withval="$with_gc"
+  case "$withval" in
+  simple | page)
+    GGC=ggc-$withval
+    ;;
+  *)
+    { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
+    ;;
+esac
+else
+  if test $ac_cv_func_mmap_fixed_mapped = yes; then
+  GGC=ggc-page
+elif test $ac_cv_func_valloc = yes; then
+  GGC=ggc-page
+else
+  GGC=ggc-simple
+fi
+fi
+
+
+echo "Using $GGC for garbage collection."
+
+# Build a new-abi (c++) system
+# Check whether --enable-new-gxx-abi or --disable-new-gxx-abi was given.
+if test "${enable_new_gxx_abi+set}" = set; then
+  enableval="$enable_new_gxx_abi"
+  cat >> confdefs.h <<\EOF
+#define ENABLE_NEW_GXX_ABI 1
+EOF
+
+GXX_ABI_FLAG='-fnew-abi'
+echo "Building a new-abi g++ compiler."
+
+fi
+
+
+
 # Make empty files to contain the specs and options for each language.
 # Then add #include lines to for a compiler that has specs and/or options.
 
@@ -8436,26 +9055,6 @@ if test x$with_newlib = xyes; then
 fi
 
 
-# Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
-sched_prefix=
-sched_cflags=
-if test x$enable_haifa = xyes; then
-    echo "Using the Haifa scheduler."
-    sched_prefix=haifa-
-    sched_cflags=-DHAIFA
-fi
-
-
-if test x$enable_haifa != x; then
-    # Explicitly remove files that need to be recompiled for the Haifa scheduler.
-    for x in genattrtab.o toplev.o *sched.o; do
-       if test -f $x; then
-           echo "Removing $x"
-           rm -f $x
-       fi
-    done
-fi
-
 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
 # absolute path for gcc_tooldir based on inserting the number of up-directory
 # movements required to get from $(exec_prefix) to $(prefix) into the basic
@@ -8561,7 +9160,6 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
 
 
 
-
 # Echo that links are built
 if test x$host = x$target
 then
@@ -8789,12 +9387,12 @@ s%@GT_YES@%$GT_YES%g
 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
 s%@l@%$l%g
 s%@gthread_flags@%$gthread_flags%g
+s%@GGC@%$GGC%g
+s%@GXX_ABI_FLAG@%$GXX_ABI_FLAG%g
 s%@build_canonical@%$build_canonical%g
 s%@host_canonical@%$host_canonical%g
 s%@target_subdir@%$target_subdir%g
 s%@inhibit_libc@%$inhibit_libc%g
-s%@sched_prefix@%$sched_prefix%g
-s%@sched_cflags@%$sched_cflags%g
 s%@gcc_tooldir@%$gcc_tooldir%g
 s%@dollar@%$dollar%g
 s%@objdir@%$objdir%g
@@ -8834,7 +9432,6 @@ s%@host_exeext@%$host_exeext%g
 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
 s%@host_xm_file_list@%$host_xm_file_list%g
 s%@install@%$install%g
-s%@JAVAGC@%$JAVAGC%g
 s%@lang_options_files@%$lang_options_files%g
 s%@lang_specs_files@%$lang_specs_files%g
 s%@lang_tree_files@%$lang_tree_files%g