]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - configure
ncurses 5.4
[ncurses.git] / configure
index c20c60f3ec2e5920babc1b53b6a740330d8727c5..c5383e392bedb948f64e9fa50c05c251605b0577 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.in Revision: 1.274 .
+# From configure.in Revision: 1.312 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.20011227.
+# Generated by Autoconf 2.52.20030208.
 #
 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
@@ -655,19 +655,21 @@ Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
 
+  --with-rel-version=XXX  override derived release version
+  --with-abi-version=XXX  override derived ABI version
   --with-system-type=XXX  test: override derived host system-type
-  --enable-add-ons=DIR... used to check if we are a glibc add-on.
-  --with-build-cc=XXX     if cross-compiling, the host C compiler (\$BUILD_CC)
-  --with-build-cflags=XXX if cross-compiling, the host C compiler-flags
-  --with-build-cppflags=XXX if cross-compiling, the host C preprocessor-flags
-  --with-build-ldflags=XXX if cross-compiling, the host linker-flags
-  --with-build-libs=XXX   if cross-compiling, the host libraries
   --without-cxx           do not adjust ncurses bool to match C++
   --without-cxx-binding   do not build C++ binding and demo
   --without-ada           suppress check for Ada95, don't build demo
   --without-progs         suppress build with programs (e.g., tic)
   --without-curses-h      install curses.h as ncurses.h only
-  --with-install-prefix   prefixes actual install-location (\$DESTDIR)
+  --with-install-prefix   prefixes actual install-location ($DESTDIR)
+Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
+  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
+  --with-build-cflags=XXX the build C compiler-flags
+  --with-build-cppflags=XXX the build C preprocessor-flags
+  --with-build-ldflags=XXX the build linker-flags
+  --with-build-libs=XXX   the build libraries
 Options to Specify the Libraries Built/Used:
   --with-libtool          generate libraries with libtool
   --with-shared           generate shared-libraries
@@ -678,6 +680,7 @@ Options to Specify the Libraries Built/Used:
   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
   --with-dmalloc          test: use Gray Watson's dmalloc library
   --with-gpm              use Alessandro Rubini's GPM library
+  --with-sysmouse         use sysmouse (FreeBSD console)
   --enable-rpath          use rpath option when generating shared libraries
   --with-shlib-version=X  Specify rel or abi version for shared libs
 Fine-Tuning Your Configuration:
@@ -692,6 +695,7 @@ Fine-Tuning Your Configuration:
   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
   --enable-getcap         fast termcap load, no xrefs to terminfo
   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
+  --disable-home-terminfo drop ~/.terminfo from terminfo search-path
   --enable-symlinks       make tic use symbolic links not hard links
   --enable-broken_linker  compile with broken-linker support code
   --with-bool=TYPE        override fallback type of bool variable
@@ -700,14 +704,15 @@ Fine-Tuning Your Configuration:
   --with-rcs-ids          compile-in RCS identifiers
 Options to Specify How Manpages are Installed:
   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
-                          optionally formatted, e.g., gzip,formatted
+                          optionally formatted/catonly, e.g., gzip,formatted
   --with-manpage-renames  specify manpage-renaming
-  --with-manpage-symlinks specify manpage-symlinks
+  --with-manpage-aliases  specify manpage-aliases using .so
+  --with-manpage-symlinks specify manpage-aliases using symlinks
   --with-manpage-tbl      specify manpage processing with tbl
 Extensions:
   --disable-ext-funcs     disable function-extensions
   --enable-const          compile with extra/non-standard const
-  --enable-no-padding     compile with \$NCURSES_NO_PADDING code
+  --enable-no-padding     compile with $NCURSES_NO_PADDING code
   --enable-sigwinch       compile with SIGWINCH handler
   --enable-tcap-names     compile with user-definable terminal capabilities
 Development Code:
@@ -718,7 +723,7 @@ Development Code:
 Experimental Code:
   --disable-assumed-color do not assume anything about default-colors
   --disable-hashmap       compile without hashmap scrolling-optimization
-  --enable-colorfgbg      compile with \$COLORFGBG code
+  --enable-colorfgbg      compile with $COLORFGBG code
   --enable-safe-sprintf   compile with experimental safe-sprintf code
   --disable-scroll-hints  compile without scroll-hints code
   --enable-widec          compile with experimental wide-char/UTF-8 code
@@ -730,6 +735,7 @@ Testing/development Options:
   --disable-leaks         test: suppress permanent memory-leaks
   --enable-expanded       test: generate functions for certain macros
   --disable-macros        test: use functions rather than macros
+  --with-trace            test: add trace() function to all models of ncurses
 Ada95 Binding Options:
   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
@@ -806,7 +812,7 @@ This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.52.20011227.  Invocation command line was
+generated by GNU Autoconf 2.52.20030208.  Invocation command line was
 
   $ $0 $@
 
