OSDN Git Service

* flow.c (clear_log_links): Use free_INSN_LIST_list, not
[pf3gnuchains/gcc-fork.git] / gcc / configure
index a12b56d..6d77080 100755 (executable)
@@ -14,23 +14,22 @@ ac_default_prefix=/usr/local
 ac_help="$ac_help
   --with-gnu-ld           arrange to work with GNU ld."
 ac_help="$ac_help
-  --with-ld               arrange to use the specified ld (full pathname)."
+  --with-ld               arrange to use the specified ld (full pathname)"
 ac_help="$ac_help
-  --with-gnu-as           arrange to work with GNU as."
+  --with-gnu-as           arrange to work with GNU as"
 ac_help="$ac_help
-  --with-as               arrange to use the specified as (full pathname)."
+  --with-as               arrange to use the specified as (full pathname)"
 ac_help="$ac_help
-  --with-stabs            arrange to use stabs instead of host debug format."
+  --with-stabs            arrange to use stabs instead of host debug format"
 ac_help="$ac_help
-  --with-elf              arrange to use ELF instead of host debug format."
+  --with-elf              arrange to use ELF instead of host debug format"
 ac_help="$ac_help
-  --with-local-prefix=DIR specifies directory to put local include."
-ac_help="$ac_help
-  --enable-libstdcxx-v3 
-                         enable libstdc++-v3 for building and installation"
+  --with-local-prefix=DIR specifies directory to put local include"
 ac_help="$ac_help
   --with-gxx-include-dir=DIR
-                          specifies directory to put g++ header files."
+                          specifies directory to put g++ header files"
+ac_help="$ac_help
+  --enable-multilib       enable library support for multiple ABIs"
 ac_help="$ac_help
   --enable-checking[=LIST]
                          enable expensive run-time checks.  With LIST,
@@ -38,55 +37,59 @@ ac_help="$ac_help
                          Categories are: misc,tree,rtl,gc,gcac; default
                          is misc,tree,gc"
 ac_help="$ac_help
-  --disable-cpp           don't provide a user-visible C preprocessor."
+  --disable-cpp           don't provide a user-visible C preprocessor"
 ac_help="$ac_help
   --with-cpp-install-dir=DIR
                           install the user visible C preprocessor in DIR
-                          (relative to PREFIX) as well as PREFIX/bin."
+                          (relative to PREFIX) as well as PREFIX/bin"
 ac_help="$ac_help
-  --enable-c-cpplib       link cpplib directly into C and C++ compilers
-                           (HIGHLY EXPERIMENTAL)."
+  --enable-c-mbchar       enable multibyte characters for C and C++"
 ac_help="$ac_help
-  --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."
+  --enable-threads        enable thread usage for target GCC
+  --enable-threads=LIB    use LIB thread package for target GCC"
 ac_help="$ac_help
   --enable-objc-gc       enable the use of Boehm's garbage collector with
-                         the GNU Objective-C runtime."
+                         the GNU Objective-C runtime"
+ac_help="$ac_help
+  --with-dwarf2           force the default debug format to be DWARF 2"
 ac_help="$ac_help
-  --with-dwarf2          force the default debug format to be DWARF2."
+  --disable-shared        don't provide a shared libgcc"
 ac_help="$ac_help
-  --disable-shared       don't provide a shared libgcc."
+  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
 ac_help="$ac_help
   --enable-nls            use Native Language Support (default)"
 ac_help="$ac_help
+  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
+ac_help="$ac_help
   --disable-nls           do not use Native Language Support"
 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).
+                          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."
+                          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."
+  --with-gc={simple,page} choose the garbage collection mechanism to use
+                          with the compiler"
 ac_help="$ac_help
   --with-system-zlib      use installed libz"
 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."
-ac_help="$ac_help
-  --enable-maintainer-mode enable make rules and dependencies not useful
+  --enable-maintainer-mode
+                          enable make rules and dependencies not useful
                           (and sometimes confusing) to the casual installer"
+ac_help="$ac_help
+  --enable-sjlj-exceptions
+                          arrange to use setjmp/longjmp exception handling"
+ac_help="$ac_help
+  --enable-version-specific-runtime-libs
+                          specify that runtime libraries should be
+                          installed in a compiler-specific directory"
+ac_help="$ac_help
+  --with-slibdir=DIR      shared libraries in DIR [LIBDIR]"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -613,7 +616,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:617: checking LIBRARY_PATH variable" >&5
+echo "configure:620: checking LIBRARY_PATH variable" >&5
 case ${LIBRARY_PATH} in
   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
     library_path_setting="contains current directory"
@@ -638,7 +641,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:642: checking GCC_EXEC_PREFIX variable" >&5
+echo "configure:645: checking GCC_EXEC_PREFIX variable" >&5
 case ${GCC_EXEC_PREFIX} in
   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
     gcc_exec_prefix_setting="contains current directory"
@@ -752,28 +755,6 @@ if test x$local_prefix = x; then
        local_prefix=/usr/local
 fi
 
-# Build a new-libstdc++ system (ie libstdc++-v3)
-echo $ac_n "checking for libstdc++ to install""... $ac_c" 1>&6
-echo "configure:758: checking for libstdc++ to install" >&5
-# Check whether --enable-libstdcxx-v3 or --disable-libstdcxx-v3 was given.
-if test "${enable_libstdcxx_v3+set}" = set; then
-  enableval="$enable_libstdcxx_v3"
-  enable_libstdcxx_v3="$enableval"
-else
-  enable_libstdcxx_v3=yes
-fi
-
-
-if test x$enable_libstdcxx_v3 = xyes; then
-  echo "$ac_t""v3" 1>&6
-  HAVE_LIBSTDCXX_V3=1
-  ac_esn=1
-else
-  echo "$ac_t""v2" 1>&6
-  HAVE_LIBSTDCXX_V3=0
-  ac_esn=0
-fi
-
 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
 # passed in by the toplevel make and thus we'd get different behavior
 # depending on where we built the sources.
@@ -795,10 +776,21 @@ if test x${gcc_gxx_include_dir} = x; then
     gcc_gxx_include_dir='${libsubdir}/include/g++'
   else
     topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
-    gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
+    gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
   fi
 fi
 
+# Determine whether or not multilibs are enabled.
+# Check whether --enable-multilib or --disable-multilib was given.
+if test "${enable_multilib+set}" = set; then
+  enableval="$enable_multilib"
+  :
+else
+  enable_multilib=yes
+fi
+
+
+
 # Enable expensive internal checks
 # Check whether --enable-checking or --disable-checking was given.
 if test "${enable_checking+set}" = set; then
@@ -885,25 +877,6 @@ fi
 fi
 
 
-# Link cpplib into the compiler proper, for C/C++/ObjC.  Defaults to on.
-maybe_cpplib=libcpp.a
-# Check whether --enable-c-cpplib or --disable-c-cpplib was given.
-if test "${enable_c_cpplib+set}" = set; then
-  enableval="$enable_c_cpplib"
-  if test x$enable_c_cpplib != xyes; then
-  maybe_cpplib=
-fi
-
-fi
-
-if test x$maybe_cpplib != x ; then
-  cat >> confdefs.h <<\EOF
-#define USE_CPPLIB 1
-EOF
-
-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
@@ -941,7 +914,7 @@ case x${enable_threads_flag} in
                target_thread_file=''
                ;;
        xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
-       xsolaris | xwin32 | xdce | xvxworks | xaix)
+       xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
                target_thread_file=$enable_threads_flag
                ;;
        *)
@@ -975,7 +948,21 @@ fi
 # Check whether --enable-shared or --disable-shared was given.
 if test "${enable_shared+set}" = set; then
   enableval="$enable_shared"
-  :
+  
+  case $enable_shared in
+  yes | no) ;;
+  *)
+    enable_shared=no
+    IFS="${IFS=        }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+    for pkg in $enableval; do
+      if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
+        enable_shared=yes
+      fi
+    done
+    IFS="$ac_save_ifs"
+    ;;
+  esac
+
 else
   enable_shared=yes
 fi
@@ -1030,7 +1017,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:1034: checking host system type" >&5
+echo "configure:1021: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1051,7 +1038,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:1055: checking target system type" >&5
+echo "configure:1042: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1069,7 +1056,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:1073: checking build system type" >&5
+echo "configure:1060: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1096,7 +1083,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:1100: checking for $ac_word" >&5
+echo "configure:1087: 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
@@ -1126,7 +1113,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:1130: checking for $ac_word" >&5
+echo "configure:1117: 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
@@ -1177,7 +1164,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:1181: checking for $ac_word" >&5
+echo "configure:1168: 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
@@ -1209,7 +1196,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1213: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1200: 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.
@@ -1220,12 +1207,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1224 "configure"
+#line 1211 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1216: \"$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
@@ -1251,12 +1238,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:1255: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1242: 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:1260: checking whether we are using GNU C" >&5
+echo "configure:1247: 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
@@ -1265,7 +1252,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1269: \"$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:1256: \"$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
@@ -1284,7 +1271,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:1288: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1275: 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
@@ -1317,10 +1304,10 @@ fi
 
 if test "x$CC" != xcc; then
   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1321: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:1308: checking whether $CC and cc understand -c and -o together" >&5
 else
   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1324: checking whether cc understands -c and -o together" >&5
+echo "configure:1311: checking whether cc understands -c and -o together" >&5
 fi
 set dummy $CC; ac_cc="`echo $2 |
                       sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
@@ -1332,16 +1319,16 @@ else
 # We do the test twice because some compilers refuse to overwrite an
 # existing .o file with -o, though they will create one.
 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
