OSDN Git Service

* flow.c (life_analysis): Only turn off PROP_LOG_LINKS and
[pf3gnuchains/gcc-fork.git] / gcc / configure.in
index 4fc57fe..a860e78 100644 (file)
@@ -101,7 +101,8 @@ if test x"${DEFAULT_LINKER+set}" = x"set"; then
   elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
     gnu_ld_flag=yes
   fi
-  AC_DEFINE_UNQUOTED(DEFAULT_LINKER,"$DEFAULT_LINKER")
+  AC_DEFINE_UNQUOTED(DEFAULT_LINKER,"$DEFAULT_LINKER",
+       [Define to enable the use of a default linker.])
 fi
 
 # With GNU as
@@ -119,7 +120,8 @@ if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
   elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
     gas_flag=yes
   fi
-  AC_DEFINE_UNQUOTED(DEFAULT_ASSEMBLER,"$DEFAULT_ASSEMBLER")
+  AC_DEFINE_UNQUOTED(DEFAULT_ASSEMBLER,"$DEFAULT_ASSEMBLER",
+       [Define to enable the use of a default assembler.])
 fi
 
 # With stabs
@@ -180,28 +182,63 @@ AC_ARG_ENABLE(checking,
                          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],
-[case "${enableval}" in
-yes)   AC_DEFINE(ENABLE_CHECKING)
-       AC_DEFINE(ENABLE_TREE_CHECKING)
-       AC_DEFINE(ENABLE_RTL_CHECKING)  ;;
+                         is misc,tree,gc],
+[ac_checking=
+ac_tree_checking=
+ac_rtl_checking=
+ac_gc_checking=
+ac_gc_always_collect=
+case "${enableval}" in
+yes)   ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
 no)    ;;
-*)     IFS="${IFS=     }"; ac_save_IFS="$IFS" IFS="$IFS,"
+*)     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="$IFS,"
        set fnord $enableval; shift
        IFS="$ac_save_IFS"
        for check
        do
                case $check in
-               misc)   AC_DEFINE(ENABLE_CHECKING)              ;;
-               tree)   AC_DEFINE(ENABLE_TREE_CHECKING)         ;;
-               rtl)    AC_DEFINE(ENABLE_RTL_CHECKING)          ;;
-               gc)     AC_DEFINE(ENABLE_GC_CHECKING)           ;;
-               gcac)   AC_DEFINE(ENABLE_GC_ALWAYS_COLLECT)     ;;
+               misc)   ac_checking=1 ;;
+               tree)   ac_tree_checking=1 ;;
+               rtl)    ac_rtl_checking=1 ;;
+               gc)     ac_gc_checking=1 ;;
+               gcac)   ac_gc_always_collect=1 ;;
                *)      AC_MSG_ERROR(unknown check category $check) ;;
                esac
        done
        ;;
-esac])
+esac
+], 
+# Enable some checks by default for development versions of GCC
+[ac_checking=1; ac_tree_checking=1; ac_gc_checking=1;])
+if test x$ac_checking != x ; then
+  AC_DEFINE(ENABLE_CHECKING, 1,
+[Define if you want more run-time sanity checks.  This one gets a grab
+   bag of miscellaneous but relatively cheap checks.])
+fi
+if test x$ac_tree_checking != x ; then
+  AC_DEFINE(ENABLE_TREE_CHECKING, 1,
+[Define if you want all operations on trees (the basic data
+   structure of the front ends) to be checked for dynamic type safety
+   at runtime.  This is moderately expensive.])
+fi
+if test x$ac_rtl_checking != x ; then
+  AC_DEFINE(ENABLE_RTL_CHECKING, 1,
+[Define if you want all operations on RTL (the basic data structure
+   of the optimizer and back end) to be checked for dynamic type safety
+   at runtime.  This is quite expensive.])
+fi
+if test x$ac_gc_checking != x ; then
+  AC_DEFINE(ENABLE_GC_CHECKING, 1,
+[Define if you want the garbage collector to do object poisoning and
+   other memory allocation checks.  This is quite expensive.])
+fi
+if test x$ac_gc_always_collect != x ; then
+  AC_DEFINE(ENABLE_GC_ALWAYS_COLLECT, 1,
+[Define if you want the garbage collector to operate in maximally
+   paranoid mode, validating the entire heap and collecting garbage at
+   every opportunity.  This is extremely expensive.])
+fi
+
 
 AC_ARG_ENABLE(cpp,
 [  --disable-cpp           don't provide a user-visible C preprocessor.],
@@ -217,24 +254,16 @@ elif test x$withval != xno; then
   cpp_install_dir=$withval
 fi])
 
