]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/configure
ncurses 5.5
[ncurses.git] / test / configure
index 9f5137339948aa1e626054a5aaad816c36148688..0eff2626f83fcb7475f9ccf7c1df80f20fb39d5b 100755 (executable)
@@ -553,7 +553,7 @@ ac_config_sub=$ac_aux_dir/config.sub
 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
 
-if test -f $srcdir/config.guess ; then
+if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
        
 # Make sure we can run config.sub.
 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
@@ -945,7 +945,6 @@ DFT_DEP_SUFFIX=""
 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`   
 DFT_UPR_MODEL="NORMAL"                 
 ECHO_LINK='@ echo linking $@ ... ;'    
-EXTRA_LIBS=""                          
 LD="ld"                                        
 LDFLAGS_SHARED=""                      
 LD_MODEL=""                            
@@ -963,6 +962,7 @@ LOCAL_LDFLAGS=""
 MATH_LIB="-lm"                         
 TEST_ARGS=""                           
 TEST_DEPS=""                           
+TINFO_ARGS='$(LIBS_CURSES)'            
 cf_cv_abi_version=""                   
 cf_cv_rel_version=""                   
 
@@ -1089,14 +1089,304 @@ OBJEXT=$ac_cv_objext
 ac_objext=$ac_cv_objext
 
 
+
+echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
+echo "configure:1095: checking for ${CC-cc} option to accept ANSI C" >&5
+if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+cf_cv_ansi_cc=no
+cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX                  -qlanglvl=ansi
+# Ultrix and OSF/1     -std1
+# HP-UX                        -Aa -D_HPUX_SOURCE
+# SVR4                 -Xc
+# UnixWare 1.2         (cannot use -Xc, since ANSI/POSIX clashes)
+for cf_arg in "-DCC_HAS_PROTOS" \
+       "" \
+       -qlanglvl=ansi \
+       -std1 \
+       -Ae \
+       "-Aa -D_HPUX_SOURCE" \
+       -Xc
+do
+       
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_arg
+do
+case $cf_fix_cppflags in
+no)
+       case $cf_add_cflags in #(vi
+       -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+               case $cf_add_cflags in
+               -D*)
+                       cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       && test -z "${cf_tst_cflags}" \
+                       && cf_fix_cppflags=yes
+
+                       if test $cf_fix_cppflags = yes ; then
+                               cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+                               continue
+                       elif test "${cf_tst_cflags}" = "\"'" ; then
+                               cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+                               continue
+                       fi
+                       ;;
+               esac
+               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
+       ;;
+yes)
+       cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+       cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       && test -z "${cf_tst_cflags}" \
+       && cf_fix_cppflags=no
+       ;;
+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
+
+if test -n "$cf_new_extra_cppflags" ; then
+       
+       EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+
+
+
+       cat > conftest.$ac_ext <<EOF
+#line 1191 "configure"
+#include "confdefs.h"
+
+#ifndef CC_HAS_PROTOS
+#if !defined(__STDC__) || (__STDC__ != 1)
+choke me
+#endif
+#endif
+
+int main() {
+
+       int test (int i, double x);
+       struct s1 {int (*f) (int a);};
+       struct s2 {int (*f) (double a);};
+; return 0; }
+EOF
+if { (eval echo configure:1207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  cf_cv_ansi_cc="$cf_arg"; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+CFLAGS="$cf_save_CFLAGS"
+CPPFLAGS="$cf_save_CPPFLAGS"
+
+fi
+
+echo "$ac_t""$cf_cv_ansi_cc" 1>&6
+
+if test "$cf_cv_ansi_cc" != "no"; then
+if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
+       
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_cv_ansi_cc
+do
+case $cf_fix_cppflags in
+no)
+       case $cf_add_cflags in #(vi
+       -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+               case $cf_add_cflags in
+               -D*)
+                       cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       && test -z "${cf_tst_cflags}" \
+                       && cf_fix_cppflags=yes
+
+                       if test $cf_fix_cppflags = yes ; then
+                               cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+                               continue
+                       elif test "${cf_tst_cflags}" = "\"'" ; then
+                               cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+                               continue
+                       fi
+                       ;;
+               esac
+               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
+       ;;
+yes)
+       cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+       cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       && test -z "${cf_tst_cflags}" \
+       && cf_fix_cppflags=no
+       ;;
+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
+
+if test -n "$cf_new_extra_cppflags" ; then
+       
+       EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+
+
+
+else
+       cat >> confdefs.h <<\EOF
+#define CC_HAS_PROTOS 1
+EOF
+
+fi
+fi
+
+
+if test "$cf_cv_ansi_cc" = "no"; then
+       { echo "configure: 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
+       c. use a wrapper such as unproto" 1>&2; exit 1; }
+fi
+
+
+
+
+INTEL_COMPILER=no
+
+if test "$GCC" = yes ; then
+       case $host_os in
+       linux*|gnu*)
+               echo $ac_n "checking if this is really Intel compiler""... $ac_c" 1>&6
+echo "configure:1323: checking if this is really Intel compiler" >&5
+               cf_save_CFLAGS="$CFLAGS"
+               CFLAGS="$CFLAGS -no-gcc"
+               cat > conftest.$ac_ext <<EOF
+#line 1327 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifdef __INTEL_COMPILER
+#else
+make an error
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  INTEL_COMPILER=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+               CFLAGS="$cf_save_CFLAGS"
+               echo "$ac_t""$INTEL_COMPILER" 1>&6
+               ;;
+       esac
+fi
+
+
+
+cf_XOPEN_SOURCE=500
+cf_POSIX_C_SOURCE=199506L
+
+case $host_os in #(vi
+aix[45]*) #(vi
+       CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+       ;;
+freebsd*) #(vi
+       # 5.x headers associate
+       #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
+       #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
+       cf_POSIX_C_SOURCE=200112L
+       cf_XOPEN_SOURCE=600
+       CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+       ;;
+hpux*) #(vi
+       CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
+       ;;
+irix[56].*) #(vi
+       CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
+       ;;
+linux*|gnu*) #(vi
+       
+
+
+if test "$INTEL_COMPILER" = no ; then
 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
-echo "configure:1094: checking if we must define _GNU_SOURCE" >&5
+echo "configure:1384: checking if we must define _GNU_SOURCE" >&5
 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 1100 "configure"
+#line 1390 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
@@ -1106,7 +1396,7 @@ make an error
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_gnu_source=no
 else
@@ -1116,7 +1406,7 @@ else
   cf_save="$CPPFLAGS"
         CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
         cat > conftest.$ac_ext <<EOF
-#line 1120 "configure"
+#line 1410 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
@@ -1126,7 +1416,7 @@ make an error
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_gnu_source=no
 else
@@ -1145,6 +1435,189 @@ fi
 
 echo "$ac_t""$cf_cv_gnu_source" 1>&6
 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+fi
+
+       ;;
+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 $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
+echo "configure:1462: checking if we should define _XOPEN_SOURCE" >&5
+if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 1468 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int main() {
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:1478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  cf_cv_xopen_source=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_save="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+        cat > conftest.$ac_ext <<EOF
+#line 1488 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int main() {
+
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  cf_cv_xopen_source=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_xopen_source=$cf_XOPEN_SOURCE
+fi
+rm -f conftest*
+       CPPFLAGS="$cf_save"
+       
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$cf_cv_xopen_source" 1>&6
+test "$cf_cv_xopen_source" != no && CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE -D_XOPEN_SOURCE=$cf_cv_xopen_source"
+       
+cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
+echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
+echo "configure:1520: checking if we should define _POSIX_C_SOURCE" >&5
+if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       
+echo "(line 1526) testing if the symbol is already defined go no further ..." 1>&5
+
+       cat > conftest.$ac_ext <<EOF
+#line 1529 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int main() {
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:1539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  cf_cv_posix_c_source=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_want_posix_source=no
+        case .$cf_POSIX_C_SOURCE in
+        .[12]??*)
+               cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+               ;;
+        .2)
+               cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+               cf_want_posix_source=yes
+               ;;
+        .*)
+               cf_want_posix_source=yes
+               ;;
+        esac
+        if test "$cf_want_posix_source" = yes ; then
+               cat > conftest.$ac_ext <<EOF
+#line 1561 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int main() {
+
+#ifdef _POSIX_SOURCE
+make an error
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:1571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_posix_c_source="$cf_cv_posix_c_source -U_POSIX_SOURCE -D_POSIX_SOURCE"
+fi
+rm -f conftest*
+        fi
+        
+echo "(line 1582) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+
+        cf_save="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
+        
+echo "(line 1587) testing if the second compile does not leave our definition intact error ..." 1>&5
+
+        cat > conftest.$ac_ext <<EOF
+#line 1590 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int main() {
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:1600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_posix_c_source=no
+fi
+rm -f conftest*
+       CPPFLAGS="$cf_save"
+       
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$cf_cv_posix_c_source" 1>&6
+test "$cf_cv_posix_c_source" != no && CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
+
+       ;;
+esac
+
 
 
 
@@ -1212,7 +1685,7 @@ curses)
        
 
 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
-echo "configure:1216: checking for extra include directories" >&5
+echo "configure:1689: checking for extra include directories" >&5
 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1236,7 +1709,7 @@ echo "$ac_t""$cf_cv_curses_incdir" 1>&6
 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
 
 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
-echo "configure:1240: checking if we have identified curses headers" >&5
+echo "configure:1713: checking if we have identified curses headers" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1249,14 +1722,14 @@ for cf_header in \
        ncurses/ncurses.h
 do
 cat > conftest.$ac_ext <<EOF
-#line 1253 "configure"
+#line 1726 "configure"
 #include "confdefs.h"
 #include <${cf_header}>
 int main() {
 initscr(); tgoto("?", 0,0)
 ; return 0; }
 EOF
-if { (eval echo configure:1260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ncurses_header=$cf_header; break
 else
@@ -1279,17 +1752,17 @@ for ac_hdr in $cf_cv_ncurses_header
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1283: checking for $ac_hdr" >&5
+echo "configure:1756: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1288 "configure"
+#line 1761 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1319,7 +1792,7 @@ done
 
        
 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
-echo "configure:1323: checking for ncurses version" >&5
+echo "configure:1796: checking for ncurses version" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1345,7 +1818,7 @@ Autoconf "old"
 #endif
 EOF
        cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-       { (eval echo configure:1349: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
+       { (eval echo configure:1822: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
        if test -f conftest.out ; then
                cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
                test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
@@ -1354,7 +1827,7 @@ EOF
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 1358 "configure"
+#line 1831 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -1378,7 +1851,7 @@ int main()
        exit(0);
 }
 EOF
-if { (eval echo configure:1382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
        cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -1402,16 +1875,16 @@ EOF
        
 
 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
-echo "configure:1406: checking if we have identified curses libraries" >&5
+echo "configure:1879: checking if we have identified curses libraries" >&5
 cat > conftest.$ac_ext <<EOF
-#line 1408 "configure"
+#line 1881 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 initscr(); tgoto("?", 0,0)
 ; return 0; }
 EOF
-if { (eval echo configure:1415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_result=yes
 else
@@ -1427,7 +1900,7 @@ if test "$cf_result" = no ; then
 case $host_os in #(vi
 freebsd*) #(vi
        echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
-echo "configure:1431: checking for tgoto in -lmytinfo" >&5
+echo "configure:1904: checking for tgoto in -lmytinfo" >&5
 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1435,7 +1908,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmytinfo  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1439 "configure"
+#line 1912 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1446,7 +1919,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1469,7 +1942,7 @@ fi
        ;;
 hpux10.*|hpux11.*) #(vi
        echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
-echo "configure:1473: checking for initscr in -lcur_colr" >&5
+echo "configure:1946: checking for initscr in -lcur_colr" >&5
 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1477,7 +1950,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcur_colr  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1481 "configure"
+#line 1954 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1488,7 +1961,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:1492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1511,7 +1984,7 @@ else
   echo "$ac_t""no" 1>&6
 
        echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
-echo "configure:1515: checking for initscr in -lHcurses" >&5
+echo "configure:1988: checking for initscr in -lHcurses" >&5
 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1519,7 +1992,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lHcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1523 "configure"
+#line 1996 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1530,7 +2003,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1583,12 +2056,12 @@ if test ".$ac_cv_func_initscr" != .yes ; then
        # Check for library containing tgoto.  Do this before curses library
        # because it may be needed to link the test-case for initscr.
        echo $ac_n "checking for tgoto""... $ac_c" 1>&6
-echo "configure:1587: checking for tgoto" >&5
+echo "configure:2060: checking for tgoto" >&5
 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1592 "configure"
+#line 2065 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char tgoto(); below.  */
@@ -1611,7 +2084,7 @@ tgoto();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_tgoto=yes"
 else
@@ -1632,7 +2105,7 @@ else
                for cf_term_lib in $cf_check_list termcap termlib unknown
                do
                        echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
-echo "configure:1636: checking for tgoto in -l$cf_term_lib" >&5
+echo "configure:2109: checking for tgoto in -l$cf_term_lib" >&5
 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1640,7 +2113,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$cf_term_lib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1644 "configure"
+#line 2117 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1651,7 +2124,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1681,7 +2154,7 @@ fi
        for cf_curs_lib in $cf_check_list xcurses jcurses unknown
        do
                echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
-echo "configure:1685: checking for initscr in -l$cf_curs_lib" >&5
+echo "configure:2158: checking for initscr in -l$cf_curs_lib" >&5
 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1689,7 +2162,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$cf_curs_lib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1693 "configure"
+#line 2166 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1700,7 +2173,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1726,16 +2199,16 @@ fi
        LIBS="-l$cf_curs_lib $cf_save_LIBS"
        if test "$cf_term_lib" = unknown ; then
                echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
-echo "configure:1730: checking if we can link with $cf_curs_lib library" >&5
+echo "configure:2203: checking if we can link with $cf_curs_lib library" >&5
                cat > conftest.$ac_ext <<EOF
-#line 1732 "configure"
+#line 2205 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_result=yes
 else
@@ -1751,16 +2224,16 @@ rm -f conftest*
                :
        elif test "$cf_term_lib" != predefined ; then
                echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
-echo "configure:1755: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
+echo "configure:2228: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
                cat > conftest.$ac_ext <<EOF
-#line 1757 "configure"
+#line 2230 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 initscr(); tgoto((char *)0, 0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_result=no
 else
@@ -1770,14 +2243,14 @@ else
   
                        LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
                        cat > conftest.$ac_ext <<EOF
-#line 1774 "configure"
+#line 2247 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_result=yes
 else
@@ -1807,7 +2280,7 @@ test "$cf_cv_curses_dir" != "no" && \
 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
 
 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
-echo "configure:1811: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "configure:2284: checking for $cf_ncuhdr_root header in include-path" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1818,7 +2291,7 @@ else
        do
                
        cat > conftest.$ac_ext <<EOF
-#line 1822 "configure"
+#line 2295 "configure"
 #include "confdefs.h"
 
 
@@ -1839,7 +2312,7 @@ printf("old\n");
        
 ; return 0; }
 EOF
-if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ncurses_h=$cf_header
        
@@ -1862,7 +2335,7 @@ if test "$cf_cv_ncurses_h" != no ; then
        cf_cv_ncurses_header=$cf_cv_ncurses_h
 else
 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
-echo "configure:1866: checking for $cf_ncuhdr_root include-path" >&5
+echo "configure:2339: checking for $cf_ncuhdr_root include-path" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1957,14 +2430,14 @@ do
                                cf_save_CPPFLAGS="$CPPFLAGS"
                                CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                                cat > conftest.$ac_ext <<EOF
-#line 1961 "configure"
+#line 2434 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 printf("Hello")
 ; return 0; }
 EOF
-if { (eval echo configure:1968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -1991,7 +2464,7 @@ done
                do
                        
        cat > conftest.$ac_ext <<EOF
-#line 1995 "configure"
+#line 2468 "configure"
 #include "confdefs.h"
 
 
@@ -2012,7 +2485,7 @@ printf("old\n");
        
 ; return 0; }
 EOF
-if { (eval echo configure:2016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ncurses_h2=$cf_header
        
@@ -2059,14 +2532,14 @@ do
                                cf_save_CPPFLAGS="$CPPFLAGS"
                                CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                                cat > conftest.$ac_ext <<EOF
-#line 2063 "configure"
+#line 2536 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 printf("Hello")
 ; return 0; }
 EOF
-if { (eval echo configure:2070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -2121,7 +2594,7 @@ esac
 
 
 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
-echo "configure:2125: checking for ncurses version" >&5
+echo "configure:2598: checking for ncurses version" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2147,7 +2620,7 @@ Autoconf "old"
 #endif
 EOF
        cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-       { (eval echo configure:2151: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
+       { (eval echo configure:2624: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
        if test -f conftest.out ; then
                cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
                test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
@@ -2156,7 +2629,7 @@ EOF
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 2160 "configure"
+#line 2633 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -2180,7 +2653,7 @@ int main()
        exit(0);
 }
 EOF
-if { (eval echo configure:2184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
        cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -2211,7 +2684,7 @@ cf_nculib_root=ncurses
 cf_ncurses_LIBS=""
 cf_ncurses_SAVE="$LIBS"
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:2215: checking for Gpm_Open in -lgpm" >&5
+echo "configure:2688: checking for Gpm_Open in -lgpm" >&5
 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2219,7 +2692,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgpm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2223 "configure"
+#line 2696 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2230,7 +2703,7 @@ int main() {
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2246,7 +2719,7 @@ fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
-echo "configure:2250: checking for initscr in -lgpm" >&5
+echo "configure:2723: checking for initscr in -lgpm" >&5
 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2254,7 +2727,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgpm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2258 "configure"
+#line 2731 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2265,7 +2738,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2295,8 +2768,9 @@ case $host_os in #(vi
 freebsd*)
        # This is only necessary if you are linking against an obsolete
        # version of ncurses (but it should do no harm, since it's static).
-       echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
-echo "configure:2300: checking for tgoto in -lmytinfo" >&5
+       if test "$cf_nculib_root" = ncurses ; then
+               echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
+echo "configure:2774: checking for tgoto in -lmytinfo" >&5
 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2304,7 +2778,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmytinfo  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2308 "configure"
+#line 2782 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2315,7 +2789,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2335,6 +2809,7 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+       fi
        ;;
 esac
 
@@ -2348,12 +2823,12 @@ else
        eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
        cf_libdir=""
        echo $ac_n "checking for initscr""... $ac_c" 1>&6
-echo "configure:2352: checking for initscr" >&5
+echo "configure:2827: checking for initscr" >&5
 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2357 "configure"
+#line 2832 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char initscr(); below.  */
@@ -2376,7 +2851,7 @@ initscr();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_initscr=yes"
 else
@@ -2396,17 +2871,17 @@ else
 
                cf_save_LIBS="$LIBS"
                echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
-echo "configure:2400: checking for initscr in -l$cf_nculib_root" >&5
+echo "configure:2875: checking for initscr in -l$cf_nculib_root" >&5
                LIBS="-l$cf_nculib_root $LIBS"
                cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
+#line 2878 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
@@ -2475,17 +2950,17 @@ test -d /usr && {
                        for cf_libdir in $cf_search
                        do
                                echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
-echo "configure:2479: checking for -l$cf_nculib_root in $cf_libdir" >&5
+echo "configure:2954: checking for -l$cf_nculib_root in $cf_libdir" >&5
                                LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
                                cat > conftest.$ac_ext <<EOF
-#line 2482 "configure"
+#line 2957 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
                                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
@@ -2516,7 +2991,7 @@ fi
 
 if test -n "$cf_ncurses_LIBS" ; then
        echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
-echo "configure:2520: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+echo "configure:2995: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
        cf_ncurses_SAVE="$LIBS"
        for p in $cf_ncurses_LIBS ; do
                q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
@@ -2525,14 +3000,14 @@ echo "configure:2520: checking if we can link $cf_nculib_root without $cf_ncurse
                fi
        done
        cat > conftest.$ac_ext <<EOF
-#line 2529 "configure"
+#line 3004 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -2559,14 +3034,14 @@ ncursesw)
        cf_cv_libtype=w
        
 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
-echo "configure:2563: checking for multibyte character support" >&5
+echo "configure:3038: checking for multibyte character support" >&5
 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cf_save_LIBS="$LIBS"
        cat > conftest.$ac_ext <<EOF
-#line 2570 "configure"
+#line 3045 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2574,7 +3049,7 @@ int main() {
 putwc(0,0);
 ; return 0; }
 EOF
-if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_utf8_lib=yes
 else
@@ -2583,7 +3058,7 @@ else
   rm -rf conftest*
   LIBS="-lutf8 $LIBS"
         cat > conftest.$ac_ext <<EOF
-#line 2587 "configure"
+#line 3062 "configure"
 #include "confdefs.h"
 
 #include <libutf8.h>
@@ -2591,7 +3066,7 @@ int main() {
 putwc(0,0);
 ; return 0; }
 EOF
-if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_utf8_lib=add-on
 else
@@ -2620,128 +3095,6 @@ EOF
 fi
 
        
-echo $ac_n "checking if we must define _XOPEN_SOURCE""... $ac_c" 1>&6
-echo "configure:2625: checking if we must define _XOPEN_SOURCE" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2627 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-
-int main() {
-
-#ifndef _XOPEN_SOURCE
-make an error
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:2638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  cf_result=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cf_result=yes
-fi
-rm -f conftest*
-echo "$ac_t""$cf_result" 1>&6
-
-if test "$cf_result" = yes ; then
-       CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
-elif test "x500" != "x" ; then
-       echo $ac_n "checking checking for compatible value versus 500""... $ac_c" 1>&6
-echo "configure:2654: checking checking for compatible value versus 500" >&5
-       cat > conftest.$ac_ext <<EOF
-#line 2656 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-
-int main() {
-
-#if _XOPEN_SOURCE-500 < 0
-make an error
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:2667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  cf_result=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cf_result=no
-fi
-rm -f conftest*
-       echo "$ac_t""$cf_result" 1>&6
-       if test "$cf_result" = no ; then
-               # perhaps we can override it - try...
-               CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
-       fi
-fi
-
-       
-echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
-echo "configure:2686: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2688 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-
-int main() {
-
-#ifndef _XOPEN_SOURCE_EXTENDED
-make an error
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:2699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  cf_result=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cf_result=yes
-fi
-rm -f conftest*
-echo "$ac_t""$cf_result" 1>&6
-
-if test "$cf_result" = yes ; then
-       CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
-elif test "x" != "x" ; then
-       echo $ac_n "checking checking for compatible value versus ""... $ac_c" 1>&6
-echo "configure:2715: checking checking for compatible value versus " >&5
-       cat > conftest.$ac_ext <<EOF
-#line 2717 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-
-int main() {
-
-#if _XOPEN_SOURCE_EXTENDED- < 0
-make an error
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:2728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  cf_result=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cf_result=no
-fi
-rm -f conftest*
-       echo "$ac_t""$cf_result" 1>&6
-       if test "$cf_result" = no ; then
-               # perhaps we can override it - try...
-               CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
-       fi
-fi
-
-       
 
 cf_ncuhdr_root=ncursesw
 
@@ -2750,7 +3103,7 @@ test "$cf_cv_curses_dir" != "no" && \
 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
 
 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
-echo "configure:2754: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "configure:3107: checking for $cf_ncuhdr_root header in include-path" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2761,7 +3114,7 @@ else
        do
                
        cat > conftest.$ac_ext <<EOF
-#line 2765 "configure"
+#line 3118 "configure"
 #include "confdefs.h"
 
 
@@ -2790,7 +3143,7 @@ printf("old\n");
        
 ; return 0; }
 EOF
-if { (eval echo configure:2794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ncurses_h=$cf_header
        
@@ -2813,7 +3166,7 @@ if test "$cf_cv_ncurses_h" != no ; then
        cf_cv_ncurses_header=$cf_cv_ncurses_h
 else
 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
-echo "configure:2817: checking for $cf_ncuhdr_root include-path" >&5
+echo "configure:3170: checking for $cf_ncuhdr_root include-path" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2908,14 +3261,14 @@ do
                                cf_save_CPPFLAGS="$CPPFLAGS"
                                CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                                cat > conftest.$ac_ext <<EOF
-#line 2912 "configure"
+#line 3265 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 printf("Hello")
 ; return 0; }
 EOF
-if { (eval echo configure:2919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -2942,7 +3295,7 @@ done
                do
                        
        cat > conftest.$ac_ext <<EOF
-#line 2946 "configure"
+#line 3299 "configure"
 #include "confdefs.h"
 
 
@@ -2971,7 +3324,7 @@ printf("old\n");
        
 ; return 0; }
 EOF
-if { (eval echo configure:2975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ncurses_h2=$cf_header
        
@@ -3018,14 +3371,14 @@ do
                                cf_save_CPPFLAGS="$CPPFLAGS"
                                CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                                cat > conftest.$ac_ext <<EOF
-#line 3022 "configure"
+#line 3375 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 printf("Hello")
 ; return 0; }
 EOF
-if { (eval echo configure:3029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -3080,7 +3433,7 @@ esac
 
 
 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
-echo "configure:3084: checking for ncurses version" >&5
+echo "configure:3437: checking for ncurses version" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3106,7 +3459,7 @@ Autoconf "old"
 #endif
 EOF
        cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-       { (eval echo configure:3110: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
+       { (eval echo configure:3463: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
        if test -f conftest.out ; then
                cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
                test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
@@ -3115,7 +3468,7 @@ EOF
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 3119 "configure"
+#line 3472 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -3139,7 +3492,7 @@ int main()
        exit(0);
 }
 EOF
-if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
        cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -3170,7 +3523,7 @@ cf_nculib_root=ncursesw
 cf_ncurses_LIBS=""
 cf_ncurses_SAVE="$LIBS"
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:3174: checking for Gpm_Open in -lgpm" >&5
+echo "configure:3527: checking for Gpm_Open in -lgpm" >&5
 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3178,7 +3531,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgpm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3182 "configure"
+#line 3535 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3189,7 +3542,7 @@ int main() {
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3205,7 +3558,7 @@ fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
-echo "configure:3209: checking for initscr in -lgpm" >&5
+echo "configure:3562: checking for initscr in -lgpm" >&5
 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3213,7 +3566,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgpm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3217 "configure"
+#line 3570 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3224,7 +3577,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3254,8 +3607,9 @@ case $host_os in #(vi
 freebsd*)
        # This is only necessary if you are linking against an obsolete
        # version of ncurses (but it should do no harm, since it's static).
-       echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
-echo "configure:3259: checking for tgoto in -lmytinfo" >&5
+       if test "$cf_nculib_root" = ncurses ; then
+               echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
+echo "configure:3613: checking for tgoto in -lmytinfo" >&5
 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3263,7 +3617,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmytinfo  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3267 "configure"
+#line 3621 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3274,7 +3628,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3294,6 +3648,7 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+       fi
        ;;
 esac
 
@@ -3307,12 +3662,12 @@ else
        eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
        cf_libdir=""
        echo $ac_n "checking for initscr""... $ac_c" 1>&6
-echo "configure:3311: checking for initscr" >&5
+echo "configure:3666: checking for initscr" >&5
 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3316 "configure"
+#line 3671 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char initscr(); below.  */
@@ -3335,7 +3690,7 @@ initscr();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_initscr=yes"
 else
@@ -3355,17 +3710,17 @@ else
 
                cf_save_LIBS="$LIBS"
                echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
-echo "configure:3359: checking for initscr in -l$cf_nculib_root" >&5
+echo "configure:3714: checking for initscr in -l$cf_nculib_root" >&5
                LIBS="-l$cf_nculib_root $LIBS"
                cat > conftest.$ac_ext <<EOF
-#line 3362 "configure"
+#line 3717 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
@@ -3434,17 +3789,17 @@ test -d /usr && {
                        for cf_libdir in $cf_search
                        do
                                echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
-echo "configure:3438: checking for -l$cf_nculib_root in $cf_libdir" >&5
+echo "configure:3793: checking for -l$cf_nculib_root in $cf_libdir" >&5
                                LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
                                cat > conftest.$ac_ext <<EOF
-#line 3441 "configure"
+#line 3796 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
                                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
@@ -3475,7 +3830,7 @@ fi
 
 if test -n "$cf_ncurses_LIBS" ; then
        echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
-echo "configure:3479: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+echo "configure:3834: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
        cf_ncurses_SAVE="$LIBS"
        for p in $cf_ncurses_LIBS ; do
                q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
@@ -3484,14 +3839,14 @@ echo "configure:3479: checking if we can link $cf_nculib_root without $cf_ncurse
                fi
        done
        cat > conftest.$ac_ext <<EOF
-#line 3488 "configure"
+#line 3843 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -3518,27 +3873,27 @@ esac
 
 
 
-echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
-echo "configure:3523: checking for form_driver in -lform$cf_cv_libtype" >&5
-ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
+echo "configure:3878: checking for new_panel in -lpanel$cf_cv_libtype" >&5
+ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lform$cf_cv_libtype  $LIBS"
+LIBS="-lpanel$cf_cv_libtype  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3531 "configure"
+#line 3886 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char form_driver();
+char new_panel();
 
 int main() {
-form_driver()
+new_panel()
 ; return 0; }
 EOF
-if { (eval echo configure:3542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3553,20 +3908,20 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-lform$cf_cv_libtype $LIBS"
+  LIBS="-lpanel$cf_cv_libtype $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
 fi
 
 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
-echo "configure:3570: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
+echo "configure:3925: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3574,7 +3929,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmenu$cf_cv_libtype  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3578 "configure"
+#line 3933 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3585,7 +3940,7 @@ int main() {
 menu_driver()
 ; return 0; }
 EOF
-if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3612,27 +3967,27 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
-echo "configure:3617: checking for new_panel in -lpanel$cf_cv_libtype" >&5
-ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
+echo "configure:3972: checking for form_driver in -lform$cf_cv_libtype" >&5
+ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lpanel$cf_cv_libtype  $LIBS"
+LIBS="-lform$cf_cv_libtype  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3625 "configure"
+#line 3980 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char new_panel();
+char form_driver();
 
 int main() {
-new_panel()
+form_driver()
 ; return 0; }
 EOF
-if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3647,13 +4002,13 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_lib 1
 EOF
 
-  LIBS="-lpanel$cf_cv_libtype $LIBS"
+  LIBS="-lform$cf_cv_libtype $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
@@ -3661,12 +4016,12 @@ fi
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3665: checking return type of signal handlers" >&5
+echo "configure:4020: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3670 "configure"
+#line 4025 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3683,7 +4038,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3703,12 +4058,12 @@ EOF
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3707: checking for ANSI C header files" >&5
+echo "configure:4062: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3712 "configure"
+#line 4067 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3716,7 +4071,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3733,7 +4088,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3737 "configure"
+#line 4092 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3751,7 +4106,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3755 "configure"
+#line 4110 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3772,7 +4127,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3776 "configure"
+#line 4131 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3783,7 +4138,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3807,12 +4162,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3811: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4166: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3816 "configure"
+#line 4171 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -3821,7 +4176,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:3825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -3858,17 +4213,17 @@ unistd.h \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3862: checking for $ac_hdr" >&5
+echo "configure:4217: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3867 "configure"
+#line 4222 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3911,12 +4266,12 @@ wresize \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3915: checking for $ac_func" >&5
+echo "configure:4270: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3920 "configure"
+#line 4275 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3939,7 +4294,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3965,7 +4320,7 @@ done
 
 
 cat > conftest.$ac_ext <<EOF
-#line 3969 "configure"
+#line 4324 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -3986,7 +4341,7 @@ int main() {
        
 ; return 0; }
 EOF
-if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define NCURSES_EXT_FUNCS 1
@@ -4000,13 +4355,13 @@ rm -f conftest*
 
 
 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
-echo "configure:4004: checking if sys/time.h works with sys/select.h" >&5
+echo "configure:4359: checking if sys/time.h works with sys/select.h" >&5
 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 4010 "configure"
+#line 4365 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4021,7 +4376,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_sys_time_select=yes
 else
@@ -4042,7 +4397,7 @@ EOF
 
 
 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
-echo "configure:4046: checking for function curses_version" >&5
+echo "configure:4401: checking for function curses_version" >&5
 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4051,7 +4406,7 @@ if test "$cross_compiling" = yes; then
   cf_cv_func_curses_version=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 4055 "configure"
+#line 4410 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -4063,7 +4418,7 @@ int main()
 }
 
 EOF
-if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   cf_cv_func_curses_version=yes
 
@@ -4088,7 +4443,7 @@ EOF
 
 
 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
-echo "configure:4092: checking for alternate character set array" >&5
+echo "configure:4447: checking for alternate character set array" >&5
 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4097,7 +4452,7 @@ cf_cv_curses_acs_map=unknown
 for name in acs_map _acs_map __acs_map _nc_acs_map
 do
 cat > conftest.$ac_ext <<EOF
-#line 4101 "configure"
+#line 4456 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -4108,7 +4463,7 @@ $name['k'] = ACS_PLUS
 
 ; return 0; }
 EOF
-if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_curses_acs_map=$name; break
 else
@@ -4129,7 +4484,7 @@ EOF
 
 
 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
-echo "configure:4133: checking for wide alternate character set array" >&5
+echo "configure:4488: checking for wide alternate character set array" >&5
 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4138,7 +4493,7 @@ else
        for name in wacs_map _wacs_map __wacs_map _nc_wacs
        do
        cat > conftest.$ac_ext <<EOF
-#line 4142 "configure"
+#line 4497 "configure"
 #include "confdefs.h"
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -4149,7 +4504,7 @@ int main() {
 $name['k'] = *WACS_PLUS
 ; return 0; }
 EOF
-if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_curses_wacs_map=$name
         break
@@ -4165,9 +4520,9 @@ echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
 
 
 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
-echo "configure:4169: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
+echo "configure:4524: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
 cat > conftest.$ac_ext <<EOF
-#line 4171 "configure"
+#line 4526 "configure"
 #include "confdefs.h"
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -4180,7 +4535,7 @@ attr_t foo
 
 ; return 0; }
 EOF
-if { (eval echo configure:4184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_result=yes
 else
@@ -4208,9 +4563,9 @@ fi
 
 
 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
-echo "configure:4212: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
+echo "configure:4567: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
 cat > conftest.$ac_ext <<EOF
-#line 4214 "configure"
+#line 4569 "configure"
 #include "confdefs.h"
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -4223,7 +4578,7 @@ mbstate_t foo
 
 ; return 0; }
 EOF
-if { (eval echo configure:4227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_result=yes
 else
@@ -4250,6 +4605,9 @@ EOF
 fi
 
 
+TEST_ARGS="$LIBS"
+LIBS=
+
 
 trap '' 1 2 15
 cat > confcache <<\EOF
@@ -4397,7 +4755,6 @@ s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
 s%@ECHO_LINK@%$ECHO_LINK%g
-s%@EXTRA_LIBS@%$EXTRA_LIBS%g
 s%@LD@%$LD%g
 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
 s%@LD_MODEL@%$LD_MODEL%g
@@ -4415,10 +4772,12 @@ s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
 s%@MATH_LIB@%$MATH_LIB%g
 s%@TEST_ARGS@%$TEST_ARGS%g
 s%@TEST_DEPS@%$TEST_DEPS%g
+s%@TINFO_ARGS@%$TINFO_ARGS%g
 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
 s%@EXEEXT@%$EXEEXT%g
 s%@OBJEXT@%$OBJEXT%g
+s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
 
 CEOF
 EOF