-   test -f conftest.o && { (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+   test -f conftest.o && { (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
 then
   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
   if test "x$CC" != xcc; then
     # Test first that cc exists at all.
-    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
       ac_try='cc -c conftest.c -o conftest.o 1>&5'
-      if { (eval echo configure:1344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
-        test -f conftest.o && { (eval echo configure:1345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+      if { (eval echo configure:1331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+        test -f conftest.o && { (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
       then
         # cc works too.
         :
@@ -1376,63 +1363,22 @@ fi
 
 
 
-echo $ac_n "checking for long double""... $ac_c" 1>&6
-echo "configure:1381: 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 1389 "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:1399: \"$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
-
-
 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
-echo "configure:1422: checking whether ${CC-cc} accepts -Wno-long-long" >&5
+echo "configure:1368: checking whether ${CC-cc} accepts -Wno-long-long" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   save_CFLAGS="$CFLAGS"
 CFLAGS="-Wno-long-long"
 cat > conftest.$ac_ext <<EOF
-#line 1429 "configure"
+#line 1375 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_prog_cc_no_long_long=yes
 else
@@ -1452,133 +1398,102 @@ if test $ac_cv_prog_cc_no_long_long = yes; then
 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
-# quick `make'.
-warn_cflags=
-if test "x$GCC" = "xyes"; then
-  warn_cflags='$(GCC_WARN_CFLAGS)'
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1403: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
 fi
-
-
-# Stage specific cflags for build.
-stage1_cflags=
-case $build in
-vax-*-*)
-  if test x$GCC = xyes
-  then
-    stage1_cflags="-Wa,-J"
-  else
-    stage1_cflags="-J"
-  fi
-  ;;
-esac
-
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1480: 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
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftestmake <<\EOF
-all:
-       @echo 'ac_maketemp="${MAKE}"'
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 1418 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
 EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
-echo "configure:1508: 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
-    else
-       echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
-    fi
-else
-    echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
-echo "configure:1520: 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
-    else
-       echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
-    fi
-else
-    echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
-echo "configure:1532: checking for GNU C library" >&5
-if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1424: \"$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
+  :
 else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1537 "configure"
+#line 1435 "configure"
 #include "confdefs.h"
-#include <features.h>
-int main() {
-
-#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
-#error Not a GNU C library system
-#endif
-; return 0; }
+#include <assert.h>
+Syntax Error
 EOF
-if { (eval echo configure:1547: \"$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:1441: \"$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
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gcc_cv_glibc=yes
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 1452 "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:1458: \"$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
+  :
 else
+  echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gcc_cv_glibc=no
+  CPP=/lib/cpp
 fi
 rm -f conftest*
 fi
-
-echo "$ac_t""$gcc_cv_glibc" 1>&6
-if test $gcc_cv_glibc = yes; then
-  cat >> confdefs.h <<\EOF
-#define _GNU_SOURCE 1
-EOF
-
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
 fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1568: checking for inline" >&5
+echo "configure:1483: 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 1575 "configure"
+#line 1490 "configure"
 #include "confdefs.h"
 
 int main() {
-} int $ac_kw foo() {
+} $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1603,30 +1518,567 @@ EOF
  ;;
 esac
 
-
-# Find some useful tools
-for ac_prog in mawk gawk 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:1614: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
+echo $ac_n "checking for volatile""... $ac_c" 1>&6
+echo "configure:1523: checking for volatile" >&5
+if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+  cat > conftest.$ac_ext <<EOF
+#line 1528 "configure"
+#include "confdefs.h"
+
+int main() {
+volatile int foo;
+; return 0; }
+EOF
+if { (eval echo configure:1535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gcc_cv_c_volatile=yes
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AWK="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gcc_cv_c_volatile=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gcc_cv_c_volatile" 1>&6
+if test $gcc_cv_c_volatile = yes ; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_VOLATILE 1
+EOF
+
+fi
+
+
+echo $ac_n "checking for long double""... $ac_c" 1>&6
+echo "configure:1557: 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 1565 "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:1575: \"$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
+
+echo $ac_n "checking for long long int""... $ac_c" 1>&6
+echo "configure:1597: checking for long long int" >&5
+if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1602 "configure"
+#include "confdefs.h"
+
+int main() {
+long long int i;
+; return 0; }
+EOF
+if { (eval echo configure:1609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_long_long=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_long_long=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_long_long" 1>&6
+  if test $ac_cv_c_long_long = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_LONG_LONG 1
+EOF
+
+  fi
+echo $ac_n "checking for __int64""... $ac_c" 1>&6
+echo "configure:1629: checking for __int64" >&5
+if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1634 "configure"
+#include "confdefs.h"
+
+int main() {
+__int64 i;
+; return 0; }
+EOF
+if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c___int64=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c___int64=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c___int64" 1>&6
+  if test $ac_cv_c___int64 = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE___INT64 1
+EOF
+
+  fi
+
+echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
+echo "configure:1662: checking for built-in _Bool" >&5
+if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1667 "configure"
+#include "confdefs.h"
+
+int main() {
+_Bool foo;
+; return 0; }
+EOF
+if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gcc_cv_c__bool=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gcc_cv_c__bool=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$gcc_cv_c__bool" 1>&6
+if test $gcc_cv_c__bool = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE__BOOL 1
+EOF
+
+fi
+
+
+# sizeof(char) is 1 by definition.
+echo $ac_n "checking size of short""... $ac_c" 1>&6
+echo "configure:1698: checking size of short" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
+  cat > conftest.$ac_ext <<EOF
+#line 1704 "configure"
+#include "confdefs.h"
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (short) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_short=$ac_size
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+  if test x$ac_cv_sizeof_short != x ; then break; fi
+done
+
+fi
+
+if test x$ac_cv_sizeof_short = x ; then
+  { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
+fi
+echo "$ac_t""$ac_cv_sizeof_short" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+EOF
+
+
+echo $ac_n "checking size of int""... $ac_c" 1>&6
+echo "configure:1737: checking size of int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
+  cat > conftest.$ac_ext <<EOF
+#line 1743 "configure"
+#include "confdefs.h"
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (int) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:1753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_int=$ac_size
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+  if test x$ac_cv_sizeof_int != x ; then break; fi
+done
+
+fi
+
+if test x$ac_cv_sizeof_int = x ; then
+  { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
+fi
+echo "$ac_t""$ac_cv_sizeof_int" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+EOF
+
+
+echo $ac_n "checking size of long""... $ac_c" 1>&6
+echo "configure:1776: checking size of long" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
+  cat > conftest.$ac_ext <<EOF
+#line 1782 "configure"
+#include "confdefs.h"
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (long) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:1792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_long=$ac_size
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+  if test x$ac_cv_sizeof_long != x ; then break; fi
+done
+
+fi
+
+if test x$ac_cv_sizeof_long = x ; then
+  { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
+fi
+echo "$ac_t""$ac_cv_sizeof_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+EOF
+
+
+if test $ac_cv_c_long_long = yes; then
+  echo $ac_n "checking size of long long""... $ac_c" 1>&6
+echo "configure:1816: checking size of long long" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
+  cat > conftest.$ac_ext <<EOF
+#line 1822 "configure"
+#include "confdefs.h"
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (long long) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_long_long=$ac_size
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+  if test x$ac_cv_sizeof_long_long != x ; then break; fi
+done
+
+fi
+
+if test x$ac_cv_sizeof_long_long = x ; then
+  { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
+fi
+echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+EOF
+
+
+fi
+if test $ac_cv_c___int64 = yes; then
+  echo $ac_n "checking size of __int64""... $ac_c" 1>&6
+echo "configure:1857: checking size of __int64" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
+  cat > conftest.$ac_ext <<EOF
+#line 1863 "configure"
+#include "confdefs.h"
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (__int64) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:1873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof___int64=$ac_size
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+  if test x$ac_cv_sizeof___int64 != x ; then break; fi
+done
+
+fi
+
+if test x$ac_cv_sizeof___int64 = x ; then
+  { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
+fi
+echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF___INT64 $ac_cv_sizeof___int64
+EOF
+
+
+fi
+
+echo $ac_n "checking execution character set""... $ac_c" 1>&6
+echo "configure:1898: checking execution character set" >&5
+if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1903 "configure"
+#include "confdefs.h"
+#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
+   && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
+ASCII
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ASCII" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_c_charset=ASCII
+fi
+rm -f conftest*
+
+  if test x${ac_cv_c_charset+set} != xset; then
+    cat > conftest.$ac_ext <<EOF
+#line 1919 "configure"
+#include "confdefs.h"
+#if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
+   && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
+EBCDIC
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "EBCDIC" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_c_charset=EBCDIC
+fi
+rm -f conftest*
+
+  fi
+  if test x${ac_cv_c_charset+set} != xset; then
+    ac_cv_c_charset=unknown
+  fi
+fi
+
+echo "$ac_t""$ac_cv_c_charset" 1>&6
+if test $ac_cv_c_charset = unknown; then
+  { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
+elif test $ac_cv_c_charset = EBCDIC; then
+  cat >> confdefs.h <<\EOF
+#define HOST_EBCDIC 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
+# quick `make'.
+warn_cflags=
+if test "x$GCC" = "xyes"; then
+  warn_cflags='$(GCC_WARN_CFLAGS)'
+fi
+
+
+# Stage specific cflags for build.
+stage1_cflags=
+case $build in
+vax-*-*)
+  if test x$GCC = xyes
+  then
+    stage1_cflags="-Wa,-J"
+  else
+    stage1_cflags="-J"
+  fi
+  ;;
+esac
+
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:1973: 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
+else
+  cat > conftestmake <<\EOF
+all:
+       @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
+echo "configure:2001: 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
+    else
+       echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
+    fi
+else
+    echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
+echo "configure:2013: 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
+    else
+       echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
+    fi
+else
+    echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
+echo "configure:2025: checking for GNU C library" >&5
+if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2030 "configure"
+#include "confdefs.h"
+#include <features.h>
+int main() {
+
+#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
+#error Not a GNU C library system
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:2040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gcc_cv_glibc=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gcc_cv_glibc=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gcc_cv_glibc" 1>&6
+if test $gcc_cv_glibc = yes; then
+  cat >> confdefs.h <<\EOF
+#define _GNU_SOURCE 1
+EOF
+
+fi
+
+# Find some useful tools
+for ac_prog in mawk gawk 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:2066: 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
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AWK="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 fi
 fi
 AWK="$ac_cv_prog_AWK"
@@ -1640,7 +2092,7 @@ test -n "$AWK" && break
 done
 
 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
-echo "configure:1644: checking whether ln works" >&5
+echo "configure:2096: 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
@@ -1672,7 +2124,7 @@ else
 fi
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1676: checking whether ln -s works" >&5
+echo "configure:2128: 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
@@ -1703,43 +2155,10 @@ else
   fi
 fi
 
-echo $ac_n "checking for volatile""... $ac_c" 1>&6
-echo "configure:1708: 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 1713 "configure"
-#include "confdefs.h"
-
-int main() {
-volatile int foo;
-; return 0; }
-EOF
-if { (eval echo configure:1720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  gcc_cv_c_volatile=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gcc_cv_c_volatile=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gcc_cv_c_volatile" 1>&6
-if test $gcc_cv_c_volatile = yes ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_VOLATILE 1
-EOF
-
-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:1743: checking for $ac_word" >&5
+echo "configure:2162: 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
@@ -1777,7 +2196,7 @@ fi
 # 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:1781: checking for a BSD compatible install" >&5
+echo "configure:2200: 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
@@ -1810,110 +2229,30 @@ else
 fi
   if test "${ac_cv_path_install+set}" = set; then
     INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-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:1832: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1847 "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:1853: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1864 "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:1870: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1881 "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:1887: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
 fi
-echo "$ac_t""$CPP" 1>&6
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1912: checking for ANSI C header files" >&5
+echo "configure:2251: 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 1917 "configure"
+#line 2256 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1921,7 +2260,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2264: \"$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*
@@ -1938,7 +2277,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 1942 "configure"
+#line 2281 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1956,7 +2295,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 1960 "configure"
+#line 2299 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1977,7 +2316,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1981 "configure"
+#line 2320 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1988,7 +2327,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -2012,12 +2351,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2016: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2355: 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 2021 "configure"
+#line 2360 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2026,7 +2365,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2046,13 +2385,46 @@ EOF
 
 fi
 
+echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
+echo "configure:2390: checking for working stdbool.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2395 "configure"
+#include "confdefs.h"
+#include <stdbool.h>
+int main() {
+bool foo = false;
+; return 0; }
+EOF
+if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_stdbool_h=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdbool_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
+if test $ac_cv_header_stdbool_h = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_STDBOOL_H 1
+EOF
+
+fi
+
 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
-echo "configure:2051: checking whether string.h and strings.h may both be included" >&5
+echo "configure:2423: 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 2056 "configure"
+#line 2428 "configure"
 #include "confdefs.h"
 #include <string.h>
 #include <strings.h>
@@ -2060,7 +2432,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gcc_cv_header_string=yes
 else
@@ -2081,12 +2453,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2085: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2457: 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 2090 "configure"
+#line 2462 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -2102,7 +2474,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:2106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -2123,146 +2495,534 @@ 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 \
+                fcntl.h unistd.h sys/file.h sys/time.h \
                 sys/resource.h sys/param.h sys/times.h sys/stat.h \
-                direct.h malloc.h langinfo.h iconv.h
+                direct.h malloc.h langinfo.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2133: checking for $ac_hdr" >&5
+echo "configure:2505: 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 2510 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2515: \"$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 "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 "ac_cv_header_$ac_safe=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
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+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:2545: 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 2550 "configure"
+#include "confdefs.h"
+#include <thread.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2555: \"$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 "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 "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_thread_h=yes
+else
+  echo "$ac_t""no" 1>&6
+have_thread_h=
+fi
+
+ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
+echo "configure:2579: 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 2138 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2143: \"$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 "ac_cv_header_$ac_safe=yes"
+  cat > conftest.$ac_ext <<EOF
+#line 2584 "configure"
+#include "confdefs.h"
+#include <pthread.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2589: \"$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 "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 "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_pthread_h=yes
+else
+  echo "$ac_t""no" 1>&6
+have_pthread_h=
+fi
+
+
+# These tests can't be done till we know if we have limits.h.
+echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
+echo "configure:2614: checking for CHAR_BIT" >&5
+if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2619 "configure"
+#include "confdefs.h"
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef CHAR_BIT
+found
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "found" >/dev/null 2>&1; then
+  rm -rf conftest*
+  gcc_cv_decl_char_bit=yes
+else
+  rm -rf conftest*
+  gcc_cv_decl_char_bit=no
+fi
+rm -f conftest*
+
+
+fi
+
+echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
+if test $gcc_cv_decl_char_bit = no; then
+  echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
+echo "configure:2644: checking number of bits in a byte" >&5
+if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  i=8
+ gcc_cv_c_nbby=
+ while test $i -lt 65; do
+   cat > conftest.$ac_ext <<EOF
+#line 2652 "configure"
+#include "confdefs.h"
+
+int main() {
+switch(0) {
+  case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
+  case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
+  ; }
+; return 0; }
+EOF
+if { (eval echo configure:2662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gcc_cv_c_nbby=$i; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+   i=`expr $i + 1`
+ done
+ test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
+
+fi
+
+echo "$ac_t""$gcc_cv_c_nbby" 1>&6
+if test $gcc_cv_c_nbby = failed; then
+  { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
+else
+  cat >> confdefs.h <<EOF
+#define CHAR_BIT $gcc_cv_c_nbby
+EOF
+
+fi
+fi
+echo $ac_n "checking byte ordering""... $ac_c" 1>&6
+echo "configure:2687: checking byte ordering" >&5
+if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_c_compile_endian=unknown
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext <<EOF
+#line 2701 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+/* This structure must have no internal padding.  */
+  struct {
+    char prefix[sizeof "\nendian:" - 1];
+    short word;
+    char postfix[2];
+ } tester = {
+    "\nendian:",
+#if SIZEOF_SHORT == 4
+    ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
+#endif
+    ('A' << CHAR_BIT) | 'B',
+    'X', '\n'
+};
+EOF
+if { (eval echo configure:2721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  od -c conftest.o |
+    sed 's/^[0-7]*[    ]*/ /
+         s/\*/./g
+         s/ \\n/*/g
+         s/ [0-9][0-9][0-9]/./g
+         s/  \\[^ ]/./g' |
+    tr -d '
+ ' | tr -s '*' '
+' | fold | sed '$a\
+' > conftest.dmp
+  if   grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then
+    ac_cv_c_compile_endian=big-endian
+  elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then
+    ac_cv_c_compile_endian=little-endian
+  fi
+fi
+rm -rf conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+
+fi
+
+echo "$ac_t""$ac_cv_c_compile_endian" 1>&6
+if test $ac_cv_c_compile_endian = unknown; then
+  { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; }
+elif test $ac_cv_c_compile_endian = big-endian; then
+  cat >> confdefs.h <<\EOF
+#define HOST_WORDS_BIG_ENDIAN 1
+EOF
+
+fi
+
+echo $ac_n "checking floating point format""... $ac_c" 1>&6
+echo "configure:2760: checking floating point format" >&5
+if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext <<EOF
+#line 2773 "configure"
+#include "confdefs.h"
+/* This will not work unless sizeof(double) == 8.  */
+extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
+
+/* This structure must have no internal padding.  */
+struct possibility {
+  char prefix[8];
+  double candidate;
+  char postfix[8];
+};
+
+#define C(cand) { "\nformat:", cand, ":tamrof\n" }
+struct possibility table [] =
+{
+  C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
+  C( 3.53802595280598432000e+18), /* D__float - VAX */
+  C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
+  C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
+  C(-5.22995989424860458374e+10)  /* IBMHEXFP - s/390 format, EBCDIC */
+};
+EOF
+if { (eval echo configure:2795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  od -c conftest.o |
+    sed 's/^[0-7]*[    ]*/ /
+         s/\*/./g
+         s/ \\n/*/g
+         s/ [0-9][0-9][0-9]/./g
+         s/  \\[^ ]/./g' |
+    tr -d '
+ ' | tr -s '*' '
+' | fold | sed '$a\
+' > conftest.dmp
+  if   grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
+    ac_cv_c_float_format='IEEE (big-endian)'
+  elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
+    ac_cv_c_float_format='IEEE (big-endian)'
+  elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
+    ac_cv_c_float_format='IEEE (little-endian)'
+  elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
+    ac_cv_c_float_format='IEEE (little-endian)'
+  elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
+    ac_cv_c_float_format='VAX D-float'
+  elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
+    ac_cv_c_float_format='PDP-10'
+  elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
+    ac_cv_c_float_format='IBM 370 hex'
+  else
+    { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
+  fi
+else
+  { echo "configure: error: compile failed" 1>&2; exit 1; }
+fi
+rm -rf conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+
+fi
+
+echo "$ac_t""$ac_cv_c_float_format" 1>&6
+# IEEE is the default format.  If the float endianness isn't the same
+# as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
+# (which is a tristate: yes, no, default).  This is only an issue with
+# IEEE; the other formats are only supported by a few machines each,
+# all with the same endianness.
+format=
+fbigend=
+case $ac_cv_c_float_format in
+    'IEEE (big-endian)' )
+       if test $ac_cv_c_compile_endian = little-endian; then
+           fbigend=1
+       fi
+       ;;
+    'IEEE (little-endian)' )
+       if test $ac_cv_c_compile_endian = big-endian; then
+           fbigend=0
+       fi
+       ;;
+    'VAX D-float' )
+       format=VAX_FLOAT_FORMAT
+       ;;
+    'PDP-10' )
+       format=PDP10_FLOAT_FORMAT
+       ;;
+    'IBM 370 hex' )
+       format=IBM_FLOAT_FORMAT
+       ;;
+esac
+if test -n "$format"; then
+       cat >> confdefs.h <<EOF
+#define HOST_FLOAT_FORMAT $format
+EOF
+
+fi
+if test -n "$fbigend"; then
+       cat >> confdefs.h <<EOF
+#define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
+EOF
+
+fi
+
+
+# See if GNAT has been installed
+if test $host != $build; then
+  ac_tool_prefix=${host_alias}-
+else
+  ac_tool_prefix=
+fi
+
+
+# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2891: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$GNATBIND"; then
+  ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
 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"
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 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
-EOF
+GNATBIND="$ac_cv_prog_GNATBIND"
+if test -n "$GNATBIND"; then
+  echo "$ac_t""$GNATBIND" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
-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:2173: checking for thread.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+if test -z "$ac_cv_prog_GNATBIND"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "gnatbind", so it can be a program name with args.
+set dummy gnatbind; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2923: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2178 "configure"
-#include "confdefs.h"
-#include <thread.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2183: \"$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 "ac_cv_header_$ac_safe=yes"
+  if test -n "$GNATBIND"; then
+  ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
 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"
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_GNATBIND="gnatbind"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
 fi
-rm -f conftest*
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_thread_h=yes
+GNATBIND="$ac_cv_prog_GNATBIND"
+if test -n "$GNATBIND"; then
+  echo "$ac_t""$GNATBIND" 1>&6
 else
   echo "$ac_t""no" 1>&6
-have_thread_h=
 fi
 
-ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
-echo "configure:2207: 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 2212 "configure"
-#include "confdefs.h"
-#include <pthread.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2217: \"$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 "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 "ac_cv_header_$ac_safe=no"
+  GNATBIND="no"
 fi
-rm -f conftest*
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_pthread_h=yes
+
+echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
+echo "configure:2956: checking for compiler driver that understands Ada" >&5
+if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$ac_t""no" 1>&6
-have_pthread_h=
+  cat >conftest.adb <<EOF
+procedure conftest is begin null; end conftest;
+EOF
+gcc_cv_prog_adac=no
+# Have to do ac_tool_prefix and user overrides by hand.
+user_adac=$ADAC
+user_cc=$CC
+for cand in ${ac_tool_prefix}$user_adac        $user_adac      \
+           ${ac_tool_prefix}$user_cc   $user_cc        \
+           ${ac_tool_prefix}gcc        gcc             \
+           ${ac_tool_prefix}cc         cc              \
+           ${ac_tool_prefix}gnatgcc    gnatgcc         \
+           ${ac_tool_prefix}gnatcc     gnatcc          \
+           ${ac_tool_prefix}adagcc     adagcc          \
+           ${ac_tool_prefix}adacc      adacc           ; do
+  # There is a bug in all released versions of GCC which causes the
+  # driver to exit successfully when the appropriate language module
+  # has not been installed.  This is fixed in 2.95.4, 3.0.2, and 3.1.
+  # Therefore we must check for the error message as well as an
+  # unsuccessful exit.
+  errors=`$cand -c conftest.adb 2>&1 || echo failure`
+  if test x"$errors" = x; then
+    gcc_cv_prog_adac=$cand
+    break
+  fi
+done
+rm -f conftest.*
 fi
 
+echo "$ac_t""$gcc_cv_prog_adac" 1>&6
+ADAC=$gcc_cv_prog_adac
 
-# See if GNAT has been installed
-# Extract the first word of "gnatbind", so it can be a program name with args.
-set dummy gnatbind; ac_word=$2
+
+if test x$GNATBIND != xno && test x$ADAC != xno; then
+  have_gnat=yes
+else
+  have_gnat=no
+fi
+
+
+# See if we have the mktemp command.
+# Extract the first word of "mktemp", so it can be a program name with args.
+set dummy mktemp; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2244: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
+echo "configure:3004: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$gnat"; then
-  ac_cv_prog_gnat="$gnat" # Let the user override the test.
+  if test -n "$have_mktemp_command"; then
+  ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
 else
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_gnat="yes"
+      ac_cv_prog_have_mktemp_command="yes"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_gnat" && ac_cv_prog_gnat="no"
+  test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
 fi
 fi
-gnat="$ac_cv_prog_gnat"
-if test -n "$gnat"; then
-  echo "$ac_t""$gnat" 1>&6
+have_mktemp_command="$ac_cv_prog_have_mktemp_command"
+if test -n "$have_mktemp_command"; then
+  echo "$ac_t""$have_mktemp_command" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -2279,7 +3039,7 @@ else
   # Extract the first word of "makeinfo", so it can be a program name with args.
 set dummy makeinfo; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2283: checking for $ac_word" >&5
+echo "configure:3043: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2308,16 +3068,16 @@ fi
 if test -n "$MAKEINFO"; then
   # Found it, now check the version.
   echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
-echo "configure:2312: checking for modern makeinfo" >&5
+echo "configure:3072: checking for modern makeinfo" >&5
 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     ac_prog_version=`$MAKEINFO --version 2>&1 |
                    sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
-  echo "configure:2318: version of makeinfo is $ac_prog_version" >&5
+  echo "configure:3078: version of makeinfo is $ac_prog_version" >&5
   case $ac_prog_version in
     '')     gcc_cv_prog_makeinfo_modern=no;;
-    3.1[2-9] | 3.[2-9][0-9] | 4.* | 1.6[89] | 1.7[0-9])
+    4.*)
             gcc_cv_prog_makeinfo_modern=yes;;
     *)      gcc_cv_prog_makeinfo_modern=no;;
   esac
@@ -2334,12 +3094,21 @@ fi
 if test $gcc_cv_prog_makeinfo_modern = no; then
   echo "configure: warning: 
 *** Makeinfo is missing or too old.
-*** Info documentation will not be built or installed." 1>&2
+*** Info documentation will not be built." 1>&2
   BUILD_INFO=
-  INSTALL_INFO=
 else
   BUILD_INFO=info              
-  INSTALL_INFO=install-info    
+fi
+
+# Is pod2man recent enough to regenerate manpages?
+echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
+echo "configure:3106: checking for recent Pod::Man" >&5
+if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then
+  echo "$ac_t""yes" 1>&6
+  GENERATED_MANPAGES=generated-manpages                
+else
+  echo "$ac_t""no" 1>&6
+  GENERATED_MANPAGES=
 fi
 
 # How about lex?
@@ -2349,7 +3118,7 @@ else
   # 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:2353: checking for $ac_word" >&5
+echo "configure:3122: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2386,7 +3155,7 @@ else
   # Extract the first word of "bison", so it can be a program name with args.
 set dummy bison; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2390: checking for $ac_word" >&5
+echo "configure:3159: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 
 fi
 
+# These libraries may be used by collect2.
+# We may need a special search path to get them linked.
+echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
+echo "configure:3191: checking for collect2 libraries" >&5
+if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  save_LIBS="$LIBS"
+for libs in '' -lld -lmld \
+               '-L/usr/lib/cmplrs/cc2.11 -lmld' \
+               '-L/usr/lib/cmplrs/cc3.11 -lmld'
+do
+       LIBS="$libs"
+       cat > conftest.$ac_ext <<EOF
+#line 3202 "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
+    builtin and then its argument prototype would still apply.  */
+char ldopen();
+
+int main() {
+ldopen()
+; return 0; }
+EOF
+if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  gcc_cv_collect2_libs="$libs"; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$save_LIBS"
+test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
+fi
+
+echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
+case $gcc_cv_collect2_libs in
+       "none required")        ;;
+       *)      COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
+esac
+
+
+# When building Ada code on Alpha, we need exc_resume which is usually in
+# -lexc.  So test for it.
+save_LIBS="$LIBS"
+LIBS=
+
+echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
+echo "configure:3239: checking for library containing exc_resume" >&5
+if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_exc_resume="no"
+cat > conftest.$ac_ext <<EOF
+#line 3246 "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
+    builtin and then its argument prototype would still apply.  */
+char exc_resume();
+
+int main() {
+exc_resume()
+; return 0; }
+EOF
+if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_exc_resume="none required"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
+LIBS="-l$i  $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3268 "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
+    builtin and then its argument prototype would still apply.  */
+char exc_resume();
+
+int main() {
+exc_resume()
+; return 0; }
+EOF
+if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_exc_resume="-l$i"
+break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
+if test "$ac_cv_search_exc_resume" != "no"; then
+  test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
+  
+else :
+  
+fi
+GNAT_LIBEXC="$LIBS"
+LIBS="$save_LIBS"
+
+
 # See if the stage1 system preprocessor understands the ANSI C
-# preprocessor stringification operator.
+# preprocessor stringification operator.  (Used by symcat.h.)
 
 
 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
-echo "configure:2424: checking for preprocessor stringizing operator" >&5
+echo "configure:3308: 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 2429 "configure"
+#line 3313 "configure"
 #include "confdefs.h"
 
 #define x(y) #y
@@ -2458,12 +3342,12 @@ 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:2462: checking for inttypes.h" >&5
+echo "configure:3346: 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 2467 "configure"
+#line 3351 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <inttypes.h>
@@ -2471,7 +3355,7 @@ int main() {
 intmax_t i = -1;
 ; return 0; }
 EOF
-if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gcc_cv_header_inttypes_h=yes
 else
@@ -2491,66 +3375,20 @@ EOF
 
 fi
 
-#
-# Determine if enumerated bitfields are unsigned.   ISO C says they can 
-# be either signed or unsigned.
-#
-echo $ac_n "checking for unsigned enumerated bitfields""... $ac_c" 1>&6
-echo "configure:2500: checking for unsigned enumerated bitfields" >&5
-if eval "test \"`echo '$''{'gcc_cv_enum_bf_unsigned'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  gcc_cv_enum_bf_unsigned=yes
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2508 "configure"
-#include "confdefs.h"
-#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);
-
-}
-EOF
-if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  gcc_cv_enum_bf_unsigned=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  gcc_cv_enum_bf_unsigned=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$gcc_cv_enum_bf_unsigned" 1>&6
-if test $gcc_cv_enum_bf_unsigned = yes; then
-  cat >> confdefs.h <<\EOF
-#define ENUM_BITFIELDS_ARE_UNSIGNED 1
-EOF
-
-fi
 
-for ac_func in strtoul bsearch putenv popen bcopy \
+for ac_func in strtoul bsearch popen times clock \
        strchr strrchr kill getrlimit setrlimit atoll atoq \
        sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
-       fputs_unlocked getrusage valloc iconv nl_langinfo
+       fputs_unlocked fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
+       lstat
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2549: checking for $ac_func" >&5
+echo "configure:3387: 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 2554 "configure"
+#line 3392 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2573,7 +3411,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3415: \"$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
@@ -2599,12 +3437,12 @@ done
 
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:2603: checking for ssize_t" >&5
+echo "configure:3441: checking for ssize_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2608 "configure"
+#line 3446 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2635,12 +3473,12 @@ fi
 # Try to determine the array type of the second argument of getgroups
 # for the target system (int or gid_t).
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:2639: checking for uid_t in sys/types.h" >&5
+echo "configure:3477: checking for uid_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2644 "configure"
+#line 3482 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -2669,7 +3507,7 @@ EOF
 fi
 
 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:2673: checking type of array argument to getgroups" >&5
+echo "configure:3511: checking type of array argument to getgroups" >&5
 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2677,7 +3515,7 @@ else
   ac_cv_type_getgroups=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 2681 "configure"
+#line 3519 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Rendell for this test.  */
@@ -2702,7 +3540,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
     ac_cv_type_getgroups=gid_t
 else
@@ -2716,7 +3554,7 @@ fi
 
 if test $ac_cv_type_getgroups = cross; then
         cat > conftest.$ac_ext <<EOF
-#line 2720 "configure"
+#line 3558 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 EOF
@@ -2757,12 +3595,12 @@ fi
 
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2761: checking for vprintf" >&5
+echo "configure:3599: 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 2766 "configure"
+#line 3604 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -2785,7 +3623,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3627: \"$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
@@ -2807,73 +3645,130 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-if test "$ac_cv_func_vprintf" != yes; then
-echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2813: checking for _doprnt" >&5
-if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
+if test "$ac_cv_func_vprintf" != yes; then
+echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
+echo "configure:3651: 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 3656 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _doprnt(); 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 _doprnt();
+
+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__doprnt) || defined (__stub____doprnt)
+choke me
+#else
+_doprnt();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3679: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func__doprnt=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_DOPRNT 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+vfprintf=
+doprint=
+if test $ac_cv_func_vprintf != yes ; then
+  vfprintf=vfprintf.o
+  if test $ac_cv_func__doprnt != yes ; then
+    doprint=doprint.o
+  fi
+fi
+
+
+
+for ac_func in strstr
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3717: 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 2818 "configure"
+#line 3722 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _doprnt(); below.  */
+    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 _doprnt();
+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__doprnt) || defined (__stub____doprnt)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-_doprnt();
+$ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:2841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func__doprnt=yes"
+  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__doprnt=no"
+  eval "ac_cv_func_$ac_func=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_DOPRNT 1
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
 EOF
-
+ strstr=
 else
   echo "$ac_t""no" 1>&6
+strstr=strstr.o
 fi
+done
 
-fi
-
-vfprintf=
-doprint=
-if test $ac_cv_func_vprintf != yes ; then
-  vfprintf=vfprintf.o
-  if test $ac_cv_func__doprnt != yes ; then
-    doprint=doprint.o
-  fi
-fi
-
-
-
+   
 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
-echo "configure:2877: checking whether the printf functions support %p" >&5
+echo "configure:3772: 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
@@ -2881,7 +3776,7 @@ else
   gcc_cv_func_printf_ptr=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2885 "configure"
+#line 3780 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 
@@ -2894,7 +3789,7 @@ int main()
   return (p != q);
 }
 EOF
-if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3793: \"$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
@@ -2920,19 +3815,18 @@ fi
 
 case "${host}" in
 *-*-uwin*)
-  # Under some versions of uwin, vfork is notoriously buggy and the test 
-  # can hang configure; on other versions, vfork exists just as a stub.
-  # FIXME: This should be removed once vfork in uwin's runtime is fixed.
-  ac_cv_func_vfork_works=no
+  { echo "configure: error: 
+*** UWIN may not be used as a host platform because
+*** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
   ;;
 esac
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2931: checking for pid_t" >&5
+echo "configure:3825: 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 2936 "configure"
+#line 3830 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2961,17 +3855,17 @@ fi
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2965: checking for vfork.h" >&5
+echo "configure:3859: 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 2970 "configure"
+#line 3864 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3869: \"$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*
@@ -2996,18 +3890,18 @@ else
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:3000: checking for working vfork" >&5
+echo "configure:3894: 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:3006: checking for vfork" >&5
+echo "configure:3900: 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 3011 "configure"
+#line 3905 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vfork(); below.  */
@@ -3030,7 +3924,7 @@ vfork();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3928: \"$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
@@ -3052,7 +3946,7 @@ fi
 ac_cv_func_vfork_works=$ac_cv_func_vfork
 else
   cat > conftest.$ac_ext <<EOF
-#line 3056 "configure"
+#line 3950 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -3147,7 +4041,7 @@ main() {
   }
 }
 EOF
-if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4045: \"$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
@@ -3169,55 +4063,15 @@ 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:3177: 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 3182 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3187: \"$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 "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 "ac_cv_header_$ac_safe=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
-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:3216: checking for $ac_func" >&5
+echo "configure:4070: 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 3221 "configure"
+#line 4075 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3240,7 +4094,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4098: \"$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
@@ -3264,23 +4118,15 @@ else
 fi
 done
 
-echo $ac_n "checking for working mmap which provides zeroed pages anywhere""... $ac_c" 1>&6
-echo "configure:3269: checking for working mmap which provides zeroed pages anywhere" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_anywhere'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_anywhere=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3277 "configure"
-#include "confdefs.h"
-
-/* Test by Richard Henderson and Alexandre Oliva.
-   Check whether mmap MAP_ANONYMOUS or mmap from /dev/zero works. */
+# The test program for the next two tests is the same except for one
+# set of ifdefs.
+cat >ct-mmap.inc <<'EOF'
 #include <sys/types.h>
-#include <fcntl.h>
 #include <sys/mman.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <setjmp.h>
+#include <stdio.h>
 
 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
 # define MAP_ANONYMOUS MAP_ANON
@@ -3327,59 +4173,289 @@ else
 
 #endif /* no HAVE_GETPAGESIZE */
 
-int main()
-{
-  char *x;
-  int fd, pg;
-
-#ifndef MAP_ANONYMOUS
-  fd = open("/dev/zero", O_RDWR);
-  if (fd < 0)
-    exit(1);
+#ifndef MAP_FAILED
+# define MAP_FAILED -1
 #endif
 
-  pg = getpagesize();
-#ifdef MAP_ANONYMOUS
-  x = (char*)mmap(0, pg, PROT_READ|PROT_WRITE,
-                  MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+#undef perror_exit
+#define perror_exit(str, val) \
+  do { perror(str); exit(val); } while (0)
+
+/* Some versions of cygwin mmap require that munmap is called with the
+   same parameters as mmap.  GCC expects that this is not the case.
+   Test for various forms of this problem.  Warning - icky signal games.  */
+
+static sigset_t unblock_sigsegv;
+static jmp_buf r;
+static size_t pg;
+static int devzero;
+
+static char *
+anonmap (size)
+     size_t size;
+{
+#ifdef USE_MAP_ANON
+  return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
+                       MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
 #else
-  x = (char*)mmap(0, pg, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
+  return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
+                       MAP_PRIVATE, devzero, 0);
 #endif
-  if (x == (char *) -1)
-    exit(2);
+}
+
+static void
+sigsegv (unused)
+     int unused;
+{
+  sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
+  longjmp (r, 1);
+}
+
+/* Basic functionality test.  */
+void
+test_0 ()
+{
+  char *x = anonmap (pg);
+  if (x == (char *) MAP_FAILED)
+    perror_exit("test 0 mmap", 2);
 
   *(int *)x += 1;
 
   if (munmap(x, pg) < 0)
-    exit(3);
+    perror_exit("test 0 munmap", 3);
+}
+
+/* 1. If we map a 2-page region and unmap its second page, the first page
+   must remain.  */
+static void
+test_1 ()
+{
+  char *x = anonmap (pg * 2);
+  if (x == (char *)MAP_FAILED)
+    perror_exit ("test 1 mmap", 4);
+
+  signal (SIGSEGV, sigsegv);
+  if (setjmp (r))
+    perror_exit ("test 1 fault", 5);
+
+  x[0] = 1;
+  x[pg] = 1;
+
+  if (munmap (x + pg, pg) < 0)
+    perror_exit ("test 1 munmap 1", 6);
+  x[0] = 2;
+
+  if (setjmp (r) == 0)
+    {
+      x[pg] = 1;
+      perror_exit ("test 1 no fault", 7);
+    }
+  if (munmap (x, pg) < 0)
+    perror_exit ("test 1 munmap 2", 8);
+}
+
+/* 2. If we map a 2-page region and unmap its first page, the second
+   page must remain.  */
+static void
+test_2 ()
+{
+  char *x = anonmap (pg * 2);
+  if (x == (char *)MAP_FAILED)
+    perror_exit ("test 2 mmap", 9);
+
+  signal (SIGSEGV, sigsegv);
+  if (setjmp (r))
+    perror_exit ("test 2 fault", 10);
+
+  x[0] = 1;
+  x[pg] = 1;
+
+  if (munmap (x, pg) < 0)
+    perror_exit ("test 2 munmap 1", 11);
+
+  x[pg] = 2;
+
+  if (setjmp (r) == 0)
+    {
+      x[0] = 1;
+      perror_exit ("test 2 no fault", 12);
+    }
+
+  if (munmap (x+pg, pg) < 0)
+    perror_exit ("test 2 munmap 2", 13);
+}
+
+/* 3. If we map two adjacent 1-page regions and unmap them both with
+   one munmap, both must go away.
+
+   Getting two adjacent 1-page regions with two mmap calls is slightly
+   tricky.  All OS's tested skip over already-allocated blocks; therefore
+   we have been careful to unmap all allocated regions in previous tests.
+   HP/UX allocates pages backward in memory.  No OS has yet been observed
+   to be so perverse as to leave unmapped space between consecutive calls
+   to mmap.  */
+
+static void
+test_3 ()
+{
+  char *x, *y, *z;
+
+  x = anonmap (pg);
+  if (x == (char *)MAP_FAILED)
+    perror_exit ("test 3 mmap 1", 14);
+  y = anonmap (pg);
+  if (y == (char *)MAP_FAILED)
+    perror_exit ("test 3 mmap 2", 15);
+
+  if (y != x + pg)
+    {
+      if (y == x - pg)
+       z = y, y = x, x = z;
+      else
+       {
+         fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
+                  (unsigned long)x, (unsigned long)y);
+         exit (16);
+       }
+    }
+
+  signal (SIGSEGV, sigsegv);
+  if (setjmp (r))
+    perror_exit ("test 3 fault", 17);
+
+  x[0] = 1;
+  y[0] = 1;
+
+  if (munmap (x, pg*2) < 0)
+    perror_exit ("test 3 munmap", 18);
+
+  if (setjmp (r) == 0)
+    {
+      x[0] = 1;
+      perror_exit ("test 3 no fault 1", 19);
+    }
+  
+  signal (SIGSEGV, sigsegv);
+  if (setjmp (r) == 0)
+    {
+      y[0] = 1;
+      perror_exit ("test 3 no fault 2", 20);
+    }
+}
+
+int
+main ()
+{
+  sigemptyset (&unblock_sigsegv);
+  sigaddset (&unblock_sigsegv, SIGSEGV);
+  pg = getpagesize ();
+#ifndef USE_MAP_ANON
+  devzero = open ("/dev/zero", O_RDWR);
+  if (devzero < 0)
+    perror_exit ("open /dev/zero", 1);
+#endif
+
+  test_0();
+  test_1();
+  test_2();
+  test_3();
 
   exit(0);
 }
 EOF
-if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+
+echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
+echo "configure:4369: checking for working mmap from /dev/zero" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  # If this is not cygwin, and /dev/zero is a character device, it's probably
+ # safe to assume it works.
+ case "$host_os" in
+   cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
+   * ) if test -c /dev/zero
+       then ac_cv_func_mmap_dev_zero=yes
+       else ac_cv_func_mmap_dev_zero=no
+       fi ;;
+  esac
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4385 "configure"
+#include "confdefs.h"
+#include "ct-mmap.inc"
+EOF
+if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_mmap_dev_zero=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  if test $? -lt 4
+ then ac_cv_func_mmap_dev_zero=no
+ else ac_cv_func_mmap_dev_zero=buggy
+ fi
+fi
+rm -fr conftest*
+fi
+
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
+if test $ac_cv_func_mmap_dev_zero = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MMAP_DEV_ZERO 1
+EOF
+
+fi
+
+echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
+echo "configure:4416: checking for working mmap with MAP_ANON(YMOUS)" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
+ # just because it's there. Some SCO Un*xen define it but don't implement it.
+ ac_cv_func_mmap_anon=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4426 "configure"
+#include "confdefs.h"
+#define USE_MAP_ANON
+#include "ct-mmap.inc"
+EOF
+if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  ac_cv_func_mmap_anywhere=yes
+  ac_cv_func_mmap_anon=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  ac_cv_func_mmap_anywhere=no
+  if test $? -lt 4
+ then ac_cv_func_mmap_anon=no
+ else ac_cv_func_mmap_anon=buggy
+ fi
 fi
 rm -fr conftest*
 fi
 
+
 fi
 
-echo "$ac_t""$ac_cv_func_mmap_anywhere" 1>&6
-if test $ac_cv_func_mmap_anywhere = yes; then
+echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
+if test $ac_cv_func_mmap_anon = yes; then
   cat >> confdefs.h <<\EOF
-#define HAVE_MMAP_ANYWHERE 1
+#define HAVE_MMAP_ANON 1
 EOF
 
 fi
+rm -f ct-mmap.inc
 
 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
-echo "configure:3383: checking for working mmap of a file" >&5
+echo "configure:4459: checking for working mmap of a file" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3394,7 +4470,7 @@ if test "$cross_compiling" = yes; then
   ac_cv_func_mmap_file=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 3398 "configure"
+#line 4474 "configure"
 #include "confdefs.h"
 
 /* Test by Zack Weinberg.  Modified from MMAP_ANYWHERE test by
@@ -3415,63 +4491,195 @@ int main()
   if (fd < 0)
     exit(1);
 
-  if (fstat (fd, &st))
-    exit(2);
+  if (fstat (fd, &st))
+    exit(2);
+
+  x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
+  if (x == (char *) -1)
+    exit(3);
+
+  if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
+    exit(4);
+
+  if (munmap(x, st.st_size) < 0)
+    exit(5);
+
+  exit(0);
+}
+EOF
+if { (eval echo configure:4511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_mmap_file=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_mmap_file=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
+if test $ac_cv_func_mmap_file = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MMAP_FILE 1
+EOF
+
+fi
+
+
+
+    
+  # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+  
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
+    done
+   
+fi
+
+
+  echo $ac_n "checking for iconv""... $ac_c" 1>&6
+echo "configure:4549: checking for iconv" >&5
+if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    cat > conftest.$ac_ext <<EOF
+#line 4557 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <iconv.h>
+int main() {
+iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);
+; return 0; }
+EOF
+if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  am_cv_func_iconv=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS -liconv"
+      cat > conftest.$ac_ext <<EOF
+#line 4579 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <iconv.h>
+int main() {
+iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);
+; return 0; }
+EOF
+if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+      LIBS="$am_save_LIBS"
+    fi
+  
+fi
+
+echo "$ac_t""$am_cv_func_iconv" 1>&6
+  if test "$am_cv_func_iconv" = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_ICONV 1
+EOF
 
-  x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
-  if (x == (char *) -1)
-    exit(3);
+    echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
+echo "configure:4610: checking for iconv declaration" >&5
+    if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      cat > conftest.$ac_ext <<EOF
+#line 4616 "configure"
+#include "confdefs.h"
 
-  if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
-    exit(4);
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
 
-  if (munmap(x, st.st_size) < 0)
-    exit(5);
+int main() {
 
-  exit(0);
-}
+; return 0; }
 EOF
-if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_func_mmap_file=yes
+if { (eval echo configure:4635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  am_cv_proto_iconv_arg1=""
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_mmap_file=no
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  am_cv_proto_iconv_arg1="const"
 fi
-
+rm -f conftest*
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
 fi
 
-echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
-if test $ac_cv_func_mmap_file = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_MMAP_FILE 1
+    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    echo "$ac_t""${ac_t:-
+         }$am_cv_proto_iconv" 1>&6
+    cat >> confdefs.h <<EOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
 EOF
 
-fi
+  fi
+  LIBICONV=
+  if test "$am_cv_lib_iconv" = yes; then
+    LIBICONV="-liconv"
+  fi
+  
 
 
 # We will need to find libiberty.h and ansidecl.h
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
-for ac_func in bcopy \
-       getenv atol sbrk abort atof getcwd getwd \
-       strsignal putc_unlocked fputs_unlocked strstr environ \
-       malloc realloc calloc free basename getopt
+for ac_func in getenv atol sbrk abort atof getcwd getwd \
+       strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
+        fprintf_unlocked strstr environ errno \
+       malloc realloc calloc free basename getopt clock
 do
   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:3468: checking whether $ac_func is declared" >&5
+echo "configure:4673: checking whether $ac_func is declared" >&5
 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3473 "configure"
+#line 4678 "configure"
 #include "confdefs.h"
-#include "gansidecl.h"
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+  
+#include "ansidecl.h"
 #include "system.h"
 
 int main() {
@@ -3480,7 +4688,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "gcc_cv_have_decl_$ac_func=yes"
 else
@@ -3506,66 +4714,75 @@ fi
 
 done
 if test x = y ; then
-  cat >> confdefs.h <<EOF
-#define HAVE_DECL_BCOPY 1
-EOF
- \
-       cat >> confdefs.h <<EOF
+  cat >> confdefs.h <<\EOF
 #define HAVE_DECL_GETENV 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_ATOL 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_SBRK 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_ABORT 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_ATOF 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_GETCWD 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_GETWD 1
 EOF
  \
-       cat >> confdefs.h <<EOF
+       cat >> confdefs.h <<\EOF
 #define HAVE_DECL_STRSIGNAL 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_PUTC_UNLOCKED 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_FPUTS_UNLOCKED 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_DECL_FWRITE_UNLOCKED 1
+EOF
+ \
+        cat >> confdefs.h <<\EOF
+#define HAVE_DECL_FPRINTF_UNLOCKED 1
+EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_STRSTR 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_ENVIRON 1
 EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_DECL_ERRNO 1
+EOF
  \
-       cat >> confdefs.h <<EOF
+       cat >> confdefs.h <<\EOF
 #define HAVE_DECL_MALLOC 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_REALLOC 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_CALLOC 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_FREE 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_BASENAME 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_GETOPT 1
 EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_DECL_CLOCK 1
+EOF
 fi
 
 
@@ -3573,14 +4790,17 @@ for ac_func in getrlimit setrlimit getrusage
 do
   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:3577: checking whether $ac_func is declared" >&5
+echo "configure:4794: checking whether $ac_func is declared" >&5
 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3582 "configure"
+#line 4799 "configure"
 #include "confdefs.h"
-#include "gansidecl.h"
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+  
+#include "ansidecl.h"
 #include "system.h"
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
@@ -3593,7 +4813,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "gcc_cv_have_decl_$ac_func=yes"
 else
 
 done
 if test x = y ; then
-  cat >> confdefs.h <<EOF
+  cat >> confdefs.h <<\EOF
 #define HAVE_DECL_GETRLIMIT 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_SETRLIMIT 1
 EOF
- cat >> confdefs.h <<EOF
+ cat >> confdefs.h <<\EOF
 #define HAVE_DECL_GETRUSAGE 1
 EOF
 fi
 
 
+for ac_func in times
+do
+  ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
+echo "configure:4859: checking whether $ac_func is declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4864 "configure"
+#include "confdefs.h"
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+  
+#include "ansidecl.h"
+#include "system.h"
+#ifdef HAVE_SYS_TIMES_H
+#include <sys/times.h>
+#endif
+
+
+int main() {
+#ifndef $ac_func
+char *(*pfn) = (char *(*)) $ac_func ;
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  eval "gcc_cv_have_decl_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "gcc_cv_have_decl_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
+#define $ac_tr_decl 1
+EOF
+else
+  echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
+#define $ac_tr_decl 0
+EOF
+fi
+
+done
+if test x = y ; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_DECL_TIMES 1
+EOF
+fi
+
+
+# More time-related stuff.
+echo $ac_n "checking for struct tms""... $ac_c" 1>&6
+echo "configure:4916: checking for struct tms" >&5
+if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+cat > conftest.$ac_ext <<EOF
+#line 4922 "configure"
+#include "confdefs.h"
+
+#include "ansidecl.h"
+#include "system.h"
+#ifdef HAVE_SYS_TIMES_H
+#include <sys/times.h>
+#endif
+
+int main() {
+struct tms tms;
+; return 0; }
+EOF
+if { (eval echo configure:4935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_struct_tms=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_struct_tms=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_struct_tms" 1>&6
+if test $ac_cv_struct_tms = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_TMS 1
+EOF
+
+fi
+
+# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
+# revisit after autoconf 2.50.
+echo $ac_n "checking for clock_t""... $ac_c" 1>&6
+echo "configure:4958: checking for clock_t" >&5
+if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+cat > conftest.$ac_ext <<EOF
+#line 4964 "configure"
+#include "confdefs.h"
+
+#include "ansidecl.h"
+#include "system.h"
+
+int main() {
+clock_t x;
+; return 0; }
+EOF
+if { (eval echo configure:4974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gcc_cv_type_clock_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gcc_cv_type_clock_t=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
+if test $gcc_cv_type_clock_t = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_CLOCK_T 1
+EOF
+
+fi
+
 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
 CFLAGS="$saved_CFLAGS"
 
 # mkdir takes a single argument on some systems. 
 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
-echo "configure:3640: checking if mkdir takes one argument" >&5
+echo "configure:4999: 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 3645 "configure"
+#line 5004 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -3658,7 +5017,7 @@ int main() {
 mkdir ("foo", 0);
 ; return 0; }
 EOF
-if { (eval echo configure:3662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gcc_cv_mkdir_takes_one_arg=no
 else
@@ -3709,12 +5068,9 @@ extra_objs="${host_extra_objs} ${extra_objs}"
 if test x"$tm_file" = x
 then tm_file=$cpu_type/$cpu_type.h; fi
 
-if test x$extra_headers = x
+if test x"$extra_headers" = x
 then extra_headers=; fi
 
-if test x"$xm_file" = x
-then xm_file=$cpu_type/xm-$cpu_type.h; fi
-
 if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
@@ -3745,9 +5101,39 @@ then
 fi
 
 # Say what files are being used for the output code and MD file.
-echo "Using \`$srcdir/config/$out_file' to output insns."
+echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
 echo "Using \`$srcdir/config/$md_file' as machine description file."
 
+# If any of the xm_file variables contain nonexistent files, warn
+# about them and drop them.
+
+bx=
+for x in $build_xm_file; do
+  if    test -f $srcdir/config/$x
+  then      bx="$bx $x"
+  else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
+  fi
+done
+build_xm_file="$bx"
+
+hx=
+for x in $host_xm_file; do
+  if    test -f $srcdir/config/$x
+  then      hx="$hx $x"
+  else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
+  fi
+done
+host_xm_file="$hx"
+
+tx=
+for x in $xm_file; do
+  if    test -f $srcdir/config/$x
+  then      tx="$tx $x"
+  else      echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
+  fi
+done
+xm_file="$tx"
+
 count=a
 for f in $tm_file; do
        count=${count}x
@@ -3765,7 +5151,9 @@ count=a
 for f in $host_xm_file; do
        count=${count}x
 done
-if test $count = ax; then
+if test $count = a; then
+       :
+elif test $count = ax; then
        echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
 else
        echo "Using the following host machine macro files:"
@@ -3779,7 +5167,9 @@ if test "$host_xm_file" != "$build_xm_file"; then
        for f in $build_xm_file; do
                count=${count}x
        done
-       if test $count = ax; then
+       if test $count = a; then
+               :
+       elif test $count = ax; then
                echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
        else
                echo "Using the following build machine macro files:"
@@ -3797,20 +5187,14 @@ if test x$thread_file = x; then
        fi
 fi
 
-# Set up the header files.
-# $links is the list of header files to create.
-# $vars is the list of shell variables with file names to include.
 # auto-host.h is the file containing items generated by autoconf and is
 # the first file included by config.h.
-null_defines=
-host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
-
 # If host=build, it is correct to have hconfig include auto-host.h
 # as well.  If host!=build, we are in error and need to do more 
 # work to find out the build config parameters.
 if test x$host = x$build
 then
-       build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
+       build_auto=auto-host.h
 else
        # We create a subdir, then run autoconf in the subdir.
        # To prevent recursion we set host and build for the new
@@ -3821,78 +5205,27 @@ else
        mkdir $tempdir
        cd $tempdir
        case ${srcdir} in
-       /*) realsrcdir=${srcdir};;
+       /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
        *) realsrcdir=../${srcdir};;
        esac
-       CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
+       saved_CFLAGS="${CFLAGS}"
+       CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+       ${realsrcdir}/configure \
                --target=$target --host=$build --build=$build
+       CFLAGS="${saved_CFLAGS}"
 
        # We just finished tests for the build machine, so rename
        # the file auto-build.h in the gcc directory.
        mv auto-host.h ../auto-build.h
        cd ..
        rm -rf $tempdir
-       build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
+       build_auto=auto-build.h
 fi
 
-xm_file="gansidecl.h ${xm_file}"
-tm_file="gansidecl.h ${tm_file}"
-
-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
-
-# Make the links.
-while test -n "$vars"
-do
-       set $vars; var=$1; shift; vars=$*
-       set $links; link=$1; shift; links=$*
-       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.
-       if test "$target_cpu_default" != "" -a $link = tm.h
-       then
-               echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
-       fi
-       if test $link = tm.h
-       then
-               echo "#ifndef GENERATOR_FILE" >>$link
-               echo "#include \"insn-codes.h\"" >>$link
-               echo "#endif" >>$link
-       fi
-
-       for file in `eval echo '$'$var`; do
-               case $file in
-               auto-host.h | auto-build.h )
-                       ;;
-               *)
-                       echo '#ifdef IN_GCC' >>$link
-                       ;;
-               esac
-               echo "#include \"$file\"" >>$link
-               case $file in
-               auto-host.h | auto-build.h )
-                       ;;
-               *)
-                       echo '#endif' >>$link
-                       ;;
-               esac
-       done
-
-       for def in `eval echo '$'$define`; do
-               echo "#ifndef $def" >>$link
-               echo "#define $def" >>$link
-               echo "#endif" >>$link
-       done
-done
+tm_file="${tm_file} defaults.h"
+host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
+build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
+xm_file="ansidecl.h ${xm_file} ${tm_file}"
 
 # Truncate the target if necessary
 if test x$host_truncate_target != x; then
@@ -3905,13 +5238,13 @@ if test "${with_gcc_version_trigger+set}" = set; then
 else
        gcc_version_trigger=${srcdir}/version.c
 fi
-gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
+gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
 
 # Compile in configure arguments.
 if test -f configargs.h ; then
        # Being re-configured.
-       gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
+       gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
        gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
 else
        gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
@@ -3919,6 +5252,7 @@ fi
 cat > configargs.h <<EOF
 /* Generated automatically. */
 static const char configuration_arguments[] = "$gcc_config_arguments";
+static const char thread_model[] = "$thread_file";
 EOF
 
 # Internationalization
@@ -3935,7 +5269,7 @@ EOF
 
 
 
-ALL_LINGUAS="en_GB"
+ALL_LINGUAS="sv"
 
 # Enable NLS support by default
 # Check whether --enable-nls or --disable-nls was given.
@@ -3955,26 +5289,17 @@ if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
   enable_nls=no
 fi
 
-# if NLS is enabled, also enable check in po subdir
-if test $enable_nls = yes; then
-  CHECK_PO=check-po
-else
-  CHECK_PO=""
-fi
-
-
 
-
-        echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:3970: 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 "checking for library containing strerror""... $ac_c" 1>&6
+echo "configure:5296: checking for library containing strerror" >&5
+if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lcposix  $LIBS"
+  ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_strerror="no"
 cat > conftest.$ac_ext <<EOF
-#line 3978 "configure"
+#line 5303 "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
@@ -3985,41 +5310,63 @@ int main() {
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5314: \"$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"
+  ac_cv_search_strerror="none required"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
+test "$ac_cv_search_strerror" = "no" && for i in cposix; do
+LIBS="-l$i  $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 5325 "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
+    builtin and then its argument prototype would still apply.  */
+char strerror();
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -lcposix"
+int main() {
+strerror()
+; return 0; }
+EOF
+if { (eval echo configure:5336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_strerror="-l$i"
+break
 else
-  echo "$ac_t""no" 1>&6
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
 fi
 
+echo "$ac_t""$ac_cv_search_strerror" 1>&6
+if test "$ac_cv_search_strerror" != "no"; then
+  test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
+  
+else :
+  
+fi
   
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:4012: checking for working const" >&5
+echo "configure:5359: 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 4017 "configure"
+#line 5364 "configure"
 #include "confdefs.h"
 
 int main() {
 
 /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
@@ -4062,7 +5409,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:4066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -4083,12 +5430,12 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:4087: checking for off_t" >&5
+echo "configure:5434: 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 4092 "configure"
+#line 5439 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -4116,12 +5463,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:4120: checking for size_t" >&5
+echo "configure:5467: 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 4125 "configure"
+#line 5472 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -4151,19 +5498,19 @@ 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:4155: checking for working alloca.h" >&5
+echo "configure:5502: 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 4160 "configure"
+#line 5507 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
-void *p = alloca(2 * sizeof(int));
+char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5514: \"$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
@@ -4184,12 +5531,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:4188: checking for alloca" >&5
+echo "configure:5535: 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 4193 "configure"
+#line 5540 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -4217,7 +5564,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:4221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5568: \"$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
@@ -4249,12 +5596,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:4253: checking whether alloca needs Cray hooks" >&5
+echo "configure:5600: 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 4258 "configure"
+#line 5605 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -4279,12 +5626,12 @@ 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:4283: checking for $ac_func" >&5
+echo "configure:5630: 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 4288 "configure"
+#line 5635 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4307,7 +5654,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5658: \"$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
@@ -4334,7 +5681,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4338: checking stack direction for C alloca" >&5
+echo "configure:5685: 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
@@ -4342,7 +5689,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 4346 "configure"
+#line 5693 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -4361,7 +5708,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5712: \"$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
 else
@@ -4375,30 +5722,67 @@ fi
 
 fi
 
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
-
-fi
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+
+    echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
+echo "configure:5735: checking whether we are using the GNU C Library 2.1 or newer" >&5
+if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5740 "configure"
+#include "confdefs.h"
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+       
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "Lucky GNU user" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_gnu_library_2_1=yes
+else
+  rm -rf conftest*
+  ac_cv_gnu_library_2_1=no
+fi
+rm -f conftest*
+
+      
+    
+fi
+
+echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
+    
+    GLIBC21="$ac_cv_gnu_library_2_1"
+  
 
-                           
-   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h sys/param.h
+                                 
+   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h 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:4392: checking for $ac_hdr" >&5
+echo "configure:5776: 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 4397 "configure"
+#line 5781 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5786: \"$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*
@@ -4424,16 +5808,17 @@ else
 fi
 done
 
-   for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-strdup __argz_count __argz_stringify __argz_next
+   for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
+getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
+strdup strtoul tsearch __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4432: checking for $ac_func" >&5
+echo "configure:5817: 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 4437 "configure"
+#line 5822 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4456,7 +5841,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5845: \"$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
 done
 
 
-   if test "${ac_cv_func_stpcpy+set}" != "set"; then
-     for ac_func in stpcpy
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4489: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+   
+    
+  # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+  
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
+    done
+   
+fi
+
+
+  echo $ac_n "checking for iconv""... $ac_c" 1>&6
+echo "configure:5885: checking for iconv" >&5
+if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 4494 "configure"
+  
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    cat > conftest.$ac_ext <<EOF
+#line 5893 "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 <stdlib.h>
+#include <iconv.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
-$ac_func();
-#endif
-
+iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5903: \"$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"
+  am_cv_func_iconv=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
-
-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
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-   fi
-   if test "${ac_cv_func_stpcpy}" = "yes"; then
-     cat >> confdefs.h <<\EOF
-#define HAVE_STPCPY 1
-EOF
-
-   fi
-
-   if test $ac_cv_header_locale_h = yes; then
-    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:4551: 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 4556 "configure"
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS -liconv"
+      cat > conftest.$ac_ext <<EOF
+#line 5915 "configure"
 #include "confdefs.h"
-#include <locale.h>
+#include <stdlib.h>
+#include <iconv.h>
 int main() {
-return LC_MESSAGES
+iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  am_cv_val_LC_MESSAGES=yes
+  am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  am_cv_val_LC_MESSAGES=no
 fi
 rm -f conftest*
-fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      cat >> confdefs.h <<\EOF
-#define HAVE_LC_MESSAGES 1
-EOF
-
+      LIBS="$am_save_LIBS"
     fi
-  fi
-   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:4584: 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"
-  USE_NLS=$enableval
-else
-  USE_NLS=yes
+  
 fi
 
-    echo "$ac_t""$USE_NLS" 1>&6
-    
-
-    USE_INCLUDED_LIBINTL=no
-
-        if test "$USE_NLS" = "yes"; then
-      cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
+echo "$ac_t""$am_cv_func_iconv" 1>&6
+  if test "$am_cv_func_iconv" = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_ICONV 1
 EOF
 
-      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:4604: 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"
-  nls_cv_force_use_gnu_gettext=$withval
-else
-  nls_cv_force_use_gnu_gettext=no
-fi
-
-      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
-
-      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
-      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
-                                       nls_cv_header_intl=
-       nls_cv_header_libgt=
-       CATOBJEXT=NONE
-
-       ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:4623: 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 4628 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4633: \"$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 "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 "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-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:4650: checking for gettext in libc" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
+    echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
+echo "configure:5946: checking for iconv declaration" >&5
+    if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 4655 "configure"
+  
+      cat > conftest.$ac_ext <<EOF
+#line 5952 "configure"
 #include "confdefs.h"
-#include <libintl.h>
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
 int main() {
-return (int) gettext ("")
+
 ; return 0; }
 EOF
-if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gt_cv_func_gettext_libc=yes
+  am_cv_proto_iconv_arg1=""
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gt_cv_func_gettext_libc=no
+  am_cv_proto_iconv_arg1="const"
 fi
 rm -f conftest*
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
 fi
 
-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:4678: 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
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lintl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4686 "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
-    builtin and then its argument prototype would still apply.  */
-char bindtextdomain();
-
-int main() {
-bindtextdomain()
-; return 0; }
+    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    echo "$ac_t""${ac_t:-
+         }$am_cv_proto_iconv" 1>&6
+    cat >> confdefs.h <<EOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
 EOF
-if { (eval echo configure:4697: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
 
-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:4713: 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:4718: 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
+  fi
+  LIBICONV=
+  if test "$am_cv_lib_iconv" = yes; then
+    LIBICONV="-liconv"
+  fi
+  
+
+   
+  echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
+echo "configure:6000: checking for nl_langinfo and CODESET" >&5
+if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lintl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4726 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 6005 "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
-    builtin and then its argument prototype would still apply.  */
-char gettext();
-
+#include <langinfo.h>
 int main() {
-gettext()
+char* cs = nl_langinfo(CODESET);
 ; return 0; }
 EOF
-if { (eval echo configure:4737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6012: \"$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"
+  am_cv_langinfo_codeset=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  am_cv_langinfo_codeset=no
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  gt_cv_func_gettext_libintl=yes
-else
-  echo "$ac_t""no" 1>&6
-gt_cv_func_gettext_libintl=no
-fi
-
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
-  echo "$ac_t""no" 1>&6
+    
 fi
 
-          fi
-
-          if test "$gt_cv_func_gettext_libc" = "yes" \
-             || test "$gt_cv_func_gettext_libintl" = "yes"; then
-             cat >> confdefs.h <<\EOF
-#define HAVE_GETTEXT 1
+echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
+  if test $am_cv_langinfo_codeset = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_LANGINFO_CODESET 1
 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:4776: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$MSGFMT" in
-  /*)
-  gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-       gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
-       break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="no"
-  ;;
-esac
-fi
-MSGFMT="$gcc_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
-  echo "$ac_t""$MSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-             if test "$MSGFMT" != "no"; then
-               for ac_func in dcgettext
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4810: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  fi
+
+   if test $ac_cv_header_locale_h = yes; then
+    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:6035: 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 4815 "configure"
+#line 6040 "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
-
+#include <locale.h>
+int main() {
+return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6047: \"$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"
+  am_cv_val_LC_MESSAGES=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  am_cv_val_LC_MESSAGES=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""$am_cv_val_LC_MESSAGES" 1>&6
+    if test $am_cv_val_LC_MESSAGES = yes; then
+      cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
 EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-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:4865: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$GMSGFMT" in
-  /*)
-  gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
-      break
     fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
+  fi
+   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:6068: 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"
+  USE_NLS=$enableval
+else
+  USE_NLS=yes
 fi
-GMSGFMT="$gcc_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
+
+    echo "$ac_t""$USE_NLS" 1>&6
+    
+
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+    INTLLIBS=
+    INTLDEPS=
+
+        if test "$USE_NLS" = "yes"; then
+      cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:6091: 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"
+  nls_cv_force_use_gnu_gettext=$withval
 else
-  echo "$ac_t""no" 1>&6
+  nls_cv_force_use_gnu_gettext=no
 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:4901: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
+      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+                               CATOBJEXT=NONE
+
+                
+        
+
+       ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:6111: 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
-  case "$XGETTEXT" in
-  /*)
-  gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-       gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
-       break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$gcc_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
-  echo "$ac_t""$XGETTEXT" 1>&6
+  cat > conftest.$ac_ext <<EOF
+#line 6116 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6121: \"$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 "ac_cv_header_$ac_safe=yes"
 else
-  echo "$ac_t""no" 1>&6
+  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"
 fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_LIBINTL_H 1
+EOF
 
-               cat > conftest.$ac_ext <<EOF
-#line 4933 "configure"
+           echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
+echo "configure:6142: checking for GNU gettext in libc" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6147 "configure"
 #include "confdefs.h"
-
-int main() {
+#include <libintl.h>
 extern int _nl_msg_cat_cntr;
-                              return _nl_msg_cat_cntr
+int main() {
+bindtextdomain ("", "");
+return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:4941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  CATOBJEXT=.gmo
-                  DATADIRNAME=share
+  gt_cv_func_gnugettext1_libc=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  CATOBJEXT=.mo
-                  DATADIRNAME=lib
+  gt_cv_func_gnugettext1_libc=no
 fi
 rm -f conftest*
-               INSTOBJEXT=.mo
-             else
-               create_catalogs="no"
-             fi
-           fi
-       
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-        if test "$CATOBJEXT" = "NONE"; then
-         echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
-echo "configure:4966: 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"
-  nls_cv_use_catgets=$withval
-else
-  nls_cv_use_catgets=no
 fi
 
-         echo "$ac_t""$nls_cv_use_catgets" 1>&6
+echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
 
-         if test "$nls_cv_use_catgets" = "yes"; then
-                   echo $ac_n "checking for main in -li""... $ac_c" 1>&6
-echo "configure:4979: 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
+          if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
+            echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
+echo "configure:6172: checking for GNU gettext in libintl" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-li  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4987 "configure"
+  gt_save_LIBS="$LIBS"
+               LIBS="$LIBS -lintl $LIBICONV"
+               cat > conftest.$ac_ext <<EOF
+#line 6179 "configure"
 #include "confdefs.h"
-
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
 int main() {
-main()
+bindtextdomain ("", "");
+return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:4994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6188: \"$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"
+  gt_cv_func_gnugettext1_libintl=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  gt_cv_func_gnugettext1_libintl=no
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+               LIBS="$gt_save_LIBS"
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+
+echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
+          fi
+
+                                          if test "$gt_cv_func_gnugettext1_libc" = "yes" \
+             || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
+                  && test "$PACKAGE" != gettext; }; then
+            cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
 EOF
 
-  LIBS="-li $LIBS"
 
-else
-  echo "$ac_t""no" 1>&6
-fi
+            if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+                                      INTLLIBS="-lintl $LIBICONV"
+            fi
 
-           echo $ac_n "checking for catgets""... $ac_c" 1>&6
-echo "configure:5022: checking for catgets" >&5
-if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $INTLLIBS"
+            for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6221: 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 5027 "configure"
+#line 6226 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char catgets(); below.  */
+    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 catgets();
+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_catgets) || defined (__stub___catgets)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-catgets();
+$ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_catgets=yes"
+  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_catgets=no"
+  eval "ac_cv_func_$ac_func=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_CATGETS 1
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
 EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
-              INTLOBJS="\$(CATOBJS)"
-              # Extract the first word of "gencat", so it can be a program name with args.
-set dummy gencat; ac_word=$2
+            LIBS="$gt_save_LIBS"
+
+                    # 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:5072: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then
+echo "configure:6278: 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
-  case "$GENCAT" in
+  case "$MSGFMT" in
   /*)
-  gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
   ;;
   *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
-      gcc_cv_path_GENCAT="$ac_dir/$ac_word"
-      break
+      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
+       ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+       break
+      fi
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$gcc_cv_path_GENCAT" && gcc_cv_path_GENCAT="no"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
   ;;
 esac
 fi
-GENCAT="$gcc_cv_path_GENCAT"
-if test -n "$GENCAT"; then
-  echo "$ac_t""$GENCAT" 1>&6
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+  echo "$ac_t""$MSGFMT" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
-              if test "$GENCAT" != "no"; then
-                # Extract the first word of "gmsgfmt", so it can be a program name with args.
+
+            # 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:5108: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
+echo "configure:6312: 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
   case "$GMSGFMT" in
   /*)
-  gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
   ;;
   ?:/*)                         
-  gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
@@ -5121,111 +6325,65 @@ else
   for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
-      gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
+      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="no"
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
   ;;
 esac
 fi
-GMSGFMT="$gcc_cv_path_GMSGFMT"
+GMSGFMT="$ac_cv_path_GMSGFMT"
 if test -n "$GMSGFMT"; then
   echo "$ac_t""$GMSGFMT" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-                if test "$GMSGFMT" = "no"; then
-                  # 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:5145: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$GMSGFMT" in
-  /*)
-  gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-       gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
-       break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="msgfmt"
-  ;;
-esac
-fi
-GMSGFMT="$gcc_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
 
-                  if test "$GMSGFMT" = "msgfmt"; then
-                    create_catalogs="no"
-                  fi
-                fi
-                # Extract the first word of "xgettext", so it can be a program name with args.
+                    # 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:5183: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
+echo "configure:6349: 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
   case "$XGETTEXT" in
   /*)
-  gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
   for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-       gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
+      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
+       ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
        break
       fi
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
   ;;
 esac
 fi
-XGETTEXT="$gcc_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
   echo "$ac_t""$XGETTEXT" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-                USE_INCLUDED_LIBINTL=yes
-                CATOBJEXT=.cat
-                INSTOBJEXT=.cat
-                DATADIRNAME=lib
-                INTLDEPS='$(top_builddir)/intl/libintl.a'
-                INTLLIBS=$INTLDEPS
-                LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-                nls_cv_header_intl=intl/libintl.h
-                nls_cv_header_libgt=intl/libgettext.h
-              fi
+
+            CATOBJEXT=.gmo
+          fi
+       
 else
   echo "$ac_t""no" 1>&6
 fi
 
-         fi
-        fi
 
         if test "$CATOBJEXT" = "NONE"; then
                          nls_cv_use_gnu_gettext=yes
@@ -5237,32 +6395,32 @@ 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:5241: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
+echo "configure:6399: 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
   case "$MSGFMT" in
   /*)
-  gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
   for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-       gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
+      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
+       ac_cv_path_MSGFMT="$ac_dir/$ac_word"
        break
       fi
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="msgfmt"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
   ;;
 esac
 fi
-MSGFMT="$gcc_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
   echo "$ac_t""$MSGFMT" 1>&6
 else
   echo "$ac_t""no" 1>&6
@@ -5271,16 +6429,16 @@ 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:5275: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
+echo "configure:6433: 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
   case "$GMSGFMT" in
   /*)
-  gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
   ;;
   ?:/*)                         
-  gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
@@ -5288,73 +6446,76 @@ else
   for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
-      gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
+      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
   ;;
 esac
 fi
-GMSGFMT="$gcc_cv_path_GMSGFMT"
+GMSGFMT="$ac_cv_path_GMSGFMT"
 if test -n "$GMSGFMT"; then
   echo "$ac_t""$GMSGFMT" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-                       if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then
-         create_catalogs="no"
-       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:5314: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
+echo "configure:6469: 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
   case "$XGETTEXT" in
   /*)
-  gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
   for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-       gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
+      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
+       ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
        break
       fi
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
   ;;
 esac
 fi
-XGETTEXT="$gcc_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
   echo "$ac_t""$XGETTEXT" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
         
+       BUILD_INCLUDED_LIBINTL=yes
        USE_INCLUDED_LIBINTL=yes
         CATOBJEXT=.gmo
-        INSTOBJEXT=.mo
-        DATADIRNAME=share
-       INTLDEPS='$(top_builddir)/intl/libintl.a'
-       INTLLIBS=$INTLDEPS
-       LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-        nls_cv_header_intl=intl/libintl.h
-        nls_cv_header_libgt=intl/libgettext.h
+       INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
+       INTLDEPS="\$(top_builddir)/intl/libintl.a"
+       LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+                  if test "$GMSGFMT" != ":"; then
+                       if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
+         : ;
+       else
+         echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
+         GMSGFMT=":"
+       fi
       fi
 
-            if test "$XGETTEXT" != ":"; then
-                       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+                  if test "$XGETTEXT" != ":"; then
+                       if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
          : ;
        else
          echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
@@ -5362,24 +6523,65 @@ fi
        fi
       fi
 
+            POSUB=po
+    fi
+    
+
 
+            if test "$PACKAGE" = gettext; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
 
-      # We need to process the po/ directory.
-      POSUB=po
-    else
-      DATADIRNAME=share
-      nls_cv_header_intl=intl/libintl.h
-      nls_cv_header_libgt=intl/libgettext.h
+                                            for ac_prog in bison
+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:6541: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$INTLBISON"; then
+  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_INTLBISON="$ac_prog"
+      break
     fi
-    
-    
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+INTLBISON="$ac_cv_prog_INTLBISON"
+if test -n "$INTLBISON"; then
+  echo "$ac_t""$INTLBISON" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
 
+test -n "$INTLBISON" && break
+done
 
-    # If this is used in GNU gettext we have to set USE_NLS to `yes'
-    # because some of the sources are only built for this goal.
-    if test "$PACKAGE" = gettext; then
-      USE_NLS=yes
-      USE_INCLUDED_LIBINTL=yes
+    if test -z "$INTLBISON"; then
+      ac_verc_fail=yes
+    else
+            echo $ac_n "checking version of bison""... $ac_c" 1>&6
+echo "configure:6574: checking version of bison" >&5
+      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+      case $ac_prog_version in
+        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+      esac
+      echo "$ac_t""$ac_prog_version" 1>&6
+    fi
+    if test $ac_verc_fail = yes; then
+      INTLBISON=:
     fi
 
                 for lang in $ALL_LINGUAS; do
@@ -5397,30 +6599,50 @@ fi
     
     
     
+    if test $USE_INCLUDED_LIBINTL = yes; then
+      cat >> confdefs.h <<\EOF
+#define USE_INCLUDED_LIBINTL 1
+EOF
+
+    fi
+
+        nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+        DATADIRNAME=share
+    
+
+        INSTOBJEXT=.mo
+    
+
+        GENCAT=gencat
     
   
 
-   if test "x$create_catalogs" = "xno"; then
-     echo "configure: warning: No program for building catalogs found -> building disabled" 1>&2
-   fi
-
-   if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then
+   if test "x$CATOBJEXT" != "x"; then
      if test "x$ALL_LINGUAS" = "x"; then
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:5413: checking for catalogs to be installed" >&5
-       if test "x$LINGUAS" = "x"; then
-        LINGUAS=$ALL_LINGUAS
-       else
-        NEW_LINGUAS=
-        for lang in $ALL_LINGUAS; do
-          case " $LINGUAS " in
-            *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-          esac
-        done
-         LINGUAS=$NEW_LINGUAS
-       fi
+echo "configure:6628: checking for catalogs to be installed" >&5
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
+           # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
        echo "$ac_t""$LINGUAS" 1>&6
      fi
 
@@ -5429,66 +6651,6 @@ echo "configure:5413: checking for catalogs to be installed" >&5
      fi
    fi
 
-            if test $ac_cv_header_locale_h = yes; then
-     INCLUDE_LOCALE_H="#include <locale.h>"
-   else
-     INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>.  Take care yourself.  */"
-   fi
-   
-
-            test -d intl || mkdir intl
-   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:5445: 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 5450 "configure"
-#include "confdefs.h"
-#include <linux/version.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5455: \"$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 "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 "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  msgformat=linux
-else
-  echo "$ac_t""no" 1>&6
-msgformat=xopen
-fi
-
-
-               sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
-   fi
-      sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
-     $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
-
-            if test "$PACKAGE" = "gettext"; then
-     GT_NO="#NO#"
-     GT_YES=
-   else
-     GT_NO=
-     GT_YES="#YES#"
-   fi
-   
-   
-
             MKINSTALLDIRS=
    if test -n "$ac_aux_dir"; then
      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
@@ -5498,22 +6660,8 @@ fi
    fi
    
 
-      l=
+      INTL_LIBTOOL_SUFFIX_PREFIX=
    
-
-         test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,        $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-       < $srcdir/po/POTFILES.in > po/POTFILES
   
 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
 
@@ -5524,21 +6672,84 @@ if test "${enable_win32_registry+set}" = set; then
   :
 fi
 
-
+case $host_os in
+       win32 | pe | cygwin* | mingw32* | uwin*)
 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
-echo "configure:5530: checking whether windows registry support is requested" >&5
-if test x$enable_win32_registry != xno; then
+echo "configure:6679: 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
+  
+echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
+echo "configure:6688: checking for library containing RegOpenKeyExA" >&5
+if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_RegOpenKeyExA="no"
+cat > conftest.$ac_ext <<EOF
+#line 6695 "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
+    builtin and then its argument prototype would still apply.  */
+char RegOpenKeyExA();
+
+int main() {
+RegOpenKeyExA()
+; return 0; }
+EOF
+if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_RegOpenKeyExA="none required"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
+LIBS="-l$i  $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6717 "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
+    builtin and then its argument prototype would still apply.  */
+char RegOpenKeyExA();
+
+int main() {
+RegOpenKeyExA()
+; return 0; }
+EOF
+if { (eval echo configure:6728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_RegOpenKeyExA="-l$i"
+break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
+if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
+  test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
+  
+else :
+  
+fi
 else
   echo "$ac_t""no" 1>&6
 fi
 
 # Check if user specified a different registry key.
-case x${enable_win32_registry} in
+case "x${enable_win32_registry}" in
 x | xyes)
   # default.
   gcc_cv_win32_registry_key="$VERSION"
@@ -5553,15 +6764,17 @@ xno)
   ;;
 esac
 
-if test x$enable_win32_registry != xno; then
+if test "x$enable_win32_registry" != xno; then
   echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
-echo "configure:5559: checking registry key on windows hosts" >&5
+echo "configure:6770: 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
+;;
+esac
 
 # Get an absolute path to the GCC top-level source directory
 holddir=`pwd`
@@ -5623,16 +6836,25 @@ out_object_file=`basename $out_file .c`.o
 tm_file_list=
 for f in $tm_file; do
   case $f in
-    gansidecl.h )
+    ansidecl.h )
+       tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
+    defaults.h )
        tm_file_list="${tm_file_list} $f" ;;
     *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
   esac
 done
 
+tm_p_file_list=
+for f in $tm_p_file; do
+    tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
+done
+
 host_xm_file_list=
 for f in $host_xm_file; do
   case $f in
-    auto-host.h | gansidecl.h | hwint.h )
+    ansidecl.h )
+       host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
+    auto-host.h | defaults.h )
        host_xm_file_list="${host_xm_file_list} $f" ;;
     *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
   esac
@@ -5641,7 +6863,9 @@ done
 build_xm_file_list=
 for f in $build_xm_file; do
   case $f in
-    auto-build.h | auto-host.h | gansidecl.h | hwint.h )
+    ansidecl.h )
+       build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
+    auto-build.h | auto-host.h | defaults.h )
        build_xm_file_list="${build_xm_file_list} $f" ;;
     *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
   esac
@@ -5662,10 +6886,9 @@ fi
 # 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.
+# If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
+# This prevents libgcc2 from containing any code which requires libc
+# support.
 inhibit_libc=
 if test x$host != x$target && test x$with_headers = x; then
        inhibit_libc=-Dinhibit_libc
@@ -5703,15 +6926,10 @@ if test x$use_collect2 = xno; then
 fi
 
 # Add a definition of USE_COLLECT2 if system wants one.
-# Also tell toplev.c what to do.
-# This substitutes for lots of t-* files.
-if test x$use_collect2 = x
+if test x$use_collect2 != x
 then
-       will_use_collect2=
-       maybe_use_collect2=
-else
-       will_use_collect2="collect2"
-       maybe_use_collect2="-DUSE_COLLECT2"
+       host_xm_defines="${host_xm_defines} USE_COLLECT2"
+       xm_defines="${xm_defines} USE_COLLECT2"
 fi
 
 # If we have gas in the build tree, make a link to it.
@@ -5726,20 +6944,17 @@ fi
 
 # If we have ld in the build tree, make a link to it.
 if test -f ../ld/Makefile; then
-#      if test x$use_collect2 = x; then
-#              rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
-#      else
-               rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
-#      fi
+       rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
 fi
 
 # Figure out what assembler we will be using.
 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
-echo "configure:5739: checking what assembler to use" >&5
+echo "configure:6953: checking what assembler to use" >&5
 gcc_cv_as=
 gcc_cv_gas_major_version=
 gcc_cv_gas_minor_version=
 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
+gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
 if test -x "$DEFAULT_ASSEMBLER"; then
        gcc_cv_as="$DEFAULT_ASSEMBLER"
 elif test -x "$AS"; then
@@ -5749,7 +6964,7 @@ elif test -x as$host_exeext; then
        gcc_cv_as=./as$host_exeext
 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
        # Single tree build which includes gas.
-       for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
+       for f in $gcc_cv_as_bfd_srcdir/configure $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
        do
                gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
                if test x$gcc_cv_gas_version != x; then
@@ -5786,7 +7001,7 @@ if test "x$gcc_cv_as" = x -a x$host = x$target; then
        # If the loop below does not find an assembler, then use whatever
        # one we can find in the users's path.
        # user's path.
-       as=as$host_exeext
+       gcc_cv_as=as$host_exeext
 
        test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
                   $test_prefix/lib/gcc-lib/$target \
@@ -5820,7 +7035,7 @@ fi
 
 # Figure out what nm we will be using.
 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
-echo "configure:5824: checking what nm to use" >&5
+echo "configure:7039: checking what nm to use" >&5
 if test -x nm$host_exeext; then
        gcc_cv_nm=./nm$host_exeext
 elif test x$host = x$target; then
@@ -5831,7 +7046,7 @@ echo "$ac_t""$gcc_cv_nm" 1>&6
 
 # Figure out what assembler alignment features are present.
 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
-echo "configure:5835: checking assembler alignment features" >&5
+echo "configure:7050: checking assembler alignment features" >&5
 gcc_cv_as_alignment_features=none
 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
        # Gas version 2.6 and later support for .balign and .p2align.
@@ -5879,7 +7094,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:5883: checking assembler subsection support" >&5
+echo "configure:7098: checking assembler subsection support" >&5
 gcc_cv_as_subsections=no
 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
   if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@@ -5919,7 +7134,7 @@ fi
 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
 
 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
-echo "configure:5923: checking assembler weak support" >&5
+echo "configure:7138: checking assembler weak support" >&5
 gcc_cv_as_weak=no
 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
   if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
@@ -5942,7 +7157,7 @@ fi
 echo "$ac_t""$gcc_cv_as_weak" 1>&6
 
 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
-echo "configure:5946: checking assembler hidden support" >&5
+echo "configure:7161: checking assembler hidden support" >&5
 gcc_cv_as_hidden=no
 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
   if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@@ -5965,10 +7180,159 @@ EOF
 fi
 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
 
+echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
+echo "configure:7185: checking assembler leb128 support" >&5
+gcc_cv_as_leb128=no
+if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
+  if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
+    gcc_cv_as_leb128="yes"
+  fi
+elif test x$gcc_cv_as != x; then
+       # Check if we have .[us]leb128, and support symbol arithmetic with it.
+       cat > conftest.s <<EOF
+       .data
+       .uleb128 L2 - L1
+L1:
+       .uleb128 1280
+       .sleb128 -1010
+L2:
+EOF
+       if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+               gcc_cv_as_leb128="yes"
+
+               # GAS versions before 2.11 do not support uleb128,
+               # despite appearing to.
+               # ??? There exists an elf-specific test that will crash
+               # the assembler.  Perhaps it's better to figure out whether
+               # arbitrary sections are supported and try the test.
+               as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
+               if echo "$as_ver" | grep GNU > /dev/null; then
+                       as_ver=`echo $as_ver | sed -e 's/.* //'`
+                       as_major=`echo $as_ver | sed 's/\..*//'`
+                       as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
+                       if test $as_major -eq 2 -a $as_minor -lt 11; then
+                               gcc_cv_as_leb128="no"
+                       fi
+               fi
+       fi
+       rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
+fi
+if test x"$gcc_cv_as_leb128" = xyes; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_AS_LEB128 1
+EOF
+
+fi
+echo "$ac_t""$gcc_cv_as_leb128" 1>&6
+
+echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
+echo "configure:7230: checking assembler eh_frame optimization" >&5
+gcc_cv_as_eh_frame=no
+if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
+  if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
+    gcc_cv_as_eh_frame="yes"
+  fi
+elif test x$gcc_cv_as != x; then
+       # Check if this is GAS.
+       as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
+       rm -f a.out 2> /dev/null
+       if echo "$as_ver" | grep GNU > /dev/null; then
+               # Versions up to and including 2.11.0 may mis-optimize
+               # .eh_frame data.  Try something.
+               cat > conftest.s <<EOF
+       .text
+.LFB1:
+       .4byte  0
+.L1:
+       .4byte  0
+.LFE1:
+       .section        .eh_frame,"aw",@progbits
+__FRAME_BEGIN__:
+       .4byte  .LECIE1-.LSCIE1
+.LSCIE1:
+       .4byte  0x0
+       .byte   0x1
+       .ascii "z\0"
+       .byte   0x1
+       .byte   0x78
+       .byte   0x1a
+       .byte   0x0
+       .byte   0x4
+       .4byte  1
+       .p2align 1
+.LECIE1:
+.LSFDE1:
+       .4byte  .LEFDE1-.LASFDE1
+.LASFDE1:
+       .4byte  .LASFDE1-__FRAME_BEGIN__
+       .4byte  .LFB1
+       .4byte  .LFE1-.LFB1
+       .byte   0x4
+       .4byte  .LFE1-.LFB1
+       .byte   0x4
+       .4byte  .L1-.LFB1
+.LEFDE1:
+EOF
+               cat > conftest.lit <<EOF
+ 0000 10000000 00000000 017a0001 781a0004  .........z..x...
+ 0010 01000000 12000000 18000000 00000000  ................
+ 0020 08000000 04080000 0044               .........D      
+EOF
+               cat > conftest.big <<EOF
+ 0000 00000010 00000000 017a0001 781a0004  .........z..x...
+ 0010 00000001 00000012 00000018 00000000  ................
+ 0020 00000008 04000000 0844               .........D      
+EOF
+               # If the assembler didn't choke, and we can objdump,
+               # and we got the correct data, then succeed.
+               if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
+                  && objdump -s -j .eh_frame conftest.o 2>/dev/null \
+                     | tail -3 > conftest.got \
+                  && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
+                       || cmp conftest.big conftest.got > /dev/null 2>&1; }
+               then
+                       gcc_cv_as_eh_frame="yes"
+               else
+                       gcc_cv_as_eh_frame="bad"
+                       if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
+                               cat >> confdefs.h <<\EOF
+#define USE_AS_TRADITIONAL_FORMAT 1
+EOF
+
+                       fi
+               fi
+       fi
+       rm -f conftest.*
+fi
+echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
+
+echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
+echo "configure:7311: checking assembler section merging support" >&5
+gcc_cv_as_shf_merge=no
+if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
+  if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
+    gcc_cv_as_shf_merge=yes
+  fi
+elif test x$gcc_cv_as != x; then
+       # Check if we support SHF_MERGE sections
+       echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
+       if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
+               gcc_cv_as_shf_merge=yes
+       fi
+       rm -f conftest.s conftest.o
+fi
+if test x"$gcc_cv_as_shf_merge" = xyes; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_GAS_SHF_MERGE 1
+EOF
+
+fi
+echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
+
 case "$target" in 
   sparc*-*-*)
     echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
-echo "configure:5972: checking assembler .register pseudo-op support" >&5
+echo "configure:7336: 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
@@ -5996,7 +7360,7 @@ EOF
     fi
 
     echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
-echo "configure:6000: checking assembler supports -relax" >&5
+echo "configure:7364: checking assembler supports -relax" >&5
 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6026,7 +7390,7 @@ EOF
     case "$tm_file" in
     *64*)
        echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
-echo "configure:6030: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
+echo "configure:7394: 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
@@ -6071,7 +7435,7 @@ EOF
 
     if test "x$gcc_cv_as_flags64" != xno; then
        echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
-echo "configure:6075: checking for assembler offsetable %lo() support" >&5
+echo "configure:7439: 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
@@ -6106,11 +7470,12 @@ EOF
 
        fi
     fi
+
     ;;
 
-  i[34567]86-*-*)
+  i[34567]86-*-* | x86_64-*-*)
     echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
-echo "configure:6114: checking assembler instructions" >&5
+echo "configure:7479: checking assembler instructions" >&5
     gcc_cv_as_instructions=
     if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
       if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
@@ -6135,11 +7500,39 @@ EOF
 
     fi
     echo "$ac_t""$gcc_cv_as_instructions" 1>&6
+
+    echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
+echo "configure:7506: checking assembler GOTOFF in data directives" >&5
+    gcc_cv_as_gotoff_in_data=no
+    if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
+    then
+      if test "$gcc_cv_gas_major_version" -eq 2 \
+        -a "$gcc_cv_gas_minor_version" -ge 11 \
+        -o "$gcc_cv_gas_major_version" -gt 2; then
+       gcc_cv_as_gotoff_in_data=yes
+      fi
+    elif test x$gcc_cv_as != x; then
+       cat > conftest.s <<EOF
+       .text
+.L0:
+       nop
+       .data
+       .long .L0@GOTOFF
+EOF
+       if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+         gcc_cv_as_gotoff_in_data=yes
+       fi
+    fi
+    cat >> confdefs.h <<EOF
+#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
+EOF
+
+    echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
     ;;
 esac
 
 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
-echo "configure:6143: checking assembler dwarf2 debug_line support" >&5
+echo "configure:7536: checking assembler dwarf2 debug_line support" >&5
 gcc_cv_as_dwarf2_debug_line=no
 # ??? Not all targets support dwarf2 debug_line, even within a version
 # of gas.  Moreover, we need to emit a valid instruction to trigger any
@@ -6148,7 +7541,7 @@ gcc_cv_as_dwarf2_debug_line=no
 # ??? Once 2.11 is released, probably need to add first known working
 # version to the per-target configury.
 case "$target" in
-  i?86*-*-* | mips*-*-* | alpha*-*-* | sparc*-*-*)
+  i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-*)
     insn="nop"
     ;;
   ia64*-*-*)
@@ -6165,12 +7558,24 @@ then
     gcc_cv_as_dwarf2_debug_line="yes"
   fi
 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
-       echo '  .file 0 "conftest.s"' > conftest.s
-       echo '  .loc 0 3 0' >> conftest.s
+       echo '  .file 1 "conftest.s"' > conftest.s
+       echo '  .loc 1 3 0' >> conftest.s
        echo "  $insn" >> conftest.s
+       # ??? This fails with non-gnu grep.
        if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
           && grep debug_line conftest.o > /dev/null 2>&1 ; then
-               gcc_cv_as_dwarf2_debug_line="yes"
+               # The .debug_line file table must be in the exact order that
+               # we specified the files, since these indicies are also used
+               # by DW_AT_decl_file.  Approximate this test by testing if
+               # the assembler bitches if the same index is assigned twice.
+               echo '  .file 1 "foo.s"' > conftest.s
+               echo '  .file 1 "bar.s"' >> conftest.s
+               if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
+               then
+                 gcc_cv_as_dwarf2_debug_line="no"
+               else
+                 gcc_cv_as_dwarf2_debug_line="yes"
+               fi
        fi
        rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
 fi
@@ -6182,6 +7587,13 @@ EOF
 fi
 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
 
+if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
+  cat >> confdefs.h <<EOF
+#define PREFIX_INCLUDE_DIR "$prefix/include"
+EOF
+
+fi
+
 # Figure out what language subdirectories are present.
 # Look if the user specified --enable-languages="..."; if not, use
 # the environment variable $LANGUAGES if defined. $LANGUAGES might
@@ -6197,6 +7609,38 @@ else
                { echo "configure: error: --enable-languages needs at least one argument" 1>&2; exit 1; }
        fi
 fi
+
+# First scan to see if an enabled language requires some other language.
+# We assume that a given config-lang.in will list all the language
+# front ends it requires, even if some are required indirectly.
+for lang in ${srcdir}/*/config-lang.in ..
+do
+   case $lang in
+    ..)
+       ;;
+    # The odd quoting in the next line works around
+    # an apparent bug in bash 1.12 on linux.
+    ${srcdir}/[*]/config-lang.in)
+       ;;
+    *)
+       lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^     ]*\).*$,\1,p' $lang`
+       this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^   ]*\).*$,\1,p' $lang`
+       for other in $this_lang_requires
+       do
+         case ,${enable_languages}, in
+          *,$other,*)
+             ;;
+          *,all,*)
+             ;;
+          *,$lang_alias,*)
+             enable_languages="$enable_languages,$other"
+             ;;
+         esac
+       done
+       ;;
+   esac
+done
+
 subdirs=
 for lang in ${srcdir}/*/config-lang.in ..
 do
@@ -6207,27 +7651,23 @@ do
        ${srcdir}/[*]/config-lang.in) ;;
        *)
          lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
+         this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^         ]*\).*$,\1,p' $lang`
+         build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^     ]*\).*$,\1,p' $lang`
          if test "x$lang_alias" = x
          then
                echo "$lang doesn't set \$language." 1>&2
                exit 1
          fi
-         if test x"${enable_languages}" = xall && test x"${lang_alias}" != xCHILL; then
-               add_this_lang=yes
-         else
-               case "${enable_languages}" in
-                   ${lang_alias} | "${lang_alias},"* | *",${lang_alias},"* | *",${lang_alias}" )
-                       add_this_lang=yes
-                       ;;
-                   * )
-                       add_this_lang=no
-                       ;;
-               esac
-         fi
+         case ${build_by_default},${enable_languages}, in
+         *,$lang_alias,*) add_this_lang=yes ;;
+         no,*) add_this_lang=no ;;
+         *,all,*) add_this_lang=yes ;;
+         *) add_this_lang=no ;;
+         esac
          if test x"${add_this_lang}" = xyes; then
                case $lang in
                    ${srcdir}/ada/config-lang.in)