-# Use cpplib+cppmain for the preprocessor, but don't link it with the compiler.
-cpp_main=cppmain
-AC_ARG_ENABLE(cpplib,
-[  --disable-cpplib        use the old isolated C preprocessor.],
-if test x$enable_cpplib = xno; then
-  cpp_main=cccp
-fi)
-
-# Link cpplib into the compiler proper, for C/C++/ObjC.
-AC_ARG_ENABLE(c-cpplib,
-[  --enable-c-cpplib       link cpplib directly into C and C++ compilers
-                          (EXPERIMENTAL) (implies --enable-cpplib).],
-if test x$enable_c_cpplib != xno; then
-  extra_c_objs="${extra_c_objs} libcpp.a"
-  extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
-  extra_c_flags="${extra_c_flags} -DUSE_CPPLIB=1"
-  cpp_main=cppmain
-fi)
+dnl Disable this for the moment; the library interface is changing.
+dnl # Link cpplib into the compiler proper, for C/C++/ObjC.
+dnl AC_ARG_ENABLE(c-cpplib,
+dnl [  --enable-c-cpplib       link cpplib directly into C and C++ compilers
+dnl                           (EXPERIMENTAL) (implies --enable-cpplib).],
+dnl if test x$enable_c_cpplib != xno; then
+dnl  extra_c_objs="${extra_c_objs} libcpp.a"
+dnl  extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
+dnl  extra_c_flags="${extra_c_flags} -DUSE_CPPLIB=1"
+dnl fi)
 
 # Enable Multibyte Characters for C/C++
 AC_ARG_ENABLE(c-mbchar,
@@ -295,17 +324,36 @@ AC_CANONICAL_SYSTEM
 
 # Find the native compiler
 AC_PROG_CC
-AC_GCC_C_LONG_DOUBLE
+AC_PROG_CC_C_O
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
+  NO_MINUS_C_MINUS_O=yes
+fi
+AC_SUBST(NO_MINUS_C_MINUS_O)
+
+gcc_AC_C_LONG_DOUBLE
+
+AC_CACHE_CHECK(whether ${CC-cc} accepts -Wno-long-long,
+ac_cv_prog_cc_no_long_long,
+[save_CFLAGS="$CFLAGS"
+CFLAGS="-Wno-long-long"
+AC_TRY_COMPILE(,,ac_cv_prog_cc_no_long_long=yes,
+              ac_cv_prog_cc_no_long_long=no)
+CFLAGS="$save_CFLAGS"])
 
 # 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
 # quick `make'.
+stage1_warn_cflags=" -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
+stage2_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
 if test "x$GCC" = "xyes"; then 
-  stage1_warn_cflags='$(WARN_CFLAGS)'
+  if test $ac_cv_prog_cc_no_long_long = yes; then
+    stage1_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
+  fi
 else
   stage1_warn_cflags=""
 fi
 AC_SUBST(stage1_warn_cflags)
+AC_SUBST(stage2_warn_cflags)
 
 AC_PROG_MAKE_SET
 
@@ -331,19 +379,21 @@ else
     AC_MSG_RESULT(no)
 fi
 
+AC_C_INLINE
+
 # Find some useful tools
 AC_PROG_AWK
 AC_PROG_LEX
-GCC_PROG_LN
-GCC_PROG_LN_S
-GCC_C_VOLATILE
+gcc_AC_PROG_LN
+gcc_AC_PROG_LN_S
+gcc_AC_C_VOLATILE
 AC_PROG_RANLIB
 AC_PROG_YACC
-EGCS_PROG_INSTALL
+gcc_AC_PROG_INSTALL
 
 AC_HEADER_STDC
 AC_HEADER_TIME
-GCC_HEADER_STRING
+gcc_AC_HEADER_STRING
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
                 fcntl.h unistd.h stab.h sys/file.h sys/time.h \
@@ -357,6 +407,30 @@ AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
 # See if GNAT has been installed
 AC_CHECK_PROG(gnat, gnatbind, yes, no)
 
+# Do we have a single-tree copy of texinfo?
+if test -f $srcdir/../texinfo/Makefile.in; then
+  MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
+  gcc_cv_prog_makeinfo_modern=yes
+  AC_MSG_RESULT([Using makeinfo from the unified source tree.])
+else
+  # See if makeinfo has been installed and is modern enough
+  # that we can use it.
+  gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
+  [GNU texinfo.* \([0-9][0-9.]*\)],
+  [3.1[2-9] | 3.[2-9][0-9] | 4.* | 1.6[89] | 1.7[0-9]])
+fi
+
+if test $gcc_cv_prog_makeinfo_modern = no; then
+  AC_MSG_WARN([
+*** Makeinfo is missing or too old.
+*** Info documentation will not be built or installed.])
+  BUILD_INFO=
+  INSTALL_INFO=
+else
+  BUILD_INFO=info              AC_SUBST(BUILD_INFO)
+  INSTALL_INFO=install-info    AC_SUBST(INSTALL_INFO)
+fi
+
 # See if the stage1 system preprocessor understands the ANSI C
 # preprocessor stringification operator.
 AC_C_STRINGIZE
@@ -373,7 +447,28 @@ AC_CACHE_VAL(gcc_cv_header_inttypes_h,
   gcc_cv_header_inttypes_h=no)])
 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
 if test $gcc_cv_header_inttypes_h = yes; then
-  AC_DEFINE(HAVE_INTTYPES_H)
+  AC_DEFINE(HAVE_INTTYPES_H, 1,
+       [Define if you have a working <inttypes.h> header file.])
+fi
+
+#
+# Determine if enumerated bitfields are unsigned.   ISO C says they can 
+# be either signed or unsigned.
+#
+AC_CACHE_CHECK(for unsigned enumerated bitfields, gcc_cv_enum_bf_unsigned,
+[AC_TRY_RUN(#include <stdlib.h>
+enum t { BLAH = 128 } ;
+struct s_t { enum t member : 8; } s ;
+int main(void)
+{            
+        s.member = BLAH;
+        if (s.member < 0) exit(1);
+        exit(0);
+
+}, gcc_cv_enum_bf_unsigned=yes, gcc_cv_enum_bf_unsigned=no, gcc_cv_enum_bf_unsigned=yes)])
+if test $gcc_cv_enum_bf_unsigned = yes; then
+  AC_DEFINE(ENUM_BITFIELDS_ARE_UNSIGNED, 1,
+    [Define if enumerated bitfields are treated as unsigned values.])
 fi
 
 AC_CHECK_FUNCS(strtoul bsearch putenv popen bcopy bzero bcmp \
@@ -381,11 +476,30 @@ AC_CHECK_FUNCS(strtoul bsearch putenv popen bcopy bzero bcmp \
        sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
        fputs_unlocked getrusage valloc)
 
-# Make sure wchar_t is available
-#AC_CHECK_TYPE(wchar_t, unsigned int)
+AC_CHECK_TYPE(ssize_t, int)
+
+# Try to determine the array type of the second argument of getgroups
+# for the target system (int or gid_t).
+AC_TYPE_GETGROUPS
+if test "${target}" = "${build}"; then
+  TARGET_GETGROUPS_T=$ac_cv_type_getgroups
+else
+  case "${target}" in
+       # This condition may need some tweaking.  It should include all
+       # targets where the array type of the second argument of getgroups
+       # is int and the type of gid_t is not equivalent to int.
+       *-*-sunos* | *-*-ultrix*)
+               TARGET_GETGROUPS_T=int
+               ;;
+       *)
+               TARGET_GETGROUPS_T=gid_t
+               ;;
+  esac
+fi
+AC_SUBST(TARGET_GETGROUPS_T)
 