@@ -930,7 +936,7 @@ if test -z "$CONFIG_SITE"; then
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
-    { echo "$as_me:933: loading site script $ac_site_file" >&5
+    { echo "$as_me:939: loading site script $ac_site_file" >&5
 echo "$as_me: loading site script $ac_site_file" >&6;}
     cat "$ac_site_file" >&5
     . "$ac_site_file"
@@ -941,7 +947,7 @@ if test -r "$cache_file"; then
   # Some versions of bash will fail to source /dev/null (special
   # files actually), so we avoid doing that.
   if test -f "$cache_file"; then
-    { echo "$as_me:944: loading cache $cache_file" >&5
+    { echo "$as_me:950: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -949,7 +955,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
     esac
   fi
 else
-  { echo "$as_me:952: creating cache $cache_file" >&5
+  { echo "$as_me:958: creating cache $cache_file" >&5
 echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
@@ -965,21 +971,21 @@ for ac_var in `(set) 2>&1 |
   eval ac_new_val="\$ac_env_${ac_var}_value"
   case $ac_old_set,$ac_new_set in
     set,)
-      { echo "$as_me:968: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+      { echo "$as_me:974: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,set)
-      { echo "$as_me:972: error: \`$ac_var' was not set in the previous run" >&5
+      { echo "$as_me:978: error: \`$ac_var' was not set in the previous run" >&5
 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
-        { echo "$as_me:978: error: \`$ac_var' has changed since the previous run:" >&5
+        { echo "$as_me:984: error: \`$ac_var' has changed since the previous run:" >&5
 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-        { echo "$as_me:980:   former value:  $ac_old_val" >&5
+        { echo "$as_me:986:   former value:  $ac_old_val" >&5
 echo "$as_me:   former value:  $ac_old_val" >&2;}
-        { echo "$as_me:982:   current value: $ac_new_val" >&5
+        { echo "$as_me:988:   current value: $ac_new_val" >&5
 echo "$as_me:   current value: $ac_new_val" >&2;}
         ac_cache_corrupted=:
       fi;;
@@ -998,9 +1004,9 @@ echo "$as_me:   current value: $ac_new_val" >&2;}
   fi
 done
 if $ac_cache_corrupted; then
-  { echo "$as_me:1001: error: changes in the environment can compromise the build" >&5
+  { echo "$as_me:1007: error: changes in the environment can compromise the build" >&5
 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:1003: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+  { { echo "$as_me:1009: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1020,10 +1026,10 @@ esac
 echo "#! $SHELL" >conftest.sh
 echo  "exit 0"   >>conftest.sh
 chmod +x conftest.sh
-if { (echo "$as_me:1023: PATH=\".;.\"; conftest.sh") >&5
+if { (echo "$as_me:1029: PATH=\".;.\"; conftest.sh") >&5
   (PATH=".;."; conftest.sh) 2>&5
   ac_status=$?
-  echo "$as_me:1026: \$? = $ac_status" >&5
+  echo "$as_me:1032: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   ac_path_separator=';'
 else
@@ -1040,9 +1046,80 @@ NCURSES_PATCH="`egrep '^NCURSES_PATCH[   ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]
 cf_cv_abi_version=${NCURSES_MAJOR}
 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
 cf_cv_timestamp=`date`
-echo "$as_me:1043: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
+echo "$as_me:1049: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
 
+test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
+
+# Check whether --with-rel-version or --without-rel-version was given.
+if test "${with_rel_version+set}" = set; then
+  withval="$with_rel_version"
+  { echo "$as_me:1057: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
+echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
+ cf_cv_rel_version=$withval
+fi;
+
+ NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
+ NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
+
+if test -n "$NCURSES_MAJOR" ; then
+  case $NCURSES_MAJOR in #(vi
+  [0-9]*) #(vi
+       ;;
+  *)
+       { { echo "$as_me:1070: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
+echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
+   { (exit 1); exit 1; }; }
+       ;;
+  esac
+else
+  { { echo "$as_me:1076: error: Release major-version value is empty" >&5
+echo "$as_me: error: Release major-version value is empty" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+if test -n "$NCURSES_MINOR" ; then
+  case $NCURSES_MINOR in #(vi
+  [0-9]*) #(vi
+       ;;
+  *)
+       { { echo "$as_me:1086: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
+echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
+   { (exit 1); exit 1; }; }
+       ;;
+  esac
+else
+  { { echo "$as_me:1092: error: Release minor-version value is empty" >&5
+echo "$as_me: error: Release minor-version value is empty" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
+
+# Check whether --with-abi-version or --without-abi-version was given.
+if test "${with_abi_version+set}" = set; then
+  withval="$with_abi_version"
+  { echo "$as_me:1102: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
+echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
+ cf_cv_abi_version=$withval
+fi;
+
+if test -n "$cf_cv_abi_version" ; then
+  case $cf_cv_abi_version in #(vi
+  [0-9]*) #(vi
+       ;;
+  *)
+       { { echo "$as_me:1112: error: ABI version is not a number: $cf_cv_abi_version" >&5
+echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
+   { (exit 1); exit 1; }; }
+       ;;
+  esac
+else
+  { { echo "$as_me:1118: error: ABI version value is empty" >&5
+echo "$as_me: error: ABI version value is empty" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   if test -f $ac_dir/install-sh; then
@@ -1060,7 +1137,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:1063: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+  { { echo "$as_me:1140: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1070,11 +1147,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
 # Make sure we can run config.sub.
 $ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:1073: error: cannot run $ac_config_sub" >&5
+  { { echo "$as_me:1150: error: cannot run $ac_config_sub" >&5
 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
    { (exit 1); exit 1; }; }
 
-echo "$as_me:1077: checking build system type" >&5
+echo "$as_me:1154: checking build system type" >&5
 echo $ECHO_N "checking build system type... $ECHO_C" >&6
 if test "${ac_cv_build+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1083,23 +1160,23 @@ else
 test -z "$ac_cv_build_alias" &&
   ac_cv_build_alias=`$ac_config_guess`
 test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:1086: error: cannot guess build type; you must specify one" >&5
+  { { echo "$as_me:1163: error: cannot guess build type; you must specify one" >&5
 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
    { (exit 1); exit 1; }; }
 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:1090: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+  { { echo "$as_me:1167: error: $ac_config_sub $ac_cv_build_alias failed." >&5
 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:1095: result: $ac_cv_build" >&5
+echo "$as_me:1172: result: $ac_cv_build" >&5
 echo "${ECHO_T}$ac_cv_build" >&6
 build=$ac_cv_build
 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
-echo "$as_me:1102: checking host system type" >&5
+echo "$as_me:1179: checking host system type" >&5
 echo $ECHO_N "checking host system type... $ECHO_C" >&6
 if test "${ac_cv_host+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1108,12 +1185,12 @@ else
 test -z "$ac_cv_host_alias" &&
   ac_cv_host_alias=$ac_cv_build_alias
 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-  { { echo "$as_me:1111: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+  { { echo "$as_me:1188: error: $ac_config_sub $ac_cv_host_alias failed" >&5
 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:1116: result: $ac_cv_host" >&5
+echo "$as_me:1193: result: $ac_cv_host" >&5
 echo "${ECHO_T}$ac_cv_host" >&6
 host=$ac_cv_host
 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -1121,7 +1198,7 @@ host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
 if test -f $srcdir/config.guess ; then
-       echo "$as_me:1124: checking target system type" >&5
+       echo "$as_me:1201: checking target system type" >&5
 echo $ECHO_N "checking target system type... $ECHO_C" >&6
 if test "${ac_cv_target+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1130,12 +1207,12 @@ else
 test "x$ac_cv_target_alias" = "x" &&
   ac_cv_target_alias=$ac_cv_host_alias
 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
-  { { echo "$as_me:1133: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+  { { echo "$as_me:1210: error: $ac_config_sub $ac_cv_target_alias failed" >&5
 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:1138: result: $ac_cv_target" >&5
+echo "$as_me:1215: result: $ac_cv_target" >&5
 echo "${ECHO_T}$ac_cv_target" >&6
 target=$ac_cv_target
 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -1166,13 +1243,13 @@ else
 fi
 
 test -z "$system_name" && system_name="$cf_cv_system_name"
-test -n "$cf_cv_system_name" && echo "$as_me:1169: result: Configuring for $cf_cv_system_name" >&5
+test -n "$cf_cv_system_name" && echo "$as_me:1246: result: Configuring for $cf_cv_system_name" >&5
 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
 
 if test ".$system_name" != ".$cf_cv_system_name" ; then
-       echo "$as_me:1173: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
+       echo "$as_me:1250: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
-       { { echo "$as_me:1175: error: \"Please remove config.cache and try again.\"" >&5
+       { { echo "$as_me:1252: error: \"Please remove config.cache and try again.\"" >&5
 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1180,62 +1257,33 @@ fi
 # Check whether --with-system-type or --without-system-type was given.
 if test "${with_system_type+set}" = set; then
   withval="$with_system_type"
-  { echo "$as_me:1183: WARNING: overriding system type to $withval" >&5
+  { echo "$as_me:1260: WARNING: overriding system type to $withval" >&5
 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
  cf_cv_system_name=$withval
 fi;
 
-# We need a configure script only when compiling as part of GNU C library.
-# Here we have to generate one of the files we need while compiling.
-#
-# The only problem is that users of the package might think they have to
-# run configure themself and find it irritating when nothing happens.
-#
-# So we try here to find out whether we are called from the glibc configure
-# or by a user.
-#
-
-# Check whether --enable-add-ons or --disable-add-ons was given.
-if test "${enable_add_ons+set}" = set; then
-  enableval="$enable_add_ons"
-  glibc_add_on=yes
-else
-  glibc_add_on=
-fi;
-
-if test x"$glibc_add_on" = "xyes" ; then
-  rm -f $srcdir/Banner
-  # We are in glibc.
-  rm -f $srcdir/Makefile
-  cp $srcdir/Makefile.glibc $srcdir/Makefile
-  echo "ncurses `grep \"^[     ]*ncurses-version[      ]*=.*$\" \
-               $srcdir/Makefile | sed -e \
-               's/^[   ]*ncurses-version[      ]*=[    ]*\([^  ^ ]*\)[         ]*$/\1/'`" > $srcdir/Banner
-  exit 0
-fi
-
 ###    Save the given $CFLAGS to allow user-override.
 cf_user_CFLAGS="$CFLAGS"
 
 ###    Default install-location
 
-echo "$as_me:1222: checking for prefix" >&5
+echo "$as_me:1270: checking for prefix" >&5
 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
 if test "x$prefix" = "xNONE" ; then
        case "$cf_cv_system_name" in
                # non-vendor systems don't have a conflict
-       openbsd*|netbsd*|freebsd*|linux*|cygwin*)
+       openbsd*|netbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
                prefix=/usr
                ;;
        *)      prefix=$ac_default_prefix
                ;;
        esac
 fi
-echo "$as_me:1234: result: $prefix" >&5
+echo "$as_me:1282: result: $prefix" >&5
 echo "${ECHO_T}$prefix" >&6
 
 if test "x$prefix" = "xNONE" ; then
-echo "$as_me:1238: checking for default include-directory" >&5
+echo "$as_me:1286: checking for default include-directory" >&5
 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
 test -n "$verbose" && echo 1>&6
 for cf_symbol in \
@@ -1258,7 +1306,7 @@ do
        fi
        test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
 done
-echo "$as_me:1261: result: $includedir" >&5
+echo "$as_me:1309: result: $includedir" >&5
 echo "${ECHO_T}$includedir" >&6
 fi
 
@@ -1271,7 +1319,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:1274: checking for $ac_word" >&5
+echo "$as_me:1322: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1286,7 +1334,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="${ac_tool_prefix}gcc"
-echo "$as_me:1289: found $ac_dir/$ac_word" >&5
+echo "$as_me:1337: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1294,10 +1342,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1297: result: $CC" >&5
+  echo "$as_me:1345: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1300: result: no" >&5
+  echo "$as_me:1348: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1306,7 +1354,7 @@ if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-echo "$as_me:1309: checking for $ac_word" >&5
+echo "$as_me:1357: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1321,7 +1369,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="gcc"
-echo "$as_me:1324: found $ac_dir/$ac_word" >&5
+echo "$as_me:1372: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1329,10 +1377,10 @@ fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1332: result: $ac_ct_CC" >&5
+  echo "$as_me:1380: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1335: result: no" >&5
+  echo "$as_me:1383: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1345,7 +1393,7 @@ if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:1348: checking for $ac_word" >&5
+echo "$as_me:1396: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1360,7 +1408,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="${ac_tool_prefix}cc"
-echo "$as_me:1363: found $ac_dir/$ac_word" >&5
+echo "$as_me:1411: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1368,10 +1416,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1371: result: $CC" >&5
+  echo "$as_me:1419: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1374: result: no" >&5
+  echo "$as_me:1422: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1380,7 +1428,7 @@ if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:1383: checking for $ac_word" >&5
+echo "$as_me:1431: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1395,7 +1443,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="cc"
-echo "$as_me:1398: found $ac_dir/$ac_word" >&5
+echo "$as_me:1446: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1403,10 +1451,10 @@ fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1406: result: $ac_ct_CC" >&5
+  echo "$as_me:1454: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1409: result: no" >&5
+  echo "$as_me:1457: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1419,7 +1467,7 @@ fi
 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 "$as_me:1422: checking for $ac_word" >&5
+echo "$as_me:1470: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1439,7 +1487,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
   continue
 fi
 ac_cv_prog_CC="cc"
-echo "$as_me:1442: found $ac_dir/$ac_word" >&5
+echo "$as_me:1490: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1461,10 +1509,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1464: result: $CC" >&5
+  echo "$as_me:1512: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1467: result: no" >&5
+  echo "$as_me:1515: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1475,7 +1523,7 @@ if test -z "$CC"; then
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:1478: checking for $ac_word" >&5
+echo "$as_me:1526: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1490,7 +1538,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-echo "$as_me:1493: found $ac_dir/$ac_word" >&5
+echo "$as_me:1541: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1498,10 +1546,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1501: result: $CC" >&5
+  echo "$as_me:1549: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1504: result: no" >&5
+  echo "$as_me:1552: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1514,7 +1562,7 @@ if test -z "$CC"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:1517: checking for $ac_word" >&5
+echo "$as_me:1565: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1529,7 +1577,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="$ac_prog"
-echo "$as_me:1532: found $ac_dir/$ac_word" >&5
+echo "$as_me:1580: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1537,10 +1585,10 @@ fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1540: result: $ac_ct_CC" >&5
+  echo "$as_me:1588: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1543: result: no" >&5
+  echo "$as_me:1591: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1552,32 +1600,32 @@ fi
 
 fi
 
-test -z "$CC" && { { echo "$as_me:1555: error: no acceptable cc found in \$PATH" >&5
+test -z "$CC" && { { echo "$as_me:1603: error: no acceptable cc found in \$PATH" >&5
 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
    { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
-echo "$as_me:1560:" \
+echo "$as_me:1608:" \
      "checking for C compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1563: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1611: \"$ac_compiler --version </dev/null >&5\"") >&5
   (eval $ac_compiler --version </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1566: \$? = $ac_status" >&5
+  echo "$as_me:1614: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1568: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1616: \"$ac_compiler -v </dev/null >&5\"") >&5
   (eval $ac_compiler -v </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1571: \$? = $ac_status" >&5
+  echo "$as_me:1619: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1573: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1621: \"$ac_compiler -V </dev/null >&5\"") >&5
   (eval $ac_compiler -V </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1576: \$? = $ac_status" >&5
+  echo "$as_me:1624: \$? = $ac_status" >&5
   (exit $ac_status); }
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 1580 "configure"
+#line 1628 "configure"
 #include "confdefs.h"
 
 int
@@ -1593,13 +1641,13 @@ ac_clean_files="$ac_clean_files a.out a.exe"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-echo "$as_me:1596: checking for C compiler default output" >&5
+echo "$as_me:1644: checking for C compiler default output" >&5
 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:1599: \"$ac_link_default\"") >&5
+if { (eval echo "$as_me:1647: \"$ac_link_default\"") >&5
   (eval $ac_link_default) 2>&5
   ac_status=$?
-  echo "$as_me:1602: \$? = $ac_status" >&5
+  echo "$as_me:1650: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   # Find the output, starting from the most likely.  This scheme is
 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
@@ -1622,34 +1670,34 @@ done
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-{ { echo "$as_me:1625: error: C compiler cannot create executables" >&5
+{ { echo "$as_me:1673: error: C compiler cannot create executables" >&5
 echo "$as_me: error: C compiler cannot create executables" >&2;}
    { (exit 77); exit 77; }; }
 fi
 
 ac_exeext=$ac_cv_exeext
-echo "$as_me:1631: result: $ac_file" >&5
+echo "$as_me:1679: result: $ac_file" >&5
 echo "${ECHO_T}$ac_file" >&6
 
 # Check the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:1636: checking whether the C compiler works" >&5
+echo "$as_me:1684: checking whether the C compiler works" >&5
 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
 # If not cross compiling, check that we can run a simple program.
 if test "$cross_compiling" != yes; then
   if { ac_try='./$ac_file'
-  { (eval echo "$as_me:1642: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1690: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1645: \$? = $ac_status" >&5
+  echo "$as_me:1693: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
        cross_compiling=yes
     else
-       { { echo "$as_me:1652: error: cannot run C compiled programs.
+       { { echo "$as_me:1700: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'." >&5
 echo "$as_me: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'." >&2;}
@@ -1657,24 +1705,24 @@ If you meant to cross compile, use \`--host'." >&2;}
     fi
   fi
 fi
-echo "$as_me:1660: result: yes" >&5
+echo "$as_me:1708: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 rm -f a.out a.exe conftest$ac_cv_exeext
 ac_clean_files=$ac_clean_files_save
 # Check the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:1667: checking whether we are cross compiling" >&5
+echo "$as_me:1715: checking whether we are cross compiling" >&5
 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:1669: result: $cross_compiling" >&5
+echo "$as_me:1717: result: $cross_compiling" >&5
 echo "${ECHO_T}$cross_compiling" >&6
 
-echo "$as_me:1672: checking for executable suffix" >&5
+echo "$as_me:1720: checking for executable suffix" >&5
 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
-if { (eval echo "$as_me:1674: \"$ac_link\"") >&5
+if { (eval echo "$as_me:1722: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:1677: \$? = $ac_status" >&5
+  echo "$as_me:1725: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   # If both `conftest.exe' and `conftest' are `present' (well, observable)
 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
@@ -1690,25 +1738,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
   esac
 done
 else
-  { { echo "$as_me:1693: error: cannot compute EXEEXT: cannot compile and link" >&5
+  { { echo "$as_me:1741: error: cannot compute EXEEXT: cannot compile and link" >&5
 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 rm -f conftest$ac_cv_exeext
-echo "$as_me:1699: result: $ac_cv_exeext" >&5
+echo "$as_me:1747: result: $ac_cv_exeext" >&5
 echo "${ECHO_T}$ac_cv_exeext" >&6
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-echo "$as_me:1705: checking for object suffix" >&5
+echo "$as_me:1753: checking for object suffix" >&5
 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
 if test "${ac_cv_objext+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1711 "configure"
+#line 1759 "configure"
 #include "confdefs.h"
 
 int
@@ -1720,10 +1768,10 @@ main ()
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1723: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1771: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1726: \$? = $ac_status" >&5
+  echo "$as_me:1774: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
   case $ac_file in
@@ -1735,24 +1783,24 @@ done
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-{ { echo "$as_me:1738: error: cannot compute OBJEXT: cannot compile" >&5
+{ { echo "$as_me:1786: error: cannot compute OBJEXT: cannot compile" >&5
 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-echo "$as_me:1745: result: $ac_cv_objext" >&5
+echo "$as_me:1793: result: $ac_cv_objext" >&5
 echo "${ECHO_T}$ac_cv_objext" >&6
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-echo "$as_me:1749: checking whether we are using the GNU C compiler" >&5
+echo "$as_me:1797: checking whether we are using the GNU C compiler" >&5
 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
 if test "${ac_cv_c_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1755 "configure"
+#line 1803 "configure"
 #include "confdefs.h"
 
 int
@@ -1767,16 +1815,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1770: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1818: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1773: \$? = $ac_status" >&5
+  echo "$as_me:1821: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1776: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1824: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1779: \$? = $ac_status" >&5
+  echo "$as_me:1827: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_compiler_gnu=yes
 else
@@ -1788,19 +1836,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:1791: result: $ac_cv_c_compiler_gnu" >&5
+echo "$as_me:1839: result: $ac_cv_c_compiler_gnu" >&5
 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
 GCC=`test $ac_compiler_gnu = yes && echo yes`
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 CFLAGS="-g"
-echo "$as_me:1797: checking whether $CC accepts -g" >&5
+echo "$as_me:1845: checking whether $CC accepts -g" >&5
 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
 if test "${ac_cv_prog_cc_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1803 "configure"
+#line 1851 "configure"
 #include "confdefs.h"
 
 int
@@ -1812,16 +1860,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1815: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1863: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1818: \$? = $ac_status" >&5
+  echo "$as_me:1866: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1821: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1869: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1824: \$? = $ac_status" >&5
+  echo "$as_me:1872: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cc_g=yes
 else
@@ -1831,7 +1879,7 @@ ac_cv_prog_cc_g=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:1834: result: $ac_cv_prog_cc_g" >&5
+echo "$as_me:1882: result: $ac_cv_prog_cc_g" >&5
 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
@@ -1858,16 +1906,16 @@ cat >conftest.$ac_ext <<_ACEOF
 #endif
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1861: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1909: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1864: \$? = $ac_status" >&5
+  echo "$as_me:1912: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1867: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1915: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1870: \$? = $ac_status" >&5
+  echo "$as_me:1918: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   for ac_declaration in \
    ''\
@@ -1879,7 +1927,7 @@ if { (eval echo "$as_me:1861: \"$ac_compile\"") >&5
    'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
-#line 1882 "configure"
+#line 1930 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 $ac_declaration
@@ -1892,16 +1940,16 @@ exit (42);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1943: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1898: \$? = $ac_status" >&5
+  echo "$as_me:1946: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1901: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1949: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1904: \$? = $ac_status" >&5
+  echo "$as_me:1952: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -1911,7 +1959,7 @@ continue
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 1914 "configure"
+#line 1962 "configure"
 #include "confdefs.h"
 $ac_declaration
 int
@@ -1923,16 +1971,16 @@ exit (42);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1926: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1974: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1929: \$? = $ac_status" >&5
+  echo "$as_me:1977: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1932: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1980: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1935: \$? = $ac_status" >&5
+  echo "$as_me:1983: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -1961,98 +2009,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 GCC_VERSION=none
 if test "$GCC" = yes ; then
-       echo "$as_me:1964: checking version of gcc" >&5
-echo $ECHO_N "checking version of gcc... $ECHO_C" >&6
-       GCC_VERSION="`${CC} --version|head -1`"
-       echo "$as_me:1967: result: $GCC_VERSION" >&5
+       echo "$as_me:2012: checking version of $CC" >&5
+echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
+       GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
+       test -z "$GCC_VERSION" && GCC_VERSION=unknown
+       echo "$as_me:2016: result: $GCC_VERSION" >&5
 echo "${ECHO_T}$GCC_VERSION" >&6
 fi
 
-# If we're cross-compiling, allow the user to override the tools and their
-# options.  The configure script is oriented toward identifying the target
-# compiler, etc., but we need a host compiler to generate parts of the source.
-BUILD_CC='$(CC)'
-BUILD_CFLAGS='$(CFLAGS)'
-BUILD_CPPFLAGS='$(CPPFLAGS)'
-BUILD_LDFLAGS='$(LDFLAGS)'
-BUILD_LIBS='$(LIBS)'
-if test "$host_alias" != "$target_alias" ; then
-
-# Check whether --with-build-cc or --without-build-cc was given.
-if test "${with_build_cc+set}" = set; then
-  withval="$with_build_cc"
-  BUILD_CC="$withval"
-else
-  for ac_prog in $CC gcc cc
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:1990: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_BUILD_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$BUILD_CC"; then
-  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
-else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_BUILD_CC="$ac_prog"
-echo "$as_me:2005: found $ac_dir/$ac_word" >&5
-break
-done
-
-fi
-fi
-BUILD_CC=$ac_cv_prog_BUILD_CC
-if test -n "$BUILD_CC"; then
-  echo "$as_me:2013: result: $BUILD_CC" >&5
-echo "${ECHO_T}$BUILD_CC" >&6
-else
-  echo "$as_me:2016: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$BUILD_CC" && break
-done
-
-fi;
-
-# Check whether --with-build-cflags or --without-build-cflags was given.
-if test "${with_build_cflags+set}" = set; then
-  withval="$with_build_cflags"
-  BUILD_CFLAGS="$withval"
-fi;
-
-# Check whether --with-build-cppflags or --without-build-cppflags was given.
-if test "${with_build_cppflags+set}" = set; then
-  withval="$with_build_cppflags"
-  BUILD_CPPFLAGS="$withval"
-fi;
-
-# Check whether --with-build-ldflags or --without-build-ldflags was given.
-if test "${with_build_ldflags+set}" = set; then
-  withval="$with_build_ldflags"
-  BUILD_LDFLAGS="$withval"
-fi;
-
-# Check whether --with-build-libs or --without-build-libs was given.
-if test "${with_build_libs+set}" = set; then
-  withval="$with_build_libs"
-  BUILD_LIBS="$withval"
-fi;
-fi
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:2055: checking how to run the C preprocessor" >&5
+echo "$as_me:2025: checking how to run the C preprocessor" >&5
 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
@@ -2073,18 +2043,18 @@ do
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2076 "configure"
+#line 2046 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:2081: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2051: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2087: \$? = $ac_status" >&5
+  echo "$as_me:2057: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2107,17 +2077,17 @@ rm -f conftest.err conftest.$ac_ext
   # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2110 "configure"
+#line 2080 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:2114: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2084: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2120: \$? = $ac_status" >&5
+  echo "$as_me:2090: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2154,7 +2124,7 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-echo "$as_me:2157: result: $CPP" >&5
+echo "$as_me:2127: result: $CPP" >&5
 echo "${ECHO_T}$CPP" >&6
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
@@ -2164,18 +2134,18 @@ do
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2167 "configure"
+#line 2137 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:2172: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2142: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2178: \$? = $ac_status" >&5
+  echo "$as_me:2148: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2198,17 +2168,17 @@ rm -f conftest.err conftest.$ac_ext
   # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2201 "configure"
+#line 2171 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:2205: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2175: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2211: \$? = $ac_status" >&5
+  echo "$as_me:2181: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2236,7 +2206,7 @@ rm -f conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then
   :
 else
-  { { echo "$as_me:2239: error: C preprocessor \"$CPP\" fails sanity check" >&5
+  { { echo "$as_me:2209: error: C preprocessor \"$CPP\" fails sanity check" >&5
 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -2248,17 +2218,17 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 if test $ac_cv_c_compiler_gnu = yes; then
-    echo "$as_me:2251: checking whether $CC needs -traditional" >&5
+    echo "$as_me:2221: checking whether $CC needs -traditional" >&5
 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
     ac_pattern="Autoconf.*'x'"
   cat >conftest.$ac_ext <<_ACEOF
-#line 2258 "configure"
+#line 2228 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
-Autoconf TIOCGETP
+int Autoconf = TIOCGETP;
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "$ac_pattern" >/dev/null 2>&1; then
@@ -2270,10 +2240,10 @@ rm -f conftest*
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat >conftest.$ac_ext <<_ACEOF
-#line 2273 "configure"
+#line 2243 "configure"
 #include "confdefs.h"
 #include <termio.h>
-Autoconf TCGETA
+int Autoconf = TCGETA;
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "$ac_pattern" >/dev/null 2>&1; then
@@ -2283,19 +2253,19 @@ rm -f conftest*
 
   fi
 fi
-echo "$as_me:2286: result: $ac_cv_prog_gcc_traditional" >&5
+echo "$as_me:2256: result: $ac_cv_prog_gcc_traditional" >&5
 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
   if test $ac_cv_prog_gcc_traditional = yes; then
     CC="$CC -traditional"
   fi
 fi
 
-echo "$as_me:2293: checking for POSIXized ISC" >&5
+echo "$as_me:2263: checking for POSIXized ISC" >&5
 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
 if test -d /etc/conf/kconfig.d &&
    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
 then
-  echo "$as_me:2298: result: yes" >&5
+  echo "$as_me:2268: result: yes" >&5
 echo "${ECHO_T}yes" >&6
   ISC=yes # If later tests want to check for ISC.
 
@@ -2309,12 +2279,12 @@ EOF
     CC="$CC -Xp"
   fi
 else
-  echo "$as_me:2312: result: no" >&5
+  echo "$as_me:2282: result: no" >&5
 echo "${ECHO_T}no" >&6
   ISC=
 fi
 
-echo "$as_me:2317: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "$as_me:2287: checking for ${CC-cc} option to accept ANSI C" >&5
 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
 if test "${cf_cv_ansi_cc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2366,11 +2336,11 @@ fi
 
 if test -n "$cf_new_cppflags" ; then
 
-       CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+       CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
 fi
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 2373 "configure"
+#line 2343 "configure"
 #include "confdefs.h"
 
 #ifndef CC_HAS_PROTOS
@@ -2391,16 +2361,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2394: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2364: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2397: \$? = $ac_status" >&5
+  echo "$as_me:2367: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2400: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2370: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2403: \$? = $ac_status" >&5
+  echo "$as_me:2373: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ansi_cc="$cf_arg"; break
 else
@@ -2413,7 +2383,7 @@ CFLAGS="$cf_save_CFLAGS"
 CPPFLAGS="$cf_save_CPPFLAGS"
 
 fi
-echo "$as_me:2416: result: $cf_cv_ansi_cc" >&5
+echo "$as_me:2386: result: $cf_cv_ansi_cc" >&5
 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
 
 if test "$cf_cv_ansi_cc" != "no"; then
@@ -2446,7 +2416,7 @@ fi
 
 if test -n "$cf_new_cppflags" ; then
 
-       CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+       CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
 fi
 
 else
@@ -2458,7 +2428,7 @@ fi
 fi
 
 if test "$cf_cv_ansi_cc" = "no"; then
-       { { echo "$as_me:2461: error: Your compiler does not appear to recognize prototypes.
+       { { echo "$as_me:2431: error: Your compiler does not appear to recognize prototypes.
 You have the following choices:
        a. adjust your compiler options
        b. get an up-to-date compiler
@@ -2471,33 +2441,34 @@ You have the following choices:
    { (exit 1); exit 1; }; }
 fi
 
-PROG_EXT=
 case $cf_cv_system_name in
 os2*)
-    # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
     CFLAGS="$CFLAGS -Zmt"
     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
     CXXFLAGS="$CXXFLAGS -Zmt"
-    LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
-    PROG_EXT=".exe"
-    ;;
-cygwin*)
-    PROG_EXT=".exe"
+    # autoconf's macro sets -Zexe and suffix both, which conflict:w
+    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
+    ac_cv_exeext=.exe
     ;;
 esac
 
+PROG_EXT="$EXEEXT"
+
 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
 #define PROG_EXT "$PROG_EXT"
 EOF
 
-case "$cf_cv_system_name" in
+if test "$cross_compiling" = yes ; then
+  LDCONFIG=:
+else
+case "$cf_cv_system_name" in #(vi
 freebsd*) #(vi
   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
   ;;
 *) LDPATH=$PATH:/sbin:/usr/sbin
   # Extract the first word of "ldconfig", so it can be a program name with args.
 set dummy ldconfig; ac_word=$2
-echo "$as_me:2500: checking for $ac_word" >&5
+echo "$as_me:2471: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_LDCONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2514,7 +2485,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
-   echo "$as_me:2517: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2488: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -2525,17 +2496,18 @@ fi
 LDCONFIG=$ac_cv_path_LDCONFIG
 
 if test -n "$LDCONFIG"; then
-  echo "$as_me:2528: result: $LDCONFIG" >&5
+  echo "$as_me:2499: result: $LDCONFIG" >&5
 echo "${ECHO_T}$LDCONFIG" >&6
 else
-  echo "$as_me:2531: result: no" >&5
+  echo "$as_me:2502: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
   ;;
 esac
+fi
 
-echo "$as_me:2538: checking if you want to ensure bool is consistent with C++" >&5
+echo "$as_me:2510: checking if you want to ensure bool is consistent with C++" >&5
 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
 
 # Check whether --with-cxx or --without-cxx was given.
@@ -2545,12 +2517,13 @@ if test "${with_cxx+set}" = set; then
 else
   cf_with_cxx=yes
 fi;
-echo "$as_me:2548: result: $cf_with_cxx" >&5
+echo "$as_me:2520: result: $cf_with_cxx" >&5
 echo "${ECHO_T}$cf_with_cxx" >&6
 if test "X$cf_with_cxx" = Xno ; then
        CXX=""
        GXX=""
 else
+       # with autoconf 2.13, we can change the error to a warning:
                ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2561,7 +2534,7 @@ if test -n "$ac_tool_prefix"; then
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:2564: checking for $ac_word" >&5
+echo "$as_me:2537: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2576,7 +2549,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-echo "$as_me:2579: found $ac_dir/$ac_word" >&5
+echo "$as_me:2552: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2584,10 +2557,10 @@ fi
 fi
 CXX=$ac_cv_prog_CXX
 if test -n "$CXX"; then
-  echo "$as_me:2587: result: $CXX" >&5
+  echo "$as_me:2560: result: $CXX" >&5
 echo "${ECHO_T}$CXX" >&6
 else
-  echo "$as_me:2590: result: no" >&5
+  echo "$as_me:2563: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2600,7 +2573,7 @@ if test -z "$CXX"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:2603: checking for $ac_word" >&5
+echo "$as_me:2576: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2615,7 +2588,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CXX="$ac_prog"
-echo "$as_me:2618: found $ac_dir/$ac_word" >&5
+echo "$as_me:2591: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2623,10 +2596,10 @@ fi
 fi
 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
 if test -n "$ac_ct_CXX"; then
-  echo "$as_me:2626: result: $ac_ct_CXX" >&5
+  echo "$as_me:2599: result: $ac_ct_CXX" >&5
 echo "${ECHO_T}$ac_ct_CXX" >&6
 else
-  echo "$as_me:2629: result: no" >&5
+  echo "$as_me:2602: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2638,32 +2611,32 @@ test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
 fi
 
 # Provide some information about the compiler.
-echo "$as_me:2641:" \
+echo "$as_me:2614:" \
      "checking for C++ compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:2644: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:2617: \"$ac_compiler --version </dev/null >&5\"") >&5
   (eval $ac_compiler --version </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:2647: \$? = $ac_status" >&5
+  echo "$as_me:2620: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:2649: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:2622: \"$ac_compiler -v </dev/null >&5\"") >&5
   (eval $ac_compiler -v </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:2652: \$? = $ac_status" >&5
+  echo "$as_me:2625: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:2654: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:2627: \"$ac_compiler -V </dev/null >&5\"") >&5
   (eval $ac_compiler -V </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:2657: \$? = $ac_status" >&5
+  echo "$as_me:2630: \$? = $ac_status" >&5
   (exit $ac_status); }
 
-echo "$as_me:2660: checking whether we are using the GNU C++ compiler" >&5
+echo "$as_me:2633: checking whether we are using the GNU C++ compiler" >&5
 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 2666 "configure"
+#line 2639 "configure"
 #include "confdefs.h"
 
 int
@@ -2678,16 +2651,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2681: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2654: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2684: \$? = $ac_status" >&5
+  echo "$as_me:2657: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2687: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2660: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2690: \$? = $ac_status" >&5
+  echo "$as_me:2663: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_compiler_gnu=yes
 else
@@ -2699,19 +2672,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:2702: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "$as_me:2675: result: $ac_cv_cxx_compiler_gnu" >&5
 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
 GXX=`test $ac_compiler_gnu = yes && echo yes`
 ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="-g"
-echo "$as_me:2708: checking whether $CXX accepts -g" >&5
+echo "$as_me:2681: checking whether $CXX accepts -g" >&5
 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
 if test "${ac_cv_prog_cxx_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 2714 "configure"
+#line 2687 "configure"
 #include "confdefs.h"
 
 int
@@ -2723,16 +2696,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2726: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2699: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2729: \$? = $ac_status" >&5
+  echo "$as_me:2702: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2732: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2705: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2735: \$? = $ac_status" >&5
+  echo "$as_me:2708: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cxx_g=yes
 else
@@ -2742,7 +2715,7 @@ ac_cv_prog_cxx_g=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:2745: result: $ac_cv_prog_cxx_g" >&5
+echo "$as_me:2718: result: $ac_cv_prog_cxx_g" >&5
 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
 if test "$ac_test_CXXFLAGS" = set; then
   CXXFLAGS=$ac_save_CXXFLAGS
@@ -2769,7 +2742,7 @@ for ac_declaration in \
    'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
-#line 2772 "configure"
+#line 2745 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 $ac_declaration
@@ -2782,16 +2755,16 @@ exit (42);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2785: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2758: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2788: \$? = $ac_status" >&5
+  echo "$as_me:2761: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2791: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2764: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2794: \$? = $ac_status" >&5
+  echo "$as_me:2767: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -2801,7 +2774,7 @@ continue
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 2804 "configure"
+#line 2777 "configure"
 #include "confdefs.h"
 $ac_declaration
 int
@@ -2813,16 +2786,16 @@ exit (42);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2816: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2789: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2819: \$? = $ac_status" >&5
+  echo "$as_me:2792: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2822: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2795: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2825: \$? = $ac_status" >&5
+  echo "$as_me:2798: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -2844,26 +2817,72 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+               # autoconf 2.5x removed the error - by hardcoding it to g++.
+       if test "$CXX" = "g++" ; then
+               # Extract the first word of "g++", so it can be a program name with args.
+set dummy g++; ac_word=$2
+echo "$as_me:2824: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $CXX in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
+  ;;
+  *)
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  if $as_executable_p "$ac_dir/$ac_word"; then
+   ac_cv_path_CXX="$ac_dir/$ac_word"
+   echo "$as_me:2841: found $ac_dir/$ac_word" >&5
+   break
+fi
+done
+
+  ;;
+esac
+fi
+CXX=$ac_cv_path_CXX
+
+if test -n "$CXX"; then
+  echo "$as_me:2852: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:2855: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
        fi
+       if test "$CXX" = "g++" ; then
+               { echo "$as_me:2861: WARNING: ignoring hardcoded g++" >&5
+echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
+               cf_with_cxx=no; CXX=""; GXX="";
+       fi
+fi
 
 GXX_VERSION=none
 if test "$GXX" = yes; then
-       echo "$as_me:2851: checking version of g++" >&5
+       echo "$as_me:2869: checking version of g++" >&5
 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
-       GXX_VERSION="`${CXX-g++} --version|head -1`"
-       echo "$as_me:2854: result: $GXX_VERSION" >&5
+       GXX_VERSION="`${CXX-g++} --version|sed -e '2,$d'`"
+       echo "$as_me:2872: result: $GXX_VERSION" >&5
 echo "${ECHO_T}$GXX_VERSION" >&6
-       case $GXX_VERSION in
-       1*|2.[0-6]*)
-               GXX=""; CXX=""; ac_cv_cxx_compiler_gnu=no
-               cf_cxx_library=no
-               { echo "$as_me:2860: WARNING: templates do not work" >&5
-echo "$as_me: WARNING: templates do not work" >&2;}
-               ;;
-       esac
 fi
 
-echo "$as_me:2866: checking if you want to build C++ binding and demo" >&5
+case $GXX_VERSION in
+1*|2.[0-6]*)
+       GXX=""; CXX=""; ac_cv_cxx_compiler_gnu=no
+       cf_cxx_library=no
+       { echo "$as_me:2880: WARNING: templates do not work" >&5
+echo "$as_me: WARNING: templates do not work" >&2;}
+       ;;
+esac
+
+echo "$as_me:2885: checking if you want to build C++ binding and demo" >&5
 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
 
 # Check whether --with-cxx-binding or --without-cxx-binding was given.
@@ -2873,10 +2892,10 @@ if test "${with_cxx_binding+set}" = set; then
 else
   cf_with_cxx_binding=$cf_with_cxx
 fi;
-echo "$as_me:2876: result: $cf_with_cxx_binding" >&5
+echo "$as_me:2895: result: $cf_with_cxx_binding" >&5
 echo "${ECHO_T}$cf_with_cxx_binding" >&6
 
-echo "$as_me:2879: checking if you want to build with Ada95" >&5
+echo "$as_me:2898: checking if you want to build with Ada95" >&5
 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
 
 # Check whether --with-ada or --without-ada was given.
@@ -2886,10 +2905,10 @@ if test "${with_ada+set}" = set; then
 else
   cf_with_ada=yes
 fi;
-echo "$as_me:2889: result: $cf_with_ada" >&5
+echo "$as_me:2908: result: $cf_with_ada" >&5
 echo "${ECHO_T}$cf_with_ada" >&6
 
-echo "$as_me:2892: checking if you want to build programs such as tic" >&5
+echo "$as_me:2911: checking if you want to build programs such as tic" >&5
 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
 
 # Check whether --with-progs or --without-progs was given.
@@ -2899,10 +2918,10 @@ if test "${with_progs+set}" = set; then
 else
   cf_with_progs=yes
 fi;
-echo "$as_me:2902: result: $cf_with_progs" >&5
+echo "$as_me:2921: result: $cf_with_progs" >&5
 echo "${ECHO_T}$cf_with_progs" >&6
 
-echo "$as_me:2905: checking if you wish to install curses.h" >&5
+echo "$as_me:2924: checking if you wish to install curses.h" >&5
 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
 
 # Check whether --with-curses-h or --without-curses-h was given.
@@ -2912,7 +2931,7 @@ if test "${with_curses_h+set}" = set; then
 else
   with_curses_h=yes
 fi;
-echo "$as_me:2915: result: $with_curses_h" >&5
+echo "$as_me:2934: result: $with_curses_h" >&5
 echo "${ECHO_T}$with_curses_h" >&6
 
 modules_to_build="ncurses"
@@ -2938,7 +2957,7 @@ 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 "$as_me:2941: checking for $ac_word" >&5
+echo "$as_me:2960: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_AWK+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2953,7 +2972,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_AWK="$ac_prog"
-echo "$as_me:2956: found $ac_dir/$ac_word" >&5
+echo "$as_me:2975: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2961,17 +2980,17 @@ fi
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  echo "$as_me:2964: result: $AWK" >&5
+  echo "$as_me:2983: result: $AWK" >&5
 echo "${ECHO_T}$AWK" >&6
 else
-  echo "$as_me:2967: result: no" >&5
+  echo "$as_me:2986: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
   test -n "$AWK" && break
 done
 
-echo "$as_me:2974: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "$as_me:2993: checking whether ${MAKE-make} sets \${MAKE}" >&5
 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
@@ -2991,11 +3010,11 @@ fi
 rm -f conftest.make
 fi
 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:2994: result: yes" >&5
+  echo "$as_me:3013: result: yes" >&5
 echo "${ECHO_T}yes" >&6
   SET_MAKE=
 else
-  echo "$as_me:2998: result: no" >&5
+  echo "$as_me:3017: result: no" >&5
 echo "${ECHO_T}no" >&6
   SET_MAKE="MAKE=${MAKE-make}"
 fi
@@ -3012,7 +3031,7 @@ fi
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:3015: checking for a BSD compatible install" >&5
+echo "$as_me:3034: checking for a BSD compatible install" >&5
 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
@@ -3061,7 +3080,7 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-echo "$as_me:3064: result: $INSTALL" >&5
+echo "$as_me:3083: result: $INSTALL" >&5
 echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -3076,13 +3095,13 @@ case $INSTALL in
 /*)
   ;;
 *)
-  cf_dir=`echo $INSTALL | sed -e 's:/[^/]*$::'`
+  cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
   test -z "$cf_dir" && cf_dir=.
-  INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's:^.*/::'`
+  INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
   ;;
 esac
 
-echo "$as_me:3085: checking for long file names" >&5
+echo "$as_me:3104: checking for long file names" >&5
 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
 if test "${ac_cv_sys_long_file_names+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3121,7 +3140,7 @@ for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
   rm -rf $ac_xdir 2>/dev/null
 done
 fi
-echo "$as_me:3124: result: $ac_cv_sys_long_file_names" >&5
+echo "$as_me:3143: result: $ac_cv_sys_long_file_names" >&5
 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
 if test $ac_cv_sys_long_file_names = yes; then
 
@@ -3131,12 +3150,22 @@ EOF
 
 fi
 
-echo "$as_me:3134: checking if filesystem supports mixed-case filenames" >&5
+echo "$as_me:3153: checking if filesystem supports mixed-case filenames" >&5
 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
 if test "${cf_cv_mixedcase+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
+if test "$cross_compiling" = yes ; then
+       case $target_alias in #(vi
+       *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
+               cf_cv_mixedcase=no
+               ;;
+       *)
+               cf_cv_mixedcase=yes
+               ;;
+       esac
+else
        rm -f conftest CONFTEST
        echo test >conftest
        if test -f CONFTEST ; then
@@ -3145,102 +3174,29 @@ else
                cf_cv_mixedcase=yes
        fi
        rm -f conftest CONFTEST
+fi
 
 fi
-echo "$as_me:3150: result: $cf_cv_mixedcase" >&5
+echo "$as_me:3180: result: $cf_cv_mixedcase" >&5
 echo "${ECHO_T}$cf_cv_mixedcase" >&6
 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
 #define MIXEDCASE_FILENAMES 1
 EOF
 
-echo "$as_me:3156: checking whether ln -s works" >&5
+echo "$as_me:3186: checking whether ln -s works" >&5
 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
 LN_S=$as_ln_s
 if test "$LN_S" = "ln -s"; then
-  echo "$as_me:3160: result: yes" >&5
+  echo "$as_me:3190: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
-  echo "$as_me:3163: result: no, using $LN_S" >&5
+  echo "$as_me:3193: result: no, using $LN_S" >&5
 echo "${ECHO_T}no, using $LN_S" >&6
 fi
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:3170: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-echo "$as_me:3185: found $ac_dir/$ac_word" >&5
-break
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  echo "$as_me:3193: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
-  echo "$as_me:3196: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:3205: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-  ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
-  IFS=$ac_save_IFS
-  test -z "$ac_dir" && ac_dir=.
-  $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_ac_ct_RANLIB="ranlib"
-echo "$as_me:3220: found $ac_dir/$ac_word" >&5
-break
-done
-
-  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  echo "$as_me:3229: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
-  echo "$as_me:3232: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  RANLIB=$ac_ct_RANLIB
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
 # Extract the first word of "ctags", so it can be a program name with args.
 set dummy ctags; ac_word=$2
-echo "$as_me:3243: checking for $ac_word" >&5
+echo "$as_me:3199: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3255,7 +3211,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_MAKE_LOWER_TAGS="yes"
-echo "$as_me:3258: found $ac_dir/$ac_word" >&5
+echo "$as_me:3214: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3264,17 +3220,17 @@ fi
 fi
 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
 if test -n "$MAKE_LOWER_TAGS"; then
-  echo "$as_me:3267: result: $MAKE_LOWER_TAGS" >&5
+  echo "$as_me:3223: result: $MAKE_LOWER_TAGS" >&5
 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
 else
-  echo "$as_me:3270: result: no" >&5
+  echo "$as_me:3226: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 if test "$cf_cv_mixedcase" = yes ; then
        # Extract the first word of "etags", so it can be a program name with args.
 set dummy etags; ac_word=$2
-echo "$as_me:3277: checking for $ac_word" >&5
+echo "$as_me:3233: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3289,7 +3245,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_MAKE_UPPER_TAGS="yes"
-echo "$as_me:3292: found $ac_dir/$ac_word" >&5
+echo "$as_me:3248: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3298,10 +3254,10 @@ fi
 fi
 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
 if test -n "$MAKE_UPPER_TAGS"; then
-  echo "$as_me:3301: result: $MAKE_UPPER_TAGS" >&5
+  echo "$as_me:3257: result: $MAKE_UPPER_TAGS" >&5
 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
 else
-  echo "$as_me:3304: result: no" >&5
+  echo "$as_me:3260: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3325,7 +3281,7 @@ for ac_prog in tdlint lint alint
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:3328: checking for $ac_word" >&5
+echo "$as_me:3284: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_LINT+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3340,7 +3296,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_LINT="$ac_prog"
-echo "$as_me:3343: found $ac_dir/$ac_word" >&5
+echo "$as_me:3299: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -3348,10 +3304,10 @@ fi
 fi
 LINT=$ac_cv_prog_LINT
 if test -n "$LINT"; then
-  echo "$as_me:3351: result: $LINT" >&5
+  echo "$as_me:3307: result: $LINT" >&5
 echo "${ECHO_T}$LINT" >&6
 else
-  echo "$as_me:3354: result: no" >&5
+  echo "$as_me:3310: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -3362,7 +3318,7 @@ for ac_prog in man man_db
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:3365: checking for $ac_word" >&5
+echo "$as_me:3321: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_MAN+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3377,7 +3333,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_MAN="$ac_prog"
-echo "$as_me:3380: found $ac_dir/$ac_word" >&5
+echo "$as_me:3336: found $ac_dir/$ac_word" >&5
 break
 done
 
 fi
 MAN=$ac_cv_prog_MAN
 if test -n "$MAN"; then
-  echo "$as_me:3388: result: $MAN" >&5
+  echo "$as_me:3344: result: $MAN" >&5
 echo "${ECHO_T}$MAN" >&6
 else
-  echo "$as_me:3391: result: no" >&5
+  echo "$as_me:3347: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
   test -n "$MAN" && break
 done
 
-if test "${cf_cv_subst_LD+set}" = set; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:3357: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+echo "$as_me:3372: found $ac_dir/$ac_word" >&5
+break
+done
 
-echo "$as_me:3402: checking for loader (symbol LD)" >&5
-echo $ECHO_N "checking for loader (symbol LD)... $ECHO_C" >&6
-test -z "$LD" && LD=ld
-echo "$as_me:3405: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-
-cf_cv_subst_LD=$LD
 fi
-
-LD=${cf_cv_subst_LD}
-
-if test "${cf_cv_subst_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:3380: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
 else
-
-echo "$as_me:3417: checking for archiver (symbol AR)" >&5
-echo $ECHO_N "checking for archiver (symbol AR)... $ECHO_C" >&6
-test -z "$AR" && AR=ar
-echo "$as_me:3420: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
-
-cf_cv_subst_AR=$AR
+  echo "$as_me:3383: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-AR=${cf_cv_subst_AR}
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:3392: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_RANLIB="ranlib"
+echo "$as_me:3407: found $ac_dir/$ac_word" >&5
+break
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:3416: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:3419: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ld; ac_word=$2
+echo "$as_me:3431: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$LD"; then
+  ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_LD="${ac_tool_prefix}ld"
+echo "$as_me:3446: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+LD=$ac_cv_prog_LD
+if test -n "$LD"; then
+  echo "$as_me:3454: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:3457: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_LD"; then
+  ac_ct_LD=$LD
+  # Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; ac_word=$2
+echo "$as_me:3466: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_LD"; then
+  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_LD="ld"
+echo "$as_me:3481: found $ac_dir/$ac_word" >&5
+break
+done
+
+  test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
+fi
+fi
+ac_ct_LD=$ac_cv_prog_ac_ct_LD
+if test -n "$ac_ct_LD"; then
+  echo "$as_me:3490: result: $ac_ct_LD" >&5
+echo "${ECHO_T}$ac_ct_LD" >&6
+else
+  echo "$as_me:3493: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  LD=$ac_ct_LD
+else
+  LD="$ac_cv_prog_LD"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:3505: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AR="${ac_tool_prefix}ar"
+echo "$as_me:3520: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  echo "$as_me:3528: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+  echo "$as_me:3531: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:3540: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_AR="ar"
+echo "$as_me:3555: found $ac_dir/$ac_word" >&5
+break
+done
+
+  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  echo "$as_me:3564: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+  echo "$as_me:3567: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  AR=$ac_ct_AR
+else
+  AR="$ac_cv_prog_AR"
+fi
 
 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-echo "$as_me:3432: checking for archiver options (symbol AR_OPTS)" >&5
+echo "$as_me:3580: checking for archiver options (symbol AR_OPTS)" >&5
 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
 test -z "$AR_OPTS" && AR_OPTS=rv
-echo "$as_me:3435: result: $AR_OPTS" >&5
+echo "$as_me:3583: result: $AR_OPTS" >&5
 echo "${ECHO_T}$AR_OPTS" >&6
 
 cf_cv_subst_AR_OPTS=$AR_OPTS
@@ -3440,7 +3588,7 @@ fi
 
 AR_OPTS=${cf_cv_subst_AR_OPTS}
 
-echo "$as_me:3443: checking for makeflags variable" >&5
+echo "$as_me:3591: checking for makeflags variable" >&5
 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
 if test "${cf_cv_makeflags+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3473,10 +3621,10 @@ CF_EOF
        rm -f cf_makeflags.tmp
 
 fi
-echo "$as_me:3476: result: $cf_cv_makeflags" >&5
+echo "$as_me:3624: result: $cf_cv_makeflags" >&5
 echo "${ECHO_T}$cf_cv_makeflags" >&6
 
-echo "$as_me:3479: checking if you have specified an install-prefix" >&5
+echo "$as_me:3627: checking if you have specified an install-prefix" >&5
 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
 
 # Check whether --with-install-prefix or --without-install-prefix was given.
@@ -3489,17 +3637,116 @@ if test "${with_install_prefix+set}" = set; then
                ;;
        esac
 fi;
-echo "$as_me:3492: result: $DESTDIR" >&5
+echo "$as_me:3640: result: $DESTDIR" >&5
 echo "${ECHO_T}$DESTDIR" >&6
 
 ###############################################################################
 
+# If we're cross-compiling, allow the user to override the tools and their
+# options.  The configure script is oriented toward identifying the host
+# compiler, etc., but we need a build compiler to generate parts of the source.
+: ${BUILD_CC:='$(CC)'}
+: ${BUILD_CFLAGS:='$(CFLAGS)'}
+: ${BUILD_CPPFLAGS:='$(CPPFLAGS)'}
+: ${BUILD_LDFLAGS:='$(LDFLAGS)'}
+: ${BUILD_LIBS:='$(LIBS)'}
+: ${BUILD_EXEEXT:='$x'}
+if test "$cross_compiling" = yes ; then
+
+# Check whether --with-build-cc or --without-build-cc was given.
+if test "${with_build_cc+set}" = set; then
+  withval="$with_build_cc"
+  BUILD_CC="$withval"
+else
+  for ac_prog in $CC gcc cc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:3665: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_BUILD_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$BUILD_CC"; then
+  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_BUILD_CC="$ac_prog"
+echo "$as_me:3680: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+BUILD_CC=$ac_cv_prog_BUILD_CC
+if test -n "$BUILD_CC"; then
+  echo "$as_me:3688: result: $BUILD_CC" >&5
+echo "${ECHO_T}$BUILD_CC" >&6
+else
+  echo "$as_me:3691: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$BUILD_CC" && break
+done
+
+fi;
+
+# Check whether --with-build-cflags or --without-build-cflags was given.
+if test "${with_build_cflags+set}" = set; then
+  withval="$with_build_cflags"
+  BUILD_CFLAGS="$withval"
+fi;
+
+# Check whether --with-build-cppflags or --without-build-cppflags was given.
+if test "${with_build_cppflags+set}" = set; then
+  withval="$with_build_cppflags"
+  BUILD_CPPFLAGS="$withval"
+fi;
+
+# Check whether --with-build-ldflags or --without-build-ldflags was given.
+if test "${with_build_ldflags+set}" = set; then
+  withval="$with_build_ldflags"
+  BUILD_LDFLAGS="$withval"
+fi;
+
+# Check whether --with-build-libs or --without-build-libs was given.
+if test "${with_build_libs+set}" = set; then
+  withval="$with_build_libs"
+  BUILD_LIBS="$withval"
+fi;
+       BUILD_EXEEXT=
+fi
+
+###############################################################################
+
 ### Options to allow the user to specify the set of libraries which are used.
 ### Use "--without-normal --with-shared" to allow the default model to be
 ### shared, for example.
 cf_list_models=""
 
-echo "$as_me:3502: checking if you want to build libraries with libtool" >&5
+LIBTOOL=
+
+# common library maintenance symbols that are convenient for libtool scripts:
+LIB_CREATE='$(AR) -cr'
+LIB_OBJECT='$(OBJECTS)'
+LIB_SUFFIX=.a
+LIB_PREP="$RANLIB"
+
+# symbols used to prop libtool up to enable it to determine what it should be
+# doing:
+LIB_CLEAN=
+LIB_COMPILE=
+LIB_LINK=
+LIB_INSTALL=
+LIB_UNINSTALL=
+
+echo "$as_me:3749: checking if you want to build libraries with libtool" >&5
 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
 
 # Check whether --with-libtool or --without-libtool was given.
@@ -3509,16 +3756,131 @@ if test "${with_libtool+set}" = set; then
 else
   with_libtool=no
 fi;
-echo "$as_me:3512: result: $with_libtool" >&5
+echo "$as_me:3759: result: $with_libtool" >&5
 echo "${ECHO_T}$with_libtool" >&6
-if test "$with_libtool" = "yes"; then
-       cf_list_models="$cf_list_models libtool"
-       test -z "$LIBTOOL" && LIBTOOL=libtool
+if test "$with_libtool" != "no"; then
+
+       if test "$with_libtool" != "yes" ; then
+
+case ".$with_libtool" in #(vi
+.\$\(*\)*|.\'*\'*) #(vi
+  ;;
+..|./*|.\\*) #(vi
+  ;;
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+  ;;
+.\${*prefix}*) #(vi
+  eval with_libtool="$with_libtool"
+  case ".$with_libtool" in #(vi
+  .NONE/*)
+    with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
+    ;;
+  esac
+  ;; #(vi
+.NONE/*)
+  with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
+  ;;
+*)
+  { { echo "$as_me:3784: error: expected a pathname, not \"$with_libtool\"" >&5
+echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
+   { (exit 1); exit 1; }; }
+  ;;
+esac
+
+               LIBTOOL=$with_libtool
+       else
+               # Extract the first word of "libtool", so it can be a program name with args.
+set dummy libtool; ac_word=$2
+echo "$as_me:3794: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_LIBTOOL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $LIBTOOL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
+  ;;
+  *)
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  if $as_executable_p "$ac_dir/$ac_word"; then
+   ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
+   echo "$as_me:3811: found $ac_dir/$ac_word" >&5
+   break
+fi
+done
+
+  ;;
+esac
+fi
+LIBTOOL=$ac_cv_path_LIBTOOL
+
+if test -n "$LIBTOOL"; then
+  echo "$as_me:3822: result: $LIBTOOL" >&5
+echo "${ECHO_T}$LIBTOOL" >&6
+else
+  echo "$as_me:3825: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       fi
+       if test -z "$LIBTOOL" ; then
+               { { echo "$as_me:3831: error: Cannot find libtool" >&5
+echo "$as_me: error: Cannot find libtool" >&2;}
+   { (exit 1); exit 1; }; }
+       fi
+       LIB_CREATE='$(LIBTOOL) --mode=link $(CC) -rpath $(DESTDIR)$(libdir) -version-info `cut -f1 $(srcdir)/VERSION` -o'
+       LIB_OBJECT='$(OBJECTS:.o=.lo)'
+       LIB_SUFFIX=.la
+       LIB_CLEAN='$(LIBTOOL) --mode=clean'
+       LIB_COMPILE='$(LIBTOOL) --mode=compile'
+       LIB_LINK='$(LIBTOOL) --mode=link'
+       LIB_INSTALL='$(LIBTOOL) --mode=install'
+       LIB_UNINSTALL='$(LIBTOOL) --mode=uninstall'
+       LIB_PREP=:
+
+       # Show the version of libtool
+       echo "$as_me:3846: checking version of libtool" >&5
+echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
+
+       # Save the version in a cache variable - this is not entirely a good
+       # thing, but the version string from libtool is very ugly, and for
+       # bug reports it might be useful to have the original string.
+       cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
+       echo "$as_me:3853: result: $cf_cv_libtool_version" >&5
+echo "${ECHO_T}$cf_cv_libtool_version" >&6
+       if test -z "$cf_cv_libtool_version" ; then
+               { { echo "$as_me:3856: error: This is not libtool" >&5
+echo "$as_me: error: This is not libtool" >&2;}
+   { (exit 1); exit 1; }; }
+       fi
+
+       # special hack to add --tag option for C++ compiler
+       case $cf_cv_libtool_version in
+       1.[5-9]*|[2-9]*)
+               LIBTOOL_CXX="$LIBTOOL --tag=CXX"
+               ;;
+       *)
+               LIBTOOL_CXX="$LIBTOOL"
+               ;;
+       esac
 else
        LIBTOOL=""
+       LIBTOOL_CXX=""
 fi
 
-echo "$as_me:3521: checking if you want to build shared libraries" >&5
+test -z "$LIBTOOL" && ECHO_LT=
+
+if test "$with_libtool" != "no" ; then
+
+cf_list_models="$cf_list_models libtool"
+
+else
+
+echo "$as_me:3883: checking if you want to build shared libraries" >&5
 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
 
 # Check whether --with-shared or --without-shared was given.
@@ -3528,11 +3890,11 @@ if test "${with_shared+set}" = set; then
 else
   with_shared=no
 fi;
-echo "$as_me:3531: result: $with_shared" >&5
+echo "$as_me:3893: result: $with_shared" >&5
 echo "${ECHO_T}$with_shared" >&6
 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
 
-echo "$as_me:3535: checking if you want to build static libraries" >&5
+echo "$as_me:3897: checking if you want to build static libraries" >&5
 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
 
 # Check whether --with-normal or --without-normal was given.
@@ -3542,11 +3904,11 @@ if test "${with_normal+set}" = set; then
 else
   with_normal=yes
 fi;
-echo "$as_me:3545: result: $with_normal" >&5
+echo "$as_me:3907: result: $with_normal" >&5
 echo "${ECHO_T}$with_normal" >&6
 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
 
-echo "$as_me:3549: checking if you want to build debug libraries" >&5
+echo "$as_me:3911: checking if you want to build debug libraries" >&5
 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
 
 # Check whether --with-debug or --without-debug was given.
@@ -3556,11 +3918,11 @@ if test "${with_debug+set}" = set; then
 else
   with_debug=yes
 fi;
-echo "$as_me:3559: result: $with_debug" >&5
+echo "$as_me:3921: result: $with_debug" >&5
 echo "${ECHO_T}$with_debug" >&6
 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
 
-echo "$as_me:3563: checking if you want to build profiling libraries" >&5
+echo "$as_me:3925: checking if you want to build profiling libraries" >&5
 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
 
 # Check whether --with-profile or --without-profile was given.
@@ -3570,25 +3932,27 @@ if test "${with_profile+set}" = set; then
 else
   with_profile=no
 fi;
-echo "$as_me:3573: result: $with_profile" >&5
+echo "$as_me:3935: result: $with_profile" >&5
 echo "${ECHO_T}$with_profile" >&6
 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
 
+fi
+
 ###############################################################################
 
-echo "$as_me:3579: checking for specified models" >&5
+echo "$as_me:3943: checking for specified models" >&5
 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
 test -z "$cf_list_models" && cf_list_models=normal
-test "$with_libtool" = "yes" && cf_list_models=libtool
-echo "$as_me:3583: result: $cf_list_models" >&5
+test "$with_libtool" != "no" && cf_list_models=libtool
+echo "$as_me:3947: result: $cf_list_models" >&5
 echo "${ECHO_T}$cf_list_models" >&6
 
 ### Use the first model as the default, and save its suffix for use in building
 ### up test-applications.
-echo "$as_me:3588: checking for default model" >&5
+echo "$as_me:3952: checking for default model" >&5
 echo $ECHO_N "checking for default model... $ECHO_C" >&6
-DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
-echo "$as_me:3591: result: $DFT_LWR_MODEL" >&5
+DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
+echo "$as_me:3955: result: $DFT_LWR_MODEL" >&5
 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
 
 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
@@ -3612,7 +3976,7 @@ LIB_SUFFIX=
 
 ###############################################################################
 
-echo "$as_me:3615: checking if you want to build a separate terminfo library" >&5
+echo "$as_me:3979: checking if you want to build a separate terminfo library" >&5
 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
 
 # Check whether --with-termlib or --without-termlib was given.
@@ -3622,11 +3986,12 @@ if test "${with_termlib+set}" = set; then
 else
   with_termlib=no
 fi;
-echo "$as_me:3625: result: $with_termlib" >&5
+echo "$as_me:3989: result: $with_termlib" >&5
 echo "${ECHO_T}$with_termlib" >&6
 
 ### Checks for special libraries, must be done up-front.
-echo "$as_me:3629: checking if you want to link with dbmalloc for testing" >&5
+
+echo "$as_me:3994: checking if you want to link with dbmalloc for testing" >&5
 echo $ECHO_N "checking if you want to link with dbmalloc for testing... $ECHO_C" >&6
 
 # Check whether --with-dbmalloc or --without-dbmalloc was given.
@@ -3636,11 +4001,11 @@ if test "${with_dbmalloc+set}" = set; then
 else
   with_dbmalloc=no
 fi;
-echo "$as_me:3639: result: $with_dbmalloc" >&5
+echo "$as_me:4004: result: $with_dbmalloc" >&5
 echo "${ECHO_T}$with_dbmalloc" >&6
-if test "$with_dbmalloc" = yes ; then
+if test $with_dbmalloc = yes ; then
 
-echo "$as_me:3643: checking for debug_malloc in -ldbmalloc" >&5
+echo "$as_me:4008: checking for debug_malloc in -ldbmalloc" >&5
 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3648,7 +4013,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldbmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 3651 "configure"
+#line 4016 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -3667,16 +4032,16 @@ debug_malloc ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3670: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4035: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3673: \$? = $ac_status" >&5
+  echo "$as_me:4038: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3676: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4041: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3679: \$? = $ac_status" >&5
+  echo "$as_me:4044: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dbmalloc_debug_malloc=yes
 else
@@ -3687,7 +4052,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:3690: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "$as_me:4055: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
   cat >>confdefs.h <<EOF
@@ -3700,7 +4065,7 @@ fi
 
 fi
 
-echo "$as_me:3703: checking if you want to link with dmalloc for testing" >&5
+echo "$as_me:4068: checking if you want to link with dmalloc for testing" >&5
 echo $ECHO_N "checking if you want to link with dmalloc for testing... $ECHO_C" >&6
 
 # Check whether --with-dmalloc or --without-dmalloc was given.
@@ -3710,11 +4075,11 @@ if test "${with_dmalloc+set}" = set; then
 else
   with_dmalloc=no
 fi;
-echo "$as_me:3713: result: $with_dmalloc" >&5
+echo "$as_me:4078: result: $with_dmalloc" >&5
 echo "${ECHO_T}$with_dmalloc" >&6
-if test "$with_dmalloc" = yes ; then
+if test $with_dmalloc = yes ; then
 
-echo "$as_me:3717: checking for dmalloc_debug in -ldmalloc" >&5
+echo "$as_me:4082: checking for dmalloc_debug in -ldmalloc" >&5
 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3722,7 +4087,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 3725 "configure"
+#line 4090 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -3741,16 +4106,16 @@ dmalloc_debug ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3744: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4109: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3747: \$? = $ac_status" >&5
+  echo "$as_me:4112: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3750: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4115: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3753: \$? = $ac_status" >&5
+  echo "$as_me:4118: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dmalloc_dmalloc_debug=yes
 else
@@ -3761,7 +4126,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:3764: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "$as_me:4129: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
   cat >>confdefs.h <<EOF
@@ -3775,7 +4140,7 @@ fi
 fi
 
 SHLIB_LIST=""
-echo "$as_me:3778: checking if you want to link with the gpm mouse library" >&5
+echo "$as_me:4143: checking if you want to link with the gpm mouse library" >&5
 echo $ECHO_N "checking if you want to link with the gpm mouse library... $ECHO_C" >&6
 
 # Check whether --with-gpm or --without-gpm was given.
@@ -3785,10 +4150,10 @@ if test "${with_gpm+set}" = set; then
 else
   with_gpm=no
 fi;
-echo "$as_me:3788: result: $with_gpm" >&5
+echo "$as_me:4153: result: $with_gpm" >&5
 echo "${ECHO_T}$with_gpm" >&6
 if test "$with_gpm" = yes ; then
-       echo "$as_me:3791: checking for Gpm_Open in -lgpm" >&5
+       echo "$as_me:4156: checking for Gpm_Open in -lgpm" >&5
 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3796,7 +4161,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 3799 "configure"
+#line 4164 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -3815,16 +4180,16 @@ Gpm_Open ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3818: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4183: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3821: \$? = $ac_status" >&5
+  echo "$as_me:4186: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3824: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4189: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3827: \$? = $ac_status" >&5
+  echo "$as_me:4192: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_Gpm_Open=yes
 else
@@ -3835,7 +4200,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:3838: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:4203: result: $ac_cv_lib_gpm_Gpm_Open" >&5
 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
 
@@ -3848,23 +4213,23 @@ EOF
 for ac_header in gpm.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:3851: checking for $ac_header" >&5
+echo "$as_me:4216: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 3857 "configure"
+#line 4222 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:3861: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:4226: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:3867: \$? = $ac_status" >&5
+  echo "$as_me:4232: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -3883,7 +4248,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:3886: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:4251: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -3894,12 +4259,76 @@ fi
 done
 
 else
-  { echo "$as_me:3897: WARNING: Cannot link with gpm library - read the FAQ" >&5
+  { echo "$as_me:4262: WARNING: Cannot link with gpm library - read the FAQ" >&5
 echo "$as_me: WARNING: Cannot link with gpm library - read the FAQ" >&2;}
 fi
 
 fi
 
+# not everyone has "test -c"
+if test -c /dev/sysmouse 2>/dev/null ; then
+echo "$as_me:4270: checking if you want to use sysmouse" >&5
+echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
+
+# Check whether --with-sysmouse or --without-sysmouse was given.
+if test "${with_sysmouse+set}" = set; then
+  withval="$with_sysmouse"
+  cf_with_sysmouse=$withval
+else
+  cf_with_sysmouse=maybe
+fi;
+       if test "$cf_with_sysmouse" != no ; then
+       cat >conftest.$ac_ext <<_ACEOF
+#line 4282 "configure"
+#include "confdefs.h"
+
+#include <osreldate.h>
+#if (__FreeBSD_version >= 400017)
+#include <sys/consio.h>
+#include <sys/fbio.h>
+#else
+#include <machine/console.h>
+#endif
+
+int
+main ()
+{
+
+       struct mouse_info the_mouse;
+       ioctl(0, CONS_MOUSECTL, &the_mouse);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4305: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4308: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:4311: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4314: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_with_sysmouse=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_with_sysmouse=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       fi
+echo "$as_me:4324: result: $cf_with_sysmouse" >&5
+echo "${ECHO_T}$cf_with_sysmouse" >&6
+test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
+#define USE_SYSMOUSE 1
+EOF
+
+fi
+
 if test X"$CC_G_OPT" = X"" ; then
        CC_G_OPT='-g'
        test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
@@ -3910,7 +4339,7 @@ if test X"$CXX_G_OPT" = X"" ; then
        test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
 fi
 
-echo "$as_me:3913: checking for default loader flags" >&5
+echo "$as_me:4342: checking for default loader flags" >&5
 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
 case $DFT_LWR_MODEL in
 libtool) LD_MODEL=''   ;;
@@ -3919,10 +4348,10 @@ debug)   LD_MODEL=$CC_G_OPT ;;
 profile) LD_MODEL='-pg';;
 shared)  LD_MODEL=''   ;;
 esac
-echo "$as_me:3922: result: $LD_MODEL" >&5
+echo "$as_me:4351: result: $LD_MODEL" >&5
 echo "${ECHO_T}$LD_MODEL" >&6
 
-echo "$as_me:3925: checking if rpath option should be used" >&5
+echo "$as_me:4354: checking if rpath option should be used" >&5
 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
 
 # Check whether --enable-rpath or --disable-rpath was given.
@@ -3932,7 +4361,7 @@ if test "${enable_rpath+set}" = set; then
 else
   cf_cv_ld_rpath=no
 fi;
-echo "$as_me:3935: result: $cf_cv_ld_rpath" >&5
+echo "$as_me:4364: result: $cf_cv_ld_rpath" >&5
 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
 
        LOCAL_LDFLAGS=
@@ -3942,7 +4371,7 @@ echo "${ECHO_T}$cf_cv_ld_rpath" >&6
 
        cf_cv_do_symlinks=no
 
-       echo "$as_me:3945: checking if release/abi version should be used for shared libs" >&5
+       echo "$as_me:4374: checking if release/abi version should be used for shared libs" >&5
 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
 
 # Check whether --with-shlib-version or --without-shlib-version was given.
@@ -3957,7 +4386,7 @@ if test "${with_shlib_version+set}" = set; then
                cf_cv_shlib_version=$withval
                ;;
        *)
-               { { echo "$as_me:3960: error: option value must be one of: rel, abi, auto or no" >&5
+               { { echo "$as_me:4389: error: option value must be one of: rel, abi, auto or no" >&5
 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
    { (exit 1); exit 1; }; }
                ;;
@@ -3966,7 +4395,7 @@ echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
 else
   cf_cv_shlib_version=auto
 fi;
-       echo "$as_me:3969: result: $cf_cv_shlib_version" >&5
+       echo "$as_me:4398: result: $cf_cv_shlib_version" >&5
 echo "${ECHO_T}$cf_cv_shlib_version" >&6
 
        cf_cv_rm_so_locs=no
@@ -3975,14 +4404,14 @@ echo "${ECHO_T}$cf_cv_shlib_version" >&6
        CC_SHARED_OPTS=
        if test "$GCC" = yes
        then
-               echo "$as_me:3978: checking which $CC option to use" >&5
+               echo "$as_me:4407: checking which $CC option to use" >&5
 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
                cf_save_CFLAGS="$CFLAGS"
                for CC_SHARED_OPTS in -fPIC -fpic ''
                do
                        CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
                        cat >conftest.$ac_ext <<_ACEOF
-#line 3985 "configure"
+#line 4414 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -3994,16 +4423,16 @@ int x = 1
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3997: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4426: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:4000: \$? = $ac_status" >&5
+  echo "$as_me:4429: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4003: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4432: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4006: \$? = $ac_status" >&5
+  echo "$as_me:4435: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -4012,7 +4441,7 @@ cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
                done
-               echo "$as_me:4015: result: $CC_SHARED_OPTS" >&5
+               echo "$as_me:4444: result: $CC_SHARED_OPTS" >&5
 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
                CFLAGS="$cf_save_CFLAGS"
        fi
@@ -4061,7 +4490,7 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
                MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
                cf_cv_rm_so_locs=yes
                ;;
-       linux*|gnu*)
+       linux*|gnu*|k*bsd*-gnu)
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
@@ -4077,6 +4506,23 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
                CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
                MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@'
                ;;
+       freebsd[45]*)
+               CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+               MK_SHARED_LIB='$(LD) -Bshareable -soname=`basename $@` -o $@'
+               test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+
+# This doesn't work - I keep getting spurious references to needing
+# libncurses.so.5.3 when ldd says it's resolved.  LOCAL_LDFLAGS2 seems to be
+# no longer used anyway.  And the rpath logic isn't relative - so I have to
+# add the local and install lib-directories:
+#
+#              if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
+#                      LOCAL_LDFLAGS="-rpath `pwd`/lib"
+#                      LOCAL_LDFLAGS2="-rpath \$(libdir) $LOCAL_LDFLAGS"
+#                      cf_ld_rpath_opt="-rpath "
+#                      EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+#              fi
+               ;;
        openbsd*|freebsd*)
                CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
                MK_SHARED_LIB='$(LD) -Bshareable -o $@'
@@ -4122,7 +4568,7 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
                ;;
        sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
                # tested with osr5.0.5
-               if test "$ac_cv_c_compiler_gnu" != yes; then
+               if test "$GCC" != yes; then
                        CC_SHARED_OPTS='-belf -KPIC'
                fi
                MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
@@ -4136,7 +4582,7 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
                ;;
        sunos4*)
                # tested with SunOS 4.1.1 and gcc 2.7.0
-               if test "$ac_cv_c_compiler_gnu" != yes; then
+               if test "$GCC" != yes; then
                        CC_SHARED_OPTS='-KPIC'
                fi
                MK_SHARED_LIB='$(LD) -assert pure-text -o $@'
@@ -4144,7 +4590,7 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
                ;;
        solaris2*)
                # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
-               if test "$ac_cv_c_compiler_gnu" != yes; then
+               if test "$GCC" != yes; then
                        CC_SHARED_OPTS='-KPIC'
                fi
                MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
@@ -4160,7 +4606,7 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
                ;;
        sysv5uw7*|unix_sv*)
                # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
-               if test "$ac_cv_c_compiler_gnu" != yes; then
+               if test "$GCC" != yes; then
                        CC_SHARED_OPTS='-KPIC'
                fi
                MK_SHARED_LIB='$(LD) -d y -G -o $@'
@@ -4179,7 +4625,7 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
                        test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
                        ;;
                *)
-                       { echo "$as_me:4182: WARNING: ignored --with-shlib-version" >&5
+                       { echo "$as_me:4628: WARNING: ignored --with-shlib-version" >&5
 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
                        ;;
                esac
@@ -4187,12 +4633,12 @@ echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
        esac
 
        if test -n "$cf_ld_rpath_opt" ; then
-               echo "$as_me:4190: checking if we need a space after rpath option" >&5
+               echo "$as_me:4636: checking if we need a space after rpath option" >&5
 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
                cf_save_LIBS="$LIBS"
                LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
                cat >conftest.$ac_ext <<_ACEOF
-#line 4195 "configure"
+#line 4641 "configure"
 #include "confdefs.h"
 
 int
@@ -4204,16 +4650,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4207: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4653: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4210: \$? = $ac_status" >&5
+  echo "$as_me:4656: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4213: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4659: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4216: \$? = $ac_status" >&5
+  echo "$as_me:4662: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_rpath_space=no
 else
@@ -4223,7 +4669,7 @@ cf_rpath_space=yes
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
                LIBS="$cf_save_LIBS"
-               echo "$as_me:4226: result: $cf_rpath_space" >&5
+               echo "$as_me:4672: result: $cf_rpath_space" >&5
 echo "${ECHO_T}$cf_rpath_space" >&6
                test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
                MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
@@ -4232,7 +4678,7 @@ echo "${ECHO_T}$cf_rpath_space" >&6
 if test "$CC_SHARED_OPTS" = "unknown"; then
        for model in $cf_list_models; do
                if test "$model" = "shared"; then
-                       { { echo "$as_me:4235: error: Shared libraries are not supported in this version" >&5
+                       { { echo "$as_me:4681: error: Shared libraries are not supported in this version" >&5
 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
    { (exit 1); exit 1; }; }
                fi
@@ -4242,7 +4688,7 @@ fi
 ###############################################################################
 
 ###    use option --disable-overwrite to leave out the link to -lcurses
-echo "$as_me:4245: checking if you wish to install ncurses overwriting curses" >&5
+echo "$as_me:4691: checking if you wish to install ncurses overwriting curses" >&5
 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
 
 # Check whether --enable-overwrite or --disable-overwrite was given.
@@ -4252,10 +4698,10 @@ if test "${enable_overwrite+set}" = set; then
 else
   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
 fi;
-echo "$as_me:4255: result: $with_overwrite" >&5
+echo "$as_me:4701: result: $with_overwrite" >&5
 echo "${ECHO_T}$with_overwrite" >&6
 
-echo "$as_me:4258: checking if external terminfo-database is used" >&5
+echo "$as_me:4704: checking if external terminfo-database is used" >&5
 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
 
 # Check whether --enable-database or --disable-database was given.
@@ -4265,7 +4711,7 @@ if test "${enable_database+set}" = set; then
 else
   use_database=yes
 fi;
-echo "$as_me:4268: result: $use_database" >&5
+echo "$as_me:4714: result: $use_database" >&5
 echo "${ECHO_T}$use_database" >&6
 
 case $host_os in #(vi
@@ -4287,7 +4733,7 @@ if test "$use_database" != no ; then
 #define USE_DATABASE 1
 EOF
 
-       echo "$as_me:4290: checking which terminfo source-file will be installed" >&5
+       echo "$as_me:4736: checking which terminfo source-file will be installed" >&5
 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
 
 # Check whether --enable-database or --disable-database was given.
@@ -4295,11 +4741,11 @@ if test "${enable_database+set}" = set; then
   enableval="$enable_database"
   TERMINFO_SRC=$withval
 fi;
-       echo "$as_me:4298: result: $TERMINFO_SRC" >&5
+       echo "$as_me:4744: result: $TERMINFO_SRC" >&5
 echo "${ECHO_T}$TERMINFO_SRC" >&6
 fi
 
-echo "$as_me:4302: checking for list of fallback descriptions" >&5
+echo "$as_me:4748: checking for list of fallback descriptions" >&5
 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
 
 # Check whether --with-fallbacks or --without-fallbacks was given.
@@ -4309,9 +4755,9 @@ if test "${with_fallbacks+set}" = set; then
 else
   with_fallback=
 fi;
-echo "$as_me:4312: result: $with_fallback" >&5
+echo "$as_me:4758: result: $with_fallback" >&5
 echo "${ECHO_T}$with_fallback" >&6
-FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'`
+FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
 
 MAKE_TERMINFO=
 if test "$use_database" = no ; then
@@ -4319,7 +4765,7 @@ if test "$use_database" = no ; then
        MAKE_TERMINFO="#"
 else
 
-echo "$as_me:4322: checking for list of terminfo directories" >&5
+echo "$as_me:4768: checking for list of terminfo directories" >&5
 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
 
 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
@@ -4353,7 +4799,7 @@ case ".$cf_src_path" in #(vi
   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:4356: error: expected a pathname, not \"$cf_src_path\"" >&5
+  { { echo "$as_me:4802: error: expected a pathname, not \"$cf_src_path\"" >&5
 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -4366,13 +4812,13 @@ IFS="$ac_save_ifs"
 
 eval 'TERMINFO_DIRS="$cf_dst_path"'
 
-echo "$as_me:4369: result: $TERMINFO_DIRS" >&5
+echo "$as_me:4815: result: $TERMINFO_DIRS" >&5
 echo "${ECHO_T}$TERMINFO_DIRS" >&6
 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
 #define TERMINFO_DIRS "$TERMINFO_DIRS"
 EOF
 
-echo "$as_me:4375: checking for default terminfo directory" >&5
+echo "$as_me:4821: checking for default terminfo directory" >&5
 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
 
 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
@@ -4401,7 +4847,7 @@ case ".$withval" in #(vi
   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:4404: error: expected a pathname, not \"$withval\"" >&5
+  { { echo "$as_me:4850: error: expected a pathname, not \"$withval\"" >&5
 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -4409,7 +4855,7 @@ esac
 
 eval TERMINFO="$withval"
 
-echo "$as_me:4412: result: $TERMINFO" >&5
+echo "$as_me:4858: result: $TERMINFO" >&5
 echo "${ECHO_T}$TERMINFO" >&6
 cat >>confdefs.h <<EOF
 #define TERMINFO "$TERMINFO"
@@ -4419,7 +4865,7 @@ fi
 
 ###    use option --disable-big-core to make tic run on small machines
 ###    We need 4Mb, check if we can allocate 50% more than that.
-echo "$as_me:4422: checking if big-core option selected" >&5
+echo "$as_me:4868: checking if big-core option selected" >&5
 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
 
 # Check whether --enable-big-core or --disable-big-core was given.
@@ -4431,7 +4877,7 @@ else
   with_big_core=no
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4434 "configure"
+#line 4880 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4445,15 +4891,15 @@ int main() {
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:4448: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4894: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4451: \$? = $ac_status" >&5
+  echo "$as_me:4897: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:4453: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4899: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4456: \$? = $ac_status" >&5
+  echo "$as_me:4902: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   with_big_core=yes
 else
@@ -4465,14 +4911,14 @@ fi
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 fi;
-echo "$as_me:4468: result: $with_big_core" >&5
+echo "$as_me:4914: result: $with_big_core" >&5
 echo "${ECHO_T}$with_big_core" >&6
 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
 #define HAVE_BIG_CORE 1
 EOF
 
 ###    use option --enable-termcap to compile in the termcap fallback support
-echo "$as_me:4475: checking if you want termcap-fallback support" >&5
+echo "$as_me:4921: checking if you want termcap-fallback support" >&5
 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
 
 # Check whether --enable-termcap or --disable-termcap was given.
@@ -4482,13 +4928,13 @@ if test "${enable_termcap+set}" = set; then
 else
   with_termcap=no
 fi;
-echo "$as_me:4485: result: $with_termcap" >&5
+echo "$as_me:4931: result: $with_termcap" >&5
 echo "${ECHO_T}$with_termcap" >&6
 
 if test "$with_termcap" != "yes" ; then
        if test "$use_database" = no ; then
-               if test -z $with_fallback ; then
-                       { { echo "$as_me:4491: error: You have disabled the database w/o specifying fallbacks" >&5
+               if test -z "$with_fallback" ; then
+                       { { echo "$as_me:4937: error: You have disabled the database w/o specifying fallbacks" >&5
 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
    { (exit 1); exit 1; }; }
                fi
@@ -4503,7 +4949,7 @@ cat >>confdefs.h <<\EOF
 #define USE_TERMCAP 1
 EOF
 
-echo "$as_me:4506: checking for list of termcap files" >&5
+echo "$as_me:4952: checking for list of termcap files" >&5
 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
 
 # Check whether --with-termpath or --without-termpath was given.
@@ -4537,7 +4983,7 @@ case ".$cf_src_path" in #(vi
   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:4540: error: expected a pathname, not \"$cf_src_path\"" >&5
+  { { echo "$as_me:4986: error: expected a pathname, not \"$cf_src_path\"" >&5
 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -4550,14 +4996,14 @@ IFS="$ac_save_ifs"
 
 eval 'TERMPATH="$cf_dst_path"'
 
-echo "$as_me:4553: result: $TERMPATH" >&5
+echo "$as_me:4999: result: $TERMPATH" >&5
 echo "${ECHO_T}$TERMPATH" >&6
 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
 #define TERMPATH "$TERMPATH"
 EOF
 
 ###    use option --enable-getcap to use a hacked getcap for reading termcaps
-echo "$as_me:4560: checking if fast termcap-loader is needed" >&5
+echo "$as_me:5006: checking if fast termcap-loader is needed" >&5
 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
 
 # Check whether --enable-getcap or --disable-getcap was given.
@@ -4567,13 +5013,13 @@ if test "${enable_getcap+set}" = set; then
 else
   with_getcap=no
 fi;
-echo "$as_me:4570: result: $with_getcap" >&5
+echo "$as_me:5016: result: $with_getcap" >&5
 echo "${ECHO_T}$with_getcap" >&6
 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
 #define USE_GETCAP 1
 EOF
 
-echo "$as_me:4576: checking if translated termcaps will be cached in ~/.terminfo" >&5
+echo "$as_me:5022: checking if translated termcaps will be cached in ~/.terminfo" >&5
 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
 
 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
@@ -4583,7 +5029,7 @@ if test "${enable_getcap_cache+set}" = set; then
 else
   with_getcap_cache=no
 fi;
-echo "$as_me:4586: result: $with_getcap_cache" >&5
+echo "$as_me:5032: result: $with_getcap_cache" >&5
 echo "${ECHO_T}$with_getcap_cache" >&6
 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
 #define USE_GETCAP_CACHE 1
@@ -4591,6 +5037,21 @@ EOF
 
 fi
 
+###   Use option --disable-home-terminfo to completely remove ~/.terminfo
+echo "$as_me:5041: checking if ~/.terminfo is wanted" >&5
+echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
+
+# Check whether --enable-home-terminfo or --disable-home-terminfo was given.
+if test "${enable_home_terminfo+set}" = set; then
+  enableval="$enable_home_terminfo"
+  with_home_terminfo=$enableval
+else
+  with_home_terminfo=yes
+fi;
+test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
+#define USE_HOME_TERMINFO 1
+EOF
+
 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
 ###   to reduce storage requirements for the terminfo database.
 
@@ -4599,13 +5060,13 @@ for ac_func in \
        unlink
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:4602: checking for $ac_func" >&5
+echo "$as_me:5063: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4608 "configure"
+#line 5069 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -4636,16 +5097,16 @@ f = $ac_func;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4639: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5100: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4642: \$? = $ac_status" >&5
+  echo "$as_me:5103: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4645: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5106: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4648: \$? = $ac_status" >&5
+  echo "$as_me:5109: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -4655,7 +5116,7 @@ eval "$as_ac_var=no"
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:4658: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5119: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -4665,20 +5126,20 @@ EOF
 fi
 done
 
-if test "$ac_cv_prog_cc_cross" = yes ; then
+if test "$cross_compiling" = yes ; then
 
 for ac_func in \
                link \
                symlink
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:4675: checking for $ac_func" >&5
+echo "$as_me:5136: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4681 "configure"
+#line 5142 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -4709,16 +5170,16 @@ f = $ac_func;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4712: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5173: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4715: \$? = $ac_status" >&5
+  echo "$as_me:5176: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4718: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5179: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4721: \$? = $ac_status" >&5
+  echo "$as_me:5182: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -4728,7 +5189,7 @@ eval "$as_ac_var=no"
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:4731: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5192: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -4739,7 +5200,7 @@ fi
 done
 
 else
-       echo "$as_me:4742: checking if link/symlink functions work" >&5
+       echo "$as_me:5203: checking if link/symlink functions work" >&5
 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
 if test "${cf_cv_link_funcs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4752,7 +5213,7 @@ else
                        eval 'ac_cv_func_'$cf_func'=error'
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4755 "configure"
+#line 5216 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4782,15 +5243,15 @@ int main()
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:4785: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5246: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4788: \$? = $ac_status" >&5
+  echo "$as_me:5249: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:4790: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5251: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4793: \$? = $ac_status" >&5
+  echo "$as_me:5254: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
                        cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
@@ -4808,7 +5269,7 @@ fi
                test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
 
 fi
-echo "$as_me:4811: result: $cf_cv_link_funcs" >&5
+echo "$as_me:5272: result: $cf_cv_link_funcs" >&5
 echo "${ECHO_T}$cf_cv_link_funcs" >&6
        test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
 #define HAVE_LINK 1
@@ -4824,27 +5285,27 @@ with_links=no
 with_symlinks=no
 
 if test "$ac_cv_func_link" != yes ; then
-    echo "$as_me:4827: checking if tic should use symbolic links" >&5
+    echo "$as_me:5288: checking if tic should use symbolic links" >&5
 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
     if test "$ac_cv_func_symlink" = yes ; then
        with_symlinks=yes
     else
        with_symlinks=no
     fi
-    echo "$as_me:4834: result: $with_symlinks" >&5
+    echo "$as_me:5295: result: $with_symlinks" >&5
 echo "${ECHO_T}$with_symlinks" >&6
 elif test "$ac_cv_func_symlink" != yes ; then
-    echo "$as_me:4837: checking if tic should use hard links" >&5
+    echo "$as_me:5298: checking if tic should use hard links" >&5
 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
     if test "$ac_cv_func_link" = yes ; then
        with_links=yes
     else
        with_links=no
     fi
-    echo "$as_me:4844: result: $with_links" >&5
+    echo "$as_me:5305: result: $with_links" >&5
 echo "${ECHO_T}$with_links" >&6
 else
-    echo "$as_me:4847: checking if tic should use symbolic links" >&5
+    echo "$as_me:5308: checking if tic should use symbolic links" >&5
 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
 
 # Check whether --enable-symlinks or --disable-symlinks was given.
@@ -4854,7 +5315,7 @@ if test "${enable_symlinks+set}" = set; then
 else
   with_symlinks=no
 fi;
-    echo "$as_me:4857: result: $with_symlinks" >&5
+    echo "$as_me:5318: result: $with_symlinks" >&5
 echo "${ECHO_T}$with_symlinks" >&6
 fi
 
@@ -4867,7 +5328,7 @@ test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
 EOF
 
 ###   use option --enable-broken-linker to force on use of broken-linker support
-echo "$as_me:4870: checking if you want broken-linker support code" >&5
+echo "$as_me:5331: checking if you want broken-linker support code" >&5
 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
 
 # Check whether --enable-broken_linker or --disable-broken_linker was given.
@@ -4875,9 +5336,9 @@ if test "${enable_broken_linker+set}" = set; then
   enableval="$enable_broken_linker"
   with_broken_linker=$enableval
 else
-  with_broken_linker=$BROKEN_LINKER
+  with_broken_linker=${BROKEN_LINKER-no}
 fi;
-echo "$as_me:4880: result: $with_broken_linker" >&5
+echo "$as_me:5341: result: $with_broken_linker" >&5
 echo "${ECHO_T}$with_broken_linker" >&6
 
 BROKEN_LINKER=0
@@ -4887,7 +5348,7 @@ if test "$with_broken_linker" = yes ; then
 EOF
 
        BROKEN_LINKER=1
-elif test $DFT_LWR_MODEL = shared ; then
+elif test "$DFT_LWR_MODEL" = shared ; then
        case $cf_cv_system_name in #(vi
        cygwin*)
                cat >>confdefs.h <<\EOF
@@ -4902,7 +5363,7 @@ EOF
 fi
 
 ###   use option --with-bool to override bool's type
-echo "$as_me:4905: checking for type of bool" >&5
+echo "$as_me:5366: checking for type of bool" >&5
 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
 
 # Check whether --with-bool or --without-bool was given.
@@ -4912,11 +5373,11 @@ if test "${with_bool+set}" = set; then
 else
   NCURSES_BOOL=auto
 fi;
-echo "$as_me:4915: result: $NCURSES_BOOL" >&5
+echo "$as_me:5376: result: $NCURSES_BOOL" >&5
 echo "${ECHO_T}$NCURSES_BOOL" >&6
 
 ###   use option --with-ospeed to override ospeed's type
-echo "$as_me:4919: checking for type of ospeed" >&5
+echo "$as_me:5380: checking for type of ospeed" >&5
 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
 
 # Check whether --with-ospeed or --without-ospeed was given.
@@ -4926,11 +5387,11 @@ if test "${with_ospeed+set}" = set; then
 else
   NCURSES_OSPEED=short
 fi;
-echo "$as_me:4929: result: $NCURSES_OSPEED" >&5
+echo "$as_me:5390: result: $NCURSES_OSPEED" >&5
 echo "${ECHO_T}$NCURSES_OSPEED" >&6
 
 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
-echo "$as_me:4933: checking if tputs should process BSD-style prefix padding" >&5
+echo "$as_me:5394: checking if tputs should process BSD-style prefix padding" >&5
 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
 
 # Check whether --enable-bsdpad or --disable-bsdpad was given.
@@ -4940,14 +5401,14 @@ if test "${enable_bsdpad+set}" = set; then
 else
   with_bsdpad=no
 fi;
-echo "$as_me:4943: result: $with_bsdpad" >&5
+echo "$as_me:5404: result: $with_bsdpad" >&5
 echo "${ECHO_T}$with_bsdpad" >&6
 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
 #define BSD_TPUTS 1
 EOF
 
 ### Enable compiling-in rcs id's
-echo "$as_me:4950: checking if RCS identifiers should be compiled-in" >&5
+echo "$as_me:5411: checking if RCS identifiers should be compiled-in" >&5
 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
 
 # Check whether --with-rcs-ids or --without-rcs-ids was given.
@@ -4957,7 +5418,7 @@ if test "${with_rcs_ids+set}" = set; then
 else
   with_rcs_ids=no
 fi;
-echo "$as_me:4960: result: $with_rcs_ids" >&5
+echo "$as_me:5421: result: $with_rcs_ids" >&5
 echo "${ECHO_T}$with_rcs_ids" >&6
 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
 #define USE_RCS_IDS 1
@@ -4965,7 +5426,7 @@ EOF
 
 ###############################################################################
 
-echo "$as_me:4968: checking format of man-pages" >&5
+echo "$as_me:5429: checking format of man-pages" >&5
 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
 
 # Check whether --with-manpage-format or --without-manpage-format was given.
@@ -4976,47 +5437,92 @@ else
   MANPAGE_FORMAT=unknown
 fi;
 
-case ".$MANPAGE_FORMAT" in
-.gzip|.compress|.BSDI|.normal|.formatted) # (vi
-  ;;
-.unknown|.) # (vi
+test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
+MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
+
+cf_unknown=
+
+case $MANPAGE_FORMAT in
+unknown)
   if test -z "$MANPATH" ; then
     MANPATH="/usr/man:/usr/share/man"
   fi
+
   # look for the 'date' man-page (it's most likely to be installed!)
+  MANPAGE_FORMAT=
+  cf_preform=no
+  cf_catonly=yes
+  cf_example=date
+
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
-  MANPAGE_FORMAT=unknown
   for cf_dir in $MANPATH; do
     test -z "$cf_dir" && cf_dir=/usr/man
-    for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date
+    for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
     do
-       cf_test=`echo $cf_name | sed -e 's/*//'`
-       if test "x$cf_test" = "x$cf_name" ; then
-         case "$cf_name" in
-         *.gz) MANPAGE_FORMAT=gzip;;
-         *.Z)  MANPAGE_FORMAT=compress;;
-         *.0)  MANPAGE_FORMAT=BSDI,formatted;;
-         *)    MANPAGE_FORMAT=normal;;
-         esac
-         break
-       fi
+      cf_test=`echo $cf_name | sed -e 's/*//'`
+      if test "x$cf_test" = "x$cf_name" ; then
+
+       case "$cf_name" in
+       *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
+       *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
+       *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
+       *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
+       esac
+
+       case "$cf_name" in
+       $cf_dir/man*)
+         cf_catonly=no
+         ;;
+       $cf_dir/cat*)
+         cf_preform=yes
+         ;;
+       esac
+       break
+      fi
+
+      # if we found a match in either man* or cat*, stop looking
+      if test -n "$MANPAGE_FORMAT" ; then
+       cf_found=no
+       test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
+       test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
+       case "$cf_name" in
+       $cf_dir/cat*)
+         cf_found=yes
+         ;;
+       esac
+       test $cf_found=yes && break
+      fi
     done
-    if test "$MANPAGE_FORMAT" != "unknown" ; then
+    # only check the first directory in $MANPATH where we find manpages
+    if test -n "$MANPAGE_FORMAT" ; then
        break
     fi
   done
+  # if we did not find the example, just assume it is normal
+  test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
   IFS="$ac_save_ifs"
   ;;
-.*) # (vi
-  { echo "$as_me:5011: WARNING: Unexpected manpage-format" >&5
-echo "$as_me: WARNING: Unexpected manpage-format" >&2;}
+*)
+  for cf_option in $MANPAGE_FORMAT; do
+     case $cf_option in #(vi
+     gzip|compress|BSDI|normal|formatted|catonly)
+       ;;
+     *)
+       cf_unknown="$cf_unknown $cf_option"
+       ;;
+     esac
+  done
   ;;
 esac
 
-echo "$as_me:5016: result: $MANPAGE_FORMAT" >&5
+echo "$as_me:5518: result: $MANPAGE_FORMAT" >&5
 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
+if test -n "$cf_unknown" ; then
+  { echo "$as_me:5521: WARNING: Unexpected manpage-format $cf_unknown" >&5
+echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
+fi
 
-echo "$as_me:5019: checking for manpage renaming" >&5
+echo "$as_me:5525: checking for manpage renaming" >&5
 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
 
 # Check whether --with-manpage-renames or --without-manpage-renames was given.
@@ -5044,7 +5550,7 @@ if test "$MANPAGE_RENAMES" != no ; then
   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
   elif test ! -f $MANPAGE_RENAMES ; then
-    { { echo "$as_me:5047: error: not a filename: $MANPAGE_RENAMES" >&5
+    { { echo "$as_me:5553: error: not a filename: $MANPAGE_RENAMES" >&5
 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
    { (exit 1); exit 1; }; }
   fi
@@ -5058,24 +5564,55 @@ echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
   fi
 fi
 
-echo "$as_me:5061: result: $MANPAGE_RENAMES" >&5
+echo "$as_me:5567: result: $MANPAGE_RENAMES" >&5
 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
 
-echo "$as_me:5064: checking for manpage symlinks" >&5
-echo $ECHO_N "checking for manpage symlinks... $ECHO_C" >&6
+echo "$as_me:5570: checking if manpage aliases will be installed" >&5
+echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
+
+# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
+if test "${with_manpage_aliases+set}" = set; then
+  withval="$with_manpage_aliases"
+  MANPAGE_ALIASES=$withval
+else
+  MANPAGE_ALIASES=yes
+fi;
+
+echo "$as_me:5581: result: $MANPAGE_ALIASES" >&5
+echo "${ECHO_T}$MANPAGE_ALIASES" >&6
+
+if test "$LN_S" = "ln -s"; then
+       cf_use_symlinks=yes
+else
+       cf_use_symlinks=no
+fi
+
+MANPAGE_SYMLINKS=no
+if test "$MANPAGE_ALIASES" = yes ; then
+echo "$as_me:5592: checking if manpage symlinks should be used" >&5
+echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
 
 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
 if test "${with_manpage_symlinks+set}" = set; then
   withval="$with_manpage_symlinks"
   MANPAGE_SYMLINKS=$withval
 else
-  MANPAGE_SYMLINKS=yes
+  MANPAGE_SYMLINKS=$cf_use_symlinks
 fi;
 
-echo "$as_me:5075: result: $MANPAGE_SYMLINKS" >&5
+if test "$$cf_use_symlinks" = no; then
+if test "$MANPAGE_SYMLINKS" = yes ; then
+       { echo "$as_me:5605: WARNING: cannot make symlinks" >&5
+echo "$as_me: WARNING: cannot make symlinks" >&2;}
+       MANPAGE_SYMLINKS=no
+fi
+fi
+
+echo "$as_me:5611: result: $MANPAGE_SYMLINKS" >&5
 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
+fi
 
-echo "$as_me:5078: checking for manpage tbl" >&5
+echo "$as_me:5615: checking for manpage tbl" >&5
 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
 
 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
@@ -5086,7 +5623,7 @@ else
   MANPAGE_TBL=no
 fi;
 
-echo "$as_me:5089: result: $MANPAGE_TBL" >&5
+echo "$as_me:5626: result: $MANPAGE_TBL" >&5
 echo "${ECHO_T}$MANPAGE_TBL" >&6
 
   if test "$prefix" = "NONE" ; then
@@ -5096,20 +5633,40 @@ echo "${ECHO_T}$MANPAGE_TBL" >&6
   fi
 
   case "$MANPAGE_FORMAT" in # (vi
+  *catonly*) # (vi
+    cf_format=yes
+    cf_inboth=no
+    ;;
   *formatted*) # (vi
-    cf_subdir='$mandir/cat'
     cf_format=yes
+    cf_inboth=yes
     ;;
   *)
-    cf_subdir='$mandir/man'
     cf_format=no
+    cf_inboth=no
     ;;
   esac
 
 test ! -d man && mkdir man
-cat >man/edit_man.sh <<CF_EOF
+
+cf_so_strip=
+cf_compress=
+case "$MANPAGE_FORMAT" in #(vi
+*compress*) #(vi
+       cf_so_strip="Z"
+       cf_compress=compress
+  ;;
+*gzip*) #(vi
+       cf_so_strip="gz"
+       cf_compress=gzip
+  ;;
+esac
+
+cf_edit_man=man/edit_man.sh
+
+cat >$cf_edit_man <<CF_EOF
 #! /bin/sh
-# this script is generated by the configure-script
+# this script is generated by the configure-script CF_MAN_PAGES macro.
 prefix="$cf_prefix"
 datadir="$datadir"
 NCURSES_OSPEED="$NCURSES_OSPEED"
@@ -5122,23 +5679,41 @@ transform="$program_transform_name"
 TMP=\${TMPDIR-/tmp}/man\$\$
 trap "rm -f \$TMP" 0 1 2 5 15
 
+form=\$1
+shift || exit 1
+
 verb=\$1
-shift
+shift || exit 1
 
 mandir=\$1
-shift
+shift || exit 1
 
 srcdir=\$1
-shift
+shift || exit 1
+
+if test "\$form" = normal ; then
+       if test "$cf_format" = yes ; then
+       if test "$cf_inboth" = no ; then
+               sh \$0 format \$verb \$mandir \$srcdir \$*
+               exit $?
+       fi
+       fi
+       cf_subdir=\$mandir/man
+       cf_tables=$MANPAGE_TBL
+else
+       cf_subdir=\$mandir/cat
+       cf_tables=yes
+fi
 
+# process the list of source-files
 for i in \$* ; do
 case \$i in #(vi
 *.orig|*.rej) ;; #(vi
 *.[0-9]*)
        section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
        if test \$verb = installing ; then
-       if test ! -d $cf_subdir\${section} ; then
-               \$MKDIRS $cf_subdir\$section
+       if test ! -d \$cf_subdir\${section} ; then
+               \$MKDIRS \$cf_subdir\$section
        fi
        fi
        aliases=
@@ -5150,29 +5725,30 @@ case \$i in #(vi
                continue
        fi
 CF_EOF
-if test "$MANPAGE_SYMLINKS" = yes ; then
-cat >>man/edit_man.sh <<CF_EOF
+
+if test "$MANPAGE_ALIASES" != no ; then
+cat >>$cf_edit_man <<CF_EOF
        aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
 CF_EOF
 fi
 
 if test "$MANPAGE_RENAMES" = no ; then
-cat >>man/edit_man.sh <<CF_EOF
+cat >>$cf_edit_man <<CF_EOF
        # perform program transformations for section 1 man pages
        if test \$section = 1 ; then
-               target=$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
+               target=\$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
        else
-               target=$cf_subdir\${section}/\$source
+               target=\$cf_subdir\${section}/\$source
        fi
 CF_EOF
 else
-cat >>man/edit_man.sh <<CF_EOF
+cat >>$cf_edit_man <<CF_EOF
        target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
        if test -z "\$target" ; then
                echo '? missing rename for '\$source
                target="\$source"
        fi
-       target="$cf_subdir\${section}/\${target}"
+       target="\$cf_subdir\${section}/\${target}"
 CF_EOF
 fi
 
@@ -5180,12 +5756,12 @@ fi
 
        for cf_name in  captoinfo clear infocmp infotocap tic toe tput
        do
-cat >>man/edit_man.sh <<CF_EOF
+cat >>$cf_edit_man <<CF_EOF
        prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
 CF_EOF
        done
 
-cat >>man/edit_man.sh <<CF_EOF
+cat >>$cf_edit_man <<CF_EOF
        sed     -e "s,@DATADIR@,\$datadir," \\
                -e "s,@TERMINFO@,\$TERMINFO," \\
                -e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
@@ -5194,75 +5770,74 @@ CF_EOF
        for cf_name in  captoinfo clear infocmp infotocap tic toe tput
        do
                cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-cat >>man/edit_man.sh <<CF_EOF
+cat >>$cf_edit_man <<CF_EOF
                -e "s,@$cf_NAME@,\$prog_$cf_name," \\
 CF_EOF
        done
 
 if test -f $MANPAGE_RENAMES ; then
-cat >>man/edit_man.sh <<CF_EOF
-               < \$i | sed -f edit_man.sed >\$TMP
+cat >>$cf_edit_man <<CF_EOF
+               < \$i | sed -f $srcdir/edit_man.sed >\$TMP
 CF_EOF
 else
-cat >>man/edit_man.sh <<CF_EOF
+cat >>$cf_edit_man <<CF_EOF
                < \$i >\$TMP
 CF_EOF
 fi
-if test $MANPAGE_TBL = yes ; then
-cat >>man/edit_man.sh <<CF_EOF
+
+cat >>$cf_edit_man <<CF_EOF
+if test \$cf_tables = yes ; then
        tbl \$TMP >\$TMP.out
        mv \$TMP.out \$TMP
-CF_EOF
 fi
+CF_EOF
+
 if test $with_curses_h != yes ; then
-cat >>man/edit_man.sh <<CF_EOF
+cat >>$cf_edit_man <<CF_EOF
        sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
        mv \$TMP.out \$TMP
 CF_EOF
 fi
-if test $cf_format = yes ; then
-cat >>man/edit_man.sh <<CF_EOF
-       nroff -man \$TMP >\$TMP.out
-       mv \$TMP.out \$TMP
-CF_EOF
-fi
-case "$MANPAGE_FORMAT" in #(vi
-*compress*) #(vi
-cat >>man/edit_man.sh <<CF_EOF
-       if test \$verb = installing ; then
-       if ( compress -f \$TMP )
-       then
-               mv \$TMP.Z \$TMP
-       fi
+
+cat >>$cf_edit_man <<CF_EOF
+       if test \$form = format ; then
+               nroff -man \$TMP >\$TMP.out
+               mv \$TMP.out \$TMP
        fi
-       target="\$target.Z"
 CF_EOF
-  ;;
-*gzip*) #(vi
-cat >>man/edit_man.sh <<CF_EOF
+
+if test -n "$cf_compress" ; then
+cat >>$cf_edit_man <<CF_EOF
        if test \$verb = installing ; then
-       if ( gzip -f \$TMP )
+       if ( $cf_compress -f \$TMP )
        then
-               mv \$TMP.gz \$TMP
+               mv \$TMP.$cf_so_strip \$TMP
        fi
        fi
-       target="\$target.gz"
+       target="\$target.$cf_so_strip"
 CF_EOF
-  ;;
+fi
+
+case "$MANPAGE_FORMAT" in #(vi
 *BSDI*)
-cat >>man/edit_man.sh <<CF_EOF
-       # BSDI installs only .0 suffixes in the cat directories
-       target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`"
+cat >>$cf_edit_man <<CF_EOF
+       if test \$form = format ; then
+               # BSDI installs only .0 suffixes in the cat directories
+               target="\`echo \$target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
+       fi
 CF_EOF
   ;;
 esac
-cat >>man/edit_man.sh <<CF_EOF
-       suffix=\`basename \$target | sed -e 's/^[^.]*//'\`
+
+cat >>$cf_edit_man <<CF_EOF
+       suffix=\`basename \$target | sed -e 's%^[^.]*%%'\`
        if test \$verb = installing ; then
                echo \$verb \$target
                \$INSTALL_DATA \$TMP \$target
                test -n "\$aliases" && (
-                       cd $cf_subdir\${section} && (
+                       cd \$cf_subdir\${section} && (
+                               source=\`echo \$target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
+                               test -n "$cf_so_strip" && source=\`echo \$source |sed -e 's%\.$cf_so_strip\$%%'\`
                                target=\`basename \$target\`
                                for cf_alias in \$aliases
                                do
@@ -5270,19 +5845,31 @@ cat >>man/edit_man.sh <<CF_EOF
                                                cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
                                        fi
 
-                                       if test -f \$cf_alias\${suffix} ; then
-                                               if ( cmp -s \$target \$cf_alias\${suffix} )
-                                               then
-                                                       :
-                                               else
-                                                       echo .. \$verb alias \$cf_alias\${suffix}
-                                                       rm -f \$cf_alias\${suffix}
-                                                       $LN_S \$target \$cf_alias\${suffix}
+                                       if test "$MANPAGE_SYMLINKS" = yes ; then
+                                               if test -f \$cf_alias\${suffix} ; then
+                                                       if ( cmp -s \$target \$cf_alias\${suffix} )
+                                                       then
+                                                               continue
+                                                       fi
                                                fi
-                                       else
                                                echo .. \$verb alias \$cf_alias\${suffix}
                                                rm -f \$cf_alias\${suffix}
                                                $LN_S \$target \$cf_alias\${suffix}
+                                       elif test "\$target" != "\$cf_alias\${suffix}" ; then
+                                               echo ".so \$source" >\$TMP
+CF_EOF
+if test -n "$cf_compress" ; then
+cat >>$cf_edit_man <<CF_EOF
+                                               if test -n "$cf_so_strip" ; then
+                                                       $cf_compress -f \$TMP
+                                                       mv \$TMP.$cf_so_strip \$TMP
+                                               fi
+CF_EOF
+fi
+cat >>$cf_edit_man <<CF_EOF
+                                               echo .. \$verb alias \$cf_alias\${suffix}
+                                               rm -f \$cf_alias\${suffix}
+                                               \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
                                        fi
                                done
                        )
@@ -5291,7 +5878,7 @@ cat >>man/edit_man.sh <<CF_EOF
                echo \$verb \$target
                rm -f \$target
                test -n "\$aliases" && (
-                       cd $cf_subdir\${section} && (
+                       cd \$cf_subdir\${section} && (
                                for cf_alias in \$aliases
                                do
                                        if test \$section = 1 ; then
@@ -5310,14 +5897,21 @@ cat >>man/edit_man.sh <<CF_EOF
        ;;
 esac
 done
+
+if test $cf_inboth = yes ; then
+if test \$form != format ; then
+       sh \$0 format \$verb \$mandir \$srcdir \$*
+fi
+fi
+
 exit 0
 CF_EOF
-chmod 755 man/edit_man.sh
+chmod 755 $cf_edit_man
 
 ###############################################################################
 
 ### Note that some functions (such as const) are normally disabled anyway.
-echo "$as_me:5320: checking if you want to build with function extensions" >&5
+echo "$as_me:5914: checking if you want to build with function extensions" >&5
 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
 
 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
@@ -5327,7 +5921,7 @@ if test "${enable_ext_funcs+set}" = set; then
 else
   with_ext_funcs=yes
 fi;
-echo "$as_me:5330: result: $with_ext_funcs" >&5
+echo "$as_me:5924: result: $with_ext_funcs" >&5
 echo "${ECHO_T}$with_ext_funcs" >&6
 if test "$with_ext_funcs" = yes ; then
        NCURSES_EXT_FUNCS=1
@@ -5341,6 +5935,10 @@ EOF
 
        cat >>confdefs.h <<\EOF
 #define HAVE_RESIZETERM 1
+EOF
+
+       cat >>confdefs.h <<\EOF
+#define HAVE_RESIZE_TERM 1
 EOF
 
        cat >>confdefs.h <<\EOF
@@ -5360,7 +5958,7 @@ else
 fi
 
 ###   use option --enable-const to turn on use of const beyond that in XSI.
-echo "$as_me:5363: checking for extended use of const keyword" >&5
+echo "$as_me:5961: checking for extended use of const keyword" >&5
 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
 
 # Check whether --enable-const or --disable-const was given.
@@ -5370,14 +5968,14 @@ if test "${enable_const+set}" = set; then
 else
   with_ext_const=no
 fi;
-echo "$as_me:5373: result: $with_ext_const" >&5
+echo "$as_me:5971: result: $with_ext_const" >&5
 echo "${ECHO_T}$with_ext_const" >&6
 NCURSES_CONST='/*nothing*/'
 if test "$with_ext_const" = yes ; then
        NCURSES_CONST=const
 fi
 
-echo "$as_me:5380: checking if you want \$NCURSES_NO_PADDING code" >&5
+echo "$as_me:5978: checking if you want \$NCURSES_NO_PADDING code" >&5
 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
 
 # Check whether --enable-no-padding or --disable-no-padding was given.
@@ -5387,14 +5985,14 @@ if test "${enable_no_padding+set}" = set; then
 else
   with_no_padding=$with_ext_funcs
 fi;
-echo "$as_me:5390: result: $with_no_padding" >&5
+echo "$as_me:5988: result: $with_no_padding" >&5
 echo "${ECHO_T}$with_no_padding" >&6
 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
 #define NCURSES_NO_PADDING 1
 EOF
 
 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
-echo "$as_me:5397: checking if you want SIGWINCH handler" >&5
+echo "$as_me:5995: checking if you want SIGWINCH handler" >&5
 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
 
 # Check whether --enable-sigwinch or --disable-sigwinch was given.
@@ -5404,14 +6002,14 @@ if test "${enable_sigwinch+set}" = set; then
 else
   with_sigwinch=$with_ext_funcs
 fi;
-echo "$as_me:5407: result: $with_sigwinch" >&5
+echo "$as_me:6005: result: $with_sigwinch" >&5
 echo "${ECHO_T}$with_sigwinch" >&6
 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
 #define USE_SIGWINCH 1
 EOF
 
 ###   use option --enable-tcap-names to allow user to define new capabilities
-echo "$as_me:5414: checking if you want user-definable terminal capabilities like termcap" >&5
+echo "$as_me:6012: checking if you want user-definable terminal capabilities like termcap" >&5
 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
 
 # Check whether --enable-tcap-names or --disable-tcap-names was given.
@@ -5421,7 +6019,7 @@ if test "${enable_tcap_names+set}" = set; then
 else
   with_tcap_names=$with_ext_funcs
 fi;
-echo "$as_me:5424: result: $with_tcap_names" >&5
+echo "$as_me:6022: result: $with_tcap_names" >&5
 echo "${ECHO_T}$with_tcap_names" >&6
 NCURSES_XNAMES=0
 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
@@ -5429,7 +6027,7 @@ test "$with_tcap_names" = yes && NCURSES_XNAMES=1
 ###############################################################################
 # These options are relatively safe to experiment with.
 
-echo "$as_me:5432: checking if you want all development code" >&5
+echo "$as_me:6030: checking if you want all development code" >&5
 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
 
 # Check whether --with-develop or --without-develop was given.
@@ -5439,11 +6037,11 @@ if test "${with_develop+set}" = set; then
 else
   with_develop=no
 fi;
-echo "$as_me:5442: result: $with_develop" >&5
+echo "$as_me:6040: result: $with_develop" >&5
 echo "${ECHO_T}$with_develop" >&6
 
 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
-echo "$as_me:5446: checking if you want hard-tabs code" >&5
+echo "$as_me:6044: checking if you want hard-tabs code" >&5
 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
 
 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
@@ -5453,13 +6051,13 @@ if test "${enable_hard_tabs+set}" = set; then
 else
   with_hardtabs=$with_develop
 fi;
-echo "$as_me:5456: result: $with_hardtabs" >&5
+echo "$as_me:6054: result: $with_hardtabs" >&5
 echo "${ECHO_T}$with_hardtabs" >&6
 test "$with_hardtabs" = yes && cat >>confdefs.h <<\EOF
 #define USE_HARD_TABS 1
 EOF
 
-echo "$as_me:5462: checking if you want to use restrict environment when running as root" >&5
+echo "$as_me:6060: checking if you want to use restrict environment when running as root" >&5
 echo $ECHO_N "checking if you want to use restrict environment when running as root... $ECHO_C" >&6
 
 # Check whether --enable-root-environ or --disable-root-environ was given.
@@ -5469,14 +6067,14 @@ if test "${enable_root_environ+set}" = set; then
 else
   with_root_environ=yes
 fi;
-echo "$as_me:5472: result: $with_root_environ" >&5
+echo "$as_me:6070: result: $with_root_environ" >&5
 echo "${ECHO_T}$with_root_environ" >&6
 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
 #define USE_ROOT_ENVIRON 1
 EOF
 
 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
-echo "$as_me:5479: checking if you want limited support for xmc" >&5
+echo "$as_me:6077: checking if you want limited support for xmc" >&5
 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
 
 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
@@ -5486,7 +6084,7 @@ if test "${enable_xmc_glitch+set}" = set; then
 else
   with_xmc_glitch=$with_develop
 fi;
-echo "$as_me:5489: result: $with_xmc_glitch" >&5
+echo "$as_me:6087: result: $with_xmc_glitch" >&5
 echo "${ECHO_T}$with_xmc_glitch" >&6
 test "$with_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
 #define USE_XMC_SUPPORT 1
@@ -5495,7 +6093,7 @@ EOF
 ###############################################################################
 # These are just experimental, probably should not be in a package:
 
-echo "$as_me:5498: checking if you do not want to assume colors are white-on-black" >&5
+echo "$as_me:6096: checking if you do not want to assume colors are white-on-black" >&5
 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
 
 # Check whether --enable-assumed-color or --disable-assumed-color was given.
@@ -5505,14 +6103,14 @@ if test "${enable_assumed_color+set}" = set; then
 else
   with_assumed_color=yes
 fi;
-echo "$as_me:5508: result: $with_assumed_color" >&5
+echo "$as_me:6106: result: $with_assumed_color" >&5
 echo "${ECHO_T}$with_assumed_color" >&6
 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
 #define USE_ASSUMED_COLOR 1
 EOF
 
 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
-echo "$as_me:5515: checking if you want hashmap scrolling-optimization code" >&5
+echo "$as_me:6113: checking if you want hashmap scrolling-optimization code" >&5
 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
 
 # Check whether --enable-hashmap or --disable-hashmap was given.
@@ -5522,14 +6120,14 @@ if test "${enable_hashmap+set}" = set; then
 else
   with_hashmap=yes
 fi;
-echo "$as_me:5525: result: $with_hashmap" >&5
+echo "$as_me:6123: result: $with_hashmap" >&5
 echo "${ECHO_T}$with_hashmap" >&6
 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
 #define USE_HASHMAP 1
 EOF
 
 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
-echo "$as_me:5532: checking if you want colorfgbg code" >&5
+echo "$as_me:6130: checking if you want colorfgbg code" >&5
 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
 
 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
@@ -5539,13 +6137,13 @@ if test "${enable_colorfgbg+set}" = set; then
 else
   with_colorfgbg=no
 fi;
-echo "$as_me:5542: result: $with_colorfgbg" >&5
+echo "$as_me:6140: result: $with_colorfgbg" >&5
 echo "${ECHO_T}$with_colorfgbg" >&6
 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
 #define USE_COLORFGBG 1
 EOF
 
-echo "$as_me:5548: checking if you want experimental safe-sprintf code" >&5
+echo "$as_me:6146: checking if you want experimental safe-sprintf code" >&5
 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
 
 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
@@ -5555,7 +6153,7 @@ if test "${enable_safe_sprintf+set}" = set; then
 else
   with_safe_sprintf=no
 fi;
-echo "$as_me:5558: result: $with_safe_sprintf" >&5
+echo "$as_me:6156: result: $with_safe_sprintf" >&5
 echo "${ECHO_T}$with_safe_sprintf" >&6
 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
 #define USE_SAFE_SPRINTF 1
@@ -5564,7 +6162,7 @@ EOF
 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
 # when hashmap is used scroll hints are useless
 if test "$with_hashmap" = no ; then
-echo "$as_me:5567: checking if you want to experiment without scrolling-hints code" >&5
+echo "$as_me:6165: checking if you want to experiment without scrolling-hints code" >&5
 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
 
 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
@@ -5574,7 +6172,7 @@ if test "${enable_scroll_hints+set}" = set; then
 else
   with_scroll_hints=yes
 fi;
-echo "$as_me:5577: result: $with_scroll_hints" >&5
+echo "$as_me:6175: result: $with_scroll_hints" >&5
 echo "${ECHO_T}$with_scroll_hints" >&6
 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
 #define USE_SCROLL_HINTS 1
 ###   use option --enable-widec to turn on use of wide-character support
 NCURSES_CH_T=chtype
 NCURSES_LIBUTF8=0
+
+NEED_WCHAR_H=0
 NCURSES_MBSTATE_T=0
-echo "$as_me:5589: checking if you want experimental wide-character code" >&5
-echo $ECHO_N "checking if you want experimental wide-character code... $ECHO_C" >&6
+NCURSES_WCHAR_T=0
+NCURSES_WINT_T=0
 
-# Check whether --enable-widec or --disable-widec was given.
-if test "${enable_widec+set}" = set; then
-  enableval="$enable_widec"
-  with_widec=$enableval
+# Check to define _XOPEN_SOURCE "automatically"
+
+case $host_os in #(vi
+freebsd*) #(vi
+       CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600"
+       ;;
+hpux*) #(vi
+       CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
+       ;;
+irix6.*) #(vi
+       CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
+       ;;
+linux*) #(vi
+
+echo "$as_me:6206: checking if we must define _GNU_SOURCE" >&5
+echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_gnu_source+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  with_widec=no
-fi;
-echo "$as_me:5599: result: $with_widec" >&5
-echo "${ECHO_T}$with_widec" >&6
-if test "$with_widec" = yes ; then
-       LIB_SUFFIX="w${LIB_SUFFIX}"
-       cat >>confdefs.h <<\EOF
-#define USE_WIDEC_SUPPORT 1
-EOF
 
-       CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
-       # with_overwrite=no
-       NCURSES_CH_T=cchar_t
-       echo "$as_me:5610: checking for putwc" >&5
-echo $ECHO_N "checking for putwc... $ECHO_C" >&6
-if test "${ac_cv_func_putwc+set}" = set; then
+cat >conftest.$ac_ext <<_ACEOF
+#line 6213 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6228: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6231: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6234: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6237: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_gnu_source=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+        cat >conftest.$ac_ext <<_ACEOF
+#line 6246 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6261: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6264: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6267: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6270: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_gnu_source=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_gnu_source=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       CPPFLAGS="$cf_save"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:6285: result: $cf_cv_gnu_source" >&5
+echo "${ECHO_T}$cf_cv_gnu_source" >&6
+test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+
+       ;;
+mirbsd*) #(vi
+       # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
+       ;;
+netbsd*) #(vi
+       # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+       ;;
+openbsd*) #(vi
+       # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+       ;;
+osf[45]*) #(vi
+       CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
+       ;;
+sco*) #(vi
+       # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+       ;;
+solaris*) #(vi
+       CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
+       ;;
+*)
+       echo "$as_me:6309: checking if we should define _XOPEN_SOURCE" >&5
+echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_xopen_source+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 5616 "configure"
+
+       cat >conftest.$ac_ext <<_ACEOF
+#line 6316 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6331: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6334: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6337: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6340: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_xopen_source=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+        cat >conftest.$ac_ext <<_ACEOF
+#line 6349 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6364: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6367: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6370: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6373: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_xopen_source=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xopen_source=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       CPPFLAGS="$cf_save"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:6388: result: $cf_cv_xopen_source" >&5
+echo "${ECHO_T}$cf_cv_xopen_source" >&6
+test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+
+       # FreeBSD 5.x headers demand this...
+       echo "$as_me:6393: checking if we should define _POSIX_C_SOURCE" >&5
+echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_xopen_source+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+       cat >conftest.$ac_ext <<_ACEOF
+#line 6400 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6415: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6418: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6421: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6424: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_xopen_source=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
+        cat >conftest.$ac_ext <<_ACEOF
+#line 6433 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _POSIX_C_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6448: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6451: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6454: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6457: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_xopen_source=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xopen_source=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       CPPFLAGS="$cf_save"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:6472: result: $cf_cv_xopen_source" >&5
+echo "${ECHO_T}$cf_cv_xopen_source" >&6
+test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
+       ;;
+esac
+
+# use these variables to work around a defect in gcc's fixincludes.
+NCURSES_OK_WCHAR_T=
+NCURSES_OK_WINT_T=
+
+echo "$as_me:6482: checking if you want experimental wide-character code" >&5
+echo $ECHO_N "checking if you want experimental wide-character code... $ECHO_C" >&6
+
+# Check whether --enable-widec or --disable-widec was given.
+if test "${enable_widec+set}" = set; then
+  enableval="$enable_widec"
+  with_widec=$enableval
+else
+  with_widec=no
+fi;
+echo "$as_me:6492: result: $with_widec" >&5
+echo "${ECHO_T}$with_widec" >&6
+if test "$with_widec" = yes ; then
+       LIB_SUFFIX="w${LIB_SUFFIX}"
+       cat >>confdefs.h <<\EOF
+#define USE_WIDEC_SUPPORT 1
+EOF
+
+echo "$as_me:6500: checking if we must define _XOPEN_SOURCE" >&5
+echo $ECHO_N "checking if we must define _XOPEN_SOURCE... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 6503 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6519: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6522: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6525: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6528: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_result=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:6537: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+
+if test "$cf_result" = yes ; then
+       CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+elif test "x500" != "x" ; then
+       echo "$as_me:6543: checking checking for compatible value versus 500" >&5
+echo $ECHO_N "checking checking for compatible value versus 500... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line 6546 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#if _XOPEN_SOURCE-500 < 0
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6562: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6565: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6568: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6571: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_result=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       echo "$as_me:6580: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+       if test "$cf_result" = no ; then
+               # perhaps we can override it - try...
+               CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+       fi
+fi
+
+echo "$as_me:6588: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
+echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 6591 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE_EXTENDED
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6607: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6610: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6613: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6616: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_result=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:6625: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+
+if test "$cf_result" = yes ; then
+       CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
+elif test "x" != "x" ; then
+       echo "$as_me:6631: checking checking for compatible value versus " >&5
+echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line 6634 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#if _XOPEN_SOURCE_EXTENDED- < 0
+make an error
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6650: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6653: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6656: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6659: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_result=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       echo "$as_me:6668: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+       if test "$cf_result" = no ; then
+               # perhaps we can override it - try...
+               CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
+       fi
+fi
+
+       # with_overwrite=no
+       NCURSES_CH_T=cchar_t
+
+for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:6682: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6688 "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.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* 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 ();
+char (*f) ();
+
+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
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6719: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6722: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6725: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6728: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:6738: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+       if test "$ac_cv_func_putwc" != yes ; then
+
+echo "$as_me:6750: checking for putwc in libutf8" >&5
+echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
+if test "${cf_cv_libutf8+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+       cf_save_LIBS="$LIBS"
+       LIBS="-lutf8 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6759 "configure"
+#include "confdefs.h"
+
+#include <libutf8.h>
+int
+main ()
+{
+putwc(0,0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6772: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6775: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:6778: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6781: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_libutf8=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_libutf8=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+       LIBS="$cf_save_LIBS"
+
+fi
+echo "$as_me:6793: result: $cf_cv_libutf8" >&5
+echo "${ECHO_T}$cf_cv_libutf8" >&6
+
+if test "$cf_cv_libutf8" = yes ; then
+       cat >>confdefs.h <<\EOF
+#define HAVE_LIBUTF8_H 1
+EOF
+
+       LIBS="-lutf8 $LIBS"
+fi
+
+               if test "$cf_cv_libutf8" = yes ; then
+                       NCURSES_LIBUTF8=1
+               fi
+       fi
+
+# This is needed on Tru64 5.0 to declare mbstate_t
+echo "$as_me:6810: checking if we must include wchar.h to declare mbstate_t" >&5
+echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
+if test "${cf_cv_mbstate_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 6817 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+mbstate_t state
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6835: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6838: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6841: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6844: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_mbstate_t=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 6851 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char putwc (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char putwc ();
-char (*f) ();
 
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
 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_putwc) || defined (__stub___putwc)
-choke me
-#else
-f = putwc;
-#endif
-
+mbstate_t value
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5647: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6870: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5650: \$? = $ac_status" >&5
+  echo "$as_me:6873: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5653: \"$ac_try\"") >&5
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6876: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5656: \$? = $ac_status" >&5
+  echo "$as_me:6879: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_func_putwc=yes
+  cf_cv_mbstate_t=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_func_putwc=no
+cf_cv_mbstate_t=unknown
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:6891: result: $cf_cv_mbstate_t" >&5
+echo "${ECHO_T}$cf_cv_mbstate_t" >&6
+
+if test "$cf_cv_mbstate_t" = yes ; then
+       cat >>confdefs.h <<\EOF
+#define NEED_WCHAR_H 1
+EOF
+
+       NEED_WCHAR_H=1
 fi
-echo "$as_me:5666: result: $ac_cv_func_putwc" >&5
-echo "${ECHO_T}$ac_cv_func_putwc" >&6
 
-if test "$ac_cv_func_putwc" != yes ; then
+# if we do not find mbstate_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_mbstate_t" = unknown ; then
+       NCURSES_MBSTATE_T=1
+fi
 
-echo "$as_me:5671: checking for putwc in libutf8" >&5
-echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
-if test "${cf_cv_libutf8+set}" = set; then
+# This is needed on Tru64 5.0 to declare wchar_t
+echo "$as_me:6908: checking if we must include wchar.h to declare wchar_t" >&5
+echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
+if test "${cf_cv_wchar_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-       cf_save_LIBS="$LIBS"
-       LIBS="-lutf8 $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5680 "configure"
+#line 6915 "configure"
 #include "confdefs.h"
 
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef HAVE_LIBUTF8_H
 #include <libutf8.h>
+#endif
 int
 main ()
 {
-putwc(0,0);
+wchar_t state
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5693: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6933: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5696: \$? = $ac_status" >&5
+  echo "$as_me:6936: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5699: \"$ac_try\"") >&5
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6939: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5702: \$? = $ac_status" >&5
+  echo "$as_me:6942: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  cf_cv_libutf8=yes
+  cf_cv_wchar_t=no
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-cf_cv_libutf8=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-       LIBS="$cf_save_LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6949 "configure"
+#include "confdefs.h"
 
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+wchar_t value
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6968: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6971: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6974: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6977: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_wchar_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_wchar_t=unknown
 fi
-echo "$as_me:5714: result: $cf_cv_libutf8" >&5
-echo "${ECHO_T}$cf_cv_libutf8" >&6
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:6989: result: $cf_cv_wchar_t" >&5
+echo "${ECHO_T}$cf_cv_wchar_t" >&6
 
-if test "$cf_cv_libutf8" = yes ; then
+if test "$cf_cv_wchar_t" = yes ; then
        cat >>confdefs.h <<\EOF
-#define HAVE_LIBUTF8_H 1
+#define NEED_WCHAR_H 1
 EOF
 
-       LIBS="-lutf8 $LIBS"
+       NEED_WCHAR_H=1
 fi
 
-       if test "$cf_cv_libutf8" = yes ; then
-               NCURSES_LIBUTF8=1
-       fi
+# if we do not find wchar_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wchar_t" = unknown ; then
+       NCURSES_WCHAR_T=1
 fi
 
-# This is needed on Tru64 5.0 to declare mbstate_t
-echo "$as_me:5731: checking if we must include wchar.h to declare mbstate_t" >&5
-echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
-if test "${cf_cv_mbstate_t+set}" = set; then
+# if we find wchar_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wchar_t" != unknown ; then
+       NCURSES_OK_WCHAR_T=1
+fi
+
+# This is needed on Tru64 5.0 to declare wint_t
+echo "$as_me:7011: checking if we must include wchar.h to declare wint_t" >&5
+echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
+if test "${cf_cv_wint_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 5738 "configure"
+#line 7018 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
 #ifdef HAVE_LIBUTF8_H
 #include <libutf8.h>
 #endif
 int
 main ()
 {
-mbstate_t state
+wint_t state
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5754: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7036: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5757: \$? = $ac_status" >&5
+  echo "$as_me:7039: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:5760: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7042: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5763: \$? = $ac_status" >&5
+  echo "$as_me:7045: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  cf_cv_mbstate_t=no
+  cf_cv_wint_t=no
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 5770 "configure"
+#line 7052 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
 #include <wchar.h>
 #ifdef HAVE_LIBUTF8_H
 #include <libutf8.h>
@@ -5778,56 +7062,57 @@ cat >conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-mbstate_t value
+wint_t value
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5787: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7071: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5790: \$? = $ac_status" >&5
+  echo "$as_me:7074: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:5793: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7077: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5796: \$? = $ac_status" >&5
+  echo "$as_me:7080: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  cf_cv_mbstate_t=yes
+  cf_cv_wint_t=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-cf_cv_mbstate_t=unknown
+cf_cv_wint_t=unknown
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:5808: result: $cf_cv_mbstate_t" >&5
-echo "${ECHO_T}$cf_cv_mbstate_t" >&6
+echo "$as_me:7092: result: $cf_cv_wint_t" >&5
+echo "${ECHO_T}$cf_cv_wint_t" >&6
 
-if test "$cf_cv_mbstate_t" = yes ; then
+if test "$cf_cv_wint_t" = yes ; then
        cat >>confdefs.h <<\EOF
 #define NEED_WCHAR_H 1
 EOF
 
+       NEED_WCHAR_H=1
 fi
 
-if test "$cf_cv_mbstate_t" != unknown ; then
-       cat >>confdefs.h <<\EOF
-#define HAVE_MBSTATE_T 1
-EOF
+# if we do not find wint_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wint_t" = unknown ; then
+       NCURSES_WINT_T=1
+fi
 
+# if we find wint_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wint_t" != unknown ; then
+       NCURSES_OK_WINT_T=1
 fi
 
-       if test $cf_cv_mbstate_t = yes ; then
-               NCURSES_MBSTATE_T=1
-       fi
 fi
 
-echo "$as_me:5830: checking for terminal capabilities file" >&5
+echo "$as_me:7115: checking for terminal capabilities file" >&5
 echo $ECHO_N "checking for terminal capabilities file... $ECHO_C" >&6
 
 # Check whether --with-caps or --without-caps was given.
@@ -5838,13 +7123,13 @@ else
   TERMINFO_CAPS=Caps
 fi;
 test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
-echo "$as_me:5841: result: $TERMINFO_CAPS" >&5
+echo "$as_me:7126: result: $TERMINFO_CAPS" >&5
 echo "${ECHO_T}$TERMINFO_CAPS" >&6
 
 ###############################################################################
 
 ###    use option --disable-echo to suppress full display compiling commands
-echo "$as_me:5847: checking if you want to display full commands during build" >&5
+echo "$as_me:7132: checking if you want to display full commands during build" >&5
 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
 
 # Check whether --enable-echo or --disable-echo was given.
@@ -5860,11 +7145,11 @@ else
        ECHO_LINK='@ echo linking $@ ... ;'
        test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
 fi
-echo "$as_me:5863: result: $with_echo" >&5
+echo "$as_me:7148: result: $with_echo" >&5
 echo "${ECHO_T}$with_echo" >&6
 
 ###    use option --enable-warnings to turn on all gcc warnings
-echo "$as_me:5867: checking if you want to see compiler warnings" >&5
+echo "$as_me:7152: checking if you want to see compiler warnings" >&5
 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
 
 # Check whether --enable-warnings or --disable-warnings was given.
@@ -5872,7 +7157,7 @@ if test "${enable_warnings+set}" = set; then
   enableval="$enable_warnings"
   with_warnings=$enableval
 fi;
-echo "$as_me:5875: result: $with_warnings" >&5
+echo "$as_me:7160: result: $with_warnings" >&5
 echo "${ECHO_T}$with_warnings" >&6
 
 if test -n "$with_warnings"; then
@@ -5881,10 +7166,10 @@ if test -n "$with_warnings"; then
 if test "$GCC" = yes
 then
        cat > conftest.$ac_ext <<EOF
-#line 5884 "configure"
+#line 7169 "configure"
 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
 EOF
-       { echo "$as_me:5887: checking for $CC warning options..." >&5
+       { echo "$as_me:7172: checking for $CC warning options..." >&5
 echo "$as_me: checking for $CC warning options..." >&6;}
        cf_save_CFLAGS="$CFLAGS"
        EXTRA_CFLAGS="-W -Wall"
@@ -5904,15 +7189,27 @@ echo "$as_me: checking for $CC warning options..." >&6;}
                Wundef $cf_warn_CONST
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-               if { (eval echo "$as_me:5907: \"$ac_compile\"") >&5
+               if { (eval echo "$as_me:7192: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5910: \$? = $ac_status" >&5
+  echo "$as_me:7195: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-                       test -n "$verbose" && echo "$as_me:5912: result: ... -$cf_opt" >&5
+                       test -n "$verbose" && echo "$as_me:7197: result: ... -$cf_opt" >&5
 echo "${ECHO_T}... -$cf_opt" >&6
+                       case $cf_opt in #(vi
+                       Wcast-qual) #(vi
+                               CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
+                               ;;
+                       Winline) #(vi
+                               case $GCC_VERSION in
+                               3.3*)
+                                       test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
+
+                                       continue;;
+                               esac
+                               ;;
+                       esac
                        EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
-                       test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
                fi
        done
        rm -f conftest*
@@ -5939,10 +7236,10 @@ cat > conftest.i <<EOF
 EOF
 if test "$GCC" = yes
 then
-       { echo "$as_me:5942: checking for $CC __attribute__ directives..." >&5
+       { echo "$as_me:7239: checking for $CC __attribute__ directives..." >&5
 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
 cat > conftest.$ac_ext <<EOF
-#line 5945 "configure"
+#line 7242 "configure"
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -5980,16 +7277,14 @@ EOF
 EOF
                        ;;
                esac
-               if { (eval echo "$as_me:5983: \"$ac_compile\"") >&5
+               if { (eval echo "$as_me:7280: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5986: \$? = $ac_status" >&5
+  echo "$as_me:7283: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-                       test -n "$verbose" && echo "$as_me:5988: result: ... $cf_attribute" >&5
+                       test -n "$verbose" && echo "$as_me:7285: result: ... $cf_attribute" >&5
 echo "${ECHO_T}... $cf_attribute" >&6
                        cat conftest.h >>confdefs.h
-#              else
-#                      sed -e 's/__attr.*/\/*nothing*\//' conftest.h >>confdefs.h
                fi
        done
 else
@@ -5999,7 +7294,7 @@ rm -rf conftest*
 fi
 
 ###    use option --enable-assertions to turn on generation of assertion code
-echo "$as_me:6002: checking if you want to enable runtime assertions" >&5
+echo "$as_me:7297: checking if you want to enable runtime assertions" >&5
 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
 
 # Check whether --enable-assertions or --disable-assertions was given.
@@ -6009,7 +7304,7 @@ if test "${enable_assertions+set}" = set; then
 else
   with_assertions=no
 fi;
-echo "$as_me:6012: result: $with_assertions" >&5
+echo "$as_me:7307: result: $with_assertions" >&5
 echo "${ECHO_T}$with_assertions" >&6
 if test -n "$GCC"
 then
@@ -6061,14 +7356,75 @@ EOF
 
 fi;
 
+# Normally we only add trace() to the debug-library.  Allow this to be
+# extended to all models of the ncurses library:
+cf_all_traces=no
+case "$CFLAGS $CPPFLAGS" in
+*-DTRACE*)
+       cf_all_traces=yes
+       ;;
+esac
+
+echo "$as_me:7368: checking whether to add trace feature to all models" >&5
+echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
+
+# Check whether --with-trace or --without-trace was given.
+if test "${with_trace+set}" = set; then
+  withval="$with_trace"
+  cf_with_trace=$withval
+else
+  cf_with_trace=$cf_all_traces
+fi;
+echo "$as_me:7378: result: $with_trace" >&5
+echo "${ECHO_T}$with_trace" >&6
+
+if test "$cf_with_trace" = yes ; then
+       LIB_TRACING=all
+       ADA_TRACE=TRUE
+
+cf_new_cflags=
+cf_new_cppflags=
+for cf_add_cflags in -DTRACE
+do
+       case $cf_add_cflags in #(vi
+       -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+               case "$CPPFLAGS" in
+               *$cf_add_cflags) #(vi
+                       ;;
+               *) #(vi
+                       cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+                       ;;
+               esac
+               ;;
+       *)
+               cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+               ;;
+       esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+       CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+       CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+fi
+
+else
+       LIB_TRACING=DEBUG
+       ADA_TRACE=FALSE
+fi
+
 ###    Checks for libraries.
-echo "$as_me:6065: checking for gettimeofday" >&5
+echo "$as_me:7421: checking for gettimeofday" >&5
 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
 if test "${ac_cv_func_gettimeofday+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6071 "configure"
+#line 7427 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gettimeofday (); below.  */
@@ -6099,16 +7455,16 @@ f = gettimeofday;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6102: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7458: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6105: \$? = $ac_status" >&5
+  echo "$as_me:7461: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6108: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7464: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6111: \$? = $ac_status" >&5
+  echo "$as_me:7467: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_gettimeofday=yes
 else
@@ -6118,7 +7474,7 @@ ac_cv_func_gettimeofday=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:6121: result: $ac_cv_func_gettimeofday" >&5
+echo "$as_me:7477: result: $ac_cv_func_gettimeofday" >&5
 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
 if test $ac_cv_func_gettimeofday = yes; then
   cat >>confdefs.h <<\EOF
@@ -6127,7 +7483,7 @@ EOF
 
 else
 
-echo "$as_me:6130: checking for gettimeofday in -lbsd" >&5
+echo "$as_me:7486: checking for gettimeofday in -lbsd" >&5
 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6135,7 +7491,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lbsd  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6138 "configure"
+#line 7494 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -6154,16 +7510,16 @@ gettimeofday ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6157: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7513: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6160: \$? = $ac_status" >&5
+  echo "$as_me:7516: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6163: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7519: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6166: \$? = $ac_status" >&5
+  echo "$as_me:7522: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_bsd_gettimeofday=yes
 else
@@ -6174,7 +7530,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6177: result: $ac_cv_lib_bsd_gettimeofday" >&5
+echo "$as_me:7533: result: $ac_cv_lib_bsd_gettimeofday" >&5
 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
 if test $ac_cv_lib_bsd_gettimeofday = yes; then
   cat >>confdefs.h <<\EOF
@@ -6186,14 +7542,14 @@ fi
 
 fi
 
-echo "$as_me:6189: checking if -lm needed for math functions" >&5
+echo "$as_me:7545: checking if -lm needed for math functions" >&5
 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
 if test "${cf_cv_need_libm+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 6196 "configure"
+#line 7552 "configure"
 #include "confdefs.h"
 
        #include <stdio.h>
@@ -6208,124 +7564,40 @@ double x = rand(); printf("result = %g\n", sin(x))
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6211: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7567: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6214: \$? = $ac_status" >&5
+  echo "$as_me:7570: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6217: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7573: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6220: \$? = $ac_status" >&5
+  echo "$as_me:7576: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_need_libm=no
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-cf_cv_need_libm=yes
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:6230: result: $cf_cv_need_libm" >&5
-echo "${ECHO_T}$cf_cv_need_libm" >&6
-if test "$cf_cv_need_libm" = yes
-then
-MATH_LIB=-lm
-fi
-
-###    Checks for header files.
-
-echo "$as_me:6239: checking if we must define _GNU_SOURCE" >&5
-echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
-if test "${cf_cv_gnu_source+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cat >conftest.$ac_ext <<_ACEOF
-#line 6246 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int
-main ()
-{
-
-#ifndef _XOPEN_SOURCE
-make an error
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6261: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6264: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6267: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6270: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_gnu_source=no
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_save="$CPPFLAGS"
-        CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
-        cat >conftest.$ac_ext <<_ACEOF
-#line 6279 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int
-main ()
-{
-
-#ifdef _XOPEN_SOURCE
-make an error
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6294: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6297: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6300: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6303: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_gnu_source=no
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_gnu_source=yes
+cf_cv_need_libm=yes
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-       CPPFLAGS="$cf_save"
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
+echo "$as_me:7586: result: $cf_cv_need_libm" >&5
+echo "${ECHO_T}$cf_cv_need_libm" >&6
+if test "$cf_cv_need_libm" = yes
+then
+MATH_LIB=-lm
 fi
-echo "$as_me:6318: result: $cf_cv_gnu_source" >&5
-echo "${ECHO_T}$cf_cv_gnu_source" >&6
-test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
 
-echo "$as_me:6322: checking for ANSI C header files" >&5
+###    Checks for header files.
+echo "$as_me:7594: checking for ANSI C header files" >&5
 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
 if test "${ac_cv_header_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6328 "configure"
+#line 7600 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -6333,13 +7605,13 @@ else
 #include <float.h>
 
 _ACEOF
-if { (eval echo "$as_me:6336: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:7608: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:6342: \$? = $ac_status" >&5
+  echo "$as_me:7614: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -6361,7 +7633,7 @@ rm -f conftest.err conftest.$ac_ext
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
   cat >conftest.$ac_ext <<_ACEOF
-#line 6364 "configure"
+#line 7636 "configure"
 #include "confdefs.h"
 #include <string.h>
 
@@ -6379,7 +7651,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 <<_ACEOF
-#line 6382 "configure"
+#line 7654 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 
@@ -6400,7 +7672,7 @@ if test $ac_cv_header_stdc = yes; then
   :
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6403 "configure"
+#line 7675 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #if ((' ' & 0x0FF) == 0x020)
@@ -6426,15 +7698,15 @@ main ()
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:6429: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7701: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6432: \$? = $ac_status" >&5
+  echo "$as_me:7704: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:6434: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7706: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6437: \$? = $ac_status" >&5
+  echo "$as_me:7709: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -6447,7 +7719,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 fi
-echo "$as_me:6450: result: $ac_cv_header_stdc" >&5
+echo "$as_me:7722: result: $ac_cv_header_stdc" >&5
 echo "${ECHO_T}$ac_cv_header_stdc" >&6
 if test $ac_cv_header_stdc = yes; then
 
@@ -6460,13 +7732,13 @@ fi
 ac_header_dirent=no
 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-echo "$as_me:6463: checking for $ac_hdr that defines DIR" >&5
+echo "$as_me:7735: checking for $ac_hdr that defines DIR" >&5
 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6469 "configure"
+#line 7741 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -6481,16 +7753,16 @@ return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6484: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7756: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:6487: \$? = $ac_status" >&5
+  echo "$as_me:7759: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6490: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7762: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6493: \$? = $ac_status" >&5
+  echo "$as_me:7765: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_Header=yes"
 else
@@ -6500,7 +7772,7 @@ eval "$as_ac_Header=no"
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:6503: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:7775: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -6513,7 +7785,7 @@ fi
 done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
-  echo "$as_me:6516: checking for opendir in -ldir" >&5
+  echo "$as_me:7788: checking for opendir in -ldir" >&5
 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
 if test "${ac_cv_lib_dir_opendir+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6521,7 +7793,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldir  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6524 "configure"
+#line 7796 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -6540,16 +7812,16 @@ opendir ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6543: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7815: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6546: \$? = $ac_status" >&5
+  echo "$as_me:7818: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6549: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7821: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6552: \$? = $ac_status" >&5
+  echo "$as_me:7824: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dir_opendir=yes
 else
@@ -6560,14 +7832,14 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6563: result: $ac_cv_lib_dir_opendir" >&5
+echo "$as_me:7835: result: $ac_cv_lib_dir_opendir" >&5
 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
 if test $ac_cv_lib_dir_opendir = yes; then
   LIBS="$LIBS -ldir"
 fi
 
 else
-  echo "$as_me:6570: checking for opendir in -lx" >&5
+  echo "$as_me:7842: checking for opendir in -lx" >&5
 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
 if test "${ac_cv_lib_x_opendir+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6575,7 +7847,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lx  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6578 "configure"
+#line 7850 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -6594,16 +7866,16 @@ opendir ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6597: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7869: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6600: \$? = $ac_status" >&5
+  echo "$as_me:7872: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6603: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7875: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6606: \$? = $ac_status" >&5
+  echo "$as_me:7878: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_x_opendir=yes
 else
@@ -6614,7 +7886,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6617: result: $ac_cv_lib_x_opendir" >&5
+echo "$as_me:7889: result: $ac_cv_lib_x_opendir" >&5
 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
 if test $ac_cv_lib_x_opendir = yes; then
   LIBS="$LIBS -lx"
@@ -6622,13 +7894,13 @@ fi
 
 fi
 
-echo "$as_me:6625: checking whether time.h and sys/time.h may both be included" >&5
+echo "$as_me:7897: checking whether time.h and sys/time.h may both be included" >&5
 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
 if test "${ac_cv_header_time+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6631 "configure"
+#line 7903 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -6644,16 +7916,16 @@ return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6647: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7919: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:6650: \$? = $ac_status" >&5
+  echo "$as_me:7922: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6653: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7925: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6656: \$? = $ac_status" >&5
+  echo "$as_me:7928: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_header_time=yes
 else
@@ -6663,7 +7935,7 @@ ac_cv_header_time=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:6666: result: $ac_cv_header_time" >&5
+echo "$as_me:7938: result: $ac_cv_header_time" >&5
 echo "${ECHO_T}$ac_cv_header_time" >&6
 if test $ac_cv_header_time = yes; then
 
@@ -6673,14 +7945,14 @@ EOF
 
 fi
 
-echo "$as_me:6676: checking for regular-expression headers" >&5
+echo "$as_me:7948: checking for regular-expression headers" >&5
 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
 if test "${cf_cv_regex+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 6683 "configure"
+#line 7955 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <regex.h>
@@ -6698,16 +7970,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6701: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7973: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6704: \$? = $ac_status" >&5
+  echo "$as_me:7976: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6707: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7979: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6710: \$? = $ac_status" >&5
+  echo "$as_me:7982: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_regex="regex.h"
 else
@@ -6715,7 +7987,7 @@ else
 cat conftest.$ac_ext >&5
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 6718 "configure"
+#line 7990 "configure"
 #include "confdefs.h"
 #include <regexp.h>
 int
@@ -6730,16 +8002,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6733: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8005: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6736: \$? = $ac_status" >&5
+  echo "$as_me:8008: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6739: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8011: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6742: \$? = $ac_status" >&5
+  echo "$as_me:8014: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_regex="regexp.h"
 else
@@ -6749,7 +8021,7 @@ cat conftest.$ac_ext >&5
                cf_save_LIBS="$LIBS"
                LIBS="-lgen $LIBS"
                cat >conftest.$ac_ext <<_ACEOF
-#line 6752 "configure"
+#line 8024 "configure"
 #include "confdefs.h"
 #include <regexpr.h>
 int
@@ -6764,16 +8036,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6767: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8039: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6770: \$? = $ac_status" >&5
+  echo "$as_me:8042: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6773: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8045: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6776: \$? = $ac_status" >&5
+  echo "$as_me:8048: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_regex="regexpr.h"
 else
@@ -6789,7 +8061,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
 
-echo "$as_me:6792: result: $cf_cv_regex" >&5
+echo "$as_me:8064: result: $cf_cv_regex" >&5
 echo "${ECHO_T}$cf_cv_regex" >&6
 case $cf_cv_regex in
        regex.h)   cat >>confdefs.h <<\EOF
@@ -6822,26 +8094,26 @@ sys/time.h \
 sys/times.h \
 ttyent.h \
 unistd.h \
-
+wctype.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:6828: checking for $ac_header" >&5
+echo "$as_me:8100: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6834 "configure"
+#line 8106 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:6838: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:8110: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:6844: \$? = $ac_status" >&5
+  echo "$as_me:8116: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -6860,7 +8132,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:6863: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:8135: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -6874,7 +8146,7 @@ done
 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
 if test "$ISC" = yes ; then
 
-echo "$as_me:6877: checking for main in -lcposix" >&5
+echo "$as_me:8149: checking for main in -lcposix" >&5
 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
 if test "${ac_cv_lib_cposix_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6882,7 +8154,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcposix  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6885 "configure"
+#line 8157 "configure"
 #include "confdefs.h"
 
 int
@@ -6894,16 +8166,16 @@ main ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6897: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8169: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6900: \$? = $ac_status" >&5
+  echo "$as_me:8172: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6903: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8175: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6906: \$? = $ac_status" >&5
+  echo "$as_me:8178: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_cposix_main=yes
 else
@@ -6914,7 +8186,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6917: result: $ac_cv_lib_cposix_main" >&5
+echo "$as_me:8189: result: $ac_cv_lib_cposix_main" >&5
 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
 if test $ac_cv_lib_cposix_main = yes; then
   cat >>confdefs.h <<EOF
@@ -6925,7 +8197,7 @@ EOF
 
 fi
 
-       echo "$as_me:6928: checking for bzero in -linet" >&5
+       echo "$as_me:8200: checking for bzero in -linet" >&5
 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
 if test "${ac_cv_lib_inet_bzero+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6933,7 +8205,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-linet  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6936 "configure"
+#line 8208 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -6952,16 +8224,16 @@ bzero ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6955: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8227: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6958: \$? = $ac_status" >&5
+  echo "$as_me:8230: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6961: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8233: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6964: \$? = $ac_status" >&5
+  echo "$as_me:8236: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_inet_bzero=yes
 else
@@ -6972,21 +8244,21 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6975: result: $ac_cv_lib_inet_bzero" >&5
+echo "$as_me:8247: result: $ac_cv_lib_inet_bzero" >&5
 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
 if test $ac_cv_lib_inet_bzero = yes; then
   LIBS="$LIBS -linet"
 fi
 fi
 
-echo "$as_me:6982: checking if sys/time.h works with sys/select.h" >&5
+echo "$as_me:8254: checking if sys/time.h works with sys/select.h" >&5
 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
 if test "${cf_cv_sys_time_select+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 6989 "configure"
+#line 8261 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -7006,16 +8278,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7009: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8281: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7012: \$? = $ac_status" >&5
+  echo "$as_me:8284: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7015: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8287: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7018: \$? = $ac_status" >&5
+  echo "$as_me:8290: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_sys_time_select=yes
 else
@@ -7027,7 +8299,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
 
-echo "$as_me:7030: result: $cf_cv_sys_time_select" >&5
+echo "$as_me:8302: result: $cf_cv_sys_time_select" >&5
 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_SYS_TIME_SELECT 1
@@ -7040,7 +8312,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-echo "$as_me:7043: checking for $CC option to accept ANSI C" >&5
+echo "$as_me:8315: checking for $CC option to accept ANSI C" >&5
 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
 if test "${ac_cv_prog_cc_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7048,7 +8320,7 @@ else
   ac_cv_prog_cc_stdc=no
 ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
-#line 7051 "configure"
+#line 8323 "configure"
 #include "confdefs.h"
 #include <stdarg.h>
 #include <stdio.h>
@@ -7097,16 +8369,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO
 do
   CC="$ac_save_CC $ac_arg"
   rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7100: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8372: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7103: \$? = $ac_status" >&5
+  echo "$as_me:8375: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7106: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8378: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7109: \$? = $ac_status" >&5
+  echo "$as_me:8381: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cc_stdc=$ac_arg
 break
@@ -7123,21 +8395,21 @@ fi
 
 case "x$ac_cv_prog_cc_stdc" in
   x|xno)
-    echo "$as_me:7126: result: none needed" >&5
+    echo "$as_me:8398: result: none needed" >&5
 echo "${ECHO_T}none needed" >&6 ;;
   *)
-    echo "$as_me:7129: result: $ac_cv_prog_cc_stdc" >&5
+    echo "$as_me:8401: result: $ac_cv_prog_cc_stdc" >&5
 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
     CC="$CC $ac_cv_prog_cc_stdc" ;;
 esac
 
-echo "$as_me:7134: checking for an ANSI C-conforming const" >&5
+echo "$as_me:8406: checking for an ANSI C-conforming const" >&5
 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
 if test "${ac_cv_c_const+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7140 "configure"
+#line 8412 "configure"
 #include "confdefs.h"
 
 int
@@ -7195,16 +8467,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7198: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8470: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7201: \$? = $ac_status" >&5
+  echo "$as_me:8473: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7204: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8476: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7207: \$? = $ac_status" >&5
+  echo "$as_me:8479: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_c_const=yes
 else
@@ -7214,7 +8486,7 @@ ac_cv_c_const=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:7217: result: $ac_cv_c_const" >&5
+echo "$as_me:8489: result: $ac_cv_c_const" >&5
 echo "${ECHO_T}$ac_cv_c_const" >&6
 if test $ac_cv_c_const = no; then
 
@@ -7224,7 +8496,7 @@ EOF
 
 fi
 
-echo "$as_me:7227: checking for inline" >&5
+echo "$as_me:8499: checking for inline" >&5
 echo $ECHO_N "checking for inline... $ECHO_C" >&6
 if test "${ac_cv_c_inline+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7232,7 +8504,7 @@ else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat >conftest.$ac_ext <<_ACEOF
-#line 7235 "configure"
+#line 8507 "configure"
 #include "confdefs.h"
 #ifndef __cplusplus
 static $ac_kw int static_foo () {return 0; }
@@ -7241,16 +8513,16 @@ $ac_kw int foo () {return 0; }
 
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7244: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8516: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7247: \$? = $ac_status" >&5
+  echo "$as_me:8519: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7250: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8522: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7253: \$? = $ac_status" >&5
+  echo "$as_me:8525: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_c_inline=$ac_kw; break
 else
@@ -7261,7 +8533,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:7264: result: $ac_cv_c_inline" >&5
+echo "$as_me:8536: result: $ac_cv_c_inline" >&5
 echo "${ECHO_T}$ac_cv_c_inline" >&6
 case $ac_cv_c_inline in
   inline | yes) ;;
@@ -7280,14 +8552,14 @@ test "$ac_cv_c_inline" != no && cat >>confdefs.h <<\EOF
 #define CC_HAS_INLINE_FUNCS 1
 EOF
 
-echo "$as_me:7283: checking if unsigned literals are legal" >&5
+echo "$as_me:8555: checking if unsigned literals are legal" >&5
 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
 if test "${cf_cv_unsigned_literals+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 7290 "configure"
+#line 8562 "configure"
 #include "confdefs.h"
 
 int
@@ -7299,16 +8571,16 @@ long x = 1L + 1UL + 1U + 1
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7302: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8574: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7305: \$? = $ac_status" >&5
+  echo "$as_me:8577: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7308: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8580: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7311: \$? = $ac_status" >&5
+  echo "$as_me:8583: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_unsigned_literals=yes
 else
@@ -7320,10 +8592,10 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
 
-echo "$as_me:7323: result: $cf_cv_unsigned_literals" >&5
+echo "$as_me:8595: result: $cf_cv_unsigned_literals" >&5
 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
 
-echo "$as_me:7326: checking for type of chtype" >&5
+echo "$as_me:8598: checking for type of chtype" >&5
 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
 if test "${cf_cv_typeof_chtype+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7333,7 +8605,7 @@ else
   cf_cv_typeof_chtype=long
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7336 "configure"
+#line 8608 "configure"
 #include "confdefs.h"
 
 #ifdef USE_WIDEC_SUPPORT
@@ -7380,15 +8652,15 @@ int main()
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:7383: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8655: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7386: \$? = $ac_status" >&5
+  echo "$as_me:8658: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:7388: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8660: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7391: \$? = $ac_status" >&5
+  echo "$as_me:8663: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_typeof_chtype=`cat cf_test.out`
 else
@@ -7403,7 +8675,7 @@ fi
 
 fi
 
-echo "$as_me:7406: result: $cf_cv_typeof_chtype" >&5
+echo "$as_me:8678: result: $cf_cv_typeof_chtype" >&5
 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
 
 cat >>confdefs.h <<EOF
@@ -7416,14 +8688,14 @@ test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
 
 ###    Checks for external-data
 
-echo "$as_me:7419: checking if external errno is declared" >&5
+echo "$as_me:8691: checking if external errno is declared" >&5
 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
 if test "${cf_cv_dcl_errno+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
     cat >conftest.$ac_ext <<_ACEOF
-#line 7426 "configure"
+#line 8698 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_STDLIB_H
@@ -7441,16 +8713,16 @@ long x = (long) errno
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7444: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8716: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7447: \$? = $ac_status" >&5
+  echo "$as_me:8719: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7450: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8722: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7453: \$? = $ac_status" >&5
+  echo "$as_me:8725: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_dcl_errno=yes
 else
@@ -7461,7 +8733,7 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:7464: result: $cf_cv_dcl_errno" >&5
+echo "$as_me:8736: result: $cf_cv_dcl_errno" >&5
 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
 
 if test "$cf_cv_dcl_errno" = no ; then
@@ -7476,14 +8748,14 @@ fi
 
 # It's possible (for near-UNIX clones) that the data doesn't exist
 
-echo "$as_me:7479: checking if external errno exists" >&5
+echo "$as_me:8751: checking if external errno exists" >&5
 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
 if test "${cf_cv_have_errno+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
     cat >conftest.$ac_ext <<_ACEOF
-#line 7486 "configure"
+#line 8758 "configure"
 #include "confdefs.h"
 
 #undef errno
@@ -7498,16 +8770,16 @@ errno = 2
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7501: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8773: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7504: \$? = $ac_status" >&5
+  echo "$as_me:8776: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7507: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8779: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7510: \$? = $ac_status" >&5
+  echo "$as_me:8782: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_have_errno=yes
 else
@@ -7518,7 +8790,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:7521: result: $cf_cv_have_errno" >&5
+echo "$as_me:8793: result: $cf_cv_have_errno" >&5
 echo "${ECHO_T}$cf_cv_have_errno" >&6
 
 if test "$cf_cv_have_errno" = yes ; then
@@ -7531,7 +8803,7 @@ EOF
 
 fi
 
-echo "$as_me:7534: checking if data-only library module links" >&5
+echo "$as_me:8806: checking if data-only library module links" >&5
 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
 if test "${cf_cv_link_dataonly+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7539,20 +8811,20 @@ else
 
        rm -f conftest.a
        cat >conftest.$ac_ext <<EOF
-#line 7542 "configure"
+#line 8814 "configure"
 int    testdata[3] = { 123, 456, 789 };
 EOF
-       if { (eval echo "$as_me:7545: \"$ac_compile\"") >&5
+       if { (eval echo "$as_me:8817: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7548: \$? = $ac_status" >&5
+  echo "$as_me:8820: \$? = $ac_status" >&5
   (exit $ac_status); } ; then
                mv conftest.o data.o && \
                ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
        fi
        rm -f conftest.$ac_ext data.o
        cat >conftest.$ac_ext <<EOF
-#line 7555 "configure"
+#line 8827 "configure"
 int    testfunc()
 {
 #if defined(NeXT)
@@ -7565,23 +8837,23 @@ int     testfunc()
 #endif
 }
 EOF
-       if { (eval echo "$as_me:7568: \"$ac_compile\"") >&5
+       if { (eval echo "$as_me:8840: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7571: \$? = $ac_status" >&5
+  echo "$as_me:8843: \$? = $ac_status" >&5
   (exit $ac_status); }; then
                mv conftest.o func.o && \
                ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
        fi
        rm -f conftest.$ac_ext func.o
-       ( eval $ac_cv_prog_RANLIB conftest.a ) 2>&5 >/dev/null
+       ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
        cf_saveLIBS="$LIBS"
        LIBS="conftest.a $LIBS"
        if test "$cross_compiling" = yes; then
   cf_cv_link_dataonly=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7584 "configure"
+#line 8856 "configure"
 #include "confdefs.h"
 
        int main()
@@ -7592,15 +8864,15 @@ else
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:7595: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8867: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7598: \$? = $ac_status" >&5
+  echo "$as_me:8870: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:7600: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8872: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7603: \$? = $ac_status" >&5
+  echo "$as_me:8875: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_link_dataonly=yes
 else
@@ -7615,7 +8887,7 @@ fi
 
 fi
 
-echo "$as_me:7618: result: $cf_cv_link_dataonly" >&5
+echo "$as_me:8890: result: $cf_cv_link_dataonly" >&5
 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
 
 if test "$cf_cv_link_dataonly" = no ; then
@@ -7652,13 +8924,13 @@ vsnprintf \
 
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:7655: checking for $ac_func" >&5
+echo "$as_me:8927: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7661 "configure"
+#line 8933 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -7689,16 +8961,16 @@ f = $ac_func;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7692: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8964: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7695: \$? = $ac_status" >&5
+  echo "$as_me:8967: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7698: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8970: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7701: \$? = $ac_status" >&5
+  echo "$as_me:8973: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -7708,7 +8980,7 @@ eval "$as_ac_var=no"
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:7711: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:8983: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -7720,14 +8992,14 @@ done
 
 if test "$with_getcap" = "yes" ; then
 
-echo "$as_me:7723: checking for terminal-capability database functions" >&5
+echo "$as_me:8995: checking for terminal-capability database functions" >&5
 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
 if test "${cf_cv_cgetent+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 7730 "configure"
+#line 9002 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -7747,16 +9019,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7750: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9022: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7753: \$? = $ac_status" >&5
+  echo "$as_me:9025: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7756: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9028: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7759: \$? = $ac_status" >&5
+  echo "$as_me:9031: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_cgetent=yes
 else
@@ -7768,7 +9040,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
 
-echo "$as_me:7771: result: $cf_cv_cgetent" >&5
+echo "$as_me:9043: result: $cf_cv_cgetent" >&5
 echo "${ECHO_T}$cf_cv_cgetent" >&6
 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_BSD_CGETENT 1
@@ -7776,14 +9048,14 @@ EOF
 
 fi
 
-echo "$as_me:7779: checking for isascii" >&5
+echo "$as_me:9051: checking for isascii" >&5
 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
 if test "${cf_cv_have_isascii+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 7786 "configure"
+#line 9058 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 int
@@ -7795,16 +9067,16 @@ int x = isascii(' ')
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7798: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9070: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7801: \$? = $ac_status" >&5
+  echo "$as_me:9073: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7804: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9076: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7807: \$? = $ac_status" >&5
+  echo "$as_me:9079: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_have_isascii=yes
 else
@@ -7815,17 +9087,17 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:7818: result: $cf_cv_have_isascii" >&5
+echo "$as_me:9090: result: $cf_cv_have_isascii" >&5
 echo "${ECHO_T}$cf_cv_have_isascii" >&6
 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_ISASCII 1
 EOF
 
 if test "$ac_cv_func_sigaction" = yes; then
-echo "$as_me:7825: checking whether sigaction needs _POSIX_SOURCE" >&5
+echo "$as_me:9097: checking whether sigaction needs _POSIX_SOURCE" >&5
 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 7828 "configure"
+#line 9100 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -7839,16 +9111,16 @@ struct sigaction act
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7842: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9114: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7845: \$? = $ac_status" >&5
+  echo "$as_me:9117: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7848: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9120: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7851: \$? = $ac_status" >&5
+  echo "$as_me:9123: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   sigact_bad=no
 else
@@ -7856,7 +9128,7 @@ else
 cat conftest.$ac_ext >&5
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 7859 "configure"
+#line 9131 "configure"
 #include "confdefs.h"
 
 #define _POSIX_SOURCE
@@ -7871,16 +9143,16 @@ struct sigaction act
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7874: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9146: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7877: \$? = $ac_status" >&5
+  echo "$as_me:9149: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7880: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9152: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7883: \$? = $ac_status" >&5
+  echo "$as_me:9155: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   sigact_bad=yes
         cat >>confdefs.h <<\EOF
@@ -7895,7 +9167,7 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:7898: result: $sigact_bad" >&5
+echo "$as_me:9170: result: $sigact_bad" >&5
 echo "${ECHO_T}$sigact_bad" >&6
 fi
 
@@ -7906,23 +9178,23 @@ unistd.h \
 
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:7909: checking for $ac_header" >&5
+echo "$as_me:9181: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7915 "configure"
+#line 9187 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:7919: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:9191: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:7925: \$? = $ac_status" >&5
+  echo "$as_me:9197: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -7941,7 +9213,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:7944: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:9216: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -7956,23 +9228,23 @@ if test "$ISC" = yes ; then
 for ac_header in sys/termio.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:7959: checking for $ac_header" >&5
+echo "$as_me:9231: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7965 "configure"
+#line 9237 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:7969: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:9241: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:7975: \$? = $ac_status" >&5
+  echo "$as_me:9247: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -7991,7 +9263,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:7994: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:9266: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -8009,10 +9281,10 @@ if test "$ac_cv_header_termios_h" = yes ; then
        *)      termios_bad=maybe ;;
        esac
        if test "$termios_bad" = maybe ; then
-       echo "$as_me:8012: checking whether termios.h needs _POSIX_SOURCE" >&5
+       echo "$as_me:9284: checking whether termios.h needs _POSIX_SOURCE" >&5
 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
        cat >conftest.$ac_ext <<_ACEOF
-#line 8015 "configure"
+#line 9287 "configure"
 #include "confdefs.h"
 #include <termios.h>
 int
@@ -8024,16 +9296,16 @@ struct termios foo; int x = foo.c_iflag
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8027: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9299: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8030: \$? = $ac_status" >&5
+  echo "$as_me:9302: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8033: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9305: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8036: \$? = $ac_status" >&5
+  echo "$as_me:9308: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   termios_bad=no
 else
@@ -8041,7 +9313,7 @@ else
 cat conftest.$ac_ext >&5
 
                cat >conftest.$ac_ext <<_ACEOF
-#line 8044 "configure"
+#line 9316 "configure"
 #include "confdefs.h"
 
 #define _POSIX_SOURCE
@@ -8055,16 +9327,16 @@ struct termios foo; int x = foo.c_iflag
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8058: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9330: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8061: \$? = $ac_status" >&5
+  echo "$as_me:9333: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8064: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9336: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8067: \$? = $ac_status" >&5
+  echo "$as_me:9339: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   termios_bad=unknown
 else
@@ -8079,19 +9351,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-       echo "$as_me:8082: result: $termios_bad" >&5
+       echo "$as_me:9354: result: $termios_bad" >&5
 echo "${ECHO_T}$termios_bad" >&6
        fi
 fi
 
-echo "$as_me:8087: checking for tcgetattr" >&5
+echo "$as_me:9359: checking for tcgetattr" >&5
 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
 if test "${cf_cv_have_tcgetattr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 8094 "configure"
+#line 9366 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -8119,16 +9391,16 @@ tcgetattr(1, &foo);
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8122: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9394: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8125: \$? = $ac_status" >&5
+  echo "$as_me:9397: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8128: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9400: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8131: \$? = $ac_status" >&5
+  echo "$as_me:9403: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_have_tcgetattr=yes
 else
@@ -8138,20 +9410,20 @@ cf_cv_have_tcgetattr=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:8141: result: $cf_cv_have_tcgetattr" >&5
+echo "$as_me:9413: result: $cf_cv_have_tcgetattr" >&5
 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_TCGETATTR 1
 EOF
 
-echo "$as_me:8147: checking for vsscanf function or workaround" >&5
+echo "$as_me:9419: checking for vsscanf function or workaround" >&5
 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
 if test "${cf_cv_func_vsscanf+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 8154 "configure"
+#line 9426 "configure"
 #include "confdefs.h"
 
 #include <stdarg.h>
@@ -8167,16 +9439,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8170: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9442: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8173: \$? = $ac_status" >&5
+  echo "$as_me:9445: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8176: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9448: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8179: \$? = $ac_status" >&5
+  echo "$as_me:9451: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_func_vsscanf=vsscanf
 else
@@ -8184,7 +9456,7 @@ else
 cat conftest.$ac_ext >&5
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 8187 "configure"
+#line 9459 "configure"
 #include "confdefs.h"
 
 #include <stdarg.h>
@@ -8206,16 +9478,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8209: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9481: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8212: \$? = $ac_status" >&5
+  echo "$as_me:9484: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8215: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9487: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8218: \$? = $ac_status" >&5
+  echo "$as_me:9490: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_func_vsscanf=vfscanf
 else
@@ -8223,7 +9495,7 @@ else
 cat conftest.$ac_ext >&5
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 8226 "configure"
+#line 9498 "configure"
 #include "confdefs.h"
 
 #include <stdarg.h>
@@ -8245,16 +9517,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8248: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9520: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8251: \$? = $ac_status" >&5
+  echo "$as_me:9523: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8254: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9526: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8257: \$? = $ac_status" >&5
+  echo "$as_me:9529: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_func_vsscanf=_doscan
 else
@@ -8269,7 +9541,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:8272: result: $cf_cv_func_vsscanf" >&5
+echo "$as_me:9544: result: $cf_cv_func_vsscanf" >&5
 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
 
 case $cf_cv_func_vsscanf in #(vi
@@ -8287,7 +9559,7 @@ EOF
 ;;
 esac
 
-echo "$as_me:8290: checking for working mkstemp" >&5
+echo "$as_me:9562: checking for working mkstemp" >&5
 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
 if test "${cf_cv_func_mkstemp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8295,13 +9567,13 @@ else
 
 rm -f conftest*
 if test "$cross_compiling" = yes; then
-  echo "$as_me:8298: checking for mkstemp" >&5
+  echo "$as_me:9570: checking for mkstemp" >&5
 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
 if test "${ac_cv_func_mkstemp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8304 "configure"
+#line 9576 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char mkstemp (); below.  */
@@ -8332,16 +9604,16 @@ f = mkstemp;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8335: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9607: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8338: \$? = $ac_status" >&5
+  echo "$as_me:9610: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8341: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9613: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8344: \$? = $ac_status" >&5
+  echo "$as_me:9616: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_mkstemp=yes
 else
@@ -8351,12 +9623,12 @@ ac_cv_func_mkstemp=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:8354: result: $ac_cv_func_mkstemp" >&5
+echo "$as_me:9626: result: $ac_cv_func_mkstemp" >&5
 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8359 "configure"
+#line 9631 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -8394,15 +9666,15 @@ int main()
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8397: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9669: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8400: \$? = $ac_status" >&5
+  echo "$as_me:9672: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8402: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9674: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8405: \$? = $ac_status" >&5
+  echo "$as_me:9677: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_func_mkstemp=yes
 
@@ -8417,7 +9689,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 fi
-echo "$as_me:8420: result: $cf_cv_func_mkstemp" >&5
+echo "$as_me:9692: result: $cf_cv_func_mkstemp" >&5
 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
 if test "$cf_cv_func_mkstemp" = yes ; then
        cat >>confdefs.h <<\EOF
@@ -8434,21 +9706,21 @@ else
 fi
 
 if test "$cross_compiling" = yes ; then
-       { echo "$as_me:8437: WARNING: cross compiling: assume setvbuf params not reversed" >&5
+       { echo "$as_me:9709: WARNING: cross compiling: assume setvbuf params not reversed" >&5
 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
 else
-       echo "$as_me:8440: checking whether setvbuf arguments are reversed" >&5
+       echo "$as_me:9712: checking whether setvbuf arguments are reversed" >&5
 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:8446: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:9718: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8451 "configure"
+#line 9723 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 /* If setvbuf has the reversed format, exit 0. */
@@ -8465,15 +9737,15 @@ main ()
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8468: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9740: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8471: \$? = $ac_status" >&5
+  echo "$as_me:9743: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8473: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9745: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8476: \$? = $ac_status" >&5
+  echo "$as_me:9748: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_setvbuf_reversed=yes
 else
@@ -8486,7 +9758,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f core core.* *.core
 fi
-echo "$as_me:8489: result: $ac_cv_func_setvbuf_reversed" >&5
+echo "$as_me:9761: result: $ac_cv_func_setvbuf_reversed" >&5
 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
 if test $ac_cv_func_setvbuf_reversed = yes; then
 
@@ -8497,13 +9769,13 @@ EOF
 fi
 
 fi
-echo "$as_me:8500: checking return type of signal handlers" >&5
+echo "$as_me:9772: checking return type of signal handlers" >&5
 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
 if test "${ac_cv_type_signal+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8506 "configure"
+#line 9778 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -8525,16 +9797,16 @@ int i;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8528: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9800: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8531: \$? = $ac_status" >&5
+  echo "$as_me:9803: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8534: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9806: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8537: \$? = $ac_status" >&5
+  echo "$as_me:9809: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_type_signal=void
 else
@@ -8544,21 +9816,21 @@ ac_cv_type_signal=int
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:8547: result: $ac_cv_type_signal" >&5
+echo "$as_me:9819: result: $ac_cv_type_signal" >&5
 echo "${ECHO_T}$ac_cv_type_signal" >&6
 
 cat >>confdefs.h <<EOF
 #define RETSIGTYPE $ac_cv_type_signal
 EOF
 
-echo "$as_me:8554: checking for type sigaction_t" >&5
+echo "$as_me:9826: checking for type sigaction_t" >&5
 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
 if test "${cf_cv_type_sigaction+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 8561 "configure"
+#line 9833 "configure"
 #include "confdefs.h"
 
 #include <signal.h>
@@ -8571,16 +9843,16 @@ sigaction_t x
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8574: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9846: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8577: \$? = $ac_status" >&5
+  echo "$as_me:9849: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8580: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9852: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8583: \$? = $ac_status" >&5
+  echo "$as_me:9855: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_type_sigaction=yes
 else
@@ -8591,13 +9863,13 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$as_me:8594: result: $cf_cv_type_sigaction" >&5
+echo "$as_me:9866: result: $cf_cv_type_sigaction" >&5
 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_TYPE_SIGACTION 1
 EOF
 
-echo "$as_me:8600: checking declaration of size-change" >&5
+echo "$as_me:9872: checking declaration of size-change" >&5
 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
 if test "${cf_cv_sizechange+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8612,7 +9884,7 @@ do
     CPPFLAGS="$cf_save_CPPFLAGS"
     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
     cat >conftest.$ac_ext <<_ACEOF
-#line 8615 "configure"
+#line 9887 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef HAVE_TERMIOS_H
@@ -8656,16 +9928,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8659: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9931: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8662: \$? = $ac_status" >&5
+  echo "$as_me:9934: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8665: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9937: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8668: \$? = $ac_status" >&5
+  echo "$as_me:9940: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_sizechange=yes
 else
@@ -8684,7 +9956,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:8687: result: $cf_cv_sizechange" >&5
+echo "$as_me:9959: result: $cf_cv_sizechange" >&5
 echo "${ECHO_T}$cf_cv_sizechange" >&6
 if test "$cf_cv_sizechange" != no ; then
        cat >>confdefs.h <<\EOF
@@ -8701,13 +9973,13 @@ EOF
        esac
 fi
 
-echo "$as_me:8704: checking for memmove" >&5
+echo "$as_me:9976: checking for memmove" >&5
 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
 if test "${ac_cv_func_memmove+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8710 "configure"
+#line 9982 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char memmove (); below.  */
@@ -8738,16 +10010,16 @@ f = memmove;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8741: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10013: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8744: \$? = $ac_status" >&5
+  echo "$as_me:10016: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8747: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10019: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8750: \$? = $ac_status" >&5
+  echo "$as_me:10022: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_memmove=yes
 else
@@ -8757,19 +10029,19 @@ ac_cv_func_memmove=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:8760: result: $ac_cv_func_memmove" >&5
+echo "$as_me:10032: result: $ac_cv_func_memmove" >&5
 echo "${ECHO_T}$ac_cv_func_memmove" >&6
 if test $ac_cv_func_memmove = yes; then
   :
 else
 
-echo "$as_me:8766: checking for bcopy" >&5
+echo "$as_me:10038: checking for bcopy" >&5
 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
 if test "${ac_cv_func_bcopy+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8772 "configure"
+#line 10044 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char bcopy (); below.  */
@@ -8800,16 +10072,16 @@ f = bcopy;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8803: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10075: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8806: \$? = $ac_status" >&5
+  echo "$as_me:10078: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8809: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10081: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8812: \$? = $ac_status" >&5
+  echo "$as_me:10084: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_bcopy=yes
 else
@@ -8819,11 +10091,11 @@ ac_cv_func_bcopy=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:8822: result: $ac_cv_func_bcopy" >&5
+echo "$as_me:10094: result: $ac_cv_func_bcopy" >&5
 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
 if test $ac_cv_func_bcopy = yes; then
 
-       echo "$as_me:8826: checking if bcopy does overlapping moves" >&5
+       echo "$as_me:10098: checking if bcopy does overlapping moves" >&5
 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
 if test "${cf_cv_good_bcopy+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8833,7 +10105,7 @@ else
   cf_cv_good_bcopy=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8836 "configure"
+#line 10108 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -8847,15 +10119,15 @@ int main() {
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8850: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10122: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8853: \$? = $ac_status" >&5
+  echo "$as_me:10125: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8855: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10127: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8858: \$? = $ac_status" >&5
+  echo "$as_me:10130: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_good_bcopy=yes
 else
@@ -8868,7 +10140,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 fi
-echo "$as_me:8871: result: $cf_cv_good_bcopy" >&5
+echo "$as_me:10143: result: $cf_cv_good_bcopy" >&5
 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
 
 else
@@ -8889,7 +10161,7 @@ EOF
 
 fi
 
-echo "$as_me:8892: checking if poll really works" >&5
+echo "$as_me:10164: checking if poll really works" >&5
 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
 if test "${cf_cv_working_poll+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8899,7 +10171,7 @@ if test "$cross_compiling" = yes; then
   cf_cv_working_poll=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8902 "configure"
+#line 10174 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -8920,15 +10192,15 @@ int main() {
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8923: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10195: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8926: \$? = $ac_status" >&5
+  echo "$as_me:10198: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8928: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10200: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8931: \$? = $ac_status" >&5
+  echo "$as_me:10203: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_working_poll=yes
 else
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 fi
-echo "$as_me:8943: result: $cf_cv_working_poll" >&5
+echo "$as_me:10215: result: $cf_cv_working_poll" >&5
 echo "${ECHO_T}$cf_cv_working_poll" >&6
 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
 #define HAVE_WORKING_POLL 1
 EOF
 
 if test -z "$cf_user_CFLAGS" ; then
-       CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
-       CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
+       CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
+       CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
 fi
 
-echo "$as_me:8954: checking for stdbool.h" >&5
-echo $ECHO_N "checking for stdbool.h... $ECHO_C" >&6
-if test "${ac_cv_header_stdbool_h+set}" = set; then
+# Just in case, check if the C compiler has a bool type.
+
+echo "$as_me:10228: checking if we should include stdbool.h" >&5
+echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
+
+if test "${cf_cv_header_stdbool_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 8960 "configure"
+
+       cat >conftest.$ac_ext <<_ACEOF
+#line 10236 "configure"
 #include "confdefs.h"
-#include <stdbool.h>
+
+int
+main ()
+{
+bool foo = false
+  ;
+  return 0;
+}
 _ACEOF
-if { (eval echo "$as_me:8964: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:8970: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
+  echo "$as_me:10251: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:10254: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:10257: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_header_stdbool_h=0
 else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_cv_header_stdbool_h=yes
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 10264 "configure"
+#include "confdefs.h"
+
+#ifndef __BEOS__
+#include <stdbool.h>
+#endif
+
+int
+main ()
+{
+bool foo = false
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10280: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:10283: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:10286: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:10289: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_header_stdbool_h=1
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_header_stdbool_h=no
+cat conftest.$ac_ext >&5
+cf_cv_header_stdbool_h=0
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:8989: result: $ac_cv_header_stdbool_h" >&5
-echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
-if test $ac_cv_header_stdbool_h = yes; then
-  cf_cv_header_stdbool_h=1
-else
-  cf_cv_header_stdbool_h=0
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "$cf_cv_header_stdbool_h" = 1
+then   echo "$as_me:10303: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else   echo "$as_me:10305: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-echo "$as_me:8997: checking for builtin bool type" >&5
+echo "$as_me:10309: checking for builtin bool type" >&5
 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
+
 if test "${cf_cv_cc_bool_type+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 9004 "configure"
+#line 10317 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -9016,16 +10329,16 @@ bool x = false
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9019: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10332: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9022: \$? = $ac_status" >&5
+  echo "$as_me:10335: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9025: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10338: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9028: \$? = $ac_status" >&5
+  echo "$as_me:10341: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_cc_bool_type=1
 else
@@ -9038,12 +10351,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
 if test "$cf_cv_cc_bool_type" = 1
-then   echo "$as_me:9041: result: yes" >&5
+then   echo "$as_me:10354: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-else   echo "$as_me:9043: result: no" >&5
+else   echo "$as_me:10356: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
+# Check for C++ compiler characteristics (and ensure that it's there!)
 if test -n "$CXX" ; then
        ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -9060,7 +10374,7 @@ os2*) #(vi
        cf_stdcpp_libname=stdc++
        ;;
 esac
-echo "$as_me:9063: checking for library $cf_stdcpp_libname" >&5
+echo "$as_me:10377: checking for library $cf_stdcpp_libname" >&5
 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
 if test "${cf_cv_libstdcpp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9069,7 +10383,7 @@ else
        cf_save="$LIBS"
        LIBS="$LIBS -l$cf_stdcpp_libname"
 cat >conftest.$ac_ext <<_ACEOF
-#line 9072 "configure"
+#line 10386 "configure"
 #include "confdefs.h"
 
 #include <strstream.h>
@@ -9085,16 +10399,16 @@ strstreambuf foo(buf, sizeof(buf))
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9088: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10402: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9091: \$? = $ac_status" >&5
+  echo "$as_me:10405: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9094: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10408: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9097: \$? = $ac_status" >&5
+  echo "$as_me:10411: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_libstdcpp=yes
 else
@@ -9106,7 +10420,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
        LIBS="$cf_save"
 
 fi
-echo "$as_me:9109: result: $cf_cv_libstdcpp" >&5
+echo "$as_me:10423: result: $cf_cv_libstdcpp" >&5
 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
 fi
@@ -9126,13 +10440,13 @@ os2*) #(vi
        cf_gpp_libname=g++
        ;;
 esac
-if test "$ac_cv_cxx_compiler_gnu" = yes; then
-       echo "$as_me:9130: checking for lib$cf_gpp_libname" >&5
+if test "$GXX" = yes; then
+       echo "$as_me:10444: checking for lib$cf_gpp_libname" >&5
 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
        cf_save="$LIBS"
        LIBS="$LIBS -l$cf_gpp_libname"
        cat >conftest.$ac_ext <<_ACEOF
-#line 9135 "configure"
+#line 10449 "configure"
 #include "confdefs.h"
 
 #include <$cf_gpp_libname/builtin.h>
@@ -9146,16 +10460,16 @@ two_arg_error_handler_t foo2 = lib_error_handler
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9149: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10463: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9152: \$? = $ac_status" >&5
+  echo "$as_me:10466: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9155: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10469: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9158: \$? = $ac_status" >&5
+  echo "$as_me:10472: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cxx_library=yes
         CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
@@ -9174,7 +10488,7 @@ else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 9177 "configure"
+#line 10491 "configure"
 #include "confdefs.h"
 
 #include <builtin.h>
@@ -9188,16 +10502,16 @@ two_arg_error_handler_t foo2 = lib_error_handler
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9191: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10505: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9194: \$? = $ac_status" >&5
+  echo "$as_me:10508: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9197: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10511: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9200: \$? = $ac_status" >&5
+  echo "$as_me:10514: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cxx_library=yes
         CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
@@ -9214,7 +10528,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
        LIBS="$cf_save"
-       echo "$as_me:9217: result: $cf_cxx_library" >&5
+       echo "$as_me:10531: result: $cf_cxx_library" >&5
 echo "${ECHO_T}$cf_cxx_library" >&6
 fi
 
@@ -9229,7 +10543,7 @@ ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-echo "$as_me:9232: checking how to run the C++ preprocessor" >&5
+echo "$as_me:10546: checking how to run the C++ preprocessor" >&5
 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
 if test -z "$CXXCPP"; then
   if test "${ac_cv_prog_CXXCPP+set}" = set; then
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line 9249 "configure"
+#line 10563 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:9254: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10568: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:9260: \$? = $ac_status" >&5
+  echo "$as_me:10574: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -9280,17 +10594,17 @@ rm -f conftest.err conftest.$ac_ext
   # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line 9283 "configure"
+#line 10597 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:9287: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10601: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:9293: \$? = $ac_status" >&5
+  echo "$as_me:10607: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -9327,7 +10641,7 @@ fi
 else
   ac_cv_prog_CXXCPP=$CXXCPP
 fi
-echo "$as_me:9330: result: $CXXCPP" >&5
+echo "$as_me:10644: result: $CXXCPP" >&5
 echo "${ECHO_T}$CXXCPP" >&6
 ac_preproc_ok=false
 for ac_cxx_preproc_warn_flag in '' yes
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line 9340 "configure"
+#line 10654 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:9345: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10659: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:9351: \$? = $ac_status" >&5
+  echo "$as_me:10665: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -9371,17 +10685,17 @@ rm -f conftest.err conftest.$ac_ext
   # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line 9374 "configure"
+#line 10688 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:9378: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10692: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:9384: \$? = $ac_status" >&5
+  echo "$as_me:10698: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -9409,7 +10723,7 @@ rm -f conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then
   :
 else
-  { { echo "$as_me:9412: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
+  { { echo "$as_me:10726: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -9423,23 +10737,23 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 for ac_header in typeinfo
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:9426: checking for $ac_header" >&5
+echo "$as_me:10740: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9432 "configure"
+#line 10746 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:9436: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10750: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:9442: \$? = $ac_status" >&5
+  echo "$as_me:10756: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -9458,7 +10772,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:9461: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:10775: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -9468,57 +10782,96 @@ EOF
 fi
 done
 
-echo "$as_me:9471: checking for stdbool.h" >&5
-echo $ECHO_N "checking for stdbool.h... $ECHO_C" >&6
-if test "${ac_cv_header_stdbool_h+set}" = set; then
+echo "$as_me:10785: checking if we should include stdbool.h" >&5
+echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
+
+if test "${cf_cv_header_stdbool_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 9477 "configure"
+
+       cat >conftest.$ac_ext <<_ACEOF
+#line 10793 "configure"
 #include "confdefs.h"
-#include <stdbool.h>
+
+int
+main ()
+{
+bool foo = false
+  ;
+  return 0;
+}
 _ACEOF
-if { (eval echo "$as_me:9481: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10805: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:9487: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
+  echo "$as_me:10808: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:10811: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:10814: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_header_stdbool_h=0
 else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_cv_header_stdbool_h=yes
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 10821 "configure"
+#include "confdefs.h"
+
+#ifndef __BEOS__
+#include <stdbool.h>
+#endif
+
+int
+main ()
+{
+bool foo = false
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10837: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:10840: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:10843: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:10846: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_header_stdbool_h=1
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_header_stdbool_h=no
+cat conftest.$ac_ext >&5
+cf_cv_header_stdbool_h=0
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:9506: result: $ac_cv_header_stdbool_h" >&5
-echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
-if test $ac_cv_header_stdbool_h = yes; then
-  cf_cv_header_stdbool_h=1
-else
-  cf_cv_header_stdbool_h=0
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "$cf_cv_header_stdbool_h" = 1
+then   echo "$as_me:10860: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else   echo "$as_me:10862: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-echo "$as_me:9514: checking for builtin bool type" >&5
+echo "$as_me:10866: checking for builtin bool type" >&5
 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
+
 if test "${cf_cv_builtin_bool+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 9521 "configure"
+#line 10874 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -9533,16 +10886,16 @@ bool x = false
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9536: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10889: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9539: \$? = $ac_status" >&5
+  echo "$as_me:10892: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9542: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10895: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9545: \$? = $ac_status" >&5
+  echo "$as_me:10898: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_builtin_bool=1
 else
@@ -9555,13 +10908,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
 if test "$cf_cv_builtin_bool" = 1
-then   echo "$as_me:9558: result: yes" >&5
+then   echo "$as_me:10911: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-else   echo "$as_me:9560: result: no" >&5
+else   echo "$as_me:10913: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
-echo "$as_me:9564: checking for size of bool" >&5
+echo "$as_me:10917: checking for size of bool" >&5
 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
 if test "${cf_cv_type_of_bool+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9572,7 +10925,7 @@ else
   cf_cv_type_of_bool=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9575 "configure"
+#line 10928 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -9614,15 +10967,15 @@ main()
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9617: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10970: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9620: \$? = $ac_status" >&5
+  echo "$as_me:10973: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:9622: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10975: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9625: \$? = $ac_status" >&5
+  echo "$as_me:10978: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_type_of_bool=`cat cf_test.out`
                 if test -z "$cf_cv_type_of_bool"; then
 fi
 
        rm -f cf_test.out
-echo "$as_me:9643: result: $cf_cv_type_of_bool" >&5
+echo "$as_me:10996: result: $cf_cv_type_of_bool" >&5
 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
 if test "$cf_cv_type_of_bool" = unknown ; then
        case .$NCURSES_BOOL in #(vi
        .auto|.) NCURSES_BOOL=unsigned;;
        esac
-       { echo "$as_me:9649: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
+       { echo "$as_me:11002: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
        cf_cv_type_of_bool=$NCURSES_BOOL
 fi
 
-echo "$as_me:9654: checking for special defines needed for etip.h" >&5
+echo "$as_me:11007: checking for special defines needed for etip.h" >&5
 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
 cf_save_CXXFLAGS="$CXXFLAGS"
 cf_result="none"
@@ -9659,11 +11012,11 @@ for cf_math in "" MATH_H
 do
 for cf_excp in "" MATH_EXCEPTION
 do
-       CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu"
+       CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
        test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
        test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
 cat >conftest.$ac_ext <<_ACEOF
-#line 9666 "configure"
+#line 11019 "configure"
 #include "confdefs.h"
 
 #include <etip.h.in>
@@ -9677,16 +11030,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9680: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11033: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9683: \$? = $ac_status" >&5
+  echo "$as_me:11036: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9686: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11039: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9689: \$? = $ac_status" >&5
+  echo "$as_me:11042: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
        test -n "$cf_math" && cat >>confdefs.h <<EOF
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
 done
-echo "$as_me:9710: result: $cf_result" >&5
+echo "$as_me:11063: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 CXXFLAGS="$cf_save_CXXFLAGS"
 
 if test -n "$CXX"; then
-echo "$as_me:9715: checking if $CXX accepts parameter initialization" >&5
+echo "$as_me:11068: checking if $CXX accepts parameter initialization" >&5
 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
 if test "${cf_cv_cpp_param_init+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9728,7 +11081,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   cf_cv_cpp_param_init=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9731 "configure"
+#line 11084 "configure"
 #include "confdefs.h"
 
 class TEST {
@@ -9747,15 +11100,15 @@ void main() { }
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9750: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11103: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9753: \$? = $ac_status" >&5
+  echo "$as_me:11106: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:9755: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11108: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9758: \$? = $ac_status" >&5
+  echo "$as_me:11111: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_cpp_param_init=yes
 else
@@ -9773,7 +11126,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 fi
-echo "$as_me:9776: result: $cf_cv_cpp_param_init" >&5
+echo "$as_me:11129: result: $cf_cv_cpp_param_init" >&5
 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
 fi
 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
@@ -9791,23 +11144,23 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 for ac_header in strstream.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:9794: checking for $ac_header" >&5
+echo "$as_me:11147: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9800 "configure"
+#line 11153 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:9804: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:11157: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:9810: \$? = $ac_status" >&5
+  echo "$as_me:11163: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -9826,7 +11179,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:9829: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:11182: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -9836,7 +11189,7 @@ EOF
 fi
 done
 
-echo "$as_me:9839: checking if $CXX supports vscan function" >&5
+echo "$as_me:11192: checking if $CXX supports vscan function" >&5
 echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
 if test "${cf_cv_cpp_vscan_func+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9850,7 +11203,7 @@ else
        strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
        esac
        cat >conftest.$ac_ext <<_ACEOF
-#line 9853 "configure"
+#line 11206 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -9895,16 +11248,16 @@ int tmp, foo = scanw("%d", &tmp)
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9898: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11251: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9901: \$? = $ac_status" >&5
+  echo "$as_me:11254: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9904: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11257: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9907: \$? = $ac_status" >&5
+  echo "$as_me:11260: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_cpp_vscan_func=$cf_vscan_func; break
 else
@@ -9917,7 +11270,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
        done
 
 fi
-echo "$as_me:9920: result: $cf_cv_cpp_vscan_func" >&5
+echo "$as_me:11273: result: $cf_cv_cpp_vscan_func" >&5
 echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
 
 ac_ext=cc
@@ -9999,7 +11352,7 @@ else
        else
                if test "$cf_cv_header_stdbool_h" = 1 ; then
 
-echo "$as_me:10002: checking for size of bool" >&5
+echo "$as_me:11355: checking for size of bool" >&5
 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
 if test "${cf_cv_type_of_bool+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10010,7 +11363,7 @@ else
   cf_cv_type_of_bool=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 10013 "configure"
+#line 11366 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -10052,15 +11405,15 @@ main()
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10055: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11408: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10058: \$? = $ac_status" >&5
+  echo "$as_me:11411: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:10060: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11413: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10063: \$? = $ac_status" >&5
+  echo "$as_me:11416: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_type_of_bool=`cat cf_test.out`
                 if test -z "$cf_cv_type_of_bool"; then
 fi
 
        rm -f cf_test.out
-echo "$as_me:10081: result: $cf_cv_type_of_bool" >&5
+echo "$as_me:11434: result: $cf_cv_type_of_bool" >&5
 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
 if test "$cf_cv_type_of_bool" = unknown ; then
        case .$NCURSES_BOOL in #(vi
        .auto|.) NCURSES_BOOL=unsigned;;
        esac
-       { echo "$as_me:10087: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
+       { echo "$as_me:11440: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
        cf_cv_type_of_bool=$NCURSES_BOOL
 fi
 
                else
-                       echo "$as_me:10093: checking for fallback type of bool" >&5
+                       echo "$as_me:11446: checking for fallback type of bool" >&5
 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
                        case "$host_cpu" in #(vi
                        i?86)   cf_cv_type_of_bool=char ;; #(vi
                        *)      cf_cv_type_of_bool=int  ;;
                        esac
-                       echo "$as_me:10099: result: $cf_cv_type_of_bool" >&5
+                       echo "$as_me:11452: result: $cf_cv_type_of_bool" >&5
 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
                fi
        fi
 fi
 
+# If the C compiler did not declare bool, and we did not determine that the C++
+# compiler does not declare bool, turn on an ifdef in curses.h that makes the
+# ncurses library use the same type as C++ bool.  Note that this allows one to
+# specify the type of bool in a configure-script option and postpone
+# integration with the C++ compiler provided that the types are compatible.
+USE_CXX_BOOL=1
+if test $cf_cv_cc_bool_type = 1
+then
+       # oops: C has a bool.  Unlikely, but C++ could differ.
+       USE_CXX_BOOL=0
+elif test $cf_cv_builtin_bool = 0
+then
+       # C++ has no bool
+       USE_CXX_BOOL=0
+else
+       # this is the normal case
+       USE_CXX_BOOL='defined(__cplusplus)'
+fi
+
 if test "$cf_with_ada" != "no" ; then
 cf_ada_make=gnatmake
 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
 set dummy $cf_ada_make; ac_word=$2
-echo "$as_me:10109: checking for $ac_word" >&5
+echo "$as_me:11481: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_gnat_exists+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10121,7 +11493,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_gnat_exists="yes"
-echo "$as_me:10124: found $ac_dir/$ac_word" >&5
+echo "$as_me:11496: found $ac_dir/$ac_word" >&5
 break
 done
 
 fi
 gnat_exists=$ac_cv_prog_gnat_exists
 if test -n "$gnat_exists"; then
-  echo "$as_me:10133: result: $gnat_exists" >&5
+  echo "$as_me:11505: result: $gnat_exists" >&5
 echo "${ECHO_T}$gnat_exists" >&6
 else
-  echo "$as_me:10136: result: no" >&5
+  echo "$as_me:11508: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -10141,18 +11513,23 @@ if test "$ac_cv_prog_gnat_exists" = no; then
    cf_ada_make=
 else
 
-cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
-  sed -e 's/[^0-9 \.]//g' | $AWK '{print $1;}'`
-case $cf_cv_gnat_version in
+echo "$as_me:11516: checking for gnat version" >&5
+echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
+cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
+  sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
+echo "$as_me:11520: result: $cf_gnat_version" >&5
+echo "${ECHO_T}$cf_gnat_version" >&6
+
+case $cf_gnat_version in
   3.1[1-9]*|3.[2-9]*|[4-9].*)
     cf_cv_prog_gnat_correct=yes
     ;;
-  *) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
+  *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
      cf_cv_prog_gnat_correct=no
      ;;
 esac
-case $cf_cv_gnat_version in
-  3.1*|[4-9].*)
+case $cf_gnat_version in
+  3.[1-9]*|[4-9].*)
       cf_compile_generics=generics
       cf_generic_objects="\$(GENOBJS)"
       ;;
@@ -10163,7 +11540,7 @@ esac
 
    # Extract the first word of "m4", so it can be a program name with args.
 set dummy m4; ac_word=$2
-echo "$as_me:10166: checking for $ac_word" >&5
+echo "$as_me:11543: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_M4_exists+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10178,7 +11555,7 @@ for ac_dir in $ac_dummy; do
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_M4_exists="yes"
-echo "$as_me:10181: found $ac_dir/$ac_word" >&5
+echo "$as_me:11558: found $ac_dir/$ac_word" >&5
 break
 done
 
 fi
 M4_exists=$ac_cv_prog_M4_exists
 if test -n "$M4_exists"; then
-  echo "$as_me:10190: result: $M4_exists" >&5
+  echo "$as_me:11567: result: $M4_exists" >&5
 echo "${ECHO_T}$M4_exists" >&6
 else
-  echo "$as_me:10193: result: no" >&5
+  echo "$as_me:11570: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -10199,7 +11576,7 @@ fi
       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
    fi
    if test "$cf_cv_prog_gnat_correct" = yes; then
-      echo "$as_me:10202: checking if GNAT works" >&5
+      echo "$as_me:11579: checking if GNAT works" >&5
 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
 
 rm -f conftest*
@@ -10227,7 +11604,7 @@ else
 fi
 rm -f conftest*
 
-      echo "$as_me:10230: result: $cf_cv_prog_gnat_correct" >&5
+      echo "$as_me:11607: result: $cf_cv_prog_gnat_correct" >&5
 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
    fi
 fi
@@ -10270,7 +11647,7 @@ case ".$withval" in #(vi
   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:10273: error: expected a pathname, not \"$withval\"" >&5
+  { { echo "$as_me:11650: error: expected a pathname, not \"$withval\"" >&5
 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -10304,7 +11681,7 @@ case ".$withval" in #(vi
   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
   ;;
 *)
-  { { echo "$as_me:10307: error: expected a pathname, not \"$withval\"" >&5
+  { { echo "$as_me:11684: error: expected a pathname, not \"$withval\"" >&5
 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -10315,51 +11692,29 @@ eval ADA_OBJECTS="$withval"
 fi
 fi
 
-### It's not possible to appease gcc 2.6.3's conversion-warnings if we're
-### using a 'char' for bools.  gcc 2.7.0's conversion-warnings are broken too
-### badly to consider using for development purposes, but 2.5.8 is okay.
-if test -n "$with_warnings"; then
-       case $GCC_VERSION in
-       2.6.3)
-               if test "$cf_cv_type_of_bool" != "char"; then
-                       EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
-               fi
-               ;;
-       2.5*)
-               EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
-               ;;
-       esac
-fi
-
 ### Construct the library-subsets, if any, from this set of keywords:
-### none, base, ext_funcs, termlib.
-echo "$as_me:10336: checking for library subsets" >&5
+### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
+echo "$as_me:11697: checking for library subsets" >&5
 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
 if test "$with_termlib" = yes ; then
-       LIB_SUBSETS="termlib "
+       LIB_SUBSETS="termlib"
+       test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
+       LIB_SUBSETS="${LIB_SUBSETS} "
 else
        LIB_SUBSETS="termlib+"
+       test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
 fi
 LIB_SUBSETS="${LIB_SUBSETS}base"
-test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
+test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
-echo "$as_me:10346: result: $LIB_SUBSETS" >&5
+echo "$as_me:11710: result: $LIB_SUBSETS" >&5
 echo "${ECHO_T}$LIB_SUBSETS" >&6
 
-LIB_TRACING=DEBUG
-ADA_TRACE=FALSE
-case "$CFLAGS $CPPFLAGS" in
-*-DTRACE*)
-       LIB_TRACING=all
-       ADA_TRACE=TRUE
-       ;;
-esac
-
 ### Construct the list of include-directories to be generated
 
-CPPFLAGS="$CPPFLAGS -I. -I../include"
+CPPFLAGS="-I. -I../include $CPPFLAGS"
 if test "$srcdir" != "."; then
-       CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../include"
+       CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS"
 fi
 if test "$GCC" != yes; then
        CPPFLAGS="$CPPFLAGS -I\$(includedir)"
@@ -10373,9 +11728,9 @@ elif test "$includedir" != "/usr/include"; then
        fi
 fi
 
-ACPPFLAGS="$ACPPFLAGS -I. -I../../include"
+ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
 if test "$srcdir" != "."; then
-       ACPPFLAGS="$ACPPFLAGS -I\$(srcdir)/../../include"
+       ACPPFLAGS="-I\$(srcdir)/../../include $ACPPFLAGS"
 fi
 if test "$GCC" != yes; then
        ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
@@ -10390,7 +11745,7 @@ elif test "$includedir" != "/usr/include"; then
 fi
 
 ### Build up pieces for makefile rules
-echo "$as_me:10393: checking default library suffix" >&5
+echo "$as_me:11748: checking default library suffix" >&5
 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
 
        case $DFT_LWR_MODEL in
@@ -10401,10 +11756,10 @@ echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
        shared)  DFT_ARG_SUFFIX=''   ;;
        esac
        test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
-echo "$as_me:10404: result: $DFT_ARG_SUFFIX" >&5
+echo "$as_me:11759: result: $DFT_ARG_SUFFIX" >&5
 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
 
-echo "$as_me:10407: checking default library-dependency suffix" >&5
+echo "$as_me:11762: checking default library-dependency suffix" >&5
 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
 
        case $DFT_LWR_MODEL in
@@ -10416,7 +11771,12 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
                case $cf_cv_system_name in
                cygwin*) DFT_DEP_SUFFIX='.dll' ;;
                darwin*) DFT_DEP_SUFFIX='.dylib' ;;
-               hpux*)  DFT_DEP_SUFFIX='.sl'  ;;
+               hpux*)
+                       case $target in
+                       ia64*)  DFT_DEP_SUFFIX='.so' ;;
+                       *)      DFT_DEP_SUFFIX='.sl' ;;
+                       esac
+                       ;;
                *)      DFT_DEP_SUFFIX='.so'  ;;
                esac
        esac
@@ -10428,10 +11788,10 @@ if test $DFT_LWR_MODEL = shared ; then
                ;;
        esac
 fi
-echo "$as_me:10431: result: $DFT_DEP_SUFFIX" >&5
+echo "$as_me:11791: result: $DFT_DEP_SUFFIX" >&5
 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
 
-echo "$as_me:10434: checking default object directory" >&5
+echo "$as_me:11794: checking default object directory" >&5
 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
 
        case $DFT_LWR_MODEL in
@@ -10447,13 +11807,14 @@ echo $ECHO_N "checking default object directory... $ECHO_C" >&6
                        DFT_OBJ_SUBDIR='obj_s' ;;
                esac
        esac
-echo "$as_me:10450: result: $DFT_OBJ_SUBDIR" >&5
+echo "$as_me:11810: result: $DFT_OBJ_SUBDIR" >&5
 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
 
 # libtool thinks it can make c++ shared libraries (perhaps only g++)
-echo "$as_me:10454: checking c++ library-dependency suffix" >&5
+if test "$cf_with_cxx" = yes ; then
+echo "$as_me:11815: checking c++ library-dependency suffix" >&5
 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
-if test "$with_libtool" = "yes"; then
+if test "$with_libtool" != "no"; then
        CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
 else
 
@@ -10466,24 +11827,33 @@ else
                case $cf_cv_system_name in
                cygwin*) CXX_LIB_SUFFIX='.dll' ;;
                darwin*) CXX_LIB_SUFFIX='.dylib' ;;
-               hpux*)  CXX_LIB_SUFFIX='.sl'  ;;
+               hpux*)
+                       case $target in
+                       ia64*)  CXX_LIB_SUFFIX='.so' ;;
+                       *)      CXX_LIB_SUFFIX='.sl' ;;
+                       esac
+                       ;;
                *)      CXX_LIB_SUFFIX='.so'  ;;
                esac
        esac
        test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
 fi
-echo "$as_me:10475: result: $CXX_LIB_SUFFIX" >&5
+echo "$as_me:11841: result: $CXX_LIB_SUFFIX" >&5
 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
 
+fi
+
 TINFO_LIST="$SHLIB_LIST"
-test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
+if test "$with_libtool" = no ; then
+       test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
+fi
 
-echo "$as_me:10481: checking where we will install curses.h" >&5
+echo "$as_me:11851: checking where we will install curses.h" >&5
 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
 test "$with_overwrite" = no && \
 test "x$includedir" = 'x${prefix}/include' && \
        includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
-echo "$as_me:10486: result: $includedir" >&5
+echo "$as_me:11856: result: $includedir" >&5
 echo "${ECHO_T}$includedir" >&6
 
 ### Resolve a conflict between normal and wide-curses by forcing applications
@@ -10491,7 +11861,7 @@ echo "${ECHO_T}$includedir" >&6
 if test "$with_overwrite" != no ; then
 if test "$NCURSES_LIBUTF8" = 1 ; then
        NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
-       { echo "$as_me:10494: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
+       { echo "$as_me:11864: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
 fi
 fi
 PROG_DEPS="$TEST_DEPS"
 PROG_ARGS="$TEST_ARGS"
 
+### predefined stuff for the test programs
+cat >>confdefs.h <<\EOF
+#define HAVE_SLK_COLOR 1
+EOF
+
 ### Construct the list of subdirectories for which we'll customize makefiles
 ### with the appropriate compile-rules.
 
-echo "$as_me:10515: checking for src modules" >&5
+echo "$as_me:11890: checking for src modules" >&5
 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
 
 # dependencies and linker-arguments for test-programs
@@ -10524,7 +11899,7 @@ else
 fi
 
 # dependencies and linker-arguments for utility-programs
-PROG_ARGS="$TEST_ARGS"
+test "$with_termlib" != yes && PROG_ARGS="$TEST_ARGS"
 
 cf_cv_src_modules=
 for cf_dir in $modules_to_build
@@ -10572,7 +11947,7 @@ EOF
                fi
        fi
 done
-echo "$as_me:10575: result: $cf_cv_src_modules" >&5
+echo "$as_me:11950: result: $cf_cv_src_modules" >&5
 echo "${ECHO_T}$cf_cv_src_modules" >&6
 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
 
@@ -10640,11 +12015,45 @@ cat >>confdefs.h <<EOF
 #define NCURSES_PATHSEP '$PATHSEP'
 EOF
 
+cat >>confdefs.h <<EOF
+#define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
+EOF
+
 ### Now that we're done running tests, add the compiler-warnings, if any
-CFLAGS="$CFLAGS $EXTRA_CFLAGS"
+
+cf_new_cflags=
+cf_new_cppflags=
+for cf_add_cflags in $EXTRA_CFLAGS
+do
+       case $cf_add_cflags in #(vi
+       -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+               case "$CPPFLAGS" in
+               *$cf_add_cflags) #(vi
+                       ;;
+               *) #(vi
+                       cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+                       ;;
+               esac
+               ;;
+       *)
+               cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+               ;;
+       esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+       CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+       CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+fi
 
 ################################################################################
-ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h misc/run_tic.sh:misc/run_tic.in $SUB_MAKEFILES Makefile"
+test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
+ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
 ac_config_commands="$ac_config_commands default"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -10725,7 +12134,7 @@ DEFS=-DHAVE_CONFIG_H
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:10728: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:12137: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
@@ -10857,7 +12266,7 @@ EOF
 cat >>$CONFIG_STATUS <<EOF
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.52.20011227,
+configured by $0, generated by GNU Autoconf 2.52.20030208,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -10901,7 +12310,7 @@ cat >>$CONFIG_STATUS <<\EOF
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:10904: error: ambiguous option: $1
+    { { echo "$as_me:12313: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -10920,7 +12329,7 @@ Try \`$0 --help' for more information." >&2;}
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:10923: error: unrecognized option: $1
+  -*) { { echo "$as_me:12332: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -10939,7 +12348,7 @@ cat >&5 << _ACEOF
 ## Running config.status.  ##
 ## ----------------------- ##
 
-This file was extended by $as_me 2.52.20011227, executed with
+This file was extended by $as_me 2.52.20030208, executed with
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
   CONFIG_LINKS    = $CONFIG_LINKS
@@ -10982,6 +12391,7 @@ cf_cv_shlib_version="$cf_cv_shlib_version"
 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
 cf_cv_system_name="$cf_cv_system_name"
 cf_with_cxx_binding="$cf_with_cxx_binding"
+host="$host"
 target="$target"
 
 EOF
   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
-  "misc/run_tic.sh" ) CONFIG_FILES="$CONFIG_FILES misc/run_tic.sh:misc/run_tic.in" ;;
   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
-  *) { { echo "$as_me:11003: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:12412: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -11087,7 +12496,6 @@ s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
-s,@cf_cv_cc_bool_type@,$cf_cv_cc_bool_type,;t t
 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
@@ -11110,11 +12518,6 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
 s,@ac_ct_CC@,$ac_ct_CC,;t t
 s,@EXEEXT@,$EXEEXT,;t t
 s,@OBJEXT@,$OBJEXT,;t t
-s,@BUILD_CC@,$BUILD_CC,;t t
-s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
-s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
-s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
-s,@BUILD_LIBS@,$BUILD_LIBS,;t t
 s,@CPP@,$CPP,;t t
 s,@PROG_EXT@,$PROG_EXT,;t t
 s,@LDCONFIG@,$LDCONFIG,;t t
@@ -11127,26 +12530,43 @@ s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
 s,@LN_S@,$LN_S,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
 s,@LINT@,$LINT,;t t
 s,@MAN@,$MAN,;t t
 s,@LINT_OPTS@,$LINT_OPTS,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
 s,@LD@,$LD,;t t
+s,@ac_ct_LD@,$ac_ct_LD,;t t
 s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
 s,@AR_OPTS@,$AR_OPTS,;t t
 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
 s,@DESTDIR@,$DESTDIR,;t t
+s,@BUILD_CC@,$BUILD_CC,;t t
+s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
+s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
+s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
+s,@BUILD_LIBS@,$BUILD_LIBS,;t t
+s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
 s,@cf_list_models@,$cf_list_models,;t t
 s,@LIBTOOL@,$LIBTOOL,;t t
+s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
+s,@LIB_CREATE@,$LIB_CREATE,;t t
+s,@LIB_OBJECT@,$LIB_OBJECT,;t t
+s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
+s,@LIB_PREP@,$LIB_PREP,;t t
+s,@LIB_CLEAN@,$LIB_CLEAN,;t t
+s,@LIB_COMPILE@,$LIB_COMPILE,;t t
+s,@LIB_LINK@,$LIB_LINK,;t t
+s,@LIB_INSTALL@,$LIB_INSTALL,;t t
+s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
 s,@TINFO_NAME@,$TINFO_NAME,;t t
 s,@LIB_NAME@,$LIB_NAME,;t t
 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
-s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
 s,@CC_G_OPT@,$CC_G_OPT,;t t
 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
 s,@LD_MODEL@,$LD_MODEL,;t t
@@ -11175,10 +12595,16 @@ s,@NCURSES_CONST@,$NCURSES_CONST,;t t
 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
+s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
+s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
+s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
+s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
+s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
 s,@ECHO_LINK@,$ECHO_LINK,;t t
 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
+s,@ADA_TRACE@,$ADA_TRACE,;t t
 s,@MATH_LIB@,$MATH_LIB,;t t
 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
@@ -11188,6 +12614,7 @@ s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
 s,@CXX_AR@,$CXX_AR,;t t
 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
 s,@CXXLIBS@,$CXXLIBS,;t t
+s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
 s,@gnat_exists@,$gnat_exists,;t t
 s,@M4_exists@,$M4_exists,;t t
 s,@cf_ada_make@,$cf_ada_make,;t t
@@ -11198,7 +12625,6 @@ s,@cf_compile_generics@,$cf_compile_generics,;t t
 s,@cf_generic_objects@,$cf_generic_objects,;t t
 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
-s,@ADA_TRACE@,$ADA_TRACE,;t t
 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
@@ -11326,7 +12752,7 @@ done; }
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:11329: creating $ac_file" >&5
+    { echo "$as_me:12755: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -11344,7 +12770,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:11347: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:12773: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -11357,7 +12783,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:11360: error: cannot find input file: $f" >&5
+           { { echo "$as_me:12786: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -11423,7 +12849,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   * )   ac_file_in=$ac_file.in ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:11426: creating $ac_file" >&5
+  test x"$ac_file" != x- && { echo "$as_me:12852: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
@@ -11434,7 +12860,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:11437: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:12863: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -11447,7 +12873,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:11450: error: cannot find input file: $f" >&5
+           { { echo "$as_me:12876: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -11505,7 +12931,7 @@ cat >>$CONFIG_STATUS <<\EOF
   rm -f $tmp/in
   if test x"$ac_file" != x-; then
     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
-      { echo "$as_me:11508: $ac_file is unchanged" >&5
+      { echo "$as_me:12934: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
                case $cf_cv_system_name in
                cygwin*) cf_suffix='.dll' ;;
                darwin*) cf_suffix='.dylib' ;;
-               hpux*)  cf_suffix='.sl'  ;;
+               hpux*)
+                       case $target in
+                       ia64*)  cf_suffix='.so' ;;
+                       *)      cf_suffix='.sl' ;;
+                       esac
+                       ;;
                *)      cf_suffix='.so'  ;;
                esac
        esac
                                esac
                        fi
                        # cygwin needs import library, and has unique naming convention
+                       # use autodetected ${cf_prefix} for import lib and static lib, but
+                       # use 'cyg' prefix for shared lib.
                        if test $cf_cv_shlib_version = cygdll ; then
-                               SHARED_LIB="../lib/${cf_prefix}${cf_dir}\$(ABI_VERSION).dll"
+                               SHARED_LIB="../lib/cyg${cf_dir}\$(ABI_VERSION).dll"
                                IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a"
                                LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)"
                                continue
 
                if test $cf_dir = ncurses ; then
                        cf_subsets="$LIB_SUBSETS"
-                       case "$LIB_SUBSETS" in #(vi
-                       termlib+*) #(vi
-                               ;;
-                       *) #(vi
-                               cf_item=`echo $LIBS_TO_MAKE |sed -e s/$LIB_NAME/$TINFO_NAME/g`
+                       cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
+                       if test "$cf_termlib" != "$cf_subsets" ; then
+                               cf_item=`echo $LIBS_TO_MAKE |sed -e s%$LIB_NAME%$TINFO_NAME%g`
                                LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
-                               ;;
-                       esac
+                       fi
                else
-                       cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib //'`
+                       cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
                fi
 
                sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
@@ -11660,7 +13090,12 @@ CF_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ
                case $cf_cv_system_name in
                cygwin*) cf_suffix='.dll' ;;
                darwin*) cf_suffix='.dylib' ;;
-               hpux*)  cf_suffix='.sl'  ;;
+               hpux*)
+                       case $target in
+                       ia64*)  cf_suffix='.so' ;;
+                       *)      cf_suffix='.sl' ;;
+                       esac
+                       ;;
                *)      cf_suffix='.so'  ;;
                esac
        esac
@@ -11710,7 +13145,7 @@ CF_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ
                                ldconfig="$LDCONFIG" \
                                overwrite=$WITH_OVERWRITE \
                                depend="$cf_depend" \
-                               target="$target" \
+                               host="$host" \
                                $srcdir/$cf_dir/modules >>$cf_dir/Makefile
                        for cf_subdir2 in $cf_subdirs lib
                        do