-                       if test x$gnat = xyes ; then
+                       if test x$have_gnat = xyes ; then
                                subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
                        fi
                        ;;
@@ -6262,12 +7702,7 @@ if test "${with_gc+set}" = set; then
     ;;
 esac
 else
-  if test $ac_cv_func_mmap_anywhere = yes \
-    || test $ac_cv_func_valloc = yes; then
   GGC=ggc-page
-else
-  GGC=ggc-simple
-fi
 fi
 
 
@@ -6287,36 +7722,9 @@ fi
 
 
 
-# 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"
-  :
-else
-  enable_new_gxx_abi=yes
-fi
-
-
-if test x$enable_new_gxx_abi = xyes; then
-  cat >> confdefs.h <<\EOF
-#define ENABLE_NEW_GXX_ABI 1
-EOF
-
-  GXX_ABI_FLAG='-fnew-abi'
-else
-  GXX_ABI_FLAG=
-fi
-
-
-cat >> confdefs.h <<EOF
-#define ENABLE_STD_NAMESPACE $ac_esn
-EOF
-
-
-
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:6320: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:7728: checking whether to enable maintainer-specific portions of Makefiles" >&5
     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
   enableval="$enable_maintainer_mode"
@@ -6334,6 +7742,18 @@ else
   MAINT='#'
 fi
 