-GCC_FUNC_VFPRINTF_DOPRNT
-GCC_FUNC_PRINTF_PTR
+gcc_AC_FUNC_VFPRINTF_DOPRNT
+gcc_AC_FUNC_PRINTF_PTR
 
 case "${host}" in
 *-*-uwin*)
@@ -397,26 +511,31 @@ case "${host}" in
 esac
 AC_FUNC_VFORK
 AC_FUNC_MMAP_ANYWHERE
+AC_FUNC_MMAP_FILE
 
-GCC_NEED_DECLARATIONS(bcopy bzero bcmp \
+# We will need to find libiberty.h and ansidecl.h
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
+gcc_AC_CHECK_DECLS(bcopy bzero bcmp \
        index rindex getenv atol sbrk abort atof getcwd getwd \
-       strsignal putc_unlocked fputs_unlocked strstr environ)
-
-GCC_NEED_DECLARATIONS(malloc realloc calloc free, [
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-])
-
-GCC_NEED_DECLARATIONS(getrlimit setrlimit getrusage, [
-#include <sys/types.h>
+       strsignal putc_unlocked fputs_unlocked strstr environ \
+       malloc realloc calloc free basename getopt, , ,[
+#include "gansidecl.h"
+#include "system.h"])
+
+gcc_AC_CHECK_DECLS(getrlimit setrlimit getrusage, , ,[
+#include "gansidecl.h"
+#include "system.h"
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
 ])
 
+# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
+CFLAGS="$saved_CFLAGS"
+
 # mkdir takes a single argument on some systems. 
-GCC_FUNC_MKDIR_TAKES_ONE_ARG
+gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
 
 # File extensions
 manext='.1'
@@ -484,6 +603,9 @@ for machine in $build $host $target; do
        alpha*-*-*)
                cpu_type=alpha
                ;;
+       strongarm*-*-*)
+               cpu_type=arm
+               ;;
        arm*-*-*)
                cpu_type=arm
                ;;
@@ -598,7 +720,7 @@ changequote([,])dnl
 
                xm_file="alpha/xm-alpha-interix.h xm-interix.h"
                xmake_file="x-interix alpha/t-pe"
-               tmake_file="alpha/t-interix alpha/t-ieee"
+               tmake_file="alpha/t-alpha alpha/t-interix alpha/t-ieee"
                if test x$enable_threads = xyes ; then
                        thread_file='posix'
                fi
@@ -611,7 +733,7 @@ changequote([,])dnl
        alpha*-*-linux-gnuecoff*)
                tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
                target_cpu_default="MASK_GAS"
-               tmake_file="alpha/t-ieee"
+               tmake_file="alpha/t-alpha alpha/t-ieee"
                gas=no
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -619,7 +741,7 @@ changequote([,])dnl
        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 alpha/t-ieee"
+               tmake_file="t-linux t-linux-gnulibc1 alpha/t-alpha alpha/t-crtbe alpha/t-ieee"
                extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -630,7 +752,7 @@ changequote([,])dnl
        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 alpha/t-ieee"
+               tmake_file="t-linux alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
                extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -641,7 +763,7 @@ changequote([,])dnl
        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 alpha/t-ieee"
+               tmake_file="alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
                extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -650,7 +772,7 @@ changequote([,])dnl
        alpha*-*-openbsd*)
                # default x-alpha is only appropriate for dec-osf.
                target_cpu_default="MASK_GAS"
-               tmake_file="alpha/t-ieee"
+               tmake_file="alpha/t-alpha alpha/t-ieee"
                ;;
                
        alpha*-dec-osf*)
@@ -663,7 +785,7 @@ changequote([,])dnl
                        extra_passes="mips-tfile mips-tdump"
                fi
                use_collect2=yes
-               tmake_file="alpha/t-ieee"
+               tmake_file="alpha/t-alpha alpha/t-ieee"
                case $machine in
                  *-*-osf1*)
                    tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
@@ -693,7 +815,7 @@ changequote([,])dnl
                ;;
        alpha*-*-vxworks*)
                tm_file="${tm_file} dbx.h alpha/vxworks.h"
-               tmake_file="alpha/t-ieee"
+               tmake_file="alpha/t-alpha alpha/t-ieee"
                if [ x$gas != xyes ]
                then
                        extra_passes="mips-tfile mips-tdump"
@@ -704,7 +826,7 @@ changequote([,])dnl
        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 alpha/t-ieee"
+               tmake_file="t-libc-ok alpha/t-alpha alpha/t-ieee"
                xmake_file=winnt/x-winnt
                extra_host_objs=oldnames.o
                extra_gcc_objs="spawnv.o oldnames.o"