+# With Setjmp/Longjmp based exception handling.
+# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
+if test "${enable_sjlj_exceptions+set}" = set; then
+  enableval="$enable_sjlj_exceptions"
+  sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
+cat >> confdefs.h <<EOF
+#define CONFIG_SJLJ_EXCEPTIONS $sjlj
+EOF
+
+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.
 
@@ -6417,6 +7837,15 @@ do
        fi
 done
 
+check_languages=
+for language in .. $all_languages
+do
+       if test $language != ".."
+       then
+               check_languages="$check_languages check-$language"
+       fi
+done
+
 # Since we can't use `::' targets, we link each language in
 # with a set of hooks, reached indirectly via lang.${target}.
 
@@ -6440,23 +7869,21 @@ do
        echo "lang.$t: $x" >> Make-hooks
 done
 
-# If we're not building in srcdir, create .gdbinit.
+# Create .gdbinit.
 
-if test ! -f Makefile.in; then
-       echo "dir ." > .gdbinit
-       echo "dir ${srcdir}" >> .gdbinit
-       if test x$gdb_needs_out_file_path = xyes
-       then
-               echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
-       fi
-       if test "x$subdirs" != x; then
-               for s in $subdirs
-               do
-                       echo "dir ${srcdir}/$s" >> .gdbinit
-               done
-       fi
-       echo "source ${srcdir}/.gdbinit" >> .gdbinit
+echo "dir ." > .gdbinit
+echo "dir ${srcdir}" >> .gdbinit
+if test x$gdb_needs_out_file_path = xyes
+then
+       echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
+fi
+if test "x$subdirs" != x; then
+       for s in $subdirs
+       do
+               echo "dir ${srcdir}/$s" >> .gdbinit
+       done
 fi
+echo "source ${srcdir}/gdbinit.in" >> .gdbinit
 
 # Define variables host_canonical and build_canonical
 # because some Cygnus local changes in the Makefile depend on them.
@@ -6464,7 +7891,7 @@ build_canonical=${build}
 host_canonical=${host}
 target_subdir=
 if test "${host}" != "${target}" ; then
-    target_subdir=${target}/
+    target_subdir=${target_alias}/
 fi
 
 
@@ -6507,6 +7934,31 @@ fi
 
 
 
+# Find a directory in which to install a shared libgcc.
+
+# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
+if test "${enable_version_specific_runtime_libs+set}" = set; then
+  enableval="$enable_version_specific_runtime_libs"
+  :
+fi
+
+
+# Check whether --with-slibdir or --without-slibdir was given.
+if test "${with_slibdir+set}" = set; then
+  withval="$with_slibdir"
+  slibdir="$with_slibdir"
+else
+  if test "${enable_version_specific_runtime_libs+set}" = set; then
+  slibdir='$(libsubdir)'
+elif test "$host" != "$target"; then
+  slibdir='$(build_tooldir)/lib'
+else
+  slibdir='$(libdir)'
+fi
+fi
+
+
+
 # Nothing to do for FLOAT_H, float_format already handled.
 objdir=`pwd`
 