@@ -719,18 +841,18 @@ changequote([,])dnl
        alpha*-dec-vms*)
                tm_file=alpha/vms.h
                xm_file="${xm_file} alpha/xm-vms.h"
-               tmake_file="alpha/t-vms alpha/t-ieee"
+               tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
                ;;
        arc-*-elf*)
                extra_parts="crtinit.o crtfini.o"
                ;;
        arm-*-coff* | armel-*-coff*)
                tm_file=arm/coff.h
-               tmake_file=arm/t-bare
+               tmake_file=arm/t-arm-coff
                ;;
        arm-*-vxworks*)
                tm_file=arm/vxarm.h
-               tmake_file=arm/t-bare
+               tmake_file=arm/t-arm-coff
                thread_file='vxworks'
                ;;
 changequote(,)dnl
@@ -812,11 +934,11 @@ changequote([,])dnl
                ;;
        arm*-*-aout)
                tm_file=arm/aout.h
-               tmake_file=arm/t-bare
+               tmake_file=arm/t-arm-aout
                ;;
         arm*-*-ecos-elf)
                tm_file=arm/ecos-elf.h
-               tmake_file=arm/t-elf
+               tmake_file=arm/t-arm-elf
                ;; 
        arm*-*-elf)
                tm_file=arm/unknown-elf.h
@@ -833,7 +955,7 @@ changequote([,])dnl
        arm-*-pe*)
                tm_file=arm/pe.h
                tmake_file=arm/t-pe
-               extra_objs=pe.o
+               extra_objs="pe.o"
                ;;
        avr-*-*)
                ;;
@@ -869,6 +991,9 @@ changequote([,])dnl
                extra_parts="crtbegin.o crtend.o"
                install_headers_dir=install-headers-cpio
                ;;
+       d30v-*)
+               float_format=i64
+               ;;
        dsp16xx-*)
                ;;
        elxsi-elxsi-*)
@@ -1009,10 +1134,11 @@ changequote([,])dnl
                if test x$enable_threads = x; then
                    enable_threads=$have_pthread_h
                fi
-               if test x$enable_threads = xyes; then
-                       thread_file='dce'
+               case x${enable_threads} in
+               xyes | xdce)
                        tmake_file="${tmake_file} pa/t-dce-thr"
-               fi
+                       ;;
+               esac
                install_headers_dir=install-headers-cpio
                use_collect2=yes
                ;;
@@ -1029,10 +1155,35 @@ changequote([,])dnl
                if test x$enable_threads = x; then
                    enable_threads=$have_pthread_h
                fi
-               if test x$enable_threads = xyes; then
-                       thread_file='dce'
+               case x${enable_threads} in
+               xyes | xdce)
                        tmake_file="${tmake_file} pa/t-dce-thr"
+                       ;;
+               esac
+               install_headers_dir=install-headers-cpio
+               use_collect2=yes
+               ;;
+       hppa*64*-*-hpux11*)
+               target_cpu_default="MASK_PA_11"
+               xm_file=pa/xm-pa64hpux.h
+               xmake_file=pa/x-pa-hpux
+               tmake_file=pa/t-pa
+               tm_file="pa/pa64-start.h ${tm_file} pa/pa64-regs.h pa/long_double.h pa/elf.h pa/pa-hpux.h pa/pa-hpux11.h pa/pa-64.h"
+               float_format=i128
+               tmake_file=pa/t-pa64
+               target_cpu_default="(MASK_PA_11|MASK_PA_20)"
+
+               if [[ x$gas = xyes ]]
+               then
+                       tm_file="${tm_file} pa/pa-gas.h"
                fi
+#              if [[ x$enable_threads = x ]]; then
+#                  enable_threads=$have_pthread_h
+#              fi
+#              if [[ 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
                ;;
@@ -1128,7 +1279,7 @@ changequote([,])dnl
                use_collect2=yes
                ;;
        hppa*-*-mpeix*)
-               tm_file="${tm_file} pa/pa-mpeix.h"
+               tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h 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." 
@@ -1274,23 +1425,12 @@ changequote([,])dnl
                tmake_file=i386/t-i386bare
                ;;
 changequote(,)dnl
-       i[34567]86-*-beospe*)
-changequote([,])dnl
-               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
-               ;;
-changequote(,)dnl
        i[34567]86-*-beoself* | i[34567]86-*-beos*)
 changequote([,])dnl
                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'
                ;;
 changequote(,)dnl
@@ -1308,7 +1448,13 @@ changequote([,])dnl
 #              use_collect2=yes
                ;;
 changequote(,)dnl
-       i[34567]86-*-freebsdelf*)
+       i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12].* | i[34567]86-*-freebsd*aout*)
+changequote([,])dnl
+               tm_file="i386/freebsd.h i386/perform.h"
+               tmake_file=t-freebsd
+               ;;
+changequote(,)dnl
+       i[34567]86-*-freebsd*)
 changequote([,])dnl
                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"
@@ -1324,12 +1470,6 @@ changequote([,])dnl
                esac
                ;;
 changequote(,)dnl
-       i[34567]86-*-freebsd*)
-changequote([,])dnl
-               tm_file="i386/freebsd.h i386/perform.h"
-               tmake_file=t-freebsd
-               ;;
-changequote(,)dnl
        i[34567]86-*-netbsd*)
 changequote([,])dnl
                tm_file=i386/netbsd.h
@@ -1373,6 +1513,7 @@ changequote([,])dnl
                        tmake_file=i386/t-crtstuff
                        extra_parts="crtbegin.o crtend.o"
                fi
+               tmake_file="$tmake_file i386/t-i386bare"
                install_headers_dir=install-headers-cpio
                ;;
 changequote(,)dnl
@@ -1443,6 +1584,7 @@ changequote([,])dnl
                gnu_ld=yes
                gas=yes
                exeext=.exe
+               float_format=none
                case $host in *pc-msdosdjgpp*)
                        target_alias=djgpp
                        ;;
@@ -1530,6 +1672,7 @@ changequote([,])dnl
                else
                        tmake_file=i386/t-sco5
                fi
+               tmake_file="$tmake_file i386/t-i386bare"
                extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
                ;;
 changequote(,)dnl
@@ -1549,6 +1692,7 @@ changequote([,])dnl
                        tmake_file=i386/t-crtstuff
                        extra_parts="crtbegin.o crtend.o"
                fi
+               tmake_file="$tmake_file i386/t-i386bare"
                # The default EAFS filesystem supports long file names.
                # Truncating the target makes $host != $target which
                # makes gcc think it is doing a cross-compile.
@@ -1570,6 +1714,7 @@ changequote([,])dnl
                        extra_parts="crtbegin.o crtend.o"
                        tmake_file=i386/t-crtstuff
                fi
+               tmake_file="$tmake_file i386/t-i386bare"
                truncate_target=yes
                ;;
 changequote(,)dnl
@@ -1582,7 +1727,7 @@ changequote([,])dnl
                        # Only needed if gas does not support -s
                        tm_file="i386/sol2gas.h ${tm_file}"
                fi
-               tmake_file=i386/t-sol2
+               tmake_file="i386/t-i386bare 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} = x; then
@@ -1609,7 +1754,7 @@ changequote([,])dnl
                then
                        tm_file="${tm_file} dbx.h"
                fi
-               tmake_file=i386/t-crtpic
+               tmake_file="i386/t-i386bare i386/t-crtpic"
                xmake_file=x-svr4
                extra_parts="crtbegin.o crtend.o"
               if test x$enable_threads = xyes; then
@@ -1626,7 +1771,7 @@ changequote([,])dnl
                then
                        tm_file="${tm_file} dbx.h"
                fi
-               tmake_file=i386/t-crtpic
+               tmake_file="i386/t-i386bare i386/t-crtpic"
                xmake_file=x-svr4
                extra_parts="crtbegin.o crtend.o"
                ;;
@@ -1636,7 +1781,7 @@ changequote([,])dnl
                xm_file="xm-alloca.h ${xm_file}"
                xm_defines="USG POSIX"
                tm_file=i386/udk.h
-               tmake_file="i386/t-crtpic i386/t-udk"
+               tmake_file="i386/t-i386bare i386/t-crtpic i386/t-udk"
                xmake_file=x-svr4
                extra_parts="crtbegin.o crtend.o"
                install_headers_dir=install-headers-cpio
@@ -1679,6 +1824,7 @@ changequote([,])dnl
                        extra_parts="crtbegin.o crtend.o"
                        tmake_file=i386/t-crtstuff
                fi
+               tmake_file="$tmake_file i386/t-crtpic"
                ;;
        i386-*-vsta)                    # Intel 80386's running VSTa kernel
                xm_file="${xm_file} i386/xm-vsta.h"
@@ -2379,6 +2525,8 @@ changequote([,])dnl
                ;;
        m88k-*-openbsd*)
                tmake_file="${tmake_file} m88k/t-luna-gas"
+               tm_file="m88k/aout-dbx.h aoutos.h m88k/m88k.h openbsd.h ${tm_file}"
+               xm_file="xm-openbsd.h m88k/xm-m88k.h ${xm_file}"
                ;;
        m88k-*-sysv3*)
                tm_file=m88k/sysv3.h
@@ -2584,18 +2732,19 @@ changequote([,])dnl
                # On NetBSD, the headers are already okay, except for math.h.
                tmake_file=t-netbsd
                ;;
-       mips*-*-linux*)                         # Linux MIPS, either endian.
+       mips*-*-linux*)                         # Linux MIPS, either endian.
                xmake_file=x-linux
-               case $machine in
-                       mipsel-*)  tm_file="mips/elfl.h mips/linux.h" ;;
-                       *)         tm_file="mips/elf.h mips/linux.h" ;;
-               esac
+               case $machine in
+                      mips*el-*)  tm_file="mips/elfl.h mips/linux.h" ;;
+                      *)         tm_file="mips/elf.h mips/linux.h" ;;
+               esac
+               tmake_file=t-linux
                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
+               if test x$enable_threads = xyes; then
+                       thread_file='posix'
+               fi
                ;;
        mips*el-*-openbsd*)     # mips little endian
                target_cpu_default="MASK_GAS|MASK_ABICALLS"
@@ -2991,79 +3140,57 @@ changequote([,])dnl
                tmake_file=rs6000/t-beos
                xmake_file=rs6000/x-beos
                ;;
-       powerpc-*-sysv* | powerpc-*-elf*)
+       powerpc-*-sysv*)
                tm_file=rs6000/sysv4.h
                xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG POSIX"
                extra_headers=ppc-asm.h
-               if test x$gas = xyes
-               then
-                       tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
-               else
-                       tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
-               fi
+               tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
                xmake_file=rs6000/x-sysv4
                ;;
        powerpc-*-eabiaix*)
-               tm_file=rs6000/eabiaix.h
+               tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
                tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
                extra_headers=ppc-asm.h
                ;;
        powerpc-*-eabisim*)