@@ -6572,6 +8024,17 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
 
 
 
+
+
+
+
+
+
+
+
+
+
+
 # Echo that links are built
 if test x$host = x$target
 then
@@ -6740,7 +8203,7 @@ s%@includedir@%$includedir%g
 s%@oldincludedir@%$oldincludedir%g
 s%@infodir@%$infodir%g
 s%@mandir@%$mandir%g
-s%@maybe_cpplib@%$maybe_cpplib%g
+s%@enable_multilib@%$enable_multilib%g
 s%@enable_shared@%$enable_shared%g
 s%@host@%$host%g
 s%@host_alias@%$host_alias%g
@@ -6761,6 +8224,7 @@ s%@CC@%$CC%g
 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
 s%@strict1_warn@%$strict1_warn%g
+s%@CPP@%$CPP%g
 s%@warn_cflags@%$warn_cflags%g
 s%@stage1_cflags@%$stage1_cflags%g
 s%@SET_MAKE@%$SET_MAKE%g
@@ -6771,56 +8235,59 @@ s%@RANLIB@%$RANLIB%g
 s%@INSTALL@%$INSTALL%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@CPP@%$CPP%g
-s%@gnat@%$gnat%g
+s%@GNATBIND@%$GNATBIND%g
+s%@ADAC@%$ADAC%g
+s%@have_mktemp_command@%$have_mktemp_command%g
 s%@MAKEINFO@%$MAKEINFO%g
 s%@BUILD_INFO@%$BUILD_INFO%g