-               tm_file=rs6000/eabisim.h
+               tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
+               tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
+               extra_headers=ppc-asm.h
+               ;;
+       powerpc-*-elf*)
+               tm_file="rs6000/sysv4.h"
                tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
                extra_headers=ppc-asm.h
                ;;
        powerpc-*-eabi*)
-               tm_file=rs6000/eabi.h
-               if test x$gas = xyes
-               then
-                       tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
-               else
-                       tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
-               fi
+               tm_file="rs6000/sysv4.h rs6000/eabi.h"
+               tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
                extra_headers=ppc-asm.h
                ;;
        powerpc-*-rtems*)
-               tm_file=rs6000/rtems.h
-               if test x$gas = xyes
-               then
-                    tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
-               else
-                    tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
-               fi
+               tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h"
+               tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
                extra_headers=ppc-asm.h
                ;;
        powerpc-*-linux-gnulibc1)
-               tm_file=rs6000/linux.h
+               tm_file="rs6000/sysv4.h rs6000/linux.h"
                xm_file=rs6000/xm-sysv4.h
                out_file=rs6000/rs6000.c
-               if test x$gas = xyes
-               then
-                       tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
-               else
-                       tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
-               fi
+               tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
                xmake_file=x-linux
-               extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
                extra_headers=ppc-asm.h
                if test x$enable_threads = xyes; then
                        thread_file='posix'
                fi
                ;;
        powerpc-*-linux-gnu*)
-               tm_file=rs6000/linux.h
+               tm_file="rs6000/sysv4.h rs6000/linux.h"
                xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG ${xm_defines}"
                out_file=rs6000/rs6000.c
-               if test x$gas = xyes
-               then
-                       tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
-               else
-                       tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
-               fi
+               tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
                xmake_file=x-linux
-               extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
                extra_headers=ppc-asm.h
                if test x$enable_threads = xyes; then
                        thread_file='posix'
@@ -3073,7 +3200,7 @@ changequote([,])dnl
                 cpu_type=rs6000
                xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG POSIX"
-                tm_file=rs6000/vxppc.h
+                tm_file="rs6000/sysv4.h rs6000/vxppc.h"
                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
                extra_headers=ppc-asm.h
                thread_file='vxworks'
@@ -3082,49 +3209,39 @@ changequote([,])dnl
                 cpu_type=rs6000
                xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG POSIX"
-                tm_file=rs6000/vxppcle.h
+                tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
                extra_headers=ppc-asm.h
                thread_file='vxworks'
                 ;;
-       powerpcle-*-sysv* | powerpcle-*-elf*)
-               tm_file=rs6000/sysv4le.h
+       powerpcle-*-sysv*)
+               tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
                xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG POSIX"
-               if test x$gas = xyes
-               then
-                       tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
-               else
-                       tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
-               fi
+               tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
                xmake_file=rs6000/x-sysv4
                extra_headers=ppc-asm.h
                ;;
+       powerpcle-*-elf*)
+               tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
+               tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
+               extra_headers=ppc-asm.h
+               ;;
        powerpcle-*-eabisim*)
-               tm_file=rs6000/eabilesim.h
+               tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
                tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
                extra_headers=ppc-asm.h
                ;;
        powerpcle-*-eabi*)
-               tm_file=rs6000/eabile.h
-               if test x$gas = xyes
-               then
-                       tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
-               else
-                       tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
-               fi
+               tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
+               tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
                extra_headers=ppc-asm.h
                ;;
        powerpcle-*-solaris2*)
-               tm_file=rs6000/sol2.h
+               tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
                xm_file="rs6000/xm-sysv4.h"
                xm_defines="USG POSIX"
-               if test x$gas = xyes
-               then
-                       tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
-               else
-                       tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
-               fi
+               tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
                xmake_file=rs6000/x-sysv4
                extra_headers=ppc-asm.h
                ;;
@@ -3157,6 +3274,12 @@ changequote([,])dnl
                then
                        tmake_file=rs6000/t-xnewas
                else
+                       tmake_file=rs6000/t-newas
+               fi
+               if test "$gnu_ld" = yes
+               then
+                       xmake_file=rs6000/x-aix41-gld
+               else
                        tmake_file="rs6000/t-newas rs6000/t-aix41"
                fi
                xmake_file=rs6000/x-aix41
@@ -3337,7 +3460,9 @@ changequote([,])dnl
                 xmake_file=sparc/x-sysv4
                 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
                 case $machine in
+changequote(,)dnl
                 *-*-solaris2.[0-4])
+changequote([,])dnl
                         float_format=i128
                 ;;
                 *)
@@ -3481,55 +3606,12 @@ changequote([,])dnl
 #              ;;
 #      tahoe-*-bsd*)                   # tahoe running BSD
 #              ;;
-       thumb-*-coff* | thumbel-*-coff*)
-               tm_file=arm/tcoff.h
-               out_file=arm/thumb.c
-               xm_file=arm/xm-thumb.h
-               md_file=arm/thumb.md
-               tmake_file=arm/t-thumb
-               tm_p_file=arm/thumb-protos.h
-               ;;
-       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
-               tm_p_file=arm/thumb-protos.h
-               ;;
-       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
-               tm_p_file=arm/thumb-protos.h
-               ;;
-       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
-               tm_p_file=arm/thumb-protos.h
-               ;;
-       thumb-wrs-vxworks)
-               tm_file=arm/tcoff.h
-               out_file=arm/thumb.c
-               xm_file=arm/xm-thumb.h
-               md_file=arm/thumb.md
-               tmake_file=arm/t-thumb
-               thread_file='vxworks'
-               tm_p_file=arm/thumb-protos.h
-               ;;
-       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
-               tm_p_file=arm/thumb-protos.h
+
+       thumb*-*-*)
+               AC_MSG_ERROR([
+*** The Thumb targets have been depreciated.  The equivalent
+*** ARM based toolchain can now generated Thumb instructions
+*** when the -mthumb switch is given to the compiler.])
                ;;
 # This hasn't been upgraded to GCC 2.
 #      tron-*-*)
@@ -3576,6 +3658,10 @@ changequote([,])dnl
                ;;
        vax-*-openbsd*)
                tmake_file="${tmake_file} vax/t-openbsd"
+               tm_file="vax/vax.h vax/openbsd1.h openbsd.h ${tm_file}"
+               xm_file="xm-openbsd.h vax/xm-vax.h"
+               float_format=vax
+               use_collect2=yes
                ;;
        vax-*-ultrix*)                  # vaxen running ultrix
                tm_file="${tm_file} vax/ultrix.h"
@@ -3717,16 +3803,16 @@ changequote([,])dnl
                then
                        if test x$gnu_ld = xyes
                        then
-                               target_cpu_default2=20
+                               target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
                        else
-                               target_cpu_default2=16
+                               target_cpu_default2="MASK_GAS"
                        fi
                fi
                ;;
        mips*-*-*)
                if test x$gas = xyes
                then
-                       target_cpu_default2=16
+                       target_cpu_default2="MASK_GAS"
                fi
                ;;
        powerpc*-*-* | rs6000-*-*)
@@ -3989,7 +4075,7 @@ do
 
        for file in `eval echo '$'$var`; do
                case $file in
-               auto-config.h)
+               auto-host.h | auto-build.h )
                        ;;
                *)
                        echo '#ifdef IN_GCC' >>$link
@@ -3997,7 +4083,7 @@ do
                esac
                echo "#include \"$file\"" >>$link
                case $file in
-               auto-config.h)
+               auto-host.h | auto-build.h )
                        ;;
                *)
                        echo '#endif' >>$link
@@ -4030,17 +4116,27 @@ changequote([,])dnl
 # Internationalization
 PACKAGE=gcc
 VERSION="$gcc_version"
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",
+       [Define to the name of the distribution.])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION",
+       [Define to the version of the distribution.])
 AC_SUBST(PACKAGE)
 AC_SUBST(VERSION)
 
-ALL_LINGUAS="en_UK"
+ALL_LINGUAS="en_GB"
 
-# NLS support is still experimental, so disable it by default for now.
+# Enable NLS support by default
 AC_ARG_ENABLE(nls,
-  [  --enable-nls            use Native Language Support (disabled by default)],
-  , enable_nls=no)
+  [  --enable-nls            use Native Language Support (default)],
+  , enable_nls=yes)
+
+# if cross compiling, disable NLS support.
+# It's not worth the trouble, at least for now.
+
+if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
+  AC_MSG_WARN(Disabling NLS support for canadian cross compiler.)
+  enable_nls=no
+fi
 
 AM_GNU_GETTEXT
 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
@@ -4057,7 +4153,9 @@ AC_ARG_ENABLE(win32-registry,
 
 AC_MSG_CHECKING(whether windows registry support is requested)
 if test x$enable_win32_registry != xno; then
-  AC_DEFINE(ENABLE_WIN32_REGISTRY)
+  AC_DEFINE(ENABLE_WIN32_REGISTRY, 1,
+[Define to 1 if installation paths should be looked up in Windows32
+   Registry. Ignored on non windows32 hosts.])
   AC_MSG_RESULT(yes)
 else
   AC_MSG_RESULT(no)
@@ -4081,7 +4179,8 @@ esac
 
 if test x$enable_win32_registry != xno; then
   AC_MSG_CHECKING(registry key on windows hosts)
-  AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$gcc_cv_win32_registry_key")
+  AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$gcc_cv_win32_registry_key",
+       [Define to be the last portion of registry key on windows hosts.])
   AC_MSG_RESULT($gcc_cv_win32_registry_key)
 fi
 
@@ -4180,6 +4279,24 @@ then
        cross_overrides="${topdir}/cross-make"
 fi
 
+# If this is a cross-compiler that does not
+# have its own set of headers then define
+# inhibit_libc
+
+# If this is using newlib, then define inhibit_libc in
+# LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
+# libgcc.a, but that's OK because newlib should have its own version of
+# assert.h.
+inhibit_libc=
+if [test x$host != x$target] && [test x$with_headers = x]; then
+       inhibit_libc=-Dinhibit_libc
+else
+       if [test x$with_newlib = xyes]; then
+               inhibit_libc=-Dinhibit_libc
+       fi
+fi
+AC_SUBST(inhibit_libc)
+
 # When building gcc with a cross-compiler, we need to fix a few things.
 # This must come after cross-make as we want all.build to override
 # all.cross.
@@ -4391,7 +4508,9 @@ EOF
                                        :
                                else
                                        gcc_cv_as_subsections="working .subsection -1"
-                                       AC_DEFINE(HAVE_GAS_SUBSECTION_ORDERING)
+                                       AC_DEFINE(HAVE_GAS_SUBSECTION_ORDERING, 1,
+[Define if your assembler supports .subsection and .subsection -1 starts
+   emitting at the beginning of your section.])
                                fi
                        fi
                fi
@@ -4406,13 +4525,29 @@ if test x$gcc_cv_as != x; then
        # Check if we have .weak
        echo "  .weak foobar" > conftest.s
        if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
-               AC_DEFINE(HAVE_GAS_WEAK)
+               AC_DEFINE(HAVE_GAS_WEAK, 1,
+                       [Define if your assembler supports .weak.])
                gcc_cv_as_weak="yes"
        fi
        rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
 fi
 AC_MSG_RESULT($gcc_cv_as_weak)
 