-s%@INSTALL_INFO@%$INSTALL_INFO%g
+s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
 s%@FLEX@%$FLEX%g
 s%@BISON@%$BISON%g
+s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
+s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
 s%@vfprintf@%$vfprintf%g
 s%@doprint@%$doprint%g
+s%@strstr@%$strstr%g
+s%@LIBICONV@%$LIBICONV%g
 s%@manext@%$manext%g
 s%@objext@%$objext%g
 s%@PACKAGE@%$PACKAGE%g
 s%@VERSION@%$VERSION%g
-s%@CHECK_PO@%$CHECK_PO%g
 s%@ALLOCA@%$ALLOCA%g
+s%@GLIBC21@%$GLIBC21%g
 s%@USE_NLS@%$USE_NLS%g
 s%@MSGFMT@%$MSGFMT%g
 s%@GMSGFMT@%$GMSGFMT%g
 s%@XGETTEXT@%$XGETTEXT%g
-s%@GENCAT@%$GENCAT%g
+s%@INTLBISON@%$INTLBISON%g
+s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
 s%@CATALOGS@%$CATALOGS%g
 s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
 s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
 s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLDEPS@%$INTLDEPS%g
 s%@INTLOBJS@%$INTLOBJS%g
 s%@POFILES@%$POFILES%g
 s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@GENCAT@%$GENCAT%g
 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