+AC_MSG_CHECKING(assembler hidden support)
+gcc_cv_as_hidden=
+if test x$gcc_cv_as != x; then
+       # Check if we have .hidden
+       echo "  .hidden foobar" > conftest.s
+       echo "foobar:" >> conftest.s
+       if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+               AC_DEFINE(HAVE_GAS_HIDDEN, 1,
+                       [Define if your assembler supports .hidden.])
+               gcc_cv_as_hidden="yes"
+       fi
+       rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
+fi
+AC_MSG_RESULT($gcc_cv_as_hidden)
+
 case "$target" in 
   sparc*-*-*)
     AC_CACHE_CHECK([assembler .register pseudo-op support],
@@ -4430,7 +4565,27 @@ case "$target" in
        fi
     ])
     if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
-       AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP)
+       AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
+               [Define if your assembler supports .register.])
+    fi
+
+    AC_CACHE_CHECK([assembler supports -relax],
+       gcc_cv_as_relax_opt, [
+       gcc_cv_as_relax_opt=unknown
+       if test x$gcc_cv_as != x; then
+           # Check if gas supports -relax
+           echo ".text" > conftest.s
+           if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
+               gcc_cv_as_relax_opt=yes
+           else
+               gcc_cv_as_relax_opt=no
+           fi
+           rm -f conftest.s conftest.o
+       fi
+    ])
+    if test "x$gcc_cv_as_relax_opt" = xyes; then
+       AC_DEFINE(HAVE_AS_RELAX_OPTION, 1,
+               [Define if your assembler supports -relax option.])
     fi
 
     case "$tm_file" in
@@ -4462,7 +4617,8 @@ changequote(, )
            dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
 changequote([, ])
        else
-           AC_DEFINE_UNQUOTED(AS_SPARC64_FLAG, "$gcc_cv_as_flags64")
+           AC_DEFINE_UNQUOTED(AS_SPARC64_FLAG, "$gcc_cv_as_flags64",
+                       [Define if the assembler supports 64bit sparc.])
        fi
        ;;
     *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
@@ -4493,7 +4649,8 @@ changequote([, ])
            fi
        ])
        if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
-           AC_DEFINE(HAVE_AS_OFFSETABLE_LO10)
+           AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1,
+               [Define if your assembler supports offsetable %lo().])
        fi
     fi
     ;;
@@ -4530,6 +4687,10 @@ if test x"${enable_languages+set}" != xset; then
        else
                enable_languages=all
        fi
+else
+       if test x"${enable_languages}" = x; then
+               AC_MSG_ERROR([--enable-languages needs at least one argument])
+       fi
 fi
 subdirs=
 for lang in ${srcdir}/*/config-lang.in ..
@@ -4612,12 +4773,49 @@ AC_ARG_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.],
-[AC_DEFINE(ENABLE_NEW_GXX_ABI)
+[AC_DEFINE(ENABLE_NEW_GXX_ABI, 1,
+       [Define if you want to always select the new-abi for g++.])
 GXX_ABI_FLAG='-fnew-abi'
 echo "Building a new-abi g++ compiler."
 ])
 AC_SUBST(GXX_ABI_FLAG)
 
+# Build a new-libstdc++ system (ie libstdc++-v3)
+AC_MSG_CHECKING([for libstdc++ to install])
+AC_ARG_ENABLE(libstdcxx-v3,
+[  --enable-libstdcxx-v3 
+                         enable libstdc++-v3 for building and installation],
+  [enable_libstdcxx_v3=yes], [enable_libstdcxx_v3=no])
+
+if test x$enable_libstdcxx_v3 = xyes; then
+  AC_MSG_RESULT(v3)
+  ac_esn=1
+else
+  AC_MSG_RESULT(v2)
+  ac_esn=0
+fi
+AC_DEFINE_UNQUOTED(ENABLE_STD_NAMESPACE, $ac_esn,
+  [Define to 1 if you want to enable namespaces (-fhonor-std) by default.])
+
+dnl Very limited version of automake's enable-maintainer-mode
+
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer],
+      maintainer_mode=$enableval,
+      maintainer_mode=no)
+
+AC_MSG_RESULT($maintainer_mode)
+
+if test "$maintainer_mode" = "yes"; then
+  MAINT=''
+else
+  MAINT='#'
+fi
+AC_SUBST(MAINT)dnl
+
 # 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.
 
@@ -4649,7 +4847,7 @@ all_boot_languages=
 all_compilers=
 all_stagestuff=
 all_diff_excludes=
-all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug'
+all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
 # List of language makefile fragments.
 all_lang_makefiles=
 all_headers=
@@ -4756,16 +4954,6 @@ AC_SUBST(build_canonical)
 AC_SUBST(host_canonical)
 AC_SUBST(target_subdir)
        
-# If this is using newlib, then define inhibit_libc in
-# LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
-# libgcc.a, but that's OK because newib should have its own version of
-# assert.h.
-inhibit_libc=
-if test x$with_newlib = xyes; then
-       inhibit_libc=-Dinhibit_libc
-fi
-AC_SUBST(inhibit_libc)
-
 # 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
@@ -4828,7 +5016,6 @@ AC_SUBST(build_xm_file_list)
 AC_SUBST(cc_set_by_configure)
 AC_SUBST(quoted_cc_set_by_configure)
 AC_SUBST(cpp_install_dir)
-AC_SUBST(cpp_main)
 AC_SUBST(dep_host_xmake_file)
 AC_SUBST(dep_tmake_file)
 AC_SUBST(extra_c_flags)