+s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
 s%@inhibit_libc@%$inhibit_libc%g
 s%@gthread_flags@%$gthread_flags%g
 s%@GGC@%$GGC%g
 s%@zlibdir@%$zlibdir%g
 s%@zlibinc@%$zlibinc%g
-s%@GXX_ABI_FLAG@%$GXX_ABI_FLAG%g
-s%@HAVE_LIBSTDCXX_V3@%$HAVE_LIBSTDCXX_V3%g
 s%@MAINT@%$MAINT%g
 s%@build_canonical@%$build_canonical%g
 s%@host_canonical@%$host_canonical%g
 s%@target_subdir@%$target_subdir%g
 s%@gcc_tooldir@%$gcc_tooldir%g
 s%@dollar@%$dollar%g
+s%@slibdir@%$slibdir%g
 s%@objdir@%$objdir%g
 s%@subdirs@%$subdirs%g
 s%@all_boot_languages@%$all_boot_languages%g
@@ -6834,6 +8301,9 @@ s%@all_stagestuff@%$all_stagestuff%g
 s%@build_exeext@%$build_exeext%g
 s%@build_install_headers_dir@%$build_install_headers_dir%g
 s%@build_xm_file_list@%$build_xm_file_list%g
+s%@build_xm_file@%$build_xm_file%g
+s%@build_xm_defines@%$build_xm_defines%g
+s%@check_languages@%$check_languages%g
 s%@cc_set_by_configure@%$cc_set_by_configure%g
 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
 s%@cpp_install_dir@%$cpp_install_dir%g
@@ -6848,18 +8318,20 @@ s%@extra_programs@%$extra_programs%g
 s%@float_h_file@%$float_h_file%g
 s%@gcc_config_arguments@%$gcc_config_arguments%g
 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
+s%@libstdcxx_incdir@%$libstdcxx_incdir%g
 s%@gcc_version@%$gcc_version%g
 s%@gcc_version_full@%$gcc_version_full%g
 s%@gcc_version_trigger@%$gcc_version_trigger%g
 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%@host_xm_file@%$host_xm_file%g
+s%@host_xm_defines@%$host_xm_defines%g
 s%@install@%$install%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
 s%@local_prefix@%$local_prefix%g
-s%@maybe_use_collect2@%$maybe_use_collect2%g
 s%@md_file@%$md_file%g
 s%@objc_boehm_gc@%$objc_boehm_gc%g
 s%@out_file@%$out_file%g
@@ -6868,7 +8340,14 @@ s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
 s%@symbolic_link@%$symbolic_link%g
 s%@thread_file@%$thread_file%g
 s%@tm_file_list@%$tm_file_list%g
-s%@will_use_collect2@%$will_use_collect2%g
+s%@tm_file@%$tm_file%g
+s%@tm_p_file_list@%$tm_p_file_list%g
+s%@tm_p_file@%$tm_p_file%g
+s%@xm_file@%$xm_file%g
+s%@xm_defines@%$xm_defines%g
+s%@c_target_objs@%$c_target_objs%g
+s%@cxx_target_objs@%$cxx_target_objs%g
+s%@target_cpu_default@%$target_cpu_default%g
 /@target_overrides@/r $target_overrides
 s%@target_overrides@%%g
 /@host_overrides@/r $host_overrides
@@ -7085,51 +8564,6 @@ cat >> $CONFIG_STATUS <<\EOF
 fi; done
 
 EOF
-
-cat >> $CONFIG_STATUS <<EOF
-ac_sources="$nls_cv_header_libgt"
-ac_dests="$nls_cv_header_intl"
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-srcdir=$ac_given_srcdir
-while test -n "$ac_sources"; do
-  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
-  set $ac_sources; ac_source=$1; shift; ac_sources=$*
-
-  echo "linking $srcdir/$ac_source to $ac_dest"
-
-  if test ! -r $srcdir/$ac_source; then
-    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
-  fi
-  rm -f $ac_dest
-
-  # Make relative symlinks.
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
-    # The dest file is in a subdirectory.
-    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
-    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dest_dir_suffix.
-    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dest_dir_suffix= ac_dots=
-  fi
-
-  case "$srcdir" in
-  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
-  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
-  esac
-
-  # Make a symlink if possible; otherwise try a hard link.
-  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
-    ln $srcdir/$ac_source $ac_dest; then :
-  else
-    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
-  fi
-done
-EOF
 cat >> $CONFIG_STATUS <<EOF
 
 
@@ -7168,9 +8602,35 @@ cpp_install_dir='${cpp_install_dir}'
 
 EOF
 cat >> $CONFIG_STATUS <<\EOF
-case "$CONFIG_FILES" in *po/Makefile.in*)
-        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac
+for ac_file in $CONFIG_FILES; do
+        # Support "outfile[:infile[:infile...]]"
+        case "$ac_file" in
+          *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+        esac
+        # PO directories have a Makefile.in generated from Makefile.in.in.
+        case "$ac_file" in */Makefile.in)
+          # Adjust a relative srcdir.
+          ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+          ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+          # In autoconf-2.13 it is called $ac_given_srcdir.
+          # In autoconf-2.50 it is called $srcdir.
+          test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+          case "$ac_given_srcdir" in
+            .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+            /*) top_srcdir="$ac_given_srcdir" ;;
+            *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+          esac
+          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+            rm -f "$ac_dir/POTFILES"
+            test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+            sed -e "/^#/d" -e "/^[     ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
+            test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          fi
+          ;;
+        esac
+      done
 
 case x$CONFIG_HEADERS in
 xauto-host.h:config.in)