]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/configure
ncurses 5.9 - patch 20140816
[ncurses.git] / test / configure
index 438905c6b87246cd58670cf5768cc26a27eb7a60..19bdb69fb21776f59b6f11a28a31fb6fd2dfaf68 100755 (executable)
@@ -667,6 +667,7 @@ Curses Version-dependent Options:
   --with-curses-colr      compile/link with HPUX 10.x color-curses
   --with-curses-5lib      compile/link with SunOS 5lib curses
   --with-Xaw3d            link with Xaw 3d library
+  --with-Xaw3dxft         link with Xaw 3d xft library
   --with-neXtaw           link with neXT Athena library
   --with-XawPlus          link with Athena-Plus library
   --with-x                use the X Window System
@@ -870,7 +871,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:873: loading site script $ac_site_file" >&5
+    { echo "$as_me:874: 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"
@@ -881,7 +882,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:884: loading cache $cache_file" >&5
+    { echo "$as_me:885: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -889,7 +890,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
     esac
   fi
 else
-  { echo "$as_me:892: creating cache $cache_file" >&5
+  { echo "$as_me:893: creating cache $cache_file" >&5
 echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
@@ -905,21 +906,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:908: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+      { echo "$as_me:909: 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:912: error: \`$ac_var' was not set in the previous run" >&5
+      { echo "$as_me:913: 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:918: error: \`$ac_var' has changed since the previous run:" >&5
+        { echo "$as_me:919: 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:920:   former value:  $ac_old_val" >&5
+        { echo "$as_me:921:   former value:  $ac_old_val" >&5
 echo "$as_me:   former value:  $ac_old_val" >&2;}
-        { echo "$as_me:922:   current value: $ac_new_val" >&5
+        { echo "$as_me:923:   current value: $ac_new_val" >&5
 echo "$as_me:   current value: $ac_new_val" >&2;}
         ac_cache_corrupted=:
       fi;;
@@ -938,9 +939,9 @@ echo "$as_me:   current value: $ac_new_val" >&2;}
   fi
 done
 if $ac_cache_corrupted; then
-  { echo "$as_me:941: error: changes in the environment can compromise the build" >&5
+  { echo "$as_me:942: 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:943: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+  { { echo "$as_me:944: 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
@@ -961,10 +962,10 @@ esac
 echo "#! $SHELL" >conftest.sh
 echo  "exit 0"   >>conftest.sh
 chmod +x conftest.sh
-if { (echo "$as_me:964: PATH=\".;.\"; conftest.sh") >&5
+if { (echo "$as_me:965: PATH=\".;.\"; conftest.sh") >&5
   (PATH=".;."; conftest.sh) 2>&5
   ac_status=$?
-  echo "$as_me:967: \$? = $ac_status" >&5
+  echo "$as_me:968: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   ac_path_separator=';'
 else
@@ -996,7 +997,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:999: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+  { { echo "$as_me:1000: 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
@@ -1006,11 +1007,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:1009: error: cannot run $ac_config_sub" >&5
+  { { echo "$as_me:1010: error: cannot run $ac_config_sub" >&5
 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
    { (exit 1); exit 1; }; }
 
-echo "$as_me:1013: checking build system type" >&5
+echo "$as_me:1014: 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
@@ -1019,16 +1020,16 @@ else
 test -z "$ac_cv_build_alias" &&
   ac_cv_build_alias=`$ac_config_guess`
 test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:1022: error: cannot guess build type; you must specify one" >&5
+  { { echo "$as_me:1023: 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:1026: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+  { { echo "$as_me:1027: 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:1031: result: $ac_cv_build" >&5
+echo "$as_me:1032: 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/'`
@@ -1036,7 +1037,7 @@ build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
-       echo "$as_me:1039: checking host system type" >&5
+       echo "$as_me:1040: 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
@@ -1045,12 +1046,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:1048: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+  { { echo "$as_me:1049: 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:1053: result: $ac_cv_host" >&5
+echo "$as_me:1054: 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/'`
@@ -1076,13 +1077,13 @@ else
 fi
 
 test -z "$system_name" && system_name="$cf_cv_system_name"
-test -n "$cf_cv_system_name" && echo "$as_me:1079: result: Configuring for $cf_cv_system_name" >&5
+test -n "$cf_cv_system_name" && echo "$as_me:1080: 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:1083: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
+       echo "$as_me:1084: 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:1085: error: \"Please remove config.cache and try again.\"" >&5
+       { { echo "$as_me:1086: 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
@@ -1100,7 +1101,7 @@ _ACEOF
 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
 rm conftest.sed
 
-echo "$as_me:1103: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "$as_me:1104: 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
@@ -1120,11 +1121,11 @@ fi
 rm -f conftest.make
 fi
 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:1123: result: yes" >&5
+  echo "$as_me:1124: result: yes" >&5
 echo "${ECHO_T}yes" >&6
   SET_MAKE=
 else
-  echo "$as_me:1127: result: no" >&5
+  echo "$as_me:1128: result: no" >&5
 echo "${ECHO_T}no" >&6
   SET_MAKE="MAKE=${MAKE-make}"
 fi
@@ -1138,7 +1139,7 @@ ac_main_return=return
 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:1141: checking for $ac_word" >&5
+echo "$as_me:1142: 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
@@ -1153,7 +1154,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:1156: found $ac_dir/$ac_word" >&5
+echo "$as_me:1157: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1161,10 +1162,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1164: result: $CC" >&5
+  echo "$as_me:1165: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1167: result: no" >&5
+  echo "$as_me:1168: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1173,7 +1174,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:1176: checking for $ac_word" >&5
+echo "$as_me:1177: 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
@@ -1188,7 +1189,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:1191: found $ac_dir/$ac_word" >&5
+echo "$as_me:1192: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1196,10 +1197,10 @@ fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1199: result: $ac_ct_CC" >&5
+  echo "$as_me:1200: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1202: result: no" >&5
+  echo "$as_me:1203: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1212,7 +1213,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:1215: checking for $ac_word" >&5
+echo "$as_me:1216: 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
@@ -1227,7 +1228,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:1230: found $ac_dir/$ac_word" >&5
+echo "$as_me:1231: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1235,10 +1236,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1238: result: $CC" >&5
+  echo "$as_me:1239: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1241: result: no" >&5
+  echo "$as_me:1242: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1247,7 +1248,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:1250: checking for $ac_word" >&5
+echo "$as_me:1251: 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
@@ -1262,7 +1263,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:1265: found $ac_dir/$ac_word" >&5
+echo "$as_me:1266: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1270,10 +1271,10 @@ fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1273: result: $ac_ct_CC" >&5
+  echo "$as_me:1274: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1276: result: no" >&5
+  echo "$as_me:1277: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1286,7 +1287,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:1289: checking for $ac_word" >&5
+echo "$as_me:1290: 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
@@ -1306,7 +1307,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
   continue
 fi
 ac_cv_prog_CC="cc"
-echo "$as_me:1309: found $ac_dir/$ac_word" >&5
+echo "$as_me:1310: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1328,10 +1329,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1331: result: $CC" >&5
+  echo "$as_me:1332: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1334: result: no" >&5
+  echo "$as_me:1335: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1342,7 +1343,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:1345: checking for $ac_word" >&5
+echo "$as_me:1346: 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
@@ -1357,7 +1358,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:1360: found $ac_dir/$ac_word" >&5
+echo "$as_me:1361: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1365,10 +1366,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1368: result: $CC" >&5
+  echo "$as_me:1369: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1371: result: no" >&5
+  echo "$as_me:1372: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1381,7 +1382,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:1384: checking for $ac_word" >&5
+echo "$as_me:1385: 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
@@ -1396,7 +1397,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:1399: found $ac_dir/$ac_word" >&5
+echo "$as_me:1400: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1404,10 +1405,10 @@ fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1407: result: $ac_ct_CC" >&5
+  echo "$as_me:1408: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1410: result: no" >&5
+  echo "$as_me:1411: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1419,32 +1420,32 @@ fi
 
 fi
 
-test -z "$CC" && { { echo "$as_me:1422: error: no acceptable cc found in \$PATH" >&5
+test -z "$CC" && { { echo "$as_me:1423: 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:1427:" \
+echo "$as_me:1428:" \
      "checking for C compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1430: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1431: \"$ac_compiler --version </dev/null >&5\"") >&5
   (eval $ac_compiler --version </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1433: \$? = $ac_status" >&5
+  echo "$as_me:1434: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1435: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1436: \"$ac_compiler -v </dev/null >&5\"") >&5
   (eval $ac_compiler -v </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1438: \$? = $ac_status" >&5
+  echo "$as_me:1439: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1440: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1441: \"$ac_compiler -V </dev/null >&5\"") >&5
   (eval $ac_compiler -V </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1443: \$? = $ac_status" >&5
+  echo "$as_me:1444: \$? = $ac_status" >&5
   (exit $ac_status); }
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 1447 "configure"
+#line 1448 "configure"
 #include "confdefs.h"
 
 int
@@ -1460,13 +1461,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:1463: checking for C compiler default output" >&5
+echo "$as_me:1464: 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:1466: \"$ac_link_default\"") >&5
+if { (eval echo "$as_me:1467: \"$ac_link_default\"") >&5
   (eval $ac_link_default) 2>&5
   ac_status=$?
-  echo "$as_me:1469: \$? = $ac_status" >&5
+  echo "$as_me:1470: \$? = $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
@@ -1489,34 +1490,34 @@ done
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-{ { echo "$as_me:1492: error: C compiler cannot create executables" >&5
+{ { echo "$as_me:1493: 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:1498: result: $ac_file" >&5
+echo "$as_me:1499: 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:1503: checking whether the C compiler works" >&5
+echo "$as_me:1504: 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:1509: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1510: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1512: \$? = $ac_status" >&5
+  echo "$as_me:1513: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
        cross_compiling=yes
     else
-       { { echo "$as_me:1519: error: cannot run C compiled programs.
+       { { echo "$as_me:1520: 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;}
@@ -1524,24 +1525,24 @@ If you meant to cross compile, use \`--host'." >&2;}
     fi
   fi
 fi
-echo "$as_me:1527: result: yes" >&5
+echo "$as_me:1528: 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:1534: checking whether we are cross compiling" >&5
+echo "$as_me:1535: checking whether we are cross compiling" >&5
 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:1536: result: $cross_compiling" >&5
+echo "$as_me:1537: result: $cross_compiling" >&5
 echo "${ECHO_T}$cross_compiling" >&6
 
-echo "$as_me:1539: checking for executable suffix" >&5
+echo "$as_me:1540: checking for executable suffix" >&5
 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
-if { (eval echo "$as_me:1541: \"$ac_link\"") >&5
+if { (eval echo "$as_me:1542: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:1544: \$? = $ac_status" >&5
+  echo "$as_me:1545: \$? = $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
@@ -1557,25 +1558,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
   esac
 done
 else
-  { { echo "$as_me:1560: error: cannot compute EXEEXT: cannot compile and link" >&5
+  { { echo "$as_me:1561: 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:1566: result: $ac_cv_exeext" >&5
+echo "$as_me:1567: 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:1572: checking for object suffix" >&5
+echo "$as_me:1573: 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 1578 "configure"
+#line 1579 "configure"
 #include "confdefs.h"
 
 int
@@ -1587,10 +1588,10 @@ main ()
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1590: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1591: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1593: \$? = $ac_status" >&5
+  echo "$as_me:1594: \$? = $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
@@ -1602,24 +1603,24 @@ done
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-{ { echo "$as_me:1605: error: cannot compute OBJEXT: cannot compile" >&5
+{ { echo "$as_me:1606: 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:1612: result: $ac_cv_objext" >&5
+echo "$as_me:1613: result: $ac_cv_objext" >&5
 echo "${ECHO_T}$ac_cv_objext" >&6
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-echo "$as_me:1616: checking whether we are using the GNU C compiler" >&5
+echo "$as_me:1617: 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 1622 "configure"
+#line 1623 "configure"
 #include "confdefs.h"
 
 int
@@ -1634,16 +1635,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1637: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1638: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1640: \$? = $ac_status" >&5
+  echo "$as_me:1641: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1643: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1644: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1646: \$? = $ac_status" >&5
+  echo "$as_me:1647: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_compiler_gnu=yes
 else
@@ -1655,19 +1656,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:1658: result: $ac_cv_c_compiler_gnu" >&5
+echo "$as_me:1659: 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:1664: checking whether $CC accepts -g" >&5
+echo "$as_me:1665: 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 1670 "configure"
+#line 1671 "configure"
 #include "confdefs.h"
 
 int
@@ -1679,16 +1680,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1682: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1683: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1685: \$? = $ac_status" >&5
+  echo "$as_me:1686: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1688: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1689: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1691: \$? = $ac_status" >&5
+  echo "$as_me:1692: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cc_g=yes
 else
@@ -1698,7 +1699,7 @@ ac_cv_prog_cc_g=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:1701: result: $ac_cv_prog_cc_g" >&5
+echo "$as_me:1702: 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
@@ -1725,16 +1726,16 @@ cat >conftest.$ac_ext <<_ACEOF
 #endif
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1728: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1729: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1731: \$? = $ac_status" >&5
+  echo "$as_me:1732: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1734: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1735: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1737: \$? = $ac_status" >&5
+  echo "$as_me:1738: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   for ac_declaration in \
    ''\
@@ -1746,7 +1747,7 @@ if { (eval echo "$as_me:1728: \"$ac_compile\"") >&5
    'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
-#line 1749 "configure"
+#line 1750 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 $ac_declaration
@@ -1759,16 +1760,16 @@ exit (42);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1762: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1763: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1765: \$? = $ac_status" >&5
+  echo "$as_me:1766: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1768: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1769: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1771: \$? = $ac_status" >&5
+  echo "$as_me:1772: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -1778,7 +1779,7 @@ continue
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 1781 "configure"
+#line 1782 "configure"
 #include "confdefs.h"
 $ac_declaration
 int
@@ -1790,16 +1791,16 @@ exit (42);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1793: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1794: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1796: \$? = $ac_status" >&5
+  echo "$as_me:1797: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1799: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1800: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1802: \$? = $ac_status" >&5
+  echo "$as_me:1803: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -1829,15 +1830,15 @@ ac_main_return=return
 
 GCC_VERSION=none
 if test "$GCC" = yes ; then
-       echo "$as_me:1832: checking version of $CC" >&5
+       echo "$as_me:1833: checking version of $CC" >&5
 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
        GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
        test -z "$GCC_VERSION" && GCC_VERSION=unknown
-       echo "$as_me:1836: result: $GCC_VERSION" >&5
+       echo "$as_me:1837: result: $GCC_VERSION" >&5
 echo "${ECHO_T}$GCC_VERSION" >&6
 fi
 
-echo "$as_me:1840: checking for $CC option to accept ANSI C" >&5
+echo "$as_me:1841: 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
@@ -1845,7 +1846,7 @@ else
   ac_cv_prog_cc_stdc=no
 ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
-#line 1848 "configure"
+#line 1849 "configure"
 #include "confdefs.h"
 #include <stdarg.h>
 #include <stdio.h>
@@ -1894,16 +1895,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:1897: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1898: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1900: \$? = $ac_status" >&5
+  echo "$as_me:1901: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1903: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1904: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1906: \$? = $ac_status" >&5
+  echo "$as_me:1907: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cc_stdc=$ac_arg
 break
@@ -1920,10 +1921,10 @@ fi
 
 case "x$ac_cv_prog_cc_stdc" in
   x|xno)
-    echo "$as_me:1923: result: none needed" >&5
+    echo "$as_me:1924: result: none needed" >&5
 echo "${ECHO_T}none needed" >&6 ;;
   *)
-    echo "$as_me:1926: result: $ac_cv_prog_cc_stdc" >&5
+    echo "$as_me:1927: result: $ac_cv_prog_cc_stdc" >&5
 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
     CC="$CC $ac_cv_prog_cc_stdc" ;;
 esac
@@ -1931,13 +1932,13 @@ esac
 # This should have been defined by AC_PROG_CC
 : ${CC:=cc}
 
-echo "$as_me:1934: checking \$CC variable" >&5
+echo "$as_me:1935: checking \$CC variable" >&5
 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
 case "$CC" in #(vi
 *[\ \  ]-[IUD]*)
-       echo "$as_me:1938: result: broken" >&5
+       echo "$as_me:1939: result: broken" >&5
 echo "${ECHO_T}broken" >&6
-       { echo "$as_me:1940: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
+       { echo "$as_me:1941: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
        # humor him...
        cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
@@ -1958,7 +1959,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -1999,7 +2000,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -2023,7 +2024,7 @@ fi
 
        ;;
 *)
-       echo "$as_me:2026: result: ok" >&5
+       echo "$as_me:2027: result: ok" >&5
 echo "${ECHO_T}ok" >&6
        ;;
 esac
@@ -2034,7 +2035,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
 ac_main_return=return
-echo "$as_me:2037: checking how to run the C preprocessor" >&5
+echo "$as_me:2038: 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
@@ -2055,18 +2056,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 2058 "configure"
+#line 2059 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:2063: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2064: \"$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:2069: \$? = $ac_status" >&5
+  echo "$as_me:2070: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2089,17 +2090,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 2092 "configure"
+#line 2093 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:2096: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2097: \"$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:2102: \$? = $ac_status" >&5
+  echo "$as_me:2103: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2136,7 +2137,7 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-echo "$as_me:2139: result: $CPP" >&5
+echo "$as_me:2140: result: $CPP" >&5
 echo "${ECHO_T}$CPP" >&6
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
@@ -2146,18 +2147,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 2149 "configure"
+#line 2150 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:2154: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2155: \"$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:2160: \$? = $ac_status" >&5
+  echo "$as_me:2161: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2180,17 +2181,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 2183 "configure"
+#line 2184 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:2187: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2188: \"$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:2193: \$? = $ac_status" >&5
+  echo "$as_me:2194: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2218,7 +2219,7 @@ rm -f conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then
   :
 else
-  { { echo "$as_me:2221: error: C preprocessor \"$CPP\" fails sanity check" >&5
+  { { echo "$as_me:2222: error: C preprocessor \"$CPP\" fails sanity check" >&5
 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -2234,7 +2235,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:2237: checking for $ac_word" >&5
+echo "$as_me:2238: 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
@@ -2249,7 +2250,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:2252: found $ac_dir/$ac_word" >&5
+echo "$as_me:2253: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2257,10 +2258,10 @@ fi
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  echo "$as_me:2260: result: $AWK" >&5
+  echo "$as_me:2261: result: $AWK" >&5
 echo "${ECHO_T}$AWK" >&6
 else
-  echo "$as_me:2263: result: no" >&5
+  echo "$as_me:2264: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2279,7 +2280,7 @@ done
 # 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:2282: checking for a BSD compatible install" >&5
+echo "$as_me:2283: 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
@@ -2328,7 +2329,7 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-echo "$as_me:2331: result: $INSTALL" >&5
+echo "$as_me:2332: result: $INSTALL" >&5
 echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -2353,7 +2354,7 @@ for ac_prog in tdlint lint alint splint lclint
 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:2356: checking for $ac_word" >&5
+echo "$as_me:2357: 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
@@ -2368,7 +2369,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:2371: found $ac_dir/$ac_word" >&5
+echo "$as_me:2372: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2376,17 +2377,17 @@ fi
 fi
 LINT=$ac_cv_prog_LINT
 if test -n "$LINT"; then
-  echo "$as_me:2379: result: $LINT" >&5
+  echo "$as_me:2380: result: $LINT" >&5
 echo "${ECHO_T}$LINT" >&6
 else
-  echo "$as_me:2382: result: no" >&5
+  echo "$as_me:2383: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
   test -n "$LINT" && break
 done
 
-echo "$as_me:2389: checking if filesystem supports mixed-case filenames" >&5
+echo "$as_me:2390: 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
@@ -2413,7 +2414,7 @@ else
 fi
 
 fi
-echo "$as_me:2416: result: $cf_cv_mixedcase" >&5
+echo "$as_me:2417: result: $cf_cv_mixedcase" >&5
 echo "${ECHO_T}$cf_cv_mixedcase" >&6
 test "$cf_cv_mixedcase" = yes &&
 cat >>confdefs.h <<\EOF
@@ -2424,7 +2425,7 @@ for ac_prog in exctags ctags
 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:2427: checking for $ac_word" >&5
+echo "$as_me:2428: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CTAGS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2439,7 +2440,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_CTAGS="$ac_prog"
-echo "$as_me:2442: found $ac_dir/$ac_word" >&5
+echo "$as_me:2443: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2447,10 +2448,10 @@ fi
 fi
 CTAGS=$ac_cv_prog_CTAGS
 if test -n "$CTAGS"; then
-  echo "$as_me:2450: result: $CTAGS" >&5
+  echo "$as_me:2451: result: $CTAGS" >&5
 echo "${ECHO_T}$CTAGS" >&6
 else
-  echo "$as_me:2453: result: no" >&5
+  echo "$as_me:2454: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2461,7 +2462,7 @@ for ac_prog in exetags etags
 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:2464: checking for $ac_word" >&5
+echo "$as_me:2465: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ETAGS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2476,7 +2477,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_ETAGS="$ac_prog"
-echo "$as_me:2479: found $ac_dir/$ac_word" >&5
+echo "$as_me:2480: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2484,10 +2485,10 @@ fi
 fi
 ETAGS=$ac_cv_prog_ETAGS
 if test -n "$ETAGS"; then
-  echo "$as_me:2487: result: $ETAGS" >&5
+  echo "$as_me:2488: result: $ETAGS" >&5
 echo "${ECHO_T}$ETAGS" >&6
 else
-  echo "$as_me:2490: result: no" >&5
+  echo "$as_me:2491: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2496,7 +2497,7 @@ done
 
 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
 set dummy ${CTAGS:-ctags}; ac_word=$2
-echo "$as_me:2499: checking for $ac_word" >&5
+echo "$as_me:2500: 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
@@ -2511,7 +2512,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:2514: found $ac_dir/$ac_word" >&5
+echo "$as_me:2515: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2520,17 +2521,17 @@ fi
 fi
 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
 if test -n "$MAKE_LOWER_TAGS"; then
-  echo "$as_me:2523: result: $MAKE_LOWER_TAGS" >&5
+  echo "$as_me:2524: result: $MAKE_LOWER_TAGS" >&5
 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
 else
-  echo "$as_me:2526: result: no" >&5
+  echo "$as_me:2527: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 if test "$cf_cv_mixedcase" = yes ; then
        # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
 set dummy ${ETAGS:-etags}; ac_word=$2
-echo "$as_me:2533: checking for $ac_word" >&5
+echo "$as_me:2534: 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
@@ -2545,7 +2546,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:2548: found $ac_dir/$ac_word" >&5
+echo "$as_me:2549: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2554,10 +2555,10 @@ fi
 fi
 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
 if test -n "$MAKE_UPPER_TAGS"; then
-  echo "$as_me:2557: result: $MAKE_UPPER_TAGS" >&5
+  echo "$as_me:2558: result: $MAKE_UPPER_TAGS" >&5
 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
 else
-  echo "$as_me:2560: result: no" >&5
+  echo "$as_me:2561: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2577,14 +2578,14 @@ else
        MAKE_LOWER_TAGS="#"
 fi
 
-echo "$as_me:2580: checking if -lm needed for math functions" >&5
+echo "$as_me:2581: 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 2587 "configure"
+#line 2588 "configure"
 #include "confdefs.h"
 
        #include <stdio.h>
@@ -2599,16 +2600,16 @@ double x = rand(); printf("result = %g\n", pow(sin(x),x))
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2602: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2603: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:2605: \$? = $ac_status" >&5
+  echo "$as_me:2606: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:2608: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2609: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2611: \$? = $ac_status" >&5
+  echo "$as_me:2612: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_need_libm=no
 else
@@ -2618,7 +2619,7 @@ cf_cv_need_libm=yes
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:2621: result: $cf_cv_need_libm" >&5
+echo "$as_me:2622: result: $cf_cv_need_libm" >&5
 echo "${ECHO_T}$cf_cv_need_libm" >&6
 if test "$cf_cv_need_libm" = yes
 then
@@ -2675,10 +2676,10 @@ cat > conftest.i <<EOF
 EOF
 if test "$GCC" = yes
 then
-       { echo "$as_me:2678: checking for $CC __attribute__ directives..." >&5
+       { echo "$as_me:2679: checking for $CC __attribute__ directives..." >&5
 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
 cat > conftest.$ac_ext <<EOF
-#line 2681 "${as_me:-configure}"
+#line 2682 "${as_me:-configure}"
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -2727,12 +2728,12 @@ EOF
                        ;;
                esac
 
-               if { (eval echo "$as_me:2730: \"$ac_compile\"") >&5
+               if { (eval echo "$as_me:2731: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2733: \$? = $ac_status" >&5
+  echo "$as_me:2734: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-                       test -n "$verbose" && echo "$as_me:2735: result: ... $cf_attribute" >&5
+                       test -n "$verbose" && echo "$as_me:2736: result: ... $cf_attribute" >&5
 echo "${ECHO_T}... $cf_attribute" >&6
                        cat conftest.h >>confdefs.h
                        case $cf_attribute in #(vi
@@ -2829,14 +2830,14 @@ irix[56].*) #(vi
        ;;
 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
 
-echo "$as_me:2832: checking if we must define _GNU_SOURCE" >&5
+echo "$as_me:2833: 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 2839 "configure"
+#line 2840 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int
@@ -2851,16 +2852,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2854: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2855: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2857: \$? = $ac_status" >&5
+  echo "$as_me:2858: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2860: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2861: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2863: \$? = $ac_status" >&5
+  echo "$as_me:2864: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_gnu_source=no
 else
@@ -2869,7 +2870,7 @@ cat conftest.$ac_ext >&5
 cf_save="$CPPFLAGS"
         CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
         cat >conftest.$ac_ext <<_ACEOF
-#line 2872 "configure"
+#line 2873 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int
@@ -2884,16 +2885,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2887: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2888: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2890: \$? = $ac_status" >&5
+  echo "$as_me:2891: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2893: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2894: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2896: \$? = $ac_status" >&5
+  echo "$as_me:2897: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_gnu_source=no
 else
@@ -2908,10 +2909,13 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:2911: result: $cf_cv_gnu_source" >&5
+echo "$as_me:2912: 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"
 
+       ;;
+minix*) #(vi
+       cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
        ;;
 mirbsd*) #(vi
        # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
@@ -2930,16 +2934,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
        sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
                -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
 
-echo "$as_me:2933: checking if we should define _POSIX_C_SOURCE" >&5
+echo "$as_me:2937: 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_posix_c_source+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-echo "${as_me:-configure}:2939: testing if the symbol is already defined go no further ..." 1>&5
+echo "${as_me:-configure}:2943: testing if the symbol is already defined go no further ..." 1>&5
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 2942 "configure"
+#line 2946 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int
@@ -2954,16 +2958,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2957: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2961: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2960: \$? = $ac_status" >&5
+  echo "$as_me:2964: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2963: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2967: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2966: \$? = $ac_status" >&5
+  echo "$as_me:2970: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_posix_c_source=no
 else
@@ -2984,7 +2988,7 @@ cf_want_posix_source=no
         esac
         if test "$cf_want_posix_source" = yes ; then
                cat >conftest.$ac_ext <<_ACEOF
-#line 2987 "configure"
+#line 2991 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int
@@ -2999,16 +3003,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3002: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3006: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3005: \$? = $ac_status" >&5
+  echo "$as_me:3009: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3008: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3012: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3011: \$? = $ac_status" >&5
+  echo "$as_me:3015: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -3019,15 +3023,15 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
         fi
 
-echo "${as_me:-configure}:3022: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+echo "${as_me:-configure}:3026: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
 
         CFLAGS="$cf_trim_CFLAGS"
         CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
 
-echo "${as_me:-configure}:3027: testing if the second compile does not leave our definition intact error ..." 1>&5
+echo "${as_me:-configure}:3031: testing if the second compile does not leave our definition intact error ..." 1>&5
 
         cat >conftest.$ac_ext <<_ACEOF
-#line 3030 "configure"
+#line 3034 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int
@@ -3042,16 +3046,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3045: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3049: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3048: \$? = $ac_status" >&5
+  echo "$as_me:3052: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3051: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3055: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3054: \$? = $ac_status" >&5
+  echo "$as_me:3058: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -3067,7 +3071,7 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:3070: result: $cf_cv_posix_c_source" >&5
+echo "$as_me:3074: result: $cf_cv_posix_c_source" >&5
 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
 
 if test "$cf_cv_posix_c_source" != no ; then
@@ -3089,7 +3093,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -3130,7 +3134,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -3177,17 +3181,18 @@ sco*) #(vi
        ;;
 solaris2.*) #(vi
        cf_xopen_source="-D__EXTENSIONS__"
+       cf_cv_xopen_source=broken
        ;;
 *)
 
-echo "$as_me:3183: checking if we should define _XOPEN_SOURCE" >&5
+echo "$as_me:3188: 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 3190 "configure"
+#line 3195 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -3206,16 +3211,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3209: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3214: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3212: \$? = $ac_status" >&5
+  echo "$as_me:3217: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3215: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3220: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3218: \$? = $ac_status" >&5
+  echo "$as_me:3223: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_xopen_source=no
 else
@@ -3224,7 +3229,7 @@ cat conftest.$ac_ext >&5
 cf_save="$CPPFLAGS"
         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
         cat >conftest.$ac_ext <<_ACEOF
-#line 3227 "configure"
+#line 3232 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -3243,16 +3248,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3246: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3251: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3249: \$? = $ac_status" >&5
+  echo "$as_me:3254: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3252: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3257: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3255: \$? = $ac_status" >&5
+  echo "$as_me:3260: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_xopen_source=no
 else
@@ -3267,7 +3272,7 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:3270: result: $cf_cv_xopen_source" >&5
+echo "$as_me:3275: result: $cf_cv_xopen_source" >&5
 echo "${ECHO_T}$cf_cv_xopen_source" >&6
 
 if test "$cf_cv_xopen_source" != no ; then
@@ -3297,7 +3302,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -3338,7 +3343,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -3375,16 +3380,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
        sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
                -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
 
-echo "$as_me:3378: checking if we should define _POSIX_C_SOURCE" >&5
+echo "$as_me:3383: 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_posix_c_source+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-echo "${as_me:-configure}:3384: testing if the symbol is already defined go no further ..." 1>&5
+echo "${as_me:-configure}:3389: testing if the symbol is already defined go no further ..." 1>&5
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 3387 "configure"
+#line 3392 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int
@@ -3399,16 +3404,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3402: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3407: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3405: \$? = $ac_status" >&5
+  echo "$as_me:3410: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3408: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3413: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3411: \$? = $ac_status" >&5
+  echo "$as_me:3416: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_posix_c_source=no
 else
@@ -3429,7 +3434,7 @@ cf_want_posix_source=no
         esac
         if test "$cf_want_posix_source" = yes ; then
                cat >conftest.$ac_ext <<_ACEOF
-#line 3432 "configure"
+#line 3437 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int
@@ -3444,16 +3449,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3447: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3452: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3450: \$? = $ac_status" >&5
+  echo "$as_me:3455: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3453: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3458: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3456: \$? = $ac_status" >&5
+  echo "$as_me:3461: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -3464,15 +3469,15 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
         fi
 
-echo "${as_me:-configure}:3467: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+echo "${as_me:-configure}:3472: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
 
         CFLAGS="$cf_trim_CFLAGS"
         CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
 
-echo "${as_me:-configure}:3472: testing if the second compile does not leave our definition intact error ..." 1>&5
+echo "${as_me:-configure}:3477: testing if the second compile does not leave our definition intact error ..." 1>&5
 
         cat >conftest.$ac_ext <<_ACEOF
-#line 3475 "configure"
+#line 3480 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int
@@ -3487,16 +3492,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3490: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3495: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3493: \$? = $ac_status" >&5
+  echo "$as_me:3498: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3496: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3501: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3499: \$? = $ac_status" >&5
+  echo "$as_me:3504: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -3512,7 +3517,7 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:3515: result: $cf_cv_posix_c_source" >&5
+echo "$as_me:3520: result: $cf_cv_posix_c_source" >&5
 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
 
 if test "$cf_cv_posix_c_source" != no ; then
@@ -3534,7 +3539,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -3575,7 +3580,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -3619,7 +3624,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -3660,7 +3665,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -3668,16 +3673,25 @@ esac
 done
 
 if test -n "$cf_new_cflags" ; then
+       test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
+
+echo "${as_me:-configure}:3678: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
 
        CFLAGS="$CFLAGS $cf_new_cflags"
 fi
 
 if test -n "$cf_new_cppflags" ; then
+       test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
+
+echo "${as_me:-configure}:3686: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
 
        CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
 fi
 
 if test -n "$cf_new_extra_cppflags" ; then
+       test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
+
+echo "${as_me:-configure}:3694: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
 
        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
 fi
@@ -3685,10 +3699,10 @@ fi
 fi
 
 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
-       echo "$as_me:3688: checking if _XOPEN_SOURCE really is set" >&5
+       echo "$as_me:3702: checking if _XOPEN_SOURCE really is set" >&5
 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
        cat >conftest.$ac_ext <<_ACEOF
-#line 3691 "configure"
+#line 3705 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 int
@@ -3703,16 +3717,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3706: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3720: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3709: \$? = $ac_status" >&5
+  echo "$as_me:3723: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3712: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3726: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3715: \$? = $ac_status" >&5
+  echo "$as_me:3729: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_XOPEN_SOURCE_set=yes
 else
@@ -3721,12 +3735,12 @@ cat conftest.$ac_ext >&5
 cf_XOPEN_SOURCE_set=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-       echo "$as_me:3724: result: $cf_XOPEN_SOURCE_set" >&5
+       echo "$as_me:3738: result: $cf_XOPEN_SOURCE_set" >&5
 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
        if test $cf_XOPEN_SOURCE_set = yes
        then
                cat >conftest.$ac_ext <<_ACEOF
-#line 3729 "configure"
+#line 3743 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 int
@@ -3741,16 +3755,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3744: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3758: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3747: \$? = $ac_status" >&5
+  echo "$as_me:3761: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3750: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3764: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3753: \$? = $ac_status" >&5
+  echo "$as_me:3767: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_XOPEN_SOURCE_set_ok=yes
 else
@@ -3761,19 +3775,19 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
                if test $cf_XOPEN_SOURCE_set_ok = no
                then
-                       { echo "$as_me:3764: WARNING: _XOPEN_SOURCE is lower than requested" >&5
+                       { echo "$as_me:3778: WARNING: _XOPEN_SOURCE is lower than requested" >&5
 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
                fi
        else
 
-echo "$as_me:3769: checking if we should define _XOPEN_SOURCE" >&5
+echo "$as_me:3783: 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 3776 "configure"
+#line 3790 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -3792,16 +3806,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3795: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3809: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3798: \$? = $ac_status" >&5
+  echo "$as_me:3812: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3801: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3815: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3804: \$? = $ac_status" >&5
+  echo "$as_me:3818: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_xopen_source=no
 else
@@ -3810,7 +3824,7 @@ cat conftest.$ac_ext >&5
 cf_save="$CPPFLAGS"
         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
         cat >conftest.$ac_ext <<_ACEOF
-#line 3813 "configure"
+#line 3827 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -3829,16 +3843,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3832: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3846: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3835: \$? = $ac_status" >&5
+  echo "$as_me:3849: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3838: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3852: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3841: \$? = $ac_status" >&5
+  echo "$as_me:3855: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_xopen_source=no
 else
@@ -3853,7 +3867,7 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:3856: result: $cf_cv_xopen_source" >&5
+echo "$as_me:3870: result: $cf_cv_xopen_source" >&5
 echo "${ECHO_T}$cf_cv_xopen_source" >&6
 
 if test "$cf_cv_xopen_source" != no ; then
@@ -3883,7 +3897,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -3924,7 +3938,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -3951,7 +3965,7 @@ fi
        fi
 fi
 
-echo "$as_me:3954: checking for signal global datatype" >&5
+echo "$as_me:3968: checking for signal global datatype" >&5
 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
 if test "${cf_cv_sig_atomic_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3963,7 +3977,7 @@ else
                "int"
        do
        cat >conftest.$ac_ext <<_ACEOF
-#line 3966 "configure"
+#line 3980 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -3986,16 +4000,16 @@ signal(SIGINT, handler);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3989: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4003: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3992: \$? = $ac_status" >&5
+  echo "$as_me:4006: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3995: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4009: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3998: \$? = $ac_status" >&5
+  echo "$as_me:4012: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_sig_atomic_t=$cf_type
 else
@@ -4009,14 +4023,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
 
-echo "$as_me:4012: result: $cf_cv_sig_atomic_t" >&5
+echo "$as_me:4026: result: $cf_cv_sig_atomic_t" >&5
 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
 test "$cf_cv_sig_atomic_t" != no &&
 cat >>confdefs.h <<EOF
 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
 EOF
 
-echo "$as_me:4019: checking if you want to use pkg-config" >&5
+echo "$as_me:4033: checking if you want to use pkg-config" >&5
 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
 
 # Check whether --with-pkg-config or --without-pkg-config was given.
@@ -4026,7 +4040,7 @@ if test "${with_pkg_config+set}" = set; then
 else
   cf_pkg_config=yes
 fi;
-echo "$as_me:4029: result: $cf_pkg_config" >&5
+echo "$as_me:4043: result: $cf_pkg_config" >&5
 echo "${ECHO_T}$cf_pkg_config" >&6
 
 case $cf_pkg_config in #(vi
@@ -4038,7 +4052,7 @@ yes) #(vi
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-echo "$as_me:4041: checking for $ac_word" >&5
+echo "$as_me:4055: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4055,7 +4069,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_PKG_CONFIG="$ac_dir/$ac_word"
-   echo "$as_me:4058: found $ac_dir/$ac_word" >&5
+   echo "$as_me:4072: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -4066,10 +4080,10 @@ fi
 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
 
 if test -n "$PKG_CONFIG"; then
-  echo "$as_me:4069: result: $PKG_CONFIG" >&5
+  echo "$as_me:4083: result: $PKG_CONFIG" >&5
 echo "${ECHO_T}$PKG_CONFIG" >&6
 else
-  echo "$as_me:4072: result: no" >&5
+  echo "$as_me:4086: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -4078,7 +4092,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
   ac_pt_PKG_CONFIG=$PKG_CONFIG
   # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
-echo "$as_me:4081: checking for $ac_word" >&5
+echo "$as_me:4095: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4095,7 +4109,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_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
-   echo "$as_me:4098: found $ac_dir/$ac_word" >&5
+   echo "$as_me:4112: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -4107,10 +4121,10 @@ fi
 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
 
 if test -n "$ac_pt_PKG_CONFIG"; then
-  echo "$as_me:4110: result: $ac_pt_PKG_CONFIG" >&5
+  echo "$as_me:4124: result: $ac_pt_PKG_CONFIG" >&5
 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
 else
-  echo "$as_me:4113: result: no" >&5
+  echo "$as_me:4127: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -4153,7 +4167,7 @@ case ".$PKG_CONFIG" in #(vi
   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
   ;;
 *)
-  { { echo "$as_me:4156: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
+  { { echo "$as_me:4170: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -4161,7 +4175,7 @@ esac
 
 fi
 
-echo "$as_me:4164: checking if you want to see long compiling messages" >&5
+echo "$as_me:4178: checking if you want to see long compiling messages" >&5
 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
 
 # Check whether --enable-echo or --disable-echo was given.
@@ -4195,10 +4209,10 @@ else
     ECHO_CC=''
 
 fi;
-echo "$as_me:4198: result: $enableval" >&5
+echo "$as_me:4212: result: $enableval" >&5
 echo "${ECHO_T}$enableval" >&6
 
-echo "$as_me:4201: checking for ncurses wrap-prefix" >&5
+echo "$as_me:4215: checking for ncurses wrap-prefix" >&5
 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
 
 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
@@ -4208,10 +4222,10 @@ if test "${with_ncurses_wrap_prefix+set}" = set; then
 else
   NCURSES_WRAP_PREFIX=_nc_
 fi;
-echo "$as_me:4211: result: $NCURSES_WRAP_PREFIX" >&5
+echo "$as_me:4225: result: $NCURSES_WRAP_PREFIX" >&5
 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
 
-echo "$as_me:4214: checking if you want to check for wide-character functions" >&5
+echo "$as_me:4228: checking if you want to check for wide-character functions" >&5
 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
 
 # Check whether --enable-widec or --disable-widec was given.
@@ -4228,10 +4242,10 @@ else
   cf_enable_widec=yes
 
 fi;
-echo "$as_me:4231: result: $cf_enable_widec" >&5
+echo "$as_me:4245: result: $cf_enable_widec" >&5
 echo "${ECHO_T}$cf_enable_widec" >&6
 
-echo "$as_me:4234: checking for specific curses-directory" >&5
+echo "$as_me:4248: checking for specific curses-directory" >&5
 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
 
 # Check whether --with-curses-dir or --without-curses-dir was given.
@@ -4241,7 +4255,7 @@ if test "${with_curses_dir+set}" = set; then
 else
   cf_cv_curses_dir=no
 fi;
-echo "$as_me:4244: result: $cf_cv_curses_dir" >&5
+echo "$as_me:4258: result: $cf_cv_curses_dir" >&5
 echo "${ECHO_T}$cf_cv_curses_dir" >&6
 
 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
@@ -4272,7 +4286,7 @@ case ".$withval" in #(vi
   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
   ;;
 *)
-  { { echo "$as_me:4275: error: expected a pathname, not \"$withval\"" >&5
+  { { echo "$as_me:4289: error: expected a pathname, not \"$withval\"" >&5
 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -4305,7 +4319,7 @@ if test -n "$cf_cv_curses_dir/include" ; then
                          cf_save_CPPFLAGS=$CPPFLAGS
                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                          cat >conftest.$ac_ext <<_ACEOF
-#line 4308 "configure"
+#line 4322 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -4317,16 +4331,16 @@ printf("Hello")
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4320: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4334: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:4323: \$? = $ac_status" >&5
+  echo "$as_me:4337: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4326: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4340: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4329: \$? = $ac_status" >&5
+  echo "$as_me:4343: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -4343,7 +4357,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                if test "$cf_have_incdir" = no ; then
                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
 
-echo "${as_me:-configure}:4346: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:4360: testing adding $cf_add_incdir to include-path ..." 1>&5
 
                  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 
@@ -4377,7 +4391,7 @@ if test -n "$cf_cv_curses_dir/lib" ; then
       if test "$cf_have_libdir" = no ; then
         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
 
-echo "${as_me:-configure}:4380: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:4394: testing adding $cf_add_libdir to library-path ..." 1>&5
 
         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
       fi
@@ -4390,7 +4404,7 @@ fi
 
 cf_cv_screen=curses
 
-echo "$as_me:4393: checking for specified curses library type" >&5
+echo "$as_me:4407: checking for specified curses library type" >&5
 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
 
 # Check whether --with-ncursesw or --without-ncursesw was given.
@@ -4427,13 +4441,13 @@ fi;
 fi;
 fi;
 
-echo "$as_me:4430: result: $cf_cv_screen" >&5
+echo "$as_me:4444: result: $cf_cv_screen" >&5
 echo "${ECHO_T}$cf_cv_screen" >&6
 
 case $cf_cv_screen in #(vi
 curses|curses_*) #(vi
 
-echo "$as_me:4436: checking for extra include directories" >&5
+echo "$as_me:4450: checking for extra include directories" >&5
 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
 if test "${cf_cv_curses_incdir+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4459,11 +4473,11 @@ sunos3*|sunos4*)
 esac
 
 fi
-echo "$as_me:4462: result: $cf_cv_curses_incdir" >&5
+echo "$as_me:4476: result: $cf_cv_curses_incdir" >&5
 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
 
-echo "$as_me:4466: checking if we have identified curses headers" >&5
+echo "$as_me:4480: checking if we have identified curses headers" >&5
 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
 if test "${cf_cv_ncurses_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4475,7 +4489,7 @@ for cf_header in  \
        curses.h ncurses/ncurses.h ncurses/curses.h
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 4478 "configure"
+#line 4492 "configure"
 #include "confdefs.h"
 #include <${cf_header}>
 int
@@ -4487,16 +4501,16 @@ initscr(); tgoto("?", 0,0)
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4490: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4504: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:4493: \$? = $ac_status" >&5
+  echo "$as_me:4507: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4496: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4510: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4499: \$? = $ac_status" >&5
+  echo "$as_me:4513: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_header=$cf_header; break
 else
@@ -4507,11 +4521,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:4510: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:4524: result: $cf_cv_ncurses_header" >&5
 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
 
 if test "$cf_cv_ncurses_header" = none ; then
-       { { echo "$as_me:4514: error: No curses header-files found" >&5
+       { { echo "$as_me:4528: error: No curses header-files found" >&5
 echo "$as_me: error: No curses header-files found" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -4521,23 +4535,23 @@ fi
 for ac_header in $cf_cv_ncurses_header
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:4524: checking for $ac_header" >&5
+echo "$as_me:4538: 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 4530 "configure"
+#line 4544 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:4534: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:4548: \"$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:4540: \$? = $ac_status" >&5
+  echo "$as_me:4554: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -4556,7 +4570,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:4559: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:4573: 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
@@ -4566,7 +4580,7 @@ EOF
 fi
 done
 
-echo "$as_me:4569: checking for terminfo header" >&5
+echo "$as_me:4583: checking for terminfo header" >&5
 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
 if test "${cf_cv_term_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4584,7 +4598,7 @@ esac
 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 4587 "configure"
+#line 4601 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -4599,16 +4613,16 @@ int x = auto_left_margin
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4602: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4616: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:4605: \$? = $ac_status" >&5
+  echo "$as_me:4619: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4608: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4622: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4611: \$? = $ac_status" >&5
+  echo "$as_me:4625: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
        cf_cv_term_header="$cf_test"
@@ -4624,7 +4638,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:4627: result: $cf_cv_term_header" >&5
+echo "$as_me:4641: result: $cf_cv_term_header" >&5
 echo "${ECHO_T}$cf_cv_term_header" >&6
 
 # Set definitions to allow ifdef'ing to accommodate subdirectories
@@ -4656,7 +4670,7 @@ EOF
        ;;
 esac
 
-echo "$as_me:4659: checking for ncurses version" >&5
+echo "$as_me:4673: checking for ncurses version" >&5
 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
 if test "${cf_cv_ncurses_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4682,10 +4696,10 @@ Autoconf "old"
 #endif
 EOF
        cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-       { (eval echo "$as_me:4685: \"$cf_try\"") >&5
+       { (eval echo "$as_me:4699: \"$cf_try\"") >&5
   (eval $cf_try) 2>&5
   ac_status=$?
-  echo "$as_me:4688: \$? = $ac_status" >&5
+  echo "$as_me:4702: \$? = $ac_status" >&5
   (exit $ac_status); }
        if test -f conftest.out ; then
                cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -4695,7 +4709,7 @@ EOF
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4698 "configure"
+#line 4712 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -4720,15 +4734,15 @@ int main()
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:4723: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4737: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4726: \$? = $ac_status" >&5
+  echo "$as_me:4740: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:4728: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4742: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4731: \$? = $ac_status" >&5
+  echo "$as_me:4745: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
        cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -4742,17 +4756,17 @@ fi
        rm -f $cf_tempfile
 
 fi
-echo "$as_me:4745: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:4759: result: $cf_cv_ncurses_version" >&5
 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
 test "$cf_cv_ncurses_version" = no ||
 cat >>confdefs.h <<\EOF
 #define NCURSES 1
 EOF
 
-echo "$as_me:4752: checking if we have identified curses libraries" >&5
+echo "$as_me:4766: checking if we have identified curses libraries" >&5
 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 4755 "configure"
+#line 4769 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header:-curses.h}>
 int
@@ -4764,16 +4778,16 @@ initscr(); tgoto("?", 0,0)
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4767: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4781: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4770: \$? = $ac_status" >&5
+  echo "$as_me:4784: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4773: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4787: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4776: \$? = $ac_status" >&5
+  echo "$as_me:4790: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -4782,13 +4796,13 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "$as_me:4785: result: $cf_result" >&5
+echo "$as_me:4799: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 
 if test "$cf_result" = no ; then
 case $host_os in #(vi
 freebsd*) #(vi
-    echo "$as_me:4791: checking for tgoto in -lmytinfo" >&5
+    echo "$as_me:4805: checking for tgoto in -lmytinfo" >&5
 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4796,7 +4810,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmytinfo  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4799 "configure"
+#line 4813 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4815,16 +4829,16 @@ tgoto ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4818: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4832: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4821: \$? = $ac_status" >&5
+  echo "$as_me:4835: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4824: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4838: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4827: \$? = $ac_status" >&5
+  echo "$as_me:4841: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_mytinfo_tgoto=yes
 else
@@ -4835,10 +4849,26 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4838: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:4852: result: $ac_cv_lib_mytinfo_tgoto" >&5
 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
 if test $ac_cv_lib_mytinfo_tgoto = yes; then
-  LIBS="-lmytinfo $LIBS"
+
+cf_add_libs="-lmytinfo"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
 fi
 
     ;;
@@ -4849,7 +4879,7 @@ hpux10.*) #(vi
        # term.h) for cur_colr
        if test "x$cf_cv_screen" = "xcurses_colr"
        then
-               echo "$as_me:4852: checking for initscr in -lcur_colr" >&5
+               echo "$as_me:4882: checking for initscr in -lcur_colr" >&5
 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4857,7 +4887,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcur_colr  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4860 "configure"
+#line 4890 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4876,16 +4906,16 @@ initscr ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4879: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4909: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4882: \$? = $ac_status" >&5
+  echo "$as_me:4912: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4885: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4915: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4888: \$? = $ac_status" >&5
+  echo "$as_me:4918: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_cur_colr_initscr=yes
 else
@@ -4896,16 +4926,31 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4899: result: $ac_cv_lib_cur_colr_initscr" >&5
+echo "$as_me:4929: result: $ac_cv_lib_cur_colr_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
 if test $ac_cv_lib_cur_colr_initscr = yes; then
 
-                       LIBS="-lcur_colr $LIBS"
+cf_add_libs="-lcur_colr"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
                        ac_cv_func_initscr=yes
 
 else
 
-               echo "$as_me:4908: checking for initscr in -lHcurses" >&5
+               echo "$as_me:4953: checking for initscr in -lHcurses" >&5
 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4913,7 +4958,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lHcurses  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4916 "configure"
+#line 4961 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4932,16 +4977,16 @@ initscr ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4935: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4980: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4938: \$? = $ac_status" >&5
+  echo "$as_me:4983: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4941: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4986: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4944: \$? = $ac_status" >&5
+  echo "$as_me:4989: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_Hcurses_initscr=yes
 else
@@ -4952,12 +4997,28 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4955: result: $ac_cv_lib_Hcurses_initscr" >&5
+echo "$as_me:5000: result: $ac_cv_lib_Hcurses_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
 if test $ac_cv_lib_Hcurses_initscr = yes; then
 
                        # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
-                       LIBS="-lHcurses $LIBS"
+
+cf_add_libs="-lHcurses"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
                        CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
                        ac_cv_func_initscr=yes
 
@@ -4992,7 +5053,7 @@ if test -n "/lib64" ; then
       if test "$cf_have_libdir" = no ; then
         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
 
-echo "${as_me:-configure}:4995: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:5056: testing adding $cf_add_libdir to library-path ..." 1>&5
 
         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
       fi
@@ -5021,7 +5082,7 @@ if test -n "/lib" ; then
       if test "$cf_have_libdir" = no ; then
         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
 
-echo "${as_me:-configure}:5024: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:5085: testing adding $cf_add_libdir to library-path ..." 1>&5
 
         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
       fi
@@ -5052,7 +5113,7 @@ if test -n "/lib" ; then
       if test "$cf_have_libdir" = no ; then
         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
 
-echo "${as_me:-configure}:5055: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:5116: testing adding $cf_add_libdir to library-path ..." 1>&5
 
         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
       fi
@@ -5087,7 +5148,7 @@ if test -n "/usr/5lib" ; then
       if test "$cf_have_libdir" = no ; then
         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
 
-echo "${as_me:-configure}:5090: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:5151: testing adding $cf_add_libdir to library-path ..." 1>&5
 
         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
       fi
@@ -5095,7 +5156,22 @@ echo "${as_me:-configure}:5090: testing adding $cf_add_libdir to library-path ..
   done
 fi
 
-                       LIBS="-lcurses -ltermcap $LIBS"
+cf_add_libs="-lcurses -ltermcap"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
                fi
     fi
     ac_cv_func_initscr=yes
@@ -5116,13 +5192,13 @@ if test ".$ac_cv_func_initscr" != .yes ; then
        # because it may be needed to link the test-case for initscr.
        if test "x$cf_term_lib" = x
        then
-               echo "$as_me:5119: checking for tgoto" >&5
+               echo "$as_me:5195: checking for tgoto" >&5
 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
 if test "${ac_cv_func_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 5125 "configure"
+#line 5201 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char tgoto (); below.  */
@@ -5153,16 +5229,16 @@ f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5156: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5232: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5159: \$? = $ac_status" >&5
+  echo "$as_me:5235: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5162: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5238: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5165: \$? = $ac_status" >&5
+  echo "$as_me:5241: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_tgoto=yes
 else
@@ -5172,7 +5248,7 @@ ac_cv_func_tgoto=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:5175: result: $ac_cv_func_tgoto" >&5
+echo "$as_me:5251: result: $ac_cv_func_tgoto" >&5
 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
 if test $ac_cv_func_tgoto = yes; then
   cf_term_lib=predefined
@@ -5181,7 +5257,7 @@ else
                        for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
                        do
                                as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
-echo "$as_me:5184: checking for tgoto in -l$cf_term_lib" >&5
+echo "$as_me:5260: checking for tgoto in -l$cf_term_lib" >&5
 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5189,7 +5265,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-l$cf_term_lib  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5192 "configure"
+#line 5268 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -5208,16 +5284,16 @@ tgoto ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5211: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5287: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5214: \$? = $ac_status" >&5
+  echo "$as_me:5290: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5217: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5293: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5220: \$? = $ac_status" >&5
+  echo "$as_me:5296: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_Lib=yes"
 else
@@ -5228,7 +5304,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:5231: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:5307: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
   break
@@ -5247,7 +5323,7 @@ fi
                for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
                do
                        as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
-echo "$as_me:5250: checking for initscr in -l$cf_curs_lib" >&5
+echo "$as_me:5326: checking for initscr in -l$cf_curs_lib" >&5
 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5255,7 +5331,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-l$cf_curs_lib  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5258 "configure"
+#line 5334 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -5274,16 +5350,16 @@ initscr ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5277: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5353: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5280: \$? = $ac_status" >&5
+  echo "$as_me:5356: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5283: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5359: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5286: \$? = $ac_status" >&5
+  echo "$as_me:5362: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_Lib=yes"
 else
@@ -5294,7 +5370,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:5297: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:5373: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
   break
@@ -5302,16 +5378,16 @@ fi
 
                done
        fi
-       test $cf_curs_lib = unknown && { { echo "$as_me:5305: error: no curses library found" >&5
+       test $cf_curs_lib = unknown && { { echo "$as_me:5381: error: no curses library found" >&5
 echo "$as_me: error: no curses library found" >&2;}
    { (exit 1); exit 1; }; }
 
        LIBS="-l$cf_curs_lib $cf_save_LIBS"
        if test "$cf_term_lib" = unknown ; then
-               echo "$as_me:5311: checking if we can link with $cf_curs_lib library" >&5
+               echo "$as_me:5387: checking if we can link with $cf_curs_lib library" >&5
 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
                cat >conftest.$ac_ext <<_ACEOF
-#line 5314 "configure"
+#line 5390 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header:-curses.h}>
 int
@@ -5323,16 +5399,16 @@ initscr()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5326: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5402: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5329: \$? = $ac_status" >&5
+  echo "$as_me:5405: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5332: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5408: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5335: \$? = $ac_status" >&5
+  echo "$as_me:5411: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -5341,18 +5417,18 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-               echo "$as_me:5344: result: $cf_result" >&5
+               echo "$as_me:5420: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
-               test $cf_result = no && { { echo "$as_me:5346: error: Cannot link curses library" >&5
+               test $cf_result = no && { { echo "$as_me:5422: error: Cannot link curses library" >&5
 echo "$as_me: error: Cannot link curses library" >&2;}
    { (exit 1); exit 1; }; }
        elif test "$cf_curs_lib" = "$cf_term_lib" ; then
                :
        elif test "$cf_term_lib" != predefined ; then
-               echo "$as_me:5352: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
+               echo "$as_me:5428: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
                cat >conftest.$ac_ext <<_ACEOF
-#line 5355 "configure"
+#line 5431 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header:-curses.h}>
 int
@@ -5364,16 +5440,16 @@ initscr(); tgoto((char *)0, 0, 0);
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5367: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5443: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5370: \$? = $ac_status" >&5
+  echo "$as_me:5446: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5373: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5449: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5376: \$? = $ac_status" >&5
+  echo "$as_me:5452: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=no
 else
@@ -5382,7 +5458,7 @@ cat conftest.$ac_ext >&5
 
                        LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
                        cat >conftest.$ac_ext <<_ACEOF
-#line 5385 "configure"
+#line 5461 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header:-curses.h}>
 int
@@ -5394,16 +5470,16 @@ initscr()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5397: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5473: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5400: \$? = $ac_status" >&5
+  echo "$as_me:5476: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5403: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5479: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5406: \$? = $ac_status" >&5
+  echo "$as_me:5482: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -5415,7 +5491,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-               echo "$as_me:5418: result: $cf_result" >&5
+               echo "$as_me:5494: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
        fi
 fi
@@ -5433,7 +5509,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:5436: checking for $ac_word" >&5
+echo "$as_me:5512: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5448,7 +5524,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_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
-echo "$as_me:5451: found $ac_dir/$ac_word" >&5
+echo "$as_me:5527: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -5456,10 +5532,10 @@ fi
 fi
 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
 if test -n "$NCURSES_CONFIG"; then
-  echo "$as_me:5459: result: $NCURSES_CONFIG" >&5
+  echo "$as_me:5535: result: $NCURSES_CONFIG" >&5
 echo "${ECHO_T}$NCURSES_CONFIG" >&6
 else
-  echo "$as_me:5462: result: no" >&5
+  echo "$as_me:5538: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -5472,7 +5548,7 @@ if test -z "$NCURSES_CONFIG"; 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:5475: checking for $ac_word" >&5
+echo "$as_me:5551: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5487,7 +5563,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_NCURSES_CONFIG="$ac_prog"
-echo "$as_me:5490: found $ac_dir/$ac_word" >&5
+echo "$as_me:5566: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -5495,10 +5571,10 @@ fi
 fi
 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
 if test -n "$ac_ct_NCURSES_CONFIG"; then
-  echo "$as_me:5498: result: $ac_ct_NCURSES_CONFIG" >&5
+  echo "$as_me:5574: result: $ac_ct_NCURSES_CONFIG" >&5
 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
 else
-  echo "$as_me:5501: result: no" >&5
+  echo "$as_me:5577: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -5512,11 +5588,26 @@ fi
 if test "$NCURSES_CONFIG" != none ; then
 
 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
-LIBS="`$NCURSES_CONFIG --libs` $LIBS"
+
+cf_add_libs="`$NCURSES_CONFIG --libs`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
 
 # even with config script, some packages use no-override for curses.h
 
-echo "$as_me:5519: checking if we have identified curses headers" >&5
+echo "$as_me:5610: checking if we have identified curses headers" >&5
 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
 if test "${cf_cv_ncurses_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5530,7 +5621,7 @@ for cf_header in  \
        curses.h
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 5533 "configure"
+#line 5624 "configure"
 #include "confdefs.h"
 #include <${cf_header}>
 int
@@ -5542,16 +5633,16 @@ initscr(); tgoto("?", 0,0)
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5545: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5636: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5548: \$? = $ac_status" >&5
+  echo "$as_me:5639: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:5551: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5642: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5554: \$? = $ac_status" >&5
+  echo "$as_me:5645: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_header=$cf_header; break
 else
@@ -5562,11 +5653,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:5565: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:5656: result: $cf_cv_ncurses_header" >&5
 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
 
 if test "$cf_cv_ncurses_header" = none ; then
-       { { echo "$as_me:5569: error: No curses header-files found" >&5
+       { { echo "$as_me:5660: error: No curses header-files found" >&5
 echo "$as_me: error: No curses header-files found" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -5576,23 +5667,23 @@ fi
 for ac_header in $cf_cv_ncurses_header
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:5579: checking for $ac_header" >&5
+echo "$as_me:5670: 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 5585 "configure"
+#line 5676 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:5589: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:5680: \"$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:5595: \$? = $ac_status" >&5
+  echo "$as_me:5686: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5611,7 +5702,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:5614: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:5705: 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
@@ -5664,7 +5755,7 @@ if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
                          cf_save_CPPFLAGS=$CPPFLAGS
                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                          cat >conftest.$ac_ext <<_ACEOF
-#line 5667 "configure"
+#line 5758 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -5676,16 +5767,16 @@ printf("Hello")
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5679: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5770: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5682: \$? = $ac_status" >&5
+  echo "$as_me:5773: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:5685: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5776: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5688: \$? = $ac_status" >&5
+  echo "$as_me:5779: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -5702,7 +5793,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                if test "$cf_have_incdir" = no ; then
                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
 
-echo "${as_me:-configure}:5705: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:5796: testing adding $cf_add_incdir to include-path ..." 1>&5
 
                  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 
@@ -5719,7 +5810,7 @@ fi
 
 }
 
-echo "$as_me:5722: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "$as_me:5813: checking for $cf_ncuhdr_root header in include-path" >&5
 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
 if test "${cf_cv_ncurses_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5731,7 +5822,7 @@ else
        do
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 5734 "configure"
+#line 5825 "configure"
 #include "confdefs.h"
 
 #include <$cf_header>
@@ -5755,16 +5846,16 @@ printf("old\n");
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5758: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5849: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5761: \$? = $ac_status" >&5
+  echo "$as_me:5852: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:5764: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5855: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5767: \$? = $ac_status" >&5
+  echo "$as_me:5858: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_h=$cf_header
 
@@ -5779,14 +5870,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
        done
 
 fi
-echo "$as_me:5782: result: $cf_cv_ncurses_h" >&5
+echo "$as_me:5873: result: $cf_cv_ncurses_h" >&5
 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
 
 if test "$cf_cv_ncurses_h" != no ; then
        cf_cv_ncurses_header=$cf_cv_ncurses_h
 else
 
-echo "$as_me:5789: checking for $cf_ncuhdr_root include-path" >&5
+echo "$as_me:5880: checking for $cf_ncuhdr_root include-path" >&5
 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
 if test "${cf_cv_ncurses_h2+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5926,7 +6017,7 @@ if test -n "$cf_incdir" ; then
                          cf_save_CPPFLAGS=$CPPFLAGS
                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                          cat >conftest.$ac_ext <<_ACEOF
-#line 5929 "configure"
+#line 6020 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -5938,16 +6029,16 @@ printf("Hello")
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5941: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6032: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5944: \$? = $ac_status" >&5
+  echo "$as_me:6035: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:5947: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6038: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5950: \$? = $ac_status" >&5
+  echo "$as_me:6041: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -5964,7 +6055,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                if test "$cf_have_incdir" = no ; then
                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
 
-echo "${as_me:-configure}:5967: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:6058: testing adding $cf_add_incdir to include-path ..." 1>&5
 
                  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 
@@ -5985,7 +6076,7 @@ fi
                do
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 5988 "configure"
+#line 6079 "configure"
 #include "confdefs.h"
 
 #include <$cf_header>
@@ -6009,16 +6100,16 @@ printf("old\n");
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6012: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6103: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:6015: \$? = $ac_status" >&5
+  echo "$as_me:6106: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6018: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6109: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6021: \$? = $ac_status" >&5
+  echo "$as_me:6112: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_h2=$cf_header
 
@@ -6039,12 +6130,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                CPPFLAGS="$cf_save2_CPPFLAGS"
                test "$cf_cv_ncurses_h2" != no && break
        done
-       test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6042: error: not found" >&5
+       test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6133: error: not found" >&5
 echo "$as_me: error: not found" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:6047: result: $cf_cv_ncurses_h2" >&5
+echo "$as_me:6138: result: $cf_cv_ncurses_h2" >&5
 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
 
        cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
@@ -6077,7 +6168,7 @@ if test -n "$cf_1st_incdir" ; then
                          cf_save_CPPFLAGS=$CPPFLAGS
                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                          cat >conftest.$ac_ext <<_ACEOF
-#line 6080 "configure"
+#line 6171 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -6089,16 +6180,16 @@ printf("Hello")
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6092: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6183: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:6095: \$? = $ac_status" >&5
+  echo "$as_me:6186: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6098: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6189: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6101: \$? = $ac_status" >&5
+  echo "$as_me:6192: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -6115,7 +6206,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                if test "$cf_have_incdir" = no ; then
                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
 
-echo "${as_me:-configure}:6118: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:6209: testing adding $cf_add_incdir to include-path ..." 1>&5
 
                  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 
@@ -6161,7 +6252,7 @@ EOF
        ;;
 esac
 
-echo "$as_me:6164: checking for terminfo header" >&5
+echo "$as_me:6255: checking for terminfo header" >&5
 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
 if test "${cf_cv_term_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6179,7 +6270,7 @@ esac
 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 6182 "configure"
+#line 6273 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -6194,16 +6285,16 @@ int x = auto_left_margin
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6197: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6288: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:6200: \$? = $ac_status" >&5
+  echo "$as_me:6291: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6203: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6294: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6206: \$? = $ac_status" >&5
+  echo "$as_me:6297: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
        cf_cv_term_header="$cf_test"
@@ -6219,7 +6310,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:6222: result: $cf_cv_term_header" >&5
+echo "$as_me:6313: result: $cf_cv_term_header" >&5
 echo "${ECHO_T}$cf_cv_term_header" >&6
 
 # Set definitions to allow ifdef'ing to accommodate subdirectories
@@ -6257,7 +6348,7 @@ cat >>confdefs.h <<\EOF
 #define NCURSES 1
 EOF
 
-echo "$as_me:6260: checking for ncurses version" >&5
+echo "$as_me:6351: checking for ncurses version" >&5
 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
 if test "${cf_cv_ncurses_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6283,10 +6374,10 @@ Autoconf "old"
 #endif
 EOF
        cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-       { (eval echo "$as_me:6286: \"$cf_try\"") >&5
+       { (eval echo "$as_me:6377: \"$cf_try\"") >&5
   (eval $cf_try) 2>&5
   ac_status=$?
-  echo "$as_me:6289: \$? = $ac_status" >&5
+  echo "$as_me:6380: \$? = $ac_status" >&5
   (exit $ac_status); }
        if test -f conftest.out ; then
                cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -6296,7 +6387,7 @@ EOF
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6299 "configure"
+#line 6390 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -6321,15 +6412,15 @@ int main()
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:6324: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6415: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6327: \$? = $ac_status" >&5
+  echo "$as_me:6418: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:6329: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6420: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6332: \$? = $ac_status" >&5
+  echo "$as_me:6423: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
        cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -6343,7 +6434,7 @@ fi
        rm -f $cf_tempfile
 
 fi
-echo "$as_me:6346: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:6437: result: $cf_cv_ncurses_version" >&5
 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
 test "$cf_cv_ncurses_version" = no ||
 cat >>confdefs.h <<\EOF
@@ -6356,7 +6447,7 @@ cf_nculib_root=ncurses
        # to link gpm.
 cf_ncurses_LIBS=""
 cf_ncurses_SAVE="$LIBS"
-echo "$as_me:6359: checking for Gpm_Open in -lgpm" >&5
+echo "$as_me:6450: 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
@@ -6364,7 +6455,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6367 "configure"
+#line 6458 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -6383,16 +6474,16 @@ Gpm_Open ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6386: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6477: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6389: \$? = $ac_status" >&5
+  echo "$as_me:6480: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6392: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6483: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6395: \$? = $ac_status" >&5
+  echo "$as_me:6486: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_Gpm_Open=yes
 else
@@ -6403,10 +6494,10 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6406: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:6497: 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
-  echo "$as_me:6409: checking for initscr in -lgpm" >&5
+  echo "$as_me:6500: checking for initscr in -lgpm" >&5
 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6414,7 +6505,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6417 "configure"
+#line 6508 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -6433,16 +6524,16 @@ initscr ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6436: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6527: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6439: \$? = $ac_status" >&5
+  echo "$as_me:6530: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6442: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6533: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6445: \$? = $ac_status" >&5
+  echo "$as_me:6536: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_initscr=yes
 else
@@ -6453,7 +6544,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6456: result: $ac_cv_lib_gpm_initscr" >&5
+echo "$as_me:6547: result: $ac_cv_lib_gpm_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
 if test $ac_cv_lib_gpm_initscr = yes; then
   LIBS="$cf_ncurses_SAVE"
@@ -6468,7 +6559,7 @@ 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).
        if test "$cf_nculib_root" = ncurses ; then
-               echo "$as_me:6471: checking for tgoto in -lmytinfo" >&5
+               echo "$as_me:6562: checking for tgoto in -lmytinfo" >&5
 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6476,7 +6567,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmytinfo  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6479 "configure"
+#line 6570 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -6495,16 +6586,16 @@ tgoto ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6498: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6589: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6501: \$? = $ac_status" >&5
+  echo "$as_me:6592: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6504: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6595: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6507: \$? = $ac_status" >&5
+  echo "$as_me:6598: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_mytinfo_tgoto=yes
 else
@@ -6515,7 +6606,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6518: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:6609: result: $ac_cv_lib_mytinfo_tgoto" >&5
 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
 if test $ac_cv_lib_mytinfo_tgoto = yes; then
   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
@@ -6525,22 +6616,52 @@ fi
        ;;
 esac
 
-LIBS="$cf_ncurses_LIBS $LIBS"
+cf_add_libs="$cf_ncurses_LIBS"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
 
 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
 then
-       LIBS="-l$cf_nculib_root $LIBS"
+
+cf_add_libs="-l$cf_nculib_root"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
 else
 
        eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
        cf_libdir=""
-       echo "$as_me:6537: checking for initscr" >&5
+       echo "$as_me:6658: checking for initscr" >&5
 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
 if test "${ac_cv_func_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6543 "configure"
+#line 6664 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char initscr (); below.  */
@@ -6571,16 +6692,16 @@ f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6574: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6695: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6577: \$? = $ac_status" >&5
+  echo "$as_me:6698: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6580: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6701: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6583: \$? = $ac_status" >&5
+  echo "$as_me:6704: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_initscr=yes
 else
@@ -6590,18 +6711,18 @@ ac_cv_func_initscr=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:6593: result: $ac_cv_func_initscr" >&5
+echo "$as_me:6714: result: $ac_cv_func_initscr" >&5
 echo "${ECHO_T}$ac_cv_func_initscr" >&6
 if test $ac_cv_func_initscr = yes; then
   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 else
 
                cf_save_LIBS="$LIBS"
-               echo "$as_me:6600: checking for initscr in -l$cf_nculib_root" >&5
+               echo "$as_me:6721: checking for initscr in -l$cf_nculib_root" >&5
 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
                LIBS="-l$cf_nculib_root $LIBS"
                cat >conftest.$ac_ext <<_ACEOF
-#line 6604 "configure"
+#line 6725 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header:-curses.h}>
 int
@@ -6613,25 +6734,25 @@ initscr()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6616: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6737: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6619: \$? = $ac_status" >&5
+  echo "$as_me:6740: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6622: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6743: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6625: \$? = $ac_status" >&5
+  echo "$as_me:6746: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:6627: result: yes" >&5
+  echo "$as_me:6748: result: yes" >&5
 echo "${ECHO_T}yes" >&6
                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:6634: result: no" >&5
+echo "$as_me:6755: result: no" >&5
 echo "${ECHO_T}no" >&6
 
 cf_search=
@@ -6721,11 +6842,11 @@ cf_search="$cf_library_path_list $cf_search"
 
                        for cf_libdir in $cf_search
                        do
-                               echo "$as_me:6724: checking for -l$cf_nculib_root in $cf_libdir" >&5
+                               echo "$as_me:6845: checking for -l$cf_nculib_root in $cf_libdir" >&5
 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
                                LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
                                cat >conftest.$ac_ext <<_ACEOF
-#line 6728 "configure"
+#line 6849 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header:-curses.h}>
 int
@@ -6737,25 +6858,25 @@ initscr()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6740: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6861: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6743: \$? = $ac_status" >&5
+  echo "$as_me:6864: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6746: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6867: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6749: \$? = $ac_status" >&5
+  echo "$as_me:6870: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:6751: result: yes" >&5
+  echo "$as_me:6872: result: yes" >&5
 echo "${ECHO_T}yes" >&6
                                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
                                         break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:6758: result: no" >&5
+echo "$as_me:6879: result: no" >&5
 echo "${ECHO_T}no" >&6
                                         LIBS="$cf_save_LIBS"
 fi
@@ -6770,7 +6891,7 @@ fi
 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
 
 if test $cf_found_library = no ; then
-       { { echo "$as_me:6773: error: Cannot link $cf_nculib_root library" >&5
+       { { echo "$as_me:6894: error: Cannot link $cf_nculib_root library" >&5
 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -6778,7 +6899,7 @@ fi
 fi
 
 if test -n "$cf_ncurses_LIBS" ; then
-       echo "$as_me:6781: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+       echo "$as_me:6902: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
        cf_ncurses_SAVE="$LIBS"
        for p in $cf_ncurses_LIBS ; do
@@ -6788,7 +6909,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS..
                fi
        done
        cat >conftest.$ac_ext <<_ACEOF
-#line 6791 "configure"
+#line 6912 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header:-curses.h}>
 int
@@ -6800,23 +6921,23 @@ initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6803: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6924: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6806: \$? = $ac_status" >&5
+  echo "$as_me:6927: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6809: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6930: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6812: \$? = $ac_status" >&5
+  echo "$as_me:6933: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:6814: result: yes" >&5
+  echo "$as_me:6935: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:6819: result: no" >&5
+echo "$as_me:6940: result: no" >&5
 echo "${ECHO_T}no" >&6
                 LIBS="$cf_ncurses_SAVE"
 fi
@@ -6834,7 +6955,7 @@ fi
        ;;
 ncursesw) #(vi
 
-echo "$as_me:6837: checking for multibyte character support" >&5
+echo "$as_me:6958: checking for multibyte character support" >&5
 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
 if test "${cf_cv_utf8_lib+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6842,7 +6963,7 @@ else
 
        cf_save_LIBS="$LIBS"
        cat >conftest.$ac_ext <<_ACEOF
-#line 6845 "configure"
+#line 6966 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -6855,16 +6976,16 @@ putwc(0,0);
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6858: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6979: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6861: \$? = $ac_status" >&5
+  echo "$as_me:6982: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6864: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6985: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6867: \$? = $ac_status" >&5
+  echo "$as_me:6988: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_utf8_lib=yes
 else
@@ -6876,12 +6997,12 @@ cat conftest.$ac_ext >&5
 cf_cv_header_path_utf8=
 cf_cv_library_path_utf8=
 
-echo "${as_me:-configure}:6879: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:7000: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
 
 cf_save_LIBS="$LIBS"
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 6884 "configure"
+#line 7005 "configure"
 #include "confdefs.h"
 
 #include <libutf8.h>
@@ -6894,16 +7015,16 @@ putwc(0,0);
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6897: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7018: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6900: \$? = $ac_status" >&5
+  echo "$as_me:7021: \$? = $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:7024: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6906: \$? = $ac_status" >&5
+  echo "$as_me:7027: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
        cf_cv_find_linkage_utf8=yes
@@ -6917,7 +7038,7 @@ cat conftest.$ac_ext >&5
 LIBS="-lutf8  $cf_save_LIBS"
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 6920 "configure"
+#line 7041 "configure"
 #include "confdefs.h"
 
 #include <libutf8.h>
@@ -6930,16 +7051,16 @@ putwc(0,0);
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6933: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7054: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6936: \$? = $ac_status" >&5
+  echo "$as_me:7057: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6939: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7060: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6942: \$? = $ac_status" >&5
+  echo "$as_me:7063: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
        cf_cv_find_linkage_utf8=yes
@@ -6956,9 +7077,9 @@ cat conftest.$ac_ext >&5
 
     test -n "$verbose" && echo "       find linkage for utf8 library" 1>&6
 
-echo "${as_me:-configure}:6959: testing find linkage for utf8 library ..." 1>&5
+echo "${as_me:-configure}:7080: testing find linkage for utf8 library ..." 1>&5
 
-echo "${as_me:-configure}:6961: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:7082: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
 
     cf_save_CPPFLAGS="$CPPFLAGS"
     cf_test_CPPFLAGS="$CPPFLAGS"
@@ -7071,11 +7192,11 @@ cf_search="$cf_search $cf_header_path_list"
       if test -d $cf_cv_header_path_utf8 ; then
         test -n "$verbose" && echo "   ... testing $cf_cv_header_path_utf8" 1>&6
 
-echo "${as_me:-configure}:7074: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:7195: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
 
         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
         cat >conftest.$ac_ext <<_ACEOF
-#line 7078 "configure"
+#line 7199 "configure"
 #include "confdefs.h"
 
 #include <libutf8.h>
@@ -7088,21 +7209,21 @@ putwc(0,0);
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7091: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7212: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7094: \$? = $ac_status" >&5
+  echo "$as_me:7215: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7097: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7218: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7100: \$? = $ac_status" >&5
+  echo "$as_me:7221: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
             test -n "$verbose" && echo "       ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
 
-echo "${as_me:-configure}:7105: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:7226: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
 
             cf_cv_find_linkage_utf8=maybe
             cf_test_CPPFLAGS="$CPPFLAGS"
@@ -7120,7 +7241,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 
     if test "$cf_cv_find_linkage_utf8" = maybe ; then
 
-echo "${as_me:-configure}:7123: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:7244: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
 
       cf_save_LIBS="$LIBS"
       cf_save_LDFLAGS="$LDFLAGS"
@@ -7217,13 +7338,13 @@ cf_search="$cf_library_path_list $cf_search"
           if test -d $cf_cv_library_path_utf8 ; then
             test -n "$verbose" && echo "       ... testing $cf_cv_library_path_utf8" 1>&6
 
-echo "${as_me:-configure}:7220: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:7341: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
 
             CPPFLAGS="$cf_test_CPPFLAGS"
             LIBS="-lutf8  $cf_save_LIBS"
             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
             cat >conftest.$ac_ext <<_ACEOF
-#line 7226 "configure"
+#line 7347 "configure"
 #include "confdefs.h"
 
 #include <libutf8.h>
@@ -7236,21 +7357,21 @@ putwc(0,0);
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7239: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7360: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7242: \$? = $ac_status" >&5
+  echo "$as_me:7363: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7245: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7366: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7248: \$? = $ac_status" >&5
+  echo "$as_me:7369: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
                 test -n "$verbose" && echo "   ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
 
-echo "${as_me:-configure}:7253: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:7374: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
 
                 cf_cv_find_linkage_utf8=yes
                 cf_cv_library_file_utf8="-lutf8"
@@ -7292,7 +7413,7 @@ fi
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:7295: result: $cf_cv_utf8_lib" >&5
+echo "$as_me:7416: result: $cf_cv_utf8_lib" >&5
 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
 
 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
@@ -7327,7 +7448,7 @@ if test -n "$cf_cv_header_path_utf8" ; then
                          cf_save_CPPFLAGS=$CPPFLAGS
                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                          cat >conftest.$ac_ext <<_ACEOF
-#line 7330 "configure"
+#line 7451 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -7339,16 +7460,16 @@ printf("Hello")
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7342: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7463: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7345: \$? = $ac_status" >&5
+  echo "$as_me:7466: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7348: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7469: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7351: \$? = $ac_status" >&5
+  echo "$as_me:7472: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -7365,7 +7486,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                if test "$cf_have_incdir" = no ; then
                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
 
-echo "${as_me:-configure}:7368: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:7489: testing adding $cf_add_incdir to include-path ..." 1>&5
 
                  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 
@@ -7399,7 +7520,7 @@ if test -n "$cf_cv_library_path_utf8" ; then
       if test "$cf_have_libdir" = no ; then
         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
 
-echo "${as_me:-configure}:7402: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:7523: testing adding $cf_add_libdir to library-path ..." 1>&5
 
         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
       fi
@@ -7407,7 +7528,22 @@ echo "${as_me:-configure}:7402: testing adding $cf_add_libdir to library-path ..
   done
 fi
 
-       LIBS="$cf_cv_library_file_utf8 $LIBS"
+cf_add_libs="$cf_cv_library_file_utf8"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
 fi
 
 cf_ncuconfig_root=ncursesw
@@ -7419,7 +7555,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:7422: checking for $ac_word" >&5
+echo "$as_me:7558: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7434,7 +7570,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_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
-echo "$as_me:7437: found $ac_dir/$ac_word" >&5
+echo "$as_me:7573: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -7442,10 +7578,10 @@ fi
 fi
 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
 if test -n "$NCURSES_CONFIG"; then
-  echo "$as_me:7445: result: $NCURSES_CONFIG" >&5
+  echo "$as_me:7581: result: $NCURSES_CONFIG" >&5
 echo "${ECHO_T}$NCURSES_CONFIG" >&6
 else
-  echo "$as_me:7448: result: no" >&5
+  echo "$as_me:7584: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -7458,7 +7594,7 @@ if test -z "$NCURSES_CONFIG"; 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:7461: checking for $ac_word" >&5
+echo "$as_me:7597: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7473,7 +7609,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_NCURSES_CONFIG="$ac_prog"
-echo "$as_me:7476: found $ac_dir/$ac_word" >&5
+echo "$as_me:7612: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -7481,10 +7617,10 @@ fi
 fi
 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
 if test -n "$ac_ct_NCURSES_CONFIG"; then
-  echo "$as_me:7484: result: $ac_ct_NCURSES_CONFIG" >&5
+  echo "$as_me:7620: result: $ac_ct_NCURSES_CONFIG" >&5
 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
 else
-  echo "$as_me:7487: result: no" >&5
+  echo "$as_me:7623: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -7498,11 +7634,26 @@ fi
 if test "$NCURSES_CONFIG" != none ; then
 
 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
-LIBS="`$NCURSES_CONFIG --libs` $LIBS"
+
+cf_add_libs="`$NCURSES_CONFIG --libs`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
 
 # even with config script, some packages use no-override for curses.h
 
-echo "$as_me:7505: checking if we have identified curses headers" >&5
+echo "$as_me:7656: checking if we have identified curses headers" >&5
 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
 if test "${cf_cv_ncurses_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7516,7 +7667,7 @@ for cf_header in  \
        curses.h
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 7519 "configure"
+#line 7670 "configure"
 #include "confdefs.h"
 #include <${cf_header}>
 int
@@ -7528,16 +7679,16 @@ initscr(); tgoto("?", 0,0)
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7531: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7682: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7534: \$? = $ac_status" >&5
+  echo "$as_me:7685: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7537: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7688: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7540: \$? = $ac_status" >&5
+  echo "$as_me:7691: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_header=$cf_header; break
 else
@@ -7548,11 +7699,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:7551: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:7702: result: $cf_cv_ncurses_header" >&5
 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
 
 if test "$cf_cv_ncurses_header" = none ; then
-       { { echo "$as_me:7555: error: No curses header-files found" >&5
+       { { echo "$as_me:7706: error: No curses header-files found" >&5
 echo "$as_me: error: No curses header-files found" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -7562,23 +7713,23 @@ fi
 for ac_header in $cf_cv_ncurses_header
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:7565: checking for $ac_header" >&5
+echo "$as_me:7716: 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 7571 "configure"
+#line 7722 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:7575: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:7726: \"$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:7581: \$? = $ac_status" >&5
+  echo "$as_me:7732: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -7597,7 +7748,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:7600: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:7751: 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
@@ -7650,7 +7801,7 @@ if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
                          cf_save_CPPFLAGS=$CPPFLAGS
                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                          cat >conftest.$ac_ext <<_ACEOF
-#line 7653 "configure"
+#line 7804 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -7662,16 +7813,16 @@ printf("Hello")
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7665: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7816: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7668: \$? = $ac_status" >&5
+  echo "$as_me:7819: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7671: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7822: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7674: \$? = $ac_status" >&5
+  echo "$as_me:7825: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -7688,7 +7839,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                if test "$cf_have_incdir" = no ; then
                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
 
-echo "${as_me:-configure}:7691: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:7842: testing adding $cf_add_incdir to include-path ..." 1>&5
 
                  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 
@@ -7705,7 +7856,7 @@ fi
 
 }
 
-echo "$as_me:7708: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "$as_me:7859: checking for $cf_ncuhdr_root header in include-path" >&5
 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
 if test "${cf_cv_ncurses_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7717,7 +7868,7 @@ else
        do
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 7720 "configure"
+#line 7871 "configure"
 #include "confdefs.h"
 
 #define _XOPEN_SOURCE_EXTENDED
@@ -7749,16 +7900,16 @@ printf("old\n");
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7752: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7903: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7755: \$? = $ac_status" >&5
+  echo "$as_me:7906: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7758: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7909: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7761: \$? = $ac_status" >&5
+  echo "$as_me:7912: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_h=$cf_header
 
@@ -7773,14 +7924,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
        done
 
 fi
-echo "$as_me:7776: result: $cf_cv_ncurses_h" >&5
+echo "$as_me:7927: result: $cf_cv_ncurses_h" >&5
 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
 
 if test "$cf_cv_ncurses_h" != no ; then
        cf_cv_ncurses_header=$cf_cv_ncurses_h
 else
 
-echo "$as_me:7783: checking for $cf_ncuhdr_root include-path" >&5
+echo "$as_me:7934: checking for $cf_ncuhdr_root include-path" >&5
 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
 if test "${cf_cv_ncurses_h2+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7920,7 +8071,7 @@ if test -n "$cf_incdir" ; then
                          cf_save_CPPFLAGS=$CPPFLAGS
                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                          cat >conftest.$ac_ext <<_ACEOF
-#line 7923 "configure"
+#line 8074 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -7932,16 +8083,16 @@ printf("Hello")
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7935: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8086: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7938: \$? = $ac_status" >&5
+  echo "$as_me:8089: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7941: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8092: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7944: \$? = $ac_status" >&5
+  echo "$as_me:8095: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -7958,7 +8109,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                if test "$cf_have_incdir" = no ; then
                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
 
-echo "${as_me:-configure}:7961: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:8112: testing adding $cf_add_incdir to include-path ..." 1>&5
 
                  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 
@@ -7979,7 +8130,7 @@ fi
                do
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 7982 "configure"
+#line 8133 "configure"
 #include "confdefs.h"
 
 #include <$cf_header>
@@ -8003,16 +8154,16 @@ printf("old\n");
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8006: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8157: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8009: \$? = $ac_status" >&5
+  echo "$as_me:8160: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8012: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8163: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8015: \$? = $ac_status" >&5
+  echo "$as_me:8166: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_h2=$cf_header
 
@@ -8033,12 +8184,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                CPPFLAGS="$cf_save2_CPPFLAGS"
                test "$cf_cv_ncurses_h2" != no && break
        done
-       test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8036: error: not found" >&5
+       test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8187: error: not found" >&5
 echo "$as_me: error: not found" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:8041: result: $cf_cv_ncurses_h2" >&5
+echo "$as_me:8192: result: $cf_cv_ncurses_h2" >&5
 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
 
        cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
@@ -8071,7 +8222,7 @@ if test -n "$cf_1st_incdir" ; then
                          cf_save_CPPFLAGS=$CPPFLAGS
                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
                          cat >conftest.$ac_ext <<_ACEOF
-#line 8074 "configure"
+#line 8225 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -8083,16 +8234,16 @@ printf("Hello")
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8086: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8237: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8089: \$? = $ac_status" >&5
+  echo "$as_me:8240: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8092: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8243: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8095: \$? = $ac_status" >&5
+  echo "$as_me:8246: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -8109,7 +8260,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                if test "$cf_have_incdir" = no ; then
                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
 
-echo "${as_me:-configure}:8112: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:8263: testing adding $cf_add_incdir to include-path ..." 1>&5
 
                  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 
@@ -8155,7 +8306,7 @@ EOF
        ;;
 esac
 
-echo "$as_me:8158: checking for terminfo header" >&5
+echo "$as_me:8309: checking for terminfo header" >&5
 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
 if test "${cf_cv_term_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8173,7 +8324,7 @@ esac
 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 8176 "configure"
+#line 8327 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -8188,16 +8339,16 @@ int x = auto_left_margin
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8191: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8342: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8194: \$? = $ac_status" >&5
+  echo "$as_me:8345: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8197: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8348: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8200: \$? = $ac_status" >&5
+  echo "$as_me:8351: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
        cf_cv_term_header="$cf_test"
@@ -8213,7 +8364,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:8216: result: $cf_cv_term_header" >&5
+echo "$as_me:8367: result: $cf_cv_term_header" >&5
 echo "${ECHO_T}$cf_cv_term_header" >&6
 
 # Set definitions to allow ifdef'ing to accommodate subdirectories
@@ -8251,7 +8402,7 @@ cat >>confdefs.h <<\EOF
 #define NCURSES 1
 EOF
 
-echo "$as_me:8254: checking for ncurses version" >&5
+echo "$as_me:8405: checking for ncurses version" >&5
 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
 if test "${cf_cv_ncurses_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8277,10 +8428,10 @@ Autoconf "old"
 #endif
 EOF
        cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-       { (eval echo "$as_me:8280: \"$cf_try\"") >&5
+       { (eval echo "$as_me:8431: \"$cf_try\"") >&5
   (eval $cf_try) 2>&5
   ac_status=$?
-  echo "$as_me:8283: \$? = $ac_status" >&5
+  echo "$as_me:8434: \$? = $ac_status" >&5
   (exit $ac_status); }
        if test -f conftest.out ; then
                cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -8290,7 +8441,7 @@ EOF
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8293 "configure"
+#line 8444 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -8315,15 +8466,15 @@ int main()
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8318: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8469: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8321: \$? = $ac_status" >&5
+  echo "$as_me:8472: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8323: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8474: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8326: \$? = $ac_status" >&5
+  echo "$as_me:8477: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
        cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -8337,7 +8488,7 @@ fi
        rm -f $cf_tempfile
 
 fi
-echo "$as_me:8340: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:8491: result: $cf_cv_ncurses_version" >&5
 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
 test "$cf_cv_ncurses_version" = no ||
 cat >>confdefs.h <<\EOF
@@ -8350,7 +8501,7 @@ cf_nculib_root=ncursesw
        # to link gpm.
 cf_ncurses_LIBS=""
 cf_ncurses_SAVE="$LIBS"
-echo "$as_me:8353: checking for Gpm_Open in -lgpm" >&5
+echo "$as_me:8504: 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
@@ -8358,7 +8509,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 8361 "configure"
+#line 8512 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -8377,16 +8528,16 @@ Gpm_Open ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8380: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8531: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8383: \$? = $ac_status" >&5
+  echo "$as_me:8534: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8386: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8537: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8389: \$? = $ac_status" >&5
+  echo "$as_me:8540: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_Gpm_Open=yes
 else
@@ -8397,10 +8548,10 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:8400: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:8551: 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
-  echo "$as_me:8403: checking for initscr in -lgpm" >&5
+  echo "$as_me:8554: checking for initscr in -lgpm" >&5
 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8408,7 +8559,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 8411 "configure"
+#line 8562 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -8427,16 +8578,16 @@ initscr ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8430: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8581: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8433: \$? = $ac_status" >&5
+  echo "$as_me:8584: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8436: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8587: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8439: \$? = $ac_status" >&5
+  echo "$as_me:8590: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_initscr=yes
 else
@@ -8447,7 +8598,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:8450: result: $ac_cv_lib_gpm_initscr" >&5
+echo "$as_me:8601: result: $ac_cv_lib_gpm_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
 if test $ac_cv_lib_gpm_initscr = yes; then
   LIBS="$cf_ncurses_SAVE"
@@ -8462,7 +8613,7 @@ 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).
        if test "$cf_nculib_root" = ncurses ; then
-               echo "$as_me:8465: checking for tgoto in -lmytinfo" >&5
+               echo "$as_me:8616: checking for tgoto in -lmytinfo" >&5
 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8470,7 +8621,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmytinfo  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 8473 "configure"
+#line 8624 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -8489,16 +8640,16 @@ tgoto ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8492: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8643: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8495: \$? = $ac_status" >&5
+  echo "$as_me:8646: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8498: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8649: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8501: \$? = $ac_status" >&5
+  echo "$as_me:8652: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_mytinfo_tgoto=yes
 else
@@ -8509,7 +8660,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:8512: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:8663: result: $ac_cv_lib_mytinfo_tgoto" >&5
 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
 if test $ac_cv_lib_mytinfo_tgoto = yes; then
   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
@@ -8519,22 +8670,52 @@ fi
        ;;
 esac
 
-LIBS="$cf_ncurses_LIBS $LIBS"
+cf_add_libs="$cf_ncurses_LIBS"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
 
 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
 then
-       LIBS="-l$cf_nculib_root $LIBS"
+
+cf_add_libs="-l$cf_nculib_root"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
 else
 
        eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
        cf_libdir=""
-       echo "$as_me:8531: checking for initscr" >&5
+       echo "$as_me:8712: checking for initscr" >&5
 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
 if test "${ac_cv_func_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8537 "configure"
+#line 8718 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char initscr (); below.  */
@@ -8565,16 +8746,16 @@ f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8568: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8749: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8571: \$? = $ac_status" >&5
+  echo "$as_me:8752: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8574: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8755: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8577: \$? = $ac_status" >&5
+  echo "$as_me:8758: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_initscr=yes
 else
@@ -8584,18 +8765,18 @@ ac_cv_func_initscr=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:8587: result: $ac_cv_func_initscr" >&5
+echo "$as_me:8768: result: $ac_cv_func_initscr" >&5
 echo "${ECHO_T}$ac_cv_func_initscr" >&6
 if test $ac_cv_func_initscr = yes; then
   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 else
 
                cf_save_LIBS="$LIBS"
-               echo "$as_me:8594: checking for initscr in -l$cf_nculib_root" >&5
+               echo "$as_me:8775: checking for initscr in -l$cf_nculib_root" >&5
 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
                LIBS="-l$cf_nculib_root $LIBS"
                cat >conftest.$ac_ext <<_ACEOF
-#line 8598 "configure"
+#line 8779 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header:-curses.h}>
 int
@@ -8607,25 +8788,25 @@ initscr()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8610: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8791: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8613: \$? = $ac_status" >&5
+  echo "$as_me:8794: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8616: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8797: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8619: \$? = $ac_status" >&5
+  echo "$as_me:8800: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:8621: result: yes" >&5
+  echo "$as_me:8802: result: yes" >&5
 echo "${ECHO_T}yes" >&6
                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:8628: result: no" >&5
+echo "$as_me:8809: result: no" >&5
 echo "${ECHO_T}no" >&6
 
 cf_search=
@@ -8715,11 +8896,11 @@ cf_search="$cf_library_path_list $cf_search"
 
                        for cf_libdir in $cf_search
                        do
-                               echo "$as_me:8718: checking for -l$cf_nculib_root in $cf_libdir" >&5
+                               echo "$as_me:8899: checking for -l$cf_nculib_root in $cf_libdir" >&5
 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
                                LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
                                cat >conftest.$ac_ext <<_ACEOF
-#line 8722 "configure"
+#line 8903 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header:-curses.h}>
 int
@@ -8731,25 +8912,25 @@ initscr()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8734: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8915: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8737: \$? = $ac_status" >&5
+  echo "$as_me:8918: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8740: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8921: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8743: \$? = $ac_status" >&5
+  echo "$as_me:8924: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:8745: result: yes" >&5
+  echo "$as_me:8926: result: yes" >&5
 echo "${ECHO_T}yes" >&6
                                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
                                         break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:8752: result: no" >&5
+echo "$as_me:8933: result: no" >&5
 echo "${ECHO_T}no" >&6
                                         LIBS="$cf_save_LIBS"
 fi
@@ -8764,7 +8945,7 @@ fi
 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
 
 if test $cf_found_library = no ; then
-       { { echo "$as_me:8767: error: Cannot link $cf_nculib_root library" >&5
+       { { echo "$as_me:8948: error: Cannot link $cf_nculib_root library" >&5
 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -8772,7 +8953,7 @@ fi
 fi
 
 if test -n "$cf_ncurses_LIBS" ; then
-       echo "$as_me:8775: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+       echo "$as_me:8956: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
        cf_ncurses_SAVE="$LIBS"
        for p in $cf_ncurses_LIBS ; do
@@ -8782,7 +8963,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS..
                fi
        done
        cat >conftest.$ac_ext <<_ACEOF
-#line 8785 "configure"
+#line 8966 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header:-curses.h}>
 int
@@ -8794,23 +8975,23 @@ initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8797: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8978: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8800: \$? = $ac_status" >&5
+  echo "$as_me:8981: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8803: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8984: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8806: \$? = $ac_status" >&5
+  echo "$as_me:8987: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:8808: result: yes" >&5
+  echo "$as_me:8989: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:8813: result: no" >&5
+echo "$as_me:8994: result: no" >&5
 echo "${ECHO_T}no" >&6
                 LIBS="$cf_ncurses_SAVE"
 fi
@@ -8827,7 +9008,7 @@ fi
 
        ;;
 pdcurses)
-       echo "$as_me:8830: checking for X" >&5
+       echo "$as_me:9011: checking for X" >&5
 echo $ECHO_N "checking for X... $ECHO_C" >&6
 
 # Check whether --with-x or --without-x was given.
@@ -8924,17 +9105,17 @@ if test "$ac_x_includes" = no; then
   # Guess where to find include files, by looking for Intrinsic.h.
   # First, try using that file with no special directory specified.
   cat >conftest.$ac_ext <<_ACEOF
-#line 8927 "configure"
+#line 9108 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 _ACEOF
-if { (eval echo "$as_me:8931: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:9112: \"$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:8937: \$? = $ac_status" >&5
+  echo "$as_me:9118: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -8967,7 +9148,7 @@ if test "$ac_x_libraries" = no; then
   ac_save_LIBS=$LIBS
   LIBS="-lXt $LIBS"
   cat >conftest.$ac_ext <<_ACEOF
-#line 8970 "configure"
+#line 9151 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 int
@@ -8979,16 +9160,16 @@ XtMalloc (0)
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8982: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9163: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8985: \$? = $ac_status" >&5
+  echo "$as_me:9166: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8988: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9169: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8991: \$? = $ac_status" >&5
+  echo "$as_me:9172: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   LIBS=$ac_save_LIBS
 # We can link X programs with no special library path.
@@ -9026,7 +9207,7 @@ fi
 fi # $with_x != no
 
 if test "$have_x" != yes; then
-  echo "$as_me:9029: result: $have_x" >&5
+  echo "$as_me:9210: result: $have_x" >&5
 echo "${ECHO_T}$have_x" >&6
   no_x=yes
 else
@@ -9036,7 +9217,7 @@ else
   # Update the cache value to reflect the command line values.
   ac_cv_have_x="have_x=yes \
                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
-  echo "$as_me:9039: result: libraries $x_libraries, headers $x_includes" >&5
+  echo "$as_me:9220: result: libraries $x_libraries, headers $x_includes" >&5
 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
 fi
 
@@ -9060,11 +9241,11 @@ else
     # others require no space.  Words are not sufficient . . . .
     case `(uname -sr) 2>/dev/null` in
     "SunOS 5"*)
-      echo "$as_me:9063: checking whether -R must be followed by a space" >&5
+      echo "$as_me:9244: checking whether -R must be followed by a space" >&5
 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
       cat >conftest.$ac_ext <<_ACEOF
-#line 9067 "configure"
+#line 9248 "configure"
 #include "confdefs.h"
 
 int
@@ -9076,16 +9257,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9079: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9260: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9082: \$? = $ac_status" >&5
+  echo "$as_me:9263: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9085: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9266: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9088: \$? = $ac_status" >&5
+  echo "$as_me:9269: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_R_nospace=yes
 else
@@ -9095,13 +9276,13 @@ ac_R_nospace=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
       if test $ac_R_nospace = yes; then
-       echo "$as_me:9098: result: no" >&5
+       echo "$as_me:9279: result: no" >&5
 echo "${ECHO_T}no" >&6
        X_LIBS="$X_LIBS -R$x_libraries"
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat >conftest.$ac_ext <<_ACEOF
-#line 9104 "configure"
+#line 9285 "configure"
 #include "confdefs.h"
 
 int
@@ -9113,16 +9294,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9116: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9297: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9119: \$? = $ac_status" >&5
+  echo "$as_me:9300: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9122: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9303: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9125: \$? = $ac_status" >&5
+  echo "$as_me:9306: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_R_space=yes
 else
@@ -9132,11 +9313,11 @@ ac_R_space=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
        if test $ac_R_space = yes; then
-         echo "$as_me:9135: result: yes" >&5
+         echo "$as_me:9316: result: yes" >&5
 echo "${ECHO_T}yes" >&6
          X_LIBS="$X_LIBS -R $x_libraries"
        else
-         echo "$as_me:9139: result: neither works" >&5
+         echo "$as_me:9320: result: neither works" >&5
 echo "${ECHO_T}neither works" >&6
        fi
       fi
@@ -9156,7 +9337,7 @@ echo "${ECHO_T}neither works" >&6
     # the Alpha needs dnet_stub (dnet does not exist).
     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
     cat >conftest.$ac_ext <<_ACEOF
-#line 9159 "configure"
+#line 9340 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -9175,22 +9356,22 @@ XOpenDisplay ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9178: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9359: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9181: \$? = $ac_status" >&5
+  echo "$as_me:9362: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9184: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9365: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9187: \$? = $ac_status" >&5
+  echo "$as_me:9368: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:9193: checking for dnet_ntoa in -ldnet" >&5
+echo "$as_me:9374: checking for dnet_ntoa in -ldnet" >&5
 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9198,7 +9379,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldnet  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 9201 "configure"
+#line 9382 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -9217,16 +9398,16 @@ dnet_ntoa ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9220: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9401: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9223: \$? = $ac_status" >&5
+  echo "$as_me:9404: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9226: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9407: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9229: \$? = $ac_status" >&5
+  echo "$as_me:9410: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dnet_dnet_ntoa=yes
 else
@@ -9237,14 +9418,14 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:9240: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+echo "$as_me:9421: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
 fi
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
-      echo "$as_me:9247: checking for dnet_ntoa in -ldnet_stub" >&5
+      echo "$as_me:9428: checking for dnet_ntoa in -ldnet_stub" >&5
 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9252,7 +9433,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldnet_stub  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 9255 "configure"
+#line 9436 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -9271,16 +9452,16 @@ dnet_ntoa ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9274: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9455: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9277: \$? = $ac_status" >&5
+  echo "$as_me:9458: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9280: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9461: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9283: \$? = $ac_status" >&5
+  echo "$as_me:9464: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dnet_stub_dnet_ntoa=yes
 else
@@ -9291,7 +9472,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:9294: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+echo "$as_me:9475: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
@@ -9310,13 +9491,13 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     # on Irix 5.2, according to T.E. Dickey.
     # The functions gethostbyname, getservbyname, and inet_addr are
     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
-    echo "$as_me:9313: checking for gethostbyname" >&5
+    echo "$as_me:9494: checking for gethostbyname" >&5
 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
 if test "${ac_cv_func_gethostbyname+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9319 "configure"
+#line 9500 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname (); below.  */
@@ -9347,16 +9528,16 @@ f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9350: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9531: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9353: \$? = $ac_status" >&5
+  echo "$as_me:9534: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9356: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9537: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9359: \$? = $ac_status" >&5
+  echo "$as_me:9540: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_gethostbyname=yes
 else
@@ -9366,11 +9547,11 @@ ac_cv_func_gethostbyname=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:9369: result: $ac_cv_func_gethostbyname" >&5
+echo "$as_me:9550: result: $ac_cv_func_gethostbyname" >&5
 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
 
     if test $ac_cv_func_gethostbyname = no; then
-      echo "$as_me:9373: checking for gethostbyname in -lnsl" >&5
+      echo "$as_me:9554: checking for gethostbyname in -lnsl" >&5
 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9378,7 +9559,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lnsl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 9381 "configure"
+#line 9562 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -9397,16 +9578,16 @@ gethostbyname ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9400: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9581: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9403: \$? = $ac_status" >&5
+  echo "$as_me:9584: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9406: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9587: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9409: \$? = $ac_status" >&5
+  echo "$as_me:9590: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_nsl_gethostbyname=yes
 else
@@ -9417,14 +9598,14 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:9420: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "$as_me:9601: result: $ac_cv_lib_nsl_gethostbyname" >&5
 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
 if test $ac_cv_lib_nsl_gethostbyname = yes; then
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
 fi
 
       if test $ac_cv_lib_nsl_gethostbyname = no; then
-        echo "$as_me:9427: checking for gethostbyname in -lbsd" >&5
+        echo "$as_me:9608: checking for gethostbyname in -lbsd" >&5
 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9432,7 +9613,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lbsd  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 9435 "configure"
+#line 9616 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -9451,16 +9632,16 @@ gethostbyname ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9454: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9635: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9457: \$? = $ac_status" >&5
+  echo "$as_me:9638: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9460: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9641: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9463: \$? = $ac_status" >&5
+  echo "$as_me:9644: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_bsd_gethostbyname=yes
 else
@@ -9471,7 +9652,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:9474: result: $ac_cv_lib_bsd_gethostbyname" >&5
+echo "$as_me:9655: result: $ac_cv_lib_bsd_gethostbyname" >&5
 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
 if test $ac_cv_lib_bsd_gethostbyname = yes; then
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
@@ -9487,13 +9668,13 @@ fi
     # variants that don't use the nameserver (or something).  -lsocket
     # must be given before -lnsl if both are needed.  We assume that
     # if connect needs -lnsl, so does gethostbyname.
-    echo "$as_me:9490: checking for connect" >&5
+    echo "$as_me:9671: checking for connect" >&5
 echo $ECHO_N "checking for connect... $ECHO_C" >&6
 if test "${ac_cv_func_connect+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9496 "configure"
+#line 9677 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect (); below.  */
@@ -9524,16 +9705,16 @@ f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9527: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9708: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9530: \$? = $ac_status" >&5
+  echo "$as_me:9711: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9533: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9714: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9536: \$? = $ac_status" >&5
+  echo "$as_me:9717: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_connect=yes
 else
@@ -9543,11 +9724,11 @@ ac_cv_func_connect=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:9546: result: $ac_cv_func_connect" >&5
+echo "$as_me:9727: result: $ac_cv_func_connect" >&5
 echo "${ECHO_T}$ac_cv_func_connect" >&6
 
     if test $ac_cv_func_connect = no; then
-      echo "$as_me:9550: checking for connect in -lsocket" >&5
+      echo "$as_me:9731: checking for connect in -lsocket" >&5
 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
 if test "${ac_cv_lib_socket_connect+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9555,7 +9736,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 9558 "configure"
+#line 9739 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -9574,16 +9755,16 @@ connect ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9577: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9758: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9580: \$? = $ac_status" >&5
+  echo "$as_me:9761: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9583: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9764: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9586: \$? = $ac_status" >&5
+  echo "$as_me:9767: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_socket_connect=yes
 else
@@ -9594,7 +9775,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:9597: result: $ac_cv_lib_socket_connect" >&5
+echo "$as_me:9778: result: $ac_cv_lib_socket_connect" >&5
 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
 if test $ac_cv_lib_socket_connect = yes; then
   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
@@ -9603,13 +9784,13 @@ fi
     fi
 
     # Guillermo Gomez says -lposix is necessary on A/UX.
-    echo "$as_me:9606: checking for remove" >&5
+    echo "$as_me:9787: checking for remove" >&5
 echo $ECHO_N "checking for remove... $ECHO_C" >&6
 if test "${ac_cv_func_remove+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9612 "configure"
+#line 9793 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove (); below.  */
@@ -9640,16 +9821,16 @@ f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9643: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9824: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9646: \$? = $ac_status" >&5
+  echo "$as_me:9827: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9649: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9830: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9652: \$? = $ac_status" >&5
+  echo "$as_me:9833: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_remove=yes
 else
@@ -9659,11 +9840,11 @@ ac_cv_func_remove=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:9662: result: $ac_cv_func_remove" >&5
+echo "$as_me:9843: result: $ac_cv_func_remove" >&5
 echo "${ECHO_T}$ac_cv_func_remove" >&6
 
     if test $ac_cv_func_remove = no; then
-      echo "$as_me:9666: checking for remove in -lposix" >&5
+      echo "$as_me:9847: checking for remove in -lposix" >&5
 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
 if test "${ac_cv_lib_posix_remove+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9671,7 +9852,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lposix  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 9674 "configure"
+#line 9855 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -9690,16 +9871,16 @@ remove ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9693: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9874: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9696: \$? = $ac_status" >&5
+  echo "$as_me:9877: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9699: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9880: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9702: \$? = $ac_status" >&5
+  echo "$as_me:9883: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_posix_remove=yes
 else
@@ -9710,7 +9891,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:9713: result: $ac_cv_lib_posix_remove" >&5
+echo "$as_me:9894: result: $ac_cv_lib_posix_remove" >&5
 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
 if test $ac_cv_lib_posix_remove = yes; then
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
@@ -9719,13 +9900,13 @@ fi
     fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
-    echo "$as_me:9722: checking for shmat" >&5
+    echo "$as_me:9903: checking for shmat" >&5
 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
 if test "${ac_cv_func_shmat+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9728 "configure"
+#line 9909 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat (); below.  */
@@ -9756,16 +9937,16 @@ f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9759: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9940: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9762: \$? = $ac_status" >&5
+  echo "$as_me:9943: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9765: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9946: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9768: \$? = $ac_status" >&5
+  echo "$as_me:9949: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_shmat=yes
 else
@@ -9775,11 +9956,11 @@ ac_cv_func_shmat=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:9778: result: $ac_cv_func_shmat" >&5
+echo "$as_me:9959: result: $ac_cv_func_shmat" >&5
 echo "${ECHO_T}$ac_cv_func_shmat" >&6
 
     if test $ac_cv_func_shmat = no; then
-      echo "$as_me:9782: checking for shmat in -lipc" >&5
+      echo "$as_me:9963: checking for shmat in -lipc" >&5
 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9787,7 +9968,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lipc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 9790 "configure"
+#line 9971 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -9806,16 +9987,16 @@ shmat ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9809: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9990: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9812: \$? = $ac_status" >&5
+  echo "$as_me:9993: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9815: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9996: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9818: \$? = $ac_status" >&5
+  echo "$as_me:9999: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_ipc_shmat=yes
 else
@@ -9826,7 +10007,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:9829: result: $ac_cv_lib_ipc_shmat" >&5
+echo "$as_me:10010: result: $ac_cv_lib_ipc_shmat" >&5
 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
 if test $ac_cv_lib_ipc_shmat = yes; then
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
@@ -9844,7 +10025,7 @@ fi
   # These have to be linked with before -lX11, unlike the other
   # libraries we check for below, so use a different variable.
   # John Interrante, Karl Berry
-  echo "$as_me:9847: checking for IceConnectionNumber in -lICE" >&5
+  echo "$as_me:10028: checking for IceConnectionNumber in -lICE" >&5
 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9852,7 +10033,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 9855 "configure"
+#line 10036 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -9871,16 +10052,16 @@ IceConnectionNumber ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9874: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10055: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9877: \$? = $ac_status" >&5
+  echo "$as_me:10058: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:9880: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10061: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9883: \$? = $ac_status" >&5
+  echo "$as_me:10064: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_ICE_IceConnectionNumber=yes
 else
@@ -9891,7 +10072,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:9894: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+echo "$as_me:10075: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
@@ -9903,7 +10084,7 @@ fi
 
 cf_x_athena=${cf_x_athena:-Xaw}
 
-echo "$as_me:9906: checking if you want to link with Xaw 3d library" >&5
+echo "$as_me:10087: checking if you want to link with Xaw 3d library" >&5
 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
 withval=
 
@@ -9914,14 +10095,32 @@ if test "${with_Xaw3d+set}" = set; then
 fi;
 if test "$withval" = yes ; then
        cf_x_athena=Xaw3d
-       echo "$as_me:9917: result: yes" >&5
+       echo "$as_me:10098: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+       echo "$as_me:10101: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+echo "$as_me:10105: checking if you want to link with Xaw 3d xft library" >&5
+echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
+withval=
+
+# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
+if test "${with_Xaw3dxft+set}" = set; then
+  withval="$with_Xaw3dxft"
+
+fi;
+if test "$withval" = yes ; then
+       cf_x_athena=Xaw3dxft
+       echo "$as_me:10116: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
-       echo "$as_me:9920: result: no" >&5
+       echo "$as_me:10119: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
-echo "$as_me:9924: checking if you want to link with neXT Athena library" >&5
+echo "$as_me:10123: checking if you want to link with neXT Athena library" >&5
 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
 withval=
 
@@ -9932,14 +10131,14 @@ if test "${with_neXtaw+set}" = set; then
 fi;
 if test "$withval" = yes ; then
        cf_x_athena=neXtaw
-       echo "$as_me:9935: result: yes" >&5
+       echo "$as_me:10134: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
-       echo "$as_me:9938: result: no" >&5
+       echo "$as_me:10137: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
-echo "$as_me:9942: checking if you want to link with Athena-Plus library" >&5
+echo "$as_me:10141: checking if you want to link with Athena-Plus library" >&5
 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
 withval=
 
@@ -9950,10 +10149,10 @@ if test "${with_XawPlus+set}" = set; then
 fi;
 if test "$withval" = yes ; then
        cf_x_athena=XawPlus
-       echo "$as_me:9953: result: yes" >&5
+       echo "$as_me:10152: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
-       echo "$as_me:9956: result: no" >&5
+       echo "$as_me:10155: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -9973,17 +10172,17 @@ if test "$PKG_CONFIG" != none ; then
 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
        test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
 
-echo "${as_me:-configure}:9976: testing found package $cf_athena_pkg ..." 1>&5
+echo "${as_me:-configure}:10175: testing found package $cf_athena_pkg ..." 1>&5
 
        cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
        cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
        test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
 
-echo "${as_me:-configure}:9982: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10181: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
 
        test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
 
-echo "${as_me:-configure}:9986: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10185: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
 
 cf_fix_cppflags=no
 cf_new_cflags=
@@ -10000,7 +10199,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -10041,7 +10240,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -10063,7 +10262,21 @@ if test -n "$cf_new_extra_cppflags" ; then
        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
 fi
 
-       LIBS="$cf_pkgconfig_libs $LIBS"
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
 
                        cf_x_athena_lib="$cf_pkgconfig_libs"
 
@@ -10080,20 +10293,20 @@ EOF
                        LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
                        test -n "$verbose" && echo "    ..trimmed $LIBS" 1>&6
 
-echo "${as_me:-configure}:10083: testing ..trimmed $LIBS ..." 1>&5
+echo "${as_me:-configure}:10296: testing ..trimmed $LIBS ..." 1>&5
 
                        ;;
                esac
        done
 
-echo "$as_me:10089: checking for usable $cf_x_athena/Xmu package" >&5
+echo "$as_me:10302: checking for usable $cf_x_athena/Xmu package" >&5
 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
 if test "${cf_cv_xaw_compat+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 10096 "configure"
+#line 10309 "configure"
 #include "confdefs.h"
 
 #include <X11/Xmu/CharSet.h>
@@ -10109,16 +10322,16 @@ int check = XmuCompareISOLatin1("big", "small")
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10112: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10325: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10115: \$? = $ac_status" >&5
+  echo "$as_me:10328: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10118: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10331: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10121: \$? = $ac_status" >&5
+  echo "$as_me:10334: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_xaw_compat=yes
 else
@@ -10128,7 +10341,7 @@ cf_cv_xaw_compat=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:10131: result: $cf_cv_xaw_compat" >&5
+echo "$as_me:10344: result: $cf_cv_xaw_compat" >&5
 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
 
                        if test "$cf_cv_xaw_compat" = no
@@ -10140,7 +10353,7 @@ echo "${ECHO_T}$cf_cv_xaw_compat" >&6
                                *)
                                        test -n "$verbose" && echo "    work around broken package" 1>&6
 
-echo "${as_me:-configure}:10143: testing work around broken package ..." 1>&5
+echo "${as_me:-configure}:10356: testing work around broken package ..." 1>&5
 
                                        cf_save_xmu="$LIBS"
                                        cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
@@ -10148,17 +10361,17 @@ echo "${as_me:-configure}:10143: testing work around broken package ..." 1>&5
 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
        test -n "$verbose" && echo "    found package xmu" 1>&6
 
-echo "${as_me:-configure}:10151: testing found package xmu ..." 1>&5
+echo "${as_me:-configure}:10364: testing found package xmu ..." 1>&5
 
        cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
        cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
        test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
 
-echo "${as_me:-configure}:10157: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10370: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
 
        test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
 
-echo "${as_me:-configure}:10161: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10374: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
 
 cf_fix_cppflags=no
 cf_new_cflags=
@@ -10175,7 +10388,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -10216,7 +10429,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -10238,18 +10451,32 @@ if test -n "$cf_new_extra_cppflags" ; then
        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
 fi
 
-       LIBS="$cf_pkgconfig_libs $LIBS"
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
 
                                                        LIBS="$cf_save_xmu"
 
 test -n "$verbose" && echo "   ...before $LIBS" 1>&6
 
-echo "${as_me:-configure}:10247: testing ...before $LIBS ..." 1>&5
+echo "${as_me:-configure}:10474: testing ...before $LIBS ..." 1>&5
 
 LIBS=`echo "$LIBS" | sed -e "s/[       ][      ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
 test -n "$verbose" && echo "   ...after  $LIBS" 1>&6
 
-echo "${as_me:-configure}:10252: testing ...after  $LIBS ..." 1>&5
+echo "${as_me:-configure}:10479: testing ...after  $LIBS ..." 1>&5
 
 else
        cf_pkgconfig_incs=
@@ -10257,12 +10484,12 @@ else
 
 test -n "$verbose" && echo "   ...before $LIBS" 1>&6
 
-echo "${as_me:-configure}:10260: testing ...before $LIBS ..." 1>&5
+echo "${as_me:-configure}:10487: testing ...before $LIBS ..." 1>&5
 
 LIBS=`echo "$LIBS" | sed -e "s/[       ][      ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
 test -n "$verbose" && echo "   ...after  $LIBS" 1>&6
 
-echo "${as_me:-configure}:10265: testing ...after  $LIBS ..." 1>&5
+echo "${as_me:-configure}:10492: testing ...after  $LIBS ..." 1>&5
 
 fi
 
@@ -10273,7 +10500,7 @@ fi
                        LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
                        test -n "$verbose" && echo "    ..trimmed $LIBS" 1>&6
 
-echo "${as_me:-configure}:10276: testing ..trimmed $LIBS ..." 1>&5
+echo "${as_me:-configure}:10503: testing ..trimmed $LIBS ..." 1>&5
 
                        ;;
                esac
@@ -10298,17 +10525,17 @@ if test -z "$cf_x_athena_lib" ; then
 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
        test -n "$verbose" && echo "    found package Xext" 1>&6
 
-echo "${as_me:-configure}:10301: testing found package Xext ..." 1>&5
+echo "${as_me:-configure}:10528: testing found package Xext ..." 1>&5
 
        cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
        cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
        test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
 
-echo "${as_me:-configure}:10307: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10534: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
 
        test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
 
-echo "${as_me:-configure}:10311: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10538: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
 
 cf_fix_cppflags=no
 cf_new_cflags=
@@ -10325,7 +10552,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -10366,7 +10593,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -10388,13 +10615,28 @@ if test -n "$cf_new_extra_cppflags" ; then
        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
 fi
 
-       LIBS="$cf_pkgconfig_libs $LIBS"
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
        :
 else
        cf_pkgconfig_incs=
        cf_pkgconfig_libs=
 
-       echo "$as_me:10397: checking for XextCreateExtension in -lXext" >&5
+       echo "$as_me:10639: checking for XextCreateExtension in -lXext" >&5
 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10402,7 +10644,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lXext  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 10405 "configure"
+#line 10647 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -10421,16 +10663,16 @@ XextCreateExtension ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10424: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10666: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10427: \$? = $ac_status" >&5
+  echo "$as_me:10669: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10430: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10672: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10433: \$? = $ac_status" >&5
+  echo "$as_me:10675: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_Xext_XextCreateExtension=yes
 else
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:10444: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
+echo "$as_me:10686: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
-  LIBS="-lXext $LIBS"
+
+cf_add_libs="-lXext"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
 fi
 
 fi
 
-cf_have_X_LIBS=no
+# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
+# in some cases has installed dummy files in the former, other cases replaced
+# it with a link to the new location).  This complicates the configure script.
+# Check for that pitfall, and recover using pkg-config
+#
+# If none of these are set, the configuration is almost certainly broken.
+if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
+then
 
-if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
-       test -n "$verbose" && echo "    found package xt" 1>&6
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
+       test -n "$verbose" && echo "    found package x11" 1>&6
 
-echo "${as_me:-configure}:10457: testing found package xt ..." 1>&5
+echo "${as_me:-configure}:10722: testing found package x11 ..." 1>&5
 
-       cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
-       cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
-       test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
+       cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
+       cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
+       test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
 
-echo "${as_me:-configure}:10463: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10728: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
 
-       test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
+       test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
 
-echo "${as_me:-configure}:10467: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10732: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
 
 cf_fix_cppflags=no
 cf_new_cflags=
@@ -10481,7 +10746,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -10522,7 +10787,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -10544,82 +10809,44 @@ if test -n "$cf_new_extra_cppflags" ; then
        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
 fi
 
-       LIBS="$cf_pkgconfig_libs $LIBS"
-
-       case "x$LIBS" in #(vi
-       *-lX11*) #(vi
-               ;;
-       *)
-# we have an "xt" package, but it may omit Xt's dependency on X11
-echo "$as_me:10554: checking for usable X dependency" >&5
-echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
-if test "${cf_cv_xt_x11_compat+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cat >conftest.$ac_ext <<_ACEOF
-#line 10561 "configure"
-#include "confdefs.h"
-
-#include <X11/Xlib.h>
-
-int
-main ()
-{
-
-       int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
-       int rc2 = XClearWindow((Display*) 0, (Window) 0);
-       int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
-       int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10580: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:10583: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10586: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:10589: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_cv_xt_x11_compat=yes
+       :
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_xt_x11_compat=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+       cf_pkgconfig_incs=
+       cf_pkgconfig_libs=
+       { echo "$as_me:10832: WARNING: unable to find X11 library" >&5
+echo "$as_me: WARNING: unable to find X11 library" >&2;}
 fi
-echo "$as_me:10599: result: $cf_cv_xt_x11_compat" >&5
-echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
-               if test "$cf_cv_xt_x11_compat" = no
-               then
-                       test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
-
-echo "${as_me:-configure}:10605: testing work around broken X11 dependency ..." 1>&5
-
-                       # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
 
-if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
-       test -n "$verbose" && echo "    found package x11" 1>&6
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
+       test -n "$verbose" && echo "    found package ice" 1>&6
 
-echo "${as_me:-configure}:10612: testing found package x11 ..." 1>&5
+echo "${as_me:-configure}:10839: testing found package ice ..." 1>&5
 
-       cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
-       cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
-       test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
+       cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
+       cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
+       test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
 
-echo "${as_me:-configure}:10618: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10845: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
 
-       test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
+       test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
 
-echo "${as_me:-configure}:10622: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10849: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
 
 cf_fix_cppflags=no
 cf_new_cflags=
@@ -10636,7 +10863,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -10677,7 +10904,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -10699,7 +10926,546 @@ if test -n "$cf_new_extra_cppflags" ; then
        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
 fi
 
-       LIBS="$cf_pkgconfig_libs $LIBS"
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+       :
+else
+       cf_pkgconfig_incs=
+       cf_pkgconfig_libs=
+       { echo "$as_me:10949: WARNING: unable to find ICE library" >&5
+echo "$as_me: WARNING: unable to find ICE library" >&2;}
+fi
+
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
+       test -n "$verbose" && echo "    found package sm" 1>&6
+
+echo "${as_me:-configure}:10956: testing found package sm ..." 1>&5
+
+       cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
+       cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
+       test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
+
+echo "${as_me:-configure}:10962: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+
+       test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
+
+echo "${as_me:-configure}:10966: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+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 "x${cf_add_cflags}" != "x${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
+                       case $cf_add_cflags in #(vi
+                       -D*)
+                               cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+       sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
+               -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
+
+                               ;;
+                       esac
+                       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 "x${cf_add_cflags}" != "x${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="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+       EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+       :
+else
+       cf_pkgconfig_incs=
+       cf_pkgconfig_libs=
+       { echo "$as_me:11066: WARNING: unable to find SM library" >&5
+echo "$as_me: WARNING: unable to find SM library" >&2;}
+fi
+
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
+       test -n "$verbose" && echo "    found package xt" 1>&6
+
+echo "${as_me:-configure}:11073: testing found package xt ..." 1>&5
+
+       cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
+       cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
+       test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
+
+echo "${as_me:-configure}:11079: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+
+       test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
+
+echo "${as_me:-configure}:11083: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+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 "x${cf_add_cflags}" != "x${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
+                       case $cf_add_cflags in #(vi
+                       -D*)
+                               cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+       sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
+               -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
+
+                               ;;
+                       esac
+                       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 "x${cf_add_cflags}" != "x${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="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+       EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+       :
+else
+       cf_pkgconfig_incs=
+       cf_pkgconfig_libs=
+       { echo "$as_me:11183: WARNING: unable to find Xt library" >&5
+echo "$as_me: WARNING: unable to find Xt library" >&2;}
+fi
+
+fi
+
+cf_have_X_LIBS=no
+
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
+       test -n "$verbose" && echo "    found package xt" 1>&6
+
+echo "${as_me:-configure}:11194: testing found package xt ..." 1>&5
+
+       cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
+       cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
+       test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
+
+echo "${as_me:-configure}:11200: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+
+       test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
+
+echo "${as_me:-configure}:11204: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+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 "x${cf_add_cflags}" != "x${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
+                       case $cf_add_cflags in #(vi
+                       -D*)
+                               cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+       sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
+               -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
+
+                               ;;
+                       esac
+                       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 "x${cf_add_cflags}" != "x${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="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+       EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+       case "x$LIBS" in #(vi
+       *-lX11*) #(vi
+               ;;
+       *)
+# we have an "xt" package, but it may omit Xt's dependency on X11
+echo "$as_me:11305: checking for usable X dependency" >&5
+echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
+if test "${cf_cv_xt_x11_compat+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 11312 "configure"
+#include "confdefs.h"
+
+#include <X11/Xlib.h>
+
+int
+main ()
+{
+
+       int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
+       int rc2 = XClearWindow((Display*) 0, (Window) 0);
+       int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
+       int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11331: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:11334: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:11337: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:11340: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_xt_x11_compat=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xt_x11_compat=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11350: result: $cf_cv_xt_x11_compat" >&5
+echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
+               if test "$cf_cv_xt_x11_compat" = no
+               then
+                       test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
+
+echo "${as_me:-configure}:11356: testing work around broken X11 dependency ..." 1>&5
+
+                       # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
+
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
+       test -n "$verbose" && echo "    found package x11" 1>&6
+
+echo "${as_me:-configure}:11363: testing found package x11 ..." 1>&5
+
+       cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
+       cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
+       test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
+
+echo "${as_me:-configure}:11369: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+
+       test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
+
+echo "${as_me:-configure}:11373: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+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 "x${cf_add_cflags}" != "x${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
+                       case $cf_add_cflags in #(vi
+                       -D*)
+                               cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+       sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
+               -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
+
+                               ;;
+                       esac
+                       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 "x${cf_add_cflags}" != "x${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="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+       EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
        :
 else
        cf_pkgconfig_incs=
@@ -10707,12 +11473,12 @@ else
 
 test -n "$verbose" && echo "   ...before $LIBS" 1>&6
 
-echo "${as_me:-configure}:10710: testing ...before $LIBS ..." 1>&5
+echo "${as_me:-configure}:11476: testing ...before $LIBS ..." 1>&5
 
 LIBS=`echo "$LIBS" | sed -e "s/[       ][      ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
 test -n "$verbose" && echo "   ...after  $LIBS" 1>&6
 
-echo "${as_me:-configure}:10715: testing ...after  $LIBS ..." 1>&5
+echo "${as_me:-configure}:11481: testing ...after  $LIBS ..." 1>&5
 
 fi
 
                ;;
        esac
 
-echo "$as_me:10723: checking for usable X Toolkit package" >&5
+echo "$as_me:11489: checking for usable X Toolkit package" >&5
 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
 if test "${cf_cv_xt_ice_compat+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 10730 "configure"
+#line 11496 "configure"
 #include "confdefs.h"
 
 #include <X11/Shell.h>
@@ -10742,16 +11508,16 @@ int num = IceConnectionNumber(0)
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10745: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11511: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10748: \$? = $ac_status" >&5
+  echo "$as_me:11514: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10751: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11517: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10754: \$? = $ac_status" >&5
+  echo "$as_me:11520: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_xt_ice_compat=yes
 else
@@ -10761,7 +11527,7 @@ cf_cv_xt_ice_compat=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:10764: result: $cf_cv_xt_ice_compat" >&5
+echo "$as_me:11530: result: $cf_cv_xt_ice_compat" >&5
 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
 
        if test "$cf_cv_xt_ice_compat" = no
@@ -10775,22 +11541,22 @@ echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
                        *)
                                test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
 
-echo "${as_me:-configure}:10778: testing work around broken ICE dependency ..." 1>&5
+echo "${as_me:-configure}:11544: testing work around broken ICE dependency ..." 1>&5
 
 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
        test -n "$verbose" && echo "    found package ice" 1>&6
 
-echo "${as_me:-configure}:10783: testing found package ice ..." 1>&5
+echo "${as_me:-configure}:11549: testing found package ice ..." 1>&5
 
        cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
        cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
        test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
 
-echo "${as_me:-configure}:10789: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:11555: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
 
        test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
 
-echo "${as_me:-configure}:10793: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:11559: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
 
 cf_fix_cppflags=no
 cf_new_cflags=
@@ -10807,7 +11573,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -10848,7 +11614,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -10870,22 +11636,36 @@ if test -n "$cf_new_extra_cppflags" ; then
        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
 fi
 
-       LIBS="$cf_pkgconfig_libs $LIBS"
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
 
 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
        test -n "$verbose" && echo "    found package sm" 1>&6
 
-echo "${as_me:-configure}:10878: testing found package sm ..." 1>&5
+echo "${as_me:-configure}:11658: testing found package sm ..." 1>&5
 
        cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
        cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
        test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
 
-echo "${as_me:-configure}:10884: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:11664: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
 
        test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
 
-echo "${as_me:-configure}:10888: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:11668: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
 
 cf_fix_cppflags=no
 cf_new_cflags=
@@ -10902,7 +11682,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -10943,7 +11723,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -10965,7 +11745,22 @@ if test -n "$cf_new_extra_cppflags" ; then
        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
 fi
 
-       LIBS="$cf_pkgconfig_libs $LIBS"
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
        :
 else
        cf_pkgconfig_incs=
@@ -10979,12 +11774,12 @@ else
 
 test -n "$verbose" && echo "   ...before $LIBS" 1>&6
 
-echo "${as_me:-configure}:10982: testing ...before $LIBS ..." 1>&5
+echo "${as_me:-configure}:11777: testing ...before $LIBS ..." 1>&5
 
 LIBS=`echo "$LIBS" | sed -e "s/[       ][      ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
 test -n "$verbose" && echo "   ...after  $LIBS" 1>&6
 
-echo "${as_me:-configure}:10987: testing ...after  $LIBS ..." 1>&5
+echo "${as_me:-configure}:11782: testing ...after  $LIBS ..." 1>&5
 
 fi
 
@@ -11004,7 +11799,7 @@ else
 
 test -n "$verbose" && echo "   checking additions to CFLAGS" 1>&6
 
-echo "${as_me:-configure}:11007: testing checking additions to CFLAGS ..." 1>&5
+echo "${as_me:-configure}:11802: testing checking additions to CFLAGS ..." 1>&5
 
 cf_check_cflags="$CFLAGS"
 cf_check_cppflags="$CPPFLAGS"
@@ -11024,7 +11819,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -11065,7 +11860,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -11075,7 +11870,7 @@ done
 if test -n "$cf_new_cflags" ; then
        test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
 
-echo "${as_me:-configure}:11078: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
+echo "${as_me:-configure}:11873: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
 
        CFLAGS="$CFLAGS $cf_new_cflags"
 fi
@@ -11083,7 +11878,7 @@ fi
 if test -n "$cf_new_cppflags" ; then
        test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
 
-echo "${as_me:-configure}:11086: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
+echo "${as_me:-configure}:11881: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
 
        CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
 fi
 if test -n "$cf_new_extra_cppflags" ; then
        test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
 
-echo "${as_me:-configure}:11094: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
+echo "${as_me:-configure}:11889: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
 
        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
 fi
 
-if test "$cf_check_cflags" != "$CFLAGS" ; then
+if test "x$cf_check_cflags" != "x$CFLAGS" ; then
 cat >conftest.$ac_ext <<_ACEOF
-#line 11101 "configure"
+#line 11896 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -11110,16 +11905,16 @@ printf("Hello world");
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11113: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11908: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11116: \$? = $ac_status" >&5
+  echo "$as_me:11911: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11119: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11914: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11122: \$? = $ac_status" >&5
+  echo "$as_me:11917: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -11127,12 +11922,12 @@ else
 cat conftest.$ac_ext >&5
 test -n "$verbose" && echo "   test-compile failed.  Undoing change to \$CFLAGS" 1>&6
 
-echo "${as_me:-configure}:11130: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
+echo "${as_me:-configure}:11925: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
 
-        if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
+        if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
                 test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
 
-echo "${as_me:-configure}:11135: testing but keeping change to \$CPPFLAGS ..." 1>&5
+echo "${as_me:-configure}:11930: testing but keeping change to \$CPPFLAGS ..." 1>&5
 
         fi
         CFLAGS="$cf_check_flags"
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
 
-       echo "$as_me:11143: checking for XOpenDisplay" >&5
+       echo "$as_me:11938: checking for XOpenDisplay" >&5
 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 11149 "configure"
+#line 11944 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char XOpenDisplay (); below.  */
@@ -11177,16 +11972,16 @@ f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11180: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11975: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11183: \$? = $ac_status" >&5
+  echo "$as_me:11978: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11186: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11981: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11189: \$? = $ac_status" >&5
+  echo "$as_me:11984: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_XOpenDisplay=yes
 else
@@ -11196,13 +11991,13 @@ ac_cv_func_XOpenDisplay=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:11199: result: $ac_cv_func_XOpenDisplay" >&5
+echo "$as_me:11994: result: $ac_cv_func_XOpenDisplay" >&5
 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
 if test $ac_cv_func_XOpenDisplay = yes; then
   :
 else
 
-       echo "$as_me:11205: checking for XOpenDisplay in -lX11" >&5
+       echo "$as_me:12000: checking for XOpenDisplay in -lX11" >&5
 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11210,7 +12005,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 11213 "configure"
+#line 12008 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -11229,16 +12024,16 @@ XOpenDisplay ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11232: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12027: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11235: \$? = $ac_status" >&5
+  echo "$as_me:12030: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11238: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12033: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11241: \$? = $ac_status" >&5
+  echo "$as_me:12036: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_X11_XOpenDisplay=yes
 else
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:11252: result: $ac_cv_lib_X11_XOpenDisplay" >&5
+echo "$as_me:12047: result: $ac_cv_lib_X11_XOpenDisplay" >&5
 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
-  LIBS="-lX11 $LIBS"
+
+cf_add_libs="-lX11"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
 fi
 
 fi
 
-       echo "$as_me:11260: checking for XtAppInitialize" >&5
+       echo "$as_me:12071: checking for XtAppInitialize" >&5
 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 11266 "configure"
+#line 12077 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char XtAppInitialize (); below.  */
@@ -11294,16 +12105,16 @@ f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11297: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12108: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11300: \$? = $ac_status" >&5
+  echo "$as_me:12111: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11303: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12114: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11306: \$? = $ac_status" >&5
+  echo "$as_me:12117: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_XtAppInitialize=yes
 else
@@ -11313,13 +12124,13 @@ ac_cv_func_XtAppInitialize=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:11316: result: $ac_cv_func_XtAppInitialize" >&5
+echo "$as_me:12127: result: $ac_cv_func_XtAppInitialize" >&5
 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
 if test $ac_cv_func_XtAppInitialize = yes; then
   :
 else
 
-       echo "$as_me:11322: checking for XtAppInitialize in -lXt" >&5
+       echo "$as_me:12133: checking for XtAppInitialize in -lXt" >&5
 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11327,7 +12138,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 11330 "configure"
+#line 12141 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -11346,16 +12157,16 @@ XtAppInitialize ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11349: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12160: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11352: \$? = $ac_status" >&5
+  echo "$as_me:12163: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11355: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12166: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11358: \$? = $ac_status" >&5
+  echo "$as_me:12169: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_Xt_XtAppInitialize=yes
 else
@@ -11366,7 +12177,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:11369: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
+echo "$as_me:12180: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
 
@@ -11383,7 +12194,7 @@ fi
 fi
 
 if test $cf_have_X_LIBS = no ; then
-       { echo "$as_me:11386: WARNING: Unable to successfully link X Toolkit library (-lXt) with
+       { echo "$as_me:12197: WARNING: Unable to successfully link X Toolkit library (-lXt) with
 test program.  You will have to check and add the proper libraries by hand
 to makefile." >&5
 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
                cf_test=X11/$cf_x_athena_root/SimpleMenu.h
                if test $cf_path != default ; then
                        CPPFLAGS="$cf_save -I$cf_path/include"
-                       echo "$as_me:11408: checking for $cf_test in $cf_path" >&5
+                       echo "$as_me:12219: checking for $cf_test in $cf_path" >&5
 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
                else
-                       echo "$as_me:11411: checking for $cf_test" >&5
+                       echo "$as_me:12222: checking for $cf_test" >&5
 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
                fi
                cat >conftest.$ac_ext <<_ACEOF
-#line 11415 "configure"
+#line 12226 "configure"
 #include "confdefs.h"
 
 #include <X11/Intrinsic.h>
@@ -11426,16 +12237,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11429: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12240: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11432: \$? = $ac_status" >&5
+  echo "$as_me:12243: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11435: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12246: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11438: \$? = $ac_status" >&5
+  echo "$as_me:12249: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -11444,7 +12255,7 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-               echo "$as_me:11447: result: $cf_result" >&5
+               echo "$as_me:12258: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
                if test "$cf_result" = yes ; then
                        cf_x_athena_inc=$cf_path
@@ -11456,7 +12267,7 @@ echo "${ECHO_T}$cf_result" >&6
 done
 
 if test -z "$cf_x_athena_inc" ; then
-       { echo "$as_me:11459: WARNING: Unable to successfully find Athena header files with test program" >&5
+       { echo "$as_me:12270: WARNING: Unable to successfully find Athena header files with test program" >&5
 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
 elif test "$cf_x_athena_inc" != default ; then
        CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
                        cf_save="$LIBS"
                        cf_test=XawSimpleMenuAddGlobalActions
                        if test $cf_path != default ; then
-                               LIBS="-L$cf_path/lib $cf_libs $LIBS"
-                               echo "$as_me:11489: checking for $cf_libs in $cf_path" >&5
+
+cf_add_libs="-L$cf_path/lib $cf_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+                               echo "$as_me:12316: checking for $cf_libs in $cf_path" >&5
 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
                        else
-                               LIBS="$cf_libs $LIBS"
-                               echo "$as_me:11493: checking for $cf_test in $cf_libs" >&5
+
+cf_add_libs="$cf_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+                               echo "$as_me:12336: checking for $cf_test in $cf_libs" >&5
 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
                        fi
                        cat >conftest.$ac_ext <<_ACEOF
-#line 11497 "configure"
+#line 12340 "configure"
 #include "confdefs.h"
 
 #include <X11/Intrinsic.h>
@@ -11510,16 +12353,16 @@ $cf_test((XtAppContext) 0)
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11513: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12356: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11516: \$? = $ac_status" >&5
+  echo "$as_me:12359: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11519: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12362: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11522: \$? = $ac_status" >&5
+  echo "$as_me:12365: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -11528,7 +12371,7 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-                       echo "$as_me:11531: result: $cf_result" >&5
+                       echo "$as_me:12374: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
                        if test "$cf_result" = yes ; then
                                cf_x_athena_lib="$cf_libs"
@@ -11542,7 +12385,7 @@ echo "${ECHO_T}$cf_result" >&6
 done
 
 if test -z "$cf_x_athena_lib" ; then
-       { { echo "$as_me:11545: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
+       { { echo "$as_me:12388: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -11560,7 +12403,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:11563: checking for $ac_word" >&5
+echo "$as_me:12406: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11575,7 +12418,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_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
-echo "$as_me:11578: found $ac_dir/$ac_word" >&5
+echo "$as_me:12421: found $ac_dir/$ac_word" >&5
 break
 done
 
 fi
 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
 if test -n "$XCURSES_CONFIG"; then
-  echo "$as_me:11586: result: $XCURSES_CONFIG" >&5
+  echo "$as_me:12429: result: $XCURSES_CONFIG" >&5
 echo "${ECHO_T}$XCURSES_CONFIG" >&6
 else
-  echo "$as_me:11589: result: no" >&5
+  echo "$as_me:12432: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -11599,7 +12442,7 @@ if test -z "$XCURSES_CONFIG"; 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:11602: checking for $ac_word" >&5
+echo "$as_me:12445: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11614,7 +12457,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_XCURSES_CONFIG="$ac_prog"
-echo "$as_me:11617: found $ac_dir/$ac_word" >&5
+echo "$as_me:12460: found $ac_dir/$ac_word" >&5
 break
 done
 
 fi
 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
 if test -n "$ac_ct_XCURSES_CONFIG"; then
-  echo "$as_me:11625: result: $ac_ct_XCURSES_CONFIG" >&5
+  echo "$as_me:12468: result: $ac_ct_XCURSES_CONFIG" >&5
 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
 else
-  echo "$as_me:11628: result: no" >&5
+  echo "$as_me:12471: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 if test "$XCURSES_CONFIG" != none ; then
 
 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
-LIBS="`$XCURSES_CONFIG --libs` $LIBS"
+
+cf_add_libs="`$XCURSES_CONFIG --libs`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
 
 cf_cv_lib_XCurses=yes
 
@@ -11649,7 +12507,7 @@ LDFLAGS="$LDFLAGS $X_LIBS"
 
 test -n "$verbose" && echo "   checking additions to CFLAGS" 1>&6
 
-echo "${as_me:-configure}:11652: testing checking additions to CFLAGS ..." 1>&5
+echo "${as_me:-configure}:12510: testing checking additions to CFLAGS ..." 1>&5
 
 cf_check_cflags="$CFLAGS"
 cf_check_cppflags="$CPPFLAGS"
@@ -11669,7 +12527,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -11710,7 +12568,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -11720,7 +12578,7 @@ done
 if test -n "$cf_new_cflags" ; then
        test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
 
-echo "${as_me:-configure}:11723: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
+echo "${as_me:-configure}:12581: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
 
        CFLAGS="$CFLAGS $cf_new_cflags"
 fi
@@ -11728,7 +12586,7 @@ fi
 if test -n "$cf_new_cppflags" ; then
        test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
 
-echo "${as_me:-configure}:11731: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
+echo "${as_me:-configure}:12589: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
 
        CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
 fi
 if test -n "$cf_new_extra_cppflags" ; then
        test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
 
-echo "${as_me:-configure}:11739: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
+echo "${as_me:-configure}:12597: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
 
        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
 fi
 
-if test "$cf_check_cflags" != "$CFLAGS" ; then
+if test "x$cf_check_cflags" != "x$CFLAGS" ; then
 cat >conftest.$ac_ext <<_ACEOF
-#line 11746 "configure"
+#line 12604 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -11755,16 +12613,16 @@ printf("Hello world");
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11758: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12616: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11761: \$? = $ac_status" >&5
+  echo "$as_me:12619: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11764: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12622: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11767: \$? = $ac_status" >&5
+  echo "$as_me:12625: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -11772,12 +12630,12 @@ else
 cat conftest.$ac_ext >&5
 test -n "$verbose" && echo "   test-compile failed.  Undoing change to \$CFLAGS" 1>&6
 
-echo "${as_me:-configure}:11775: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
+echo "${as_me:-configure}:12633: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
 
-        if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
+        if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
                 test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
 
-echo "${as_me:-configure}:11780: testing but keeping change to \$CPPFLAGS ..." 1>&5
+echo "${as_me:-configure}:12638: testing but keeping change to \$CPPFLAGS ..." 1>&5
 
         fi
         CFLAGS="$cf_check_flags"
@@ -11785,7 +12643,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
 
-echo "$as_me:11788: checking for XOpenDisplay in -lX11" >&5
+echo "$as_me:12646: checking for XOpenDisplay in -lX11" >&5
 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11793,7 +12651,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 11796 "configure"
+#line 12654 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -11812,16 +12670,16 @@ XOpenDisplay ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11815: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12673: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11818: \$? = $ac_status" >&5
+  echo "$as_me:12676: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11821: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12679: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11824: \$? = $ac_status" >&5
+  echo "$as_me:12682: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_X11_XOpenDisplay=yes
 else
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:11835: result: $ac_cv_lib_X11_XOpenDisplay" >&5
+echo "$as_me:12693: result: $ac_cv_lib_X11_XOpenDisplay" >&5
 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
-  LIBS="-lX11 $LIBS"
+
+cf_add_libs="-lX11"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
 fi
 
-echo "$as_me:11841: checking for XCurses library" >&5
+echo "$as_me:12715: checking for XCurses library" >&5
 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
 if test "${cf_cv_lib_XCurses+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-LIBS="-lXCurses $LIBS"
+cf_add_libs="-lXCurses"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
 cat >conftest.$ac_ext <<_ACEOF
-#line 11849 "configure"
+#line 12738 "configure"
 #include "confdefs.h"
 
 #include <xcurses.h>
@@ -11861,16 +12750,16 @@ XCursesExit();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11864: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12753: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11867: \$? = $ac_status" >&5
+  echo "$as_me:12756: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11870: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12759: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11873: \$? = $ac_status" >&5
+  echo "$as_me:12762: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_lib_XCurses=yes
 else
@@ -11881,7 +12770,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:11884: result: $cf_cv_lib_XCurses" >&5
+echo "$as_me:12773: result: $cf_cv_lib_XCurses" >&5
 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
 
 fi
@@ -11896,23 +12785,23 @@ cat >>confdefs.h <<\EOF
 #define XCURSES 1
 EOF
 
-       echo "$as_me:11899: checking for xcurses.h" >&5
+       echo "$as_me:12788: checking for xcurses.h" >&5
 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
 if test "${ac_cv_header_xcurses_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 11905 "configure"
+#line 12794 "configure"
 #include "confdefs.h"
 #include <xcurses.h>
 _ACEOF
-if { (eval echo "$as_me:11909: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12798: \"$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:11915: \$? = $ac_status" >&5
+  echo "$as_me:12804: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -11931,7 +12820,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:11934: result: $ac_cv_header_xcurses_h" >&5
+echo "$as_me:12823: result: $ac_cv_header_xcurses_h" >&5
 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
 if test $ac_cv_header_xcurses_h = yes; then
 
@@ -11942,7 +12831,7 @@ EOF
 fi
 
 else
-       { { echo "$as_me:11945: error: Cannot link with XCurses" >&5
+       { { echo "$as_me:12834: error: Cannot link with XCurses" >&5
 echo "$as_me: error: Cannot link with XCurses" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -11953,14 +12842,14 @@ esac
 case $cf_cv_screen in
 curses|curses_*)
 
-echo "$as_me:11956: checking for NetBSD form.h" >&5
+echo "$as_me:12845: checking for NetBSD form.h" >&5
 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
 if test "${cf_cv_netbsd_form_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 11963 "configure"
+#line 12852 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -11979,16 +12868,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11982: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12871: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11985: \$? = $ac_status" >&5
+  echo "$as_me:12874: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11988: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12877: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11991: \$? = $ac_status" >&5
+  echo "$as_me:12880: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_netbsd_form_h=yes
 
@@ -12000,7 +12889,7 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:12003: result: $cf_cv_netbsd_form_h" >&5
+echo "$as_me:12892: result: $cf_cv_netbsd_form_h" >&5
 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
 
 test "$cf_cv_netbsd_form_h" = yes &&
@@ -12008,14 +12897,14 @@ cat >>confdefs.h <<\EOF
 #define HAVE_NETBSD_FORM_H 1
 EOF
 
-echo "$as_me:12011: checking for NetBSD menu.h" >&5
+echo "$as_me:12900: checking for NetBSD menu.h" >&5
 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
 if test "${cf_cv_netbsd_menu_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 12018 "configure"
+#line 12907 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -12033,16 +12922,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12036: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12925: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12039: \$? = $ac_status" >&5
+  echo "$as_me:12928: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12042: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12931: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12045: \$? = $ac_status" >&5
+  echo "$as_me:12934: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_netbsd_menu_h=yes
 
@@ -12054,7 +12943,7 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:12057: result: $cf_cv_netbsd_menu_h" >&5
+echo "$as_me:12946: result: $cf_cv_netbsd_menu_h" >&5
 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
 
 test "$cf_cv_netbsd_menu_h" = yes &&
@@ -12078,7 +12967,7 @@ pdcurses) #(vi
        : ${cf_form_lib:=form}
 
 as_ac_Lib=`echo "ac_cv_lib_$cf_panel_lib$cf_cv_libtype''_new_panel" | $as_tr_sh`
-echo "$as_me:12081: checking for new_panel in -l$cf_panel_lib$cf_cv_libtype" >&5
+echo "$as_me:12970: checking for new_panel in -l$cf_panel_lib$cf_cv_libtype" >&5
 echo $ECHO_N "checking for new_panel in -l$cf_panel_lib$cf_cv_libtype... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12086,7 +12975,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-l$cf_panel_lib$cf_cv_libtype  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 12089 "configure"
+#line 12978 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -12105,16 +12994,16 @@ new_panel ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12108: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12997: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12111: \$? = $ac_status" >&5
+  echo "$as_me:13000: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12114: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13003: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12117: \$? = $ac_status" >&5
+  echo "$as_me:13006: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_Lib=yes"
 else
@@ -12125,7 +13014,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:12128: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:13017: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -12137,7 +13026,7 @@ EOF
 fi
 
 as_ac_Lib=`echo "ac_cv_lib_$cf_menu_lib$cf_cv_libtype''_menu_driver" | $as_tr_sh`
-echo "$as_me:12140: checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype" >&5
+echo "$as_me:13029: checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype" >&5
 echo $ECHO_N "checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12145,7 +13034,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-l$cf_menu_lib$cf_cv_libtype  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 12148 "configure"
+#line 13037 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -12164,16 +13053,16 @@ menu_driver ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12167: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13056: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12170: \$? = $ac_status" >&5
+  echo "$as_me:13059: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12173: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13062: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12176: \$? = $ac_status" >&5
+  echo "$as_me:13065: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_Lib=yes"
 else
@@ -12184,7 +13073,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:12187: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:13076: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -12196,7 +13085,7 @@ EOF
 fi
 
 as_ac_Lib=`echo "ac_cv_lib_$cf_form_lib$cf_cv_libtype''_form_driver" | $as_tr_sh`
-echo "$as_me:12199: checking for form_driver in -l$cf_form_lib$cf_cv_libtype" >&5
+echo "$as_me:13088: checking for form_driver in -l$cf_form_lib$cf_cv_libtype" >&5
 echo $ECHO_N "checking for form_driver in -l$cf_form_lib$cf_cv_libtype... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12204,7 +13093,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-l$cf_form_lib$cf_cv_libtype  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 12207 "configure"
+#line 13096 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -12223,16 +13112,16 @@ form_driver ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12226: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13115: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12229: \$? = $ac_status" >&5
+  echo "$as_me:13118: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12232: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13121: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12235: \$? = $ac_status" >&5
+  echo "$as_me:13124: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_Lib=yes"
 else
@@ -12243,7 +13132,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:12246: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:13135: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -12266,23 +13155,23 @@ for ac_header in \
 
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:12269: checking for $ac_header" >&5
+echo "$as_me:13158: 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 12275 "configure"
+#line 13164 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:12279: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:13168: \"$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:12285: \$? = $ac_status" >&5
+  echo "$as_me:13174: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12301,7 +13190,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:12304: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:13193: 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
@@ -12314,13 +13203,13 @@ done
        ;;
 esac
 
-echo "$as_me:12317: checking for ANSI C header files" >&5
+echo "$as_me:13206: 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 12323 "configure"
+#line 13212 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -12328,13 +13217,13 @@ else
 #include <float.h>
 
 _ACEOF
-if { (eval echo "$as_me:12331: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:13220: \"$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:12337: \$? = $ac_status" >&5
+  echo "$as_me:13226: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12356,7 +13245,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 12359 "configure"
+#line 13248 "configure"
 #include "confdefs.h"
 #include <string.h>
 
@@ -12374,7 +13263,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 12377 "configure"
+#line 13266 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 
@@ -12395,7 +13284,7 @@ if test $ac_cv_header_stdc = yes; then
   :
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 12398 "configure"
+#line 13287 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #if ((' ' & 0x0FF) == 0x020)
@@ -12421,15 +13310,15 @@ main ()
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12424: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13313: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12427: \$? = $ac_status" >&5
+  echo "$as_me:13316: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:12429: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13318: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12432: \$? = $ac_status" >&5
+  echo "$as_me:13321: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -12442,7 +13331,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 fi
-echo "$as_me:12445: result: $ac_cv_header_stdc" >&5
+echo "$as_me:13334: result: $ac_cv_header_stdc" >&5
 echo "${ECHO_T}$ac_cv_header_stdc" >&6
 if test $ac_cv_header_stdc = yes; then
 
@@ -12452,13 +13341,13 @@ EOF
 
 fi
 
-echo "$as_me:12455: checking whether time.h and sys/time.h may both be included" >&5
+echo "$as_me:13344: 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 12461 "configure"
+#line 13350 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -12474,16 +13363,16 @@ return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12477: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13366: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12480: \$? = $ac_status" >&5
+  echo "$as_me:13369: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12483: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13372: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12486: \$? = $ac_status" >&5
+  echo "$as_me:13375: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_header_time=yes
 else
@@ -12493,7 +13382,7 @@ ac_cv_header_time=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:12496: result: $ac_cv_header_time" >&5
+echo "$as_me:13385: result: $ac_cv_header_time" >&5
 echo "${ECHO_T}$ac_cv_header_time" >&6
 if test $ac_cv_header_time = yes; then
 
@@ -12516,23 +13405,23 @@ unistd.h \
 
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:12519: checking for $ac_header" >&5
+echo "$as_me:13408: 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 12525 "configure"
+#line 13414 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:12529: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:13418: \"$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:12535: \$? = $ac_status" >&5
+  echo "$as_me:13424: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12551,7 +13440,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:12554: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:13443: 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
@@ -12564,23 +13453,23 @@ done
 for ac_header in unistd.h getopt.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:12567: checking for $ac_header" >&5
+echo "$as_me:13456: 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 12573 "configure"
+#line 13462 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:12577: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:13466: \"$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:12583: \$? = $ac_status" >&5
+  echo "$as_me:13472: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12599,7 +13488,7 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:12602: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:13491: 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
@@ -12609,7 +13498,7 @@ EOF
 fi
 done
 
-echo "$as_me:12612: checking for header declaring getopt variables" >&5
+echo "$as_me:13501: checking for header declaring getopt variables" >&5
 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
 if test "${cf_cv_getopt_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12619,7 +13508,7 @@ cf_cv_getopt_header=none
 for cf_header in stdio.h stdlib.h unistd.h getopt.h
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 12622 "configure"
+#line 13511 "configure"
 #include "confdefs.h"
 
 #include <$cf_header>
@@ -12632,16 +13521,16 @@ int x = optind; char *y = optarg
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12635: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13524: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12638: \$? = $ac_status" >&5
+  echo "$as_me:13527: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12641: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13530: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12644: \$? = $ac_status" >&5
+  echo "$as_me:13533: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_getopt_header=$cf_header
  break
@@ -12653,7 +13542,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:12656: result: $cf_cv_getopt_header" >&5
+echo "$as_me:13545: result: $cf_cv_getopt_header" >&5
 echo "${ECHO_T}$cf_cv_getopt_header" >&6
 if test $cf_cv_getopt_header != none ; then
 
@@ -12661,6 +13550,13 @@ cat >>confdefs.h <<\EOF
 #define HAVE_GETOPT_HEADER 1
 EOF
 
+fi
+if test $cf_cv_getopt_header = getopt.h ; then
+
+cat >>confdefs.h <<\EOF
+#define NEED_GETOPT_H 1
+EOF
+
 fi
 
 for ac_func in \
@@ -12668,13 +13564,13 @@ gettimeofday \
 
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:12671: checking for $ac_func" >&5
+echo "$as_me:13567: 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 12677 "configure"
+#line 13573 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -12705,16 +13601,16 @@ f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12708: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13604: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12711: \$? = $ac_status" >&5
+  echo "$as_me:13607: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12714: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13610: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12717: \$? = $ac_status" >&5
+  echo "$as_me:13613: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -12724,7 +13620,7 @@ eval "$as_ac_var=no"
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:12727: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:13623: 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
@@ -12748,13 +13644,13 @@ wcstombs \
 
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:12751: checking for $ac_func" >&5
+echo "$as_me:13647: 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 12757 "configure"
+#line 13653 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -12785,16 +13681,16 @@ f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12788: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13684: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12791: \$? = $ac_status" >&5
+  echo "$as_me:13687: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12794: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13690: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12797: \$? = $ac_status" >&5
+  echo "$as_me:13693: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -12804,7 +13700,7 @@ eval "$as_ac_var=no"
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:12807: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:13703: 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
@@ -12816,14 +13712,14 @@ done
 
 fi
 
-echo "$as_me:12819: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
+echo "$as_me:13715: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
 if test "${cf_cv_need_xopen_extension+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 12826 "configure"
+#line 13722 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -12845,23 +13741,23 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12848: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13744: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12851: \$? = $ac_status" >&5
+  echo "$as_me:13747: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12854: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13750: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12857: \$? = $ac_status" >&5
+  echo "$as_me:13753: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_need_xopen_extension=no
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 12864 "configure"
+#line 13760 "configure"
 #include "confdefs.h"
 
 #define _XOPEN_SOURCE_EXTENDED
@@ -12883,16 +13779,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12886: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13782: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12889: \$? = $ac_status" >&5
+  echo "$as_me:13785: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12892: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13788: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12895: \$? = $ac_status" >&5
+  echo "$as_me:13791: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_need_xopen_extension=yes
 else
@@ -12904,11 +13800,11 @@ 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:12907: result: $cf_cv_need_xopen_extension" >&5
+echo "$as_me:13803: result: $cf_cv_need_xopen_extension" >&5
 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
 
-echo "$as_me:12911: checking for term.h" >&5
+echo "$as_me:13807: checking for term.h" >&5
 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
 if test "${cf_cv_term_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12929,7 +13825,7 @@ esac
 for cf_header in $cf_header_list
 do
        cat >conftest.$ac_ext <<_ACEOF
-#line 12932 "configure"
+#line 13828 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -12943,16 +13839,16 @@ WINDOW *x
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12946: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13842: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12949: \$? = $ac_status" >&5
+  echo "$as_me:13845: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12952: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13848: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12955: \$? = $ac_status" >&5
+  echo "$as_me:13851: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_term_header=$cf_header
         break
@@ -12971,7 +13867,7 @@ no)
        for cf_header in ncurses/term.h ncursesw/term.h
        do
                cat >conftest.$ac_ext <<_ACEOF
-#line 12974 "configure"
+#line 13870 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -12989,16 +13885,16 @@ WINDOW *x
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12992: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13888: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12995: \$? = $ac_status" >&5
+  echo "$as_me:13891: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12998: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13894: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13001: \$? = $ac_status" >&5
+  echo "$as_me:13897: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_term_header=$cf_header
                         break
@@ -13013,7 +13909,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 esac
 
 fi
-echo "$as_me:13016: result: $cf_cv_term_header" >&5
+echo "$as_me:13912: result: $cf_cv_term_header" >&5
 echo "${ECHO_T}$cf_cv_term_header" >&6
 
 case $cf_cv_term_header in #(vi
@@ -13040,7 +13936,7 @@ EOF
        ;;
 esac
 
-echo "$as_me:13043: checking for unctrl.h" >&5
+echo "$as_me:13939: checking for unctrl.h" >&5
 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
 if test "${cf_cv_unctrl_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13061,7 +13957,7 @@ esac
 for cf_header in $cf_header_list
 do
        cat >conftest.$ac_ext <<_ACEOF
-#line 13064 "configure"
+#line 13960 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -13075,16 +13971,16 @@ WINDOW *x
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13078: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13974: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13081: \$? = $ac_status" >&5
+  echo "$as_me:13977: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13084: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13980: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13087: \$? = $ac_status" >&5
+  echo "$as_me:13983: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_unctrl_header=$cf_header
         break
@@ -13097,12 +13993,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:13100: result: $cf_cv_unctrl_header" >&5
+echo "$as_me:13996: result: $cf_cv_unctrl_header" >&5
 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
 
 case $cf_cv_unctrl_header in #(vi
 no)
-       { echo "$as_me:13105: WARNING: unctrl.h header not found" >&5
+       { echo "$as_me:14001: WARNING: unctrl.h header not found" >&5
 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
        ;;
 esac
@@ -13159,8 +14055,11 @@ tigetnum \
 tigetstr \
 typeahead \
 use_default_colors \
+use_env \
 use_screen \
 use_window \
+vid_puts \
+vidputs \
 vsscanf \
 vw_printw \
 wchgat \
 
 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
 
-       echo "$as_me:13175: checking for ${cf_func}" >&5
+       echo "$as_me:14074: checking for ${cf_func}" >&5
 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
 
-echo "${as_me:-configure}:13178: testing ${cf_func} ..." 1>&5
+echo "${as_me:-configure}:14077: testing ${cf_func} ..." 1>&5
 
        if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13184,7 +14083,7 @@ else
                eval cf_result='$ac_cv_func_'$cf_func
                if test ".$cf_result" != ".no"; then
                        cat >conftest.$ac_ext <<_ACEOF
-#line 13187 "configure"
+#line 14086 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -13207,6 +14106,7 @@ main ()
 
 #ifndef ${cf_func}
 long foo = (long)(&${cf_func});
+fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
 if (foo + 1234 > 5678)
        ${cf_cv_main_return:-return}(foo);
 #endif
@@ -13216,16 +14116,16 @@ if (foo + 1234 > 5678)
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13219: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14119: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13222: \$? = $ac_status" >&5
+  echo "$as_me:14122: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13225: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14125: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13228: \$? = $ac_status" >&5
+  echo "$as_me:14128: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -13241,7 +14141,7 @@ fi
 
        # use the computed/retrieved cache-value:
        eval 'cf_result=$cf_cv_func_'$cf_func
-       echo "$as_me:13244: result: $cf_result" >&5
+       echo "$as_me:14144: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
        if test $cf_result != no; then
                cat >>confdefs.h <<EOF
 
 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
 
-       echo "$as_me:13259: checking for ${cf_func}" >&5
+       echo "$as_me:14159: checking for ${cf_func}" >&5
 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
 
-echo "${as_me:-configure}:13262: testing ${cf_func} ..." 1>&5
+echo "${as_me:-configure}:14162: testing ${cf_func} ..." 1>&5
 
        if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13268,7 +14168,7 @@ else
                eval cf_result='$ac_cv_func_'$cf_func
                if test ".$cf_result" != ".no"; then
                        cat >conftest.$ac_ext <<_ACEOF
-#line 13271 "configure"
+#line 14171 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -13291,6 +14191,7 @@ main ()
 
 #ifndef ${cf_func}
 long foo = (long)(&${cf_func});
+fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
 if (foo + 1234 > 5678)
        ${cf_cv_main_return:-return}(foo);
 #endif
@@ -13300,16 +14201,16 @@ if (foo + 1234 > 5678)
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13303: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14204: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13306: \$? = $ac_status" >&5
+  echo "$as_me:14207: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13309: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14210: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13312: \$? = $ac_status" >&5
+  echo "$as_me:14213: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -13325,7 +14226,7 @@ fi
 
        # use the computed/retrieved cache-value:
        eval 'cf_result=$cf_cv_func_'$cf_func
-       echo "$as_me:13328: result: $cf_result" >&5
+       echo "$as_me:14229: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
        if test $cf_result != no; then
                cat >>confdefs.h <<EOF
@@ -13349,7 +14250,7 @@ then
                                cf_return="return value"
                        fi
                        cat >conftest.$ac_ext <<_ACEOF
-#line 13352 "configure"
+#line 14253 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -13369,21 +14270,21 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13372: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14273: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13375: \$? = $ac_status" >&5
+  echo "$as_me:14276: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13378: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14279: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13381: \$? = $ac_status" >&5
+  echo "$as_me:14282: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
                test -n "$verbose" && echo "    prototype $cf_ret func($cf_arg value)" 1>&6
 
-echo "${as_me:-configure}:13386: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
+echo "${as_me:-configure}:14287: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
 
                cat >>confdefs.h <<EOF
 #define TPUTS_ARG               $cf_arg
@@ -13403,14 +14304,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
        done
 fi
 
-echo "$as_me:13406: checking for ncurses extended functions" >&5
+echo "$as_me:14307: checking for ncurses extended functions" >&5
 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 13413 "configure"
+#line 14314 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -13425,16 +14326,16 @@ int x = NCURSES_EXT_FUNCS
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13428: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14329: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13431: \$? = $ac_status" >&5
+  echo "$as_me:14332: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13434: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14335: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13437: \$? = $ac_status" >&5
+  echo "$as_me:14338: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_ext_funcs=defined
 else
@@ -13442,7 +14343,7 @@ else
 cat conftest.$ac_ext >&5
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 13445 "configure"
+#line 14346 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -13467,16 +14368,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13470: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14371: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13473: \$? = $ac_status" >&5
+  echo "$as_me:14374: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13476: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14377: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13479: \$? = $ac_status" >&5
+  echo "$as_me:14380: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_ext_funcs=yes
 else
@@ -13490,7 +14391,7 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:13493: result: $cf_cv_ncurses_ext_funcs" >&5
+echo "$as_me:14394: result: $cf_cv_ncurses_ext_funcs" >&5
 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
 test "$cf_cv_ncurses_ext_funcs" = yes &&
 cat >>confdefs.h <<\EOF
@@ -13504,11 +14405,11 @@ then
        if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
        then
                cf_define_xpg5=no
-               echo "$as_me:13507: checking if _XPG5 should be defined to enable wide-characters" >&5
+               echo "$as_me:14408: checking if _XPG5 should be defined to enable wide-characters" >&5
 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
 
                cat >conftest.$ac_ext <<_ACEOF
-#line 13511 "configure"
+#line 14412 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -13521,16 +14422,16 @@ int x = _XPG5
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13524: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14425: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13527: \$? = $ac_status" >&5
+  echo "$as_me:14428: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13530: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14431: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13533: \$? = $ac_status" >&5
+  echo "$as_me:14434: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -13539,7 +14440,7 @@ cat conftest.$ac_ext >&5
 cf_save_cppflags="$CPPFLAGS"
                         CPPFLAGS="$CPPFLAGS -D_XPG5"
                         cat >conftest.$ac_ext <<_ACEOF
-#line 13542 "configure"
+#line 14443 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -13552,16 +14453,16 @@ int x = _XPG5
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13555: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14456: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13558: \$? = $ac_status" >&5
+  echo "$as_me:14459: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13561: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14462: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13564: \$? = $ac_status" >&5
+  echo "$as_me:14465: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_define_xpg5=yes
 else
@@ -13572,7 +14473,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                         CPPFLAGS="$cf_save_cppflags"
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-               echo "$as_me:13575: result: $cf_define_xpg5" >&5
+               echo "$as_me:14476: result: $cf_define_xpg5" >&5
 echo "${ECHO_T}$cf_define_xpg5" >&6
 
                if test "$cf_define_xpg5" = yes
@@ -13581,14 +14482,14 @@ echo "${ECHO_T}$cf_define_xpg5" >&6
                fi
        fi
 
-       echo "$as_me:13584: checking for wide-character functions" >&5
+       echo "$as_me:14485: checking for wide-character functions" >&5
 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
 if test "${cf_cv_widechar_funcs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 13591 "configure"
+#line 14492 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -13605,16 +14506,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13608: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14509: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13611: \$? = $ac_status" >&5
+  echo "$as_me:14512: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13614: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14515: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13617: \$? = $ac_status" >&5
+  echo "$as_me:14518: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_widechar_funcs=yes
 else
@@ -13625,7 +14526,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:13628: result: $cf_cv_widechar_funcs" >&5
+echo "$as_me:14529: result: $cf_cv_widechar_funcs" >&5
 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
        if test "$cf_cv_widechar_funcs" != no ; then
 
@@ -13646,14 +14547,14 @@ EOF
 
 fi
 
-echo "$as_me:13649: checking if sys/time.h works with sys/select.h" >&5
+echo "$as_me:14550: 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 13656 "configure"
+#line 14557 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -13673,16 +14574,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13676: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14577: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13679: \$? = $ac_status" >&5
+  echo "$as_me:14580: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13682: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14583: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13685: \$? = $ac_status" >&5
+  echo "$as_me:14586: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_sys_time_select=yes
 else
@@ -13694,14 +14595,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
 
-echo "$as_me:13697: result: $cf_cv_sys_time_select" >&5
+echo "$as_me:14598: 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
 EOF
 
-echo "$as_me:13704: checking for function curses_version" >&5
+echo "$as_me:14605: checking for function curses_version" >&5
 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
 if test "${cf_cv_func_curses_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13711,7 +14612,7 @@ if test "$cross_compiling" = yes; then
   cf_cv_func_curses_version=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 13714 "configure"
+#line 14615 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -13724,15 +14625,15 @@ int main()
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13727: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14628: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13730: \$? = $ac_status" >&5
+  echo "$as_me:14631: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:13732: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14633: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13735: \$? = $ac_status" >&5
+  echo "$as_me:14636: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_func_curses_version=yes
 
@@ -13747,14 +14648,14 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f core
 fi
-echo "$as_me:13750: result: $cf_cv_func_curses_version" >&5
+echo "$as_me:14651: result: $cf_cv_func_curses_version" >&5
 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
 test "$cf_cv_func_curses_version" = yes &&
 cat >>confdefs.h <<\EOF
 #define HAVE_CURSES_VERSION 1
 EOF
 
-echo "$as_me:13757: checking for alternate character set array" >&5
+echo "$as_me:14658: checking for alternate character set array" >&5
 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
 if test "${cf_cv_curses_acs_map+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13764,7 +14665,7 @@ cf_cv_curses_acs_map=unknown
 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 13767 "configure"
+#line 14668 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header:-curses.h}>
@@ -13780,16 +14681,16 @@ $name['k'] = ACS_PLUS
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13783: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14684: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13786: \$? = $ac_status" >&5
+  echo "$as_me:14687: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13789: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14690: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13792: \$? = $ac_status" >&5
+  echo "$as_me:14693: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_curses_acs_map=$name; break
 else
@@ -13800,7 +14701,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 done
 
 fi
-echo "$as_me:13803: result: $cf_cv_curses_acs_map" >&5
+echo "$as_me:14704: result: $cf_cv_curses_acs_map" >&5
 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
 
 test "$cf_cv_curses_acs_map" != unknown &&
@@ -13810,7 +14711,7 @@ EOF
 
 if test "$cf_enable_widec" = yes; then
 
-echo "$as_me:13813: checking for wide alternate character set array" >&5
+echo "$as_me:14714: checking for wide alternate character set array" >&5
 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
 if test "${cf_cv_curses_wacs_map+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13820,7 +14721,7 @@ else
        for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
        do
        cat >conftest.$ac_ext <<_ACEOF
-#line 13823 "configure"
+#line 14724 "configure"
 #include "confdefs.h"
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -13836,16 +14737,16 @@ void *foo = &($name['k'])
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13839: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14740: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13842: \$? = $ac_status" >&5
+  echo "$as_me:14743: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13845: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14746: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13848: \$? = $ac_status" >&5
+  echo "$as_me:14749: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_curses_wacs_map=$name
         break
@@ -13856,7 +14757,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
        done
 fi
-echo "$as_me:13859: result: $cf_cv_curses_wacs_map" >&5
+echo "$as_me:14760: result: $cf_cv_curses_wacs_map" >&5
 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
 
 test "$cf_cv_curses_wacs_map" != unknown &&
@@ -13864,7 +14765,7 @@ cat >>confdefs.h <<EOF
 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
 EOF
 
-echo "$as_me:13867: checking for wide alternate character constants" >&5
+echo "$as_me:14768: checking for wide alternate character constants" >&5
 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13874,7 +14775,7 @@ cf_cv_curses_wacs_symbols=no
 if test "$cf_cv_curses_wacs_map" != unknown
 then
        cat >conftest.$ac_ext <<_ACEOF
-#line 13877 "configure"
+#line 14778 "configure"
 #include "confdefs.h"
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -13891,16 +14792,16 @@ cchar_t *foo = WACS_PLUS;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13894: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14795: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13897: \$? = $ac_status" >&5
+  echo "$as_me:14798: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13900: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14801: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13903: \$? = $ac_status" >&5
+  echo "$as_me:14804: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_curses_wacs_symbols=yes
 else
@@ -13910,7 +14811,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 else
        cat >conftest.$ac_ext <<_ACEOF
-#line 13913 "configure"
+#line 14814 "configure"
 #include "confdefs.h"
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -13926,16 +14827,16 @@ cchar_t *foo = WACS_PLUS
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13929: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14830: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13932: \$? = $ac_status" >&5
+  echo "$as_me:14833: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13935: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14836: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13938: \$? = $ac_status" >&5
+  echo "$as_me:14839: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_curses_wacs_symbols=yes
 else
@@ -13946,7 +14847,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
 
 fi
-echo "$as_me:13949: result: $cf_cv_curses_wacs_symbols" >&5
+echo "$as_me:14850: result: $cf_cv_curses_wacs_symbols" >&5
 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
 
 test "$cf_cv_curses_wacs_symbols" != no &&
@@ -13956,10 +14857,10 @@ EOF
 
 fi
 
-echo "$as_me:13959: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:14860: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 13962 "configure"
+#line 14863 "configure"
 #include "confdefs.h"
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -13977,16 +14878,16 @@ attr_t foo
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13980: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14881: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13983: \$? = $ac_status" >&5
+  echo "$as_me:14884: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13986: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14887: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13989: \$? = $ac_status" >&5
+  echo "$as_me:14890: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -13995,7 +14896,7 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:13998: result: $cf_result" >&5
+echo "$as_me:14899: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 if test $cf_result = yes ; then
 
 if test "$cf_enable_widec" = yes; then
 
 # This is needed on Tru64 5.0 to declare mbstate_t
-echo "$as_me:14019: checking if we must include wchar.h to declare mbstate_t" >&5
+echo "$as_me:14920: 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 14026 "configure"
+#line 14927 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -14041,23 +14942,23 @@ mbstate_t state
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14044: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14945: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14047: \$? = $ac_status" >&5
+  echo "$as_me:14948: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14050: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14951: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14053: \$? = $ac_status" >&5
+  echo "$as_me:14954: \$? = $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 14060 "configure"
+#line 14961 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -14076,16 +14977,16 @@ mbstate_t value
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14079: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14980: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14082: \$? = $ac_status" >&5
+  echo "$as_me:14983: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14085: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14986: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14088: \$? = $ac_status" >&5
+  echo "$as_me:14989: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_mbstate_t=yes
 else
@@ -14097,7 +14998,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:14100: result: $cf_cv_mbstate_t" >&5
+echo "$as_me:15001: result: $cf_cv_mbstate_t" >&5
 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
 
 if test "$cf_cv_mbstate_t" = yes ; then
@@ -14120,14 +15021,14 @@ if test "$cf_cv_mbstate_t" != unknown ; then
 fi
 
 # This is needed on Tru64 5.0 to declare wchar_t
-echo "$as_me:14123: checking if we must include wchar.h to declare wchar_t" >&5
+echo "$as_me:15024: 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
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 14130 "configure"
+#line 15031 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -14145,23 +15046,23 @@ wchar_t state
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14148: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15049: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14151: \$? = $ac_status" >&5
+  echo "$as_me:15052: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14154: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15055: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14157: \$? = $ac_status" >&5
+  echo "$as_me:15058: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_wchar_t=no
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 14164 "configure"
+#line 15065 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -14180,16 +15081,16 @@ wchar_t value
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14183: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15084: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14186: \$? = $ac_status" >&5
+  echo "$as_me:15087: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14189: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15090: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14192: \$? = $ac_status" >&5
+  echo "$as_me:15093: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_wchar_t=yes
 else
@@ -14201,7 +15102,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:14204: result: $cf_cv_wchar_t" >&5
+echo "$as_me:15105: result: $cf_cv_wchar_t" >&5
 echo "${ECHO_T}$cf_cv_wchar_t" >&6
 
 if test "$cf_cv_wchar_t" = yes ; then
@@ -14224,14 +15125,14 @@ if test "$cf_cv_wchar_t" != unknown ; then
 fi
 
 # This is needed on Tru64 5.0 to declare wint_t
-echo "$as_me:14227: checking if we must include wchar.h to declare wint_t" >&5
+echo "$as_me:15128: 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 14234 "configure"
+#line 15135 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -14249,23 +15150,23 @@ wint_t state
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14252: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15153: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14255: \$? = $ac_status" >&5
+  echo "$as_me:15156: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14258: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15159: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14261: \$? = $ac_status" >&5
+  echo "$as_me:15162: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_wint_t=no
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 14268 "configure"
+#line 15169 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -14284,16 +15185,16 @@ wint_t value
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14287: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15188: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14290: \$? = $ac_status" >&5
+  echo "$as_me:15191: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14293: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15194: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14296: \$? = $ac_status" >&5
+  echo "$as_me:15197: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_wint_t=yes
 else
@@ -14305,7 +15206,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:14308: result: $cf_cv_wint_t" >&5
+echo "$as_me:15209: result: $cf_cv_wint_t" >&5
 echo "${ECHO_T}$cf_cv_wint_t" >&6
 
 if test "$cf_cv_wint_t" = yes ; then
 
        if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
 
-echo "$as_me:14332: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:15233: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 14335 "configure"
+#line 15236 "configure"
 #include "confdefs.h"
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -14350,16 +15251,16 @@ mbstate_t foo
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14353: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15254: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14356: \$? = $ac_status" >&5
+  echo "$as_me:15257: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14359: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15260: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14362: \$? = $ac_status" >&5
+  echo "$as_me:15263: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14368,7 +15269,7 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14371: result: $cf_result" >&5
+echo "$as_me:15272: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 if test $cf_result = yes ; then
 
 
        if test "$NCURSES_OK_WCHAR_T" = 0 ; then
 
-echo "$as_me:14393: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:15294: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 14396 "configure"
+#line 15297 "configure"
 #include "confdefs.h"
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -14411,16 +15312,16 @@ wchar_t foo
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14414: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15315: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14417: \$? = $ac_status" >&5
+  echo "$as_me:15318: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14420: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15321: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14423: \$? = $ac_status" >&5
+  echo "$as_me:15324: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14429,7 +15330,7 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14432: result: $cf_result" >&5
+echo "$as_me:15333: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 if test $cf_result = yes ; then
 
 
        if test "$NCURSES_OK_WINT_T" = 0 ; then
 
-echo "$as_me:14454: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:15355: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 14457 "configure"
+#line 15358 "configure"
 #include "confdefs.h"
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -14472,16 +15373,16 @@ wint_t foo
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14475: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15376: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14478: \$? = $ac_status" >&5
+  echo "$as_me:15379: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14481: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15382: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14484: \$? = $ac_status" >&5
+  echo "$as_me:15385: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14490,7 +15391,7 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14493: result: $cf_result" >&5
+echo "$as_me:15394: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 if test $cf_result = yes ; then
 
        fi
 fi
 
-echo "$as_me:14514: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:15415: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 14518 "configure"
+#line 15419 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -14543,16 +15444,16 @@ void *foo = &(boolnames)
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14546: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15447: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14549: \$? = $ac_status" >&5
+  echo "$as_me:15450: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14552: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15453: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14555: \$? = $ac_status" >&5
+  echo "$as_me:15456: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14561,7 +15462,7 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14564: result: $cf_result" >&5
+echo "$as_me:15465: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 
 if test $cf_result = yes ; then
@@ -14573,14 +15474,14 @@ cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz.
 EOF
 
 else
-       echo "$as_me:14576: checking for data boolnames in library" >&5
+       echo "$as_me:15477: checking for data boolnames in library" >&5
 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
        # BSD linkers insist on making weak linkage, but resolve at runtime.
        if test "$cross_compiling" = yes; then
 
        # cross-compiling
        cat >conftest.$ac_ext <<_ACEOF
-#line 14583 "configure"
+#line 15484 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -14604,6 +15505,7 @@ main ()
 
        do {
                void *foo = &(boolnames);
+               fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
                ${cf_cv_main_return:-return}(foo == 0);
        } while (0)
 
@@ -14612,16 +15514,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14615: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15517: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14618: \$? = $ac_status" >&5
+  echo "$as_me:15520: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14621: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15523: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14624: \$? = $ac_status" >&5
+  echo "$as_me:15526: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14633,7 +15535,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 14636 "configure"
+#line 15538 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -14654,19 +15556,20 @@ extern char boolnames;
 int main(void)
 {
        void *foo = &(boolnames);
+       fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
        ${cf_cv_main_return:-return}(foo == 0);
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14661: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15564: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14664: \$? = $ac_status" >&5
+  echo "$as_me:15567: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:14666: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15569: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14669: \$? = $ac_status" >&5
+  echo "$as_me:15572: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14677,7 +15580,7 @@ cf_result=no
 fi
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-       echo "$as_me:14680: result: $cf_result" >&5
+       echo "$as_me:15583: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
        if test $cf_result = yes ; then
 
@@ -14690,11 +15593,11 @@ EOF
        fi
 fi
 
-echo "$as_me:14693: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:15596: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 14697 "configure"
+#line 15600 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -14722,16 +15625,16 @@ void *foo = &(boolfnames)
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14725: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15628: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14728: \$? = $ac_status" >&5
+  echo "$as_me:15631: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14731: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15634: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14734: \$? = $ac_status" >&5
+  echo "$as_me:15637: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14740,7 +15643,7 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14743: result: $cf_result" >&5
+echo "$as_me:15646: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 
 if test $cf_result = yes ; then
@@ -14752,14 +15655,14 @@ cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz
 EOF
 
 else
-       echo "$as_me:14755: checking for data boolfnames in library" >&5
+       echo "$as_me:15658: checking for data boolfnames in library" >&5
 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
        # BSD linkers insist on making weak linkage, but resolve at runtime.
        if test "$cross_compiling" = yes; then
 
        # cross-compiling
        cat >conftest.$ac_ext <<_ACEOF
-#line 14762 "configure"
+#line 15665 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -14783,6 +15686,7 @@ main ()
 
        do {
                void *foo = &(boolfnames);
+               fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
                ${cf_cv_main_return:-return}(foo == 0);
        } while (0)
 
@@ -14791,16 +15695,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14794: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15698: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14797: \$? = $ac_status" >&5
+  echo "$as_me:15701: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14800: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15704: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14803: \$? = $ac_status" >&5
+  echo "$as_me:15707: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14812,7 +15716,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 14815 "configure"
+#line 15719 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -14833,19 +15737,20 @@ extern char boolfnames;
 int main(void)
 {
        void *foo = &(boolfnames);
+       fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
        ${cf_cv_main_return:-return}(foo == 0);
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14840: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15745: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14843: \$? = $ac_status" >&5
+  echo "$as_me:15748: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:14845: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15750: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14848: \$? = $ac_status" >&5
+  echo "$as_me:15753: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14856,7 +15761,7 @@ cf_result=no
 fi
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-       echo "$as_me:14859: result: $cf_result" >&5
+       echo "$as_me:15764: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
        if test $cf_result = yes ; then
 
@@ -14871,7 +15776,7 @@ fi
 
 if ( test "$GCC" = yes || test "$GXX" = yes )
 then
-echo "$as_me:14874: checking if you want to turn on gcc warnings" >&5
+echo "$as_me:15779: checking if you want to turn on gcc warnings" >&5
 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
 
 # Check whether --enable-warnings or --disable-warnings was given.
@@ -14888,7 +15793,7 @@ else
   with_warnings=no
 
 fi;
-echo "$as_me:14891: result: $with_warnings" >&5
+echo "$as_me:15796: result: $with_warnings" >&5
 echo "${ECHO_T}$with_warnings" >&6
 if test "$with_warnings" = "yes"
 then
@@ -14911,10 +15816,10 @@ cat > conftest.i <<EOF
 EOF
 if test "$GCC" = yes
 then
-       { echo "$as_me:14914: checking for $CC __attribute__ directives..." >&5
+       { echo "$as_me:15819: checking for $CC __attribute__ directives..." >&5
 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
 cat > conftest.$ac_ext <<EOF
-#line 14917 "${as_me:-configure}"
+#line 15822 "${as_me:-configure}"
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -14963,12 +15868,12 @@ EOF
                        ;;
                esac
 
-               if { (eval echo "$as_me:14966: \"$ac_compile\"") >&5
+               if { (eval echo "$as_me:15871: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14969: \$? = $ac_status" >&5
+  echo "$as_me:15874: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-                       test -n "$verbose" && echo "$as_me:14971: result: ... $cf_attribute" >&5
+                       test -n "$verbose" && echo "$as_me:15876: result: ... $cf_attribute" >&5
 echo "${ECHO_T}... $cf_attribute" >&6
                        cat conftest.h >>confdefs.h
                        case $cf_attribute in #(vi
@@ -15032,12 +15937,12 @@ INTEL_COMPILER=no
 if test "$GCC" = yes ; then
        case $host_os in
        linux*|gnu*)
-               echo "$as_me:15035: checking if this is really Intel C compiler" >&5
+               echo "$as_me:15940: checking if this is really Intel C compiler" >&5
 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
                cf_save_CFLAGS="$CFLAGS"
                CFLAGS="$CFLAGS -no-gcc"
                cat >conftest.$ac_ext <<_ACEOF
-#line 15040 "configure"
+#line 15945 "configure"
 #include "confdefs.h"
 
 int
@@ -15054,19 +15959,19 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15057: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15962: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15060: \$? = $ac_status" >&5
+  echo "$as_me:15965: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15063: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15968: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15066: \$? = $ac_status" >&5
+  echo "$as_me:15971: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   INTEL_COMPILER=yes
-cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+cf_save_CFLAGS="$cf_save_CFLAGS -we147"
 
 else
   echo "$as_me: failed program was:" >&5
@@ -15074,7 +15979,7 @@ cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
                CFLAGS="$cf_save_CFLAGS"
-               echo "$as_me:15077: result: $INTEL_COMPILER" >&5
+               echo "$as_me:15982: result: $INTEL_COMPILER" >&5
 echo "${ECHO_T}$INTEL_COMPILER" >&6
                ;;
        esac
 CLANG_COMPILER=no
 
 if test "$GCC" = yes ; then
-       echo "$as_me:15086: checking if this is really Clang C compiler" >&5
+       echo "$as_me:15991: checking if this is really Clang C compiler" >&5
 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
        cf_save_CFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS -Qunused-arguments"
        cat >conftest.$ac_ext <<_ACEOF
-#line 15091 "configure"
+#line 15996 "configure"
 #include "confdefs.h"
 
 int
@@ -15105,16 +16010,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15108: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:16013: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15111: \$? = $ac_status" >&5
+  echo "$as_me:16016: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15114: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16019: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15117: \$? = $ac_status" >&5
+  echo "$as_me:16022: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   CLANG_COMPILER=yes
 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
@@ -15125,12 +16030,12 @@ cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
        CFLAGS="$cf_save_CFLAGS"
-       echo "$as_me:15128: result: $CLANG_COMPILER" >&5
+       echo "$as_me:16033: result: $CLANG_COMPILER" >&5
 echo "${ECHO_T}$CLANG_COMPILER" >&6
 fi
 
 cat > conftest.$ac_ext <<EOF
-#line 15133 "${as_me:-configure}"
+#line 16038 "${as_me:-configure}"
 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
 EOF
 
@@ -15147,7 +16052,7 @@ then
 # remark #981: operands are evaluated in unspecified order
 # warning #279: controlling expression is constant
 
-       { echo "$as_me:15150: checking for $CC warning options..." >&5
+       { echo "$as_me:16055: checking for $CC warning options..." >&5
 echo "$as_me: checking for $CC warning options..." >&6;}
        cf_save_CFLAGS="$CFLAGS"
        EXTRA_CFLAGS="-Wall"
@@ -15163,12 +16068,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
                wd981
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-               if { (eval echo "$as_me:15166: \"$ac_compile\"") >&5
+               if { (eval echo "$as_me:16071: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15169: \$? = $ac_status" >&5
+  echo "$as_me:16074: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-                       test -n "$verbose" && echo "$as_me:15171: result: ... -$cf_opt" >&5
+                       test -n "$verbose" && echo "$as_me:16076: result: ... -$cf_opt" >&5
 echo "${ECHO_T}... -$cf_opt" >&6
                        EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
                fi
@@ -15177,37 +16082,36 @@ echo "${ECHO_T}... -$cf_opt" >&6
 
 elif test "$GCC" = yes
 then
-       { echo "$as_me:15180: checking for $CC warning options..." >&5
+       { echo "$as_me:16085: checking for $CC warning options..." >&5
 echo "$as_me: checking for $CC warning options..." >&6;}
        cf_save_CFLAGS="$CFLAGS"
        EXTRA_CFLAGS=
        cf_warn_CONST=""
        test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+       cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
+       test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
        for cf_opt in W Wall \
                Wbad-function-cast \
                Wcast-align \
                Wcast-qual \
                Wdeclaration-after-statement \
                Wextra \
-               Wignored-qualifiers \
                Winline \
-               Wlogical-op \
                Wmissing-declarations \
                Wmissing-prototypes \
                Wnested-externs \
                Wpointer-arith \
                Wshadow \
                Wstrict-prototypes \
-               Wundef \
-               Wvarargs $cf_warn_CONST
+               Wundef $cf_gcc_warnings $cf_warn_CONST
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-               if { (eval echo "$as_me:15205: \"$ac_compile\"") >&5
+               if { (eval echo "$as_me:16109: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15208: \$? = $ac_status" >&5
+  echo "$as_me:16112: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-                       test -n "$verbose" && echo "$as_me:15210: result: ... -$cf_opt" >&5
+                       test -n "$verbose" && echo "$as_me:16114: result: ... -$cf_opt" >&5
 echo "${ECHO_T}... -$cf_opt" >&6
                        case $cf_opt in #(vi
                        Wcast-qual) #(vi
@@ -15218,7 +16122,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
                                [34].*)
                                        test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
 
-echo "${as_me:-configure}:15221: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+echo "${as_me:-configure}:16125: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
 
                                        continue;;
                                esac
@@ -15228,7 +16132,7 @@ echo "${as_me:-configure}:15221: testing feature is broken in gcc $GCC_VERSION .
                                [12].*)
                                        test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
 
-echo "${as_me:-configure}:15231: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+echo "${as_me:-configure}:16135: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
 
                                        continue;;
                                esac
@@ -15244,7 +16148,7 @@ rm -rf conftest*
 fi
 fi
 
-echo "$as_me:15247: checking if you want to use dmalloc for testing" >&5
+echo "$as_me:16151: checking if you want to use dmalloc for testing" >&5
 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
 
 # Check whether --with-dmalloc or --without-dmalloc was given.
@@ -15261,7 +16165,7 @@ EOF
 else
   with_dmalloc=
 fi;
-echo "$as_me:15264: result: ${with_dmalloc:-no}" >&5
+echo "$as_me:16168: result: ${with_dmalloc:-no}" >&5
 echo "${ECHO_T}${with_dmalloc:-no}" >&6
 
 case .$with_cflags in #(vi
@@ -15286,7 +16190,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -15327,7 +16231,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
 esac
 
 if test "$with_dmalloc" = yes ; then
-       echo "$as_me:15358: checking for dmalloc.h" >&5
+       echo "$as_me:16262: checking for dmalloc.h" >&5
 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
 if test "${ac_cv_header_dmalloc_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 15364 "configure"
+#line 16268 "configure"
 #include "confdefs.h"
 #include <dmalloc.h>
 _ACEOF
-if { (eval echo "$as_me:15368: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:16272: \"$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:15374: \$? = $ac_status" >&5
+  echo "$as_me:16278: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -15390,11 +16294,11 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:15393: result: $ac_cv_header_dmalloc_h" >&5
+echo "$as_me:16297: result: $ac_cv_header_dmalloc_h" >&5
 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
 if test $ac_cv_header_dmalloc_h = yes; then
 
-echo "$as_me:15397: checking for dmalloc_debug in -ldmalloc" >&5
+echo "$as_me:16301: 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
@@ -15402,7 +16306,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 15405 "configure"
+#line 16309 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -15421,16 +16325,16 @@ dmalloc_debug ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15424: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16328: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:15427: \$? = $ac_status" >&5
+  echo "$as_me:16331: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:15430: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16334: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15433: \$? = $ac_status" >&5
+  echo "$as_me:16337: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dmalloc_dmalloc_debug=yes
 else
@@ -15441,7 +16345,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:15444: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "$as_me:16348: 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
@@ -15456,7 +16360,7 @@ fi
 
 fi
 
-echo "$as_me:15459: checking if you want to use dbmalloc for testing" >&5
+echo "$as_me:16363: checking if you want to use dbmalloc for testing" >&5
 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
 
 # Check whether --with-dbmalloc or --without-dbmalloc was given.
@@ -15473,7 +16377,7 @@ EOF
 else
   with_dbmalloc=
 fi;
-echo "$as_me:15476: result: ${with_dbmalloc:-no}" >&5
+echo "$as_me:16380: result: ${with_dbmalloc:-no}" >&5
 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
 
 case .$with_cflags in #(vi
@@ -15498,7 +16402,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -15539,7 +16443,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
 esac
 
 if test "$with_dbmalloc" = yes ; then
-       echo "$as_me:15570: checking for dbmalloc.h" >&5
+       echo "$as_me:16474: checking for dbmalloc.h" >&5
 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 15576 "configure"
+#line 16480 "configure"
 #include "confdefs.h"
 #include <dbmalloc.h>
 _ACEOF
-if { (eval echo "$as_me:15580: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:16484: \"$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:15586: \$? = $ac_status" >&5
+  echo "$as_me:16490: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -15602,11 +16506,11 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:15605: result: $ac_cv_header_dbmalloc_h" >&5
+echo "$as_me:16509: result: $ac_cv_header_dbmalloc_h" >&5
 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
 if test $ac_cv_header_dbmalloc_h = yes; then
 
-echo "$as_me:15609: checking for debug_malloc in -ldbmalloc" >&5
+echo "$as_me:16513: 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
@@ -15614,7 +16518,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldbmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 15617 "configure"
+#line 16521 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -15633,16 +16537,16 @@ debug_malloc ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15636: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16540: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:15639: \$? = $ac_status" >&5
+  echo "$as_me:16543: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:15642: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16546: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15645: \$? = $ac_status" >&5
+  echo "$as_me:16549: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dbmalloc_debug_malloc=yes
 else
@@ -15653,7 +16557,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:15656: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "$as_me:16560: 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
@@ -15668,7 +16572,7 @@ fi
 
 fi
 
-echo "$as_me:15671: checking if you want to use valgrind for testing" >&5
+echo "$as_me:16575: checking if you want to use valgrind for testing" >&5
 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
 
 # Check whether --with-valgrind or --without-valgrind was given.
@@ -15685,7 +16589,7 @@ EOF
 else
   with_valgrind=
 fi;
-echo "$as_me:15688: result: ${with_valgrind:-no}" >&5
+echo "$as_me:16592: result: ${with_valgrind:-no}" >&5
 echo "${ECHO_T}${with_valgrind:-no}" >&6
 
 case .$with_cflags in #(vi
@@ -15710,7 +16614,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -15751,7 +16655,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -15778,7 +16682,7 @@ fi
        ;;
 esac
 
-echo "$as_me:15781: checking if you want to perform memory-leak testing" >&5
+echo "$as_me:16685: checking if you want to perform memory-leak testing" >&5
 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
 
 # Check whether --enable-leaks or --disable-leaks was given.
@@ -15788,7 +16692,7 @@ if test "${enable_leaks+set}" = set; then
 else
   : ${with_no_leaks:=no}
 fi;
-echo "$as_me:15791: result: $with_no_leaks" >&5
+echo "$as_me:16695: result: $with_no_leaks" >&5
 echo "${ECHO_T}$with_no_leaks" >&6
 
 if test "$with_no_leaks" = yes ; then
@@ -15804,7 +16708,7 @@ EOF
 fi
 
 LD_RPATH_OPT=
-echo "$as_me:15807: checking for an rpath option" >&5
+echo "$as_me:16711: checking for an rpath option" >&5
 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
 case $cf_cv_system_name in #(vi
 irix*) #(vi
@@ -15835,17 +16739,33 @@ solaris2*) #(vi
 *)
        ;;
 esac
-echo "$as_me:15838: result: $LD_RPATH_OPT" >&5
+echo "$as_me:16742: result: $LD_RPATH_OPT" >&5
 echo "${ECHO_T}$LD_RPATH_OPT" >&6
 
 case "x$LD_RPATH_OPT" in #(vi
 x-R*)
-       echo "$as_me:15843: checking if we need a space after rpath option" >&5
+       echo "$as_me:16747: 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="${LD_RPATH_OPT}$libdir $LIBS"
+
+cf_add_libs="${LD_RPATH_OPT}$libdir"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+       for cf_add_2lib in $cf_add_libs
+       do
+               if test "x$cf_add_1lib" = "x$cf_add_2lib"
+               then
+                       cf_add_1lib=
+                       break
+               fi
+       done
+       test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
        cat >conftest.$ac_ext <<_ACEOF
-#line 15848 "configure"
+#line 16768 "configure"
 #include "confdefs.h"
 
 int
@@ -15857,16 +16777,16 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15860: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16780: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:15863: \$? = $ac_status" >&5
+  echo "$as_me:16783: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:15866: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16786: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15869: \$? = $ac_status" >&5
+  echo "$as_me:16789: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_rpath_space=no
 else
@@ -15876,13 +16796,13 @@ cf_rpath_space=yes
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
        LIBS="$cf_save_LIBS"
-       echo "$as_me:15879: result: $cf_rpath_space" >&5
+       echo "$as_me:16799: result: $cf_rpath_space" >&5
 echo "${ECHO_T}$cf_rpath_space" >&6
        test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
        ;;
 esac
 
-echo "$as_me:15885: checking if rpath-hack should be disabled" >&5
+echo "$as_me:16805: checking if rpath-hack should be disabled" >&5
 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
 
 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
@@ -15899,21 +16819,21 @@ else
   cf_disable_rpath_hack=no
 
 fi;
-echo "$as_me:15902: result: $cf_disable_rpath_hack" >&5
+echo "$as_me:16822: result: $cf_disable_rpath_hack" >&5
 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
 if test "$cf_disable_rpath_hack" = no ; then
 
-echo "$as_me:15906: checking for updated LDFLAGS" >&5
+echo "$as_me:16826: checking for updated LDFLAGS" >&5
 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
 if test -n "$LD_RPATH_OPT" ; then
-       echo "$as_me:15909: result: maybe" >&5
+       echo "$as_me:16829: result: maybe" >&5
 echo "${ECHO_T}maybe" >&6
 
        for ac_prog in ldd
 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:15916: checking for $ac_word" >&5
+echo "$as_me:16836: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15928,7 +16848,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_cf_ldd_prog="$ac_prog"
-echo "$as_me:15931: found $ac_dir/$ac_word" >&5
+echo "$as_me:16851: found $ac_dir/$ac_word" >&5
 break
 done
 
 fi
 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
 if test -n "$cf_ldd_prog"; then
-  echo "$as_me:15939: result: $cf_ldd_prog" >&5
+  echo "$as_me:16859: result: $cf_ldd_prog" >&5
 echo "${ECHO_T}$cf_ldd_prog" >&6
 else
-  echo "$as_me:15942: result: no" >&5
+  echo "$as_me:16862: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -15953,7 +16873,7 @@ test -n "$cf_ldd_prog" || cf_ldd_prog="no"
                cf_rpath_oops=
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 15956 "configure"
+#line 16876 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -15965,16 +16885,16 @@ printf("Hello");
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15968: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16888: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:15971: \$? = $ac_status" >&5
+  echo "$as_me:16891: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:15974: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16894: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15977: \$? = $ac_status" >&5
+  echo "$as_me:16897: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
                 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
@@ -16002,7 +16922,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
                                        then
                                                test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
 
-echo "${as_me:-configure}:16005: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
+echo "${as_me:-configure}:16925: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
 
                                                LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
                                                break
@@ -16014,11 +16934,11 @@ echo "${as_me:-configure}:16005: testing ...adding -L$cf_rpath_dir/lib to LDFLAG
 
        test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
 
-echo "${as_me:-configure}:16017: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:16937: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
 
 test -n "$verbose" && echo "   ...checking LDFLAGS $LDFLAGS" 1>&6
 
-echo "${as_me:-configure}:16021: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:16941: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
 
 cf_rpath_dst=
 for cf_rpath_src in $LDFLAGS
@@ -16055,7 +16975,7 @@ do
                        then
                                test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
 
-echo "${as_me:-configure}:16058: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+echo "${as_me:-configure}:16978: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
 
                                EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
                        fi
@@ -16068,11 +16988,11 @@ LDFLAGS=$cf_rpath_dst
 
 test -n "$verbose" && echo "   ...checked LDFLAGS $LDFLAGS" 1>&6
 
-echo "${as_me:-configure}:16071: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:16991: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
 
 test -n "$verbose" && echo "   ...checking LIBS $LIBS" 1>&6
 
-echo "${as_me:-configure}:16075: testing ...checking LIBS $LIBS ..." 1>&5
+echo "${as_me:-configure}:16995: testing ...checking LIBS $LIBS ..." 1>&5
 
 cf_rpath_dst=
 for cf_rpath_src in $LIBS
@@ -16109,7 +17029,7 @@ do
                        then
                                test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
 
-echo "${as_me:-configure}:16112: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+echo "${as_me:-configure}:17032: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
 
                                EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
                        fi
@@ -16122,14 +17042,14 @@ LIBS=$cf_rpath_dst
 
 test -n "$verbose" && echo "   ...checked LIBS $LIBS" 1>&6
 
-echo "${as_me:-configure}:16125: testing ...checked LIBS $LIBS ..." 1>&5
+echo "${as_me:-configure}:17045: testing ...checked LIBS $LIBS ..." 1>&5
 
        test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
 
-echo "${as_me:-configure}:16129: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:17049: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
 
 else
-       echo "$as_me:16132: result: no" >&5
+       echo "$as_me:17052: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -16219,7 +17139,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:16222: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:17142: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
@@ -16395,7 +17315,7 @@ cat >>$CONFIG_STATUS <<\EOF
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:16398: error: ambiguous option: $1
+    { { echo "$as_me:17318: 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;}
@@ -16414,7 +17334,7 @@ Try \`$0 --help' for more information." >&2;}
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:16417: error: unrecognized option: $1
+  -*) { { echo "$as_me:17337: 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;}
@@ -16464,7 +17384,7 @@ do
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
   "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
-  *) { { echo "$as_me:16467: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:17387: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -16735,7 +17655,7 @@ done; }
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:16738: creating $ac_file" >&5
+    { echo "$as_me:17658: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -16753,7 +17673,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:16756: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:17676: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -16766,7 +17686,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:16769: error: cannot find input file: $f" >&5
+           { { echo "$as_me:17689: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -16782,7 +17702,7 @@ cat >>$CONFIG_STATUS <<\EOF
       if test -n "$ac_seen"; then
         ac_used=`grep '@datarootdir@' $ac_item`
         if test -z "$ac_used"; then
-          { echo "$as_me:16785: WARNING: datarootdir was used implicitly but not set:
+          { echo "$as_me:17705: WARNING: datarootdir was used implicitly but not set:
 $ac_seen" >&5
 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
 $ac_seen" >&2;}
@@ -16791,7 +17711,7 @@ $ac_seen" >&2;}
       fi
       ac_seen=`grep '${datarootdir}' $ac_item`
       if test -n "$ac_seen"; then
-        { echo "$as_me:16794: WARNING: datarootdir was used explicitly but not set:
+        { echo "$as_me:17714: WARNING: datarootdir was used explicitly but not set:
 $ac_seen" >&5
 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
 $ac_seen" >&2;}
@@ -16828,7 +17748,7 @@ s,@INSTALL@,$ac_INSTALL,;t t
             ac_init=`egrep '[  ]*'$ac_name'[   ]*=' $ac_file`
             if test -z "$ac_init"; then
               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
-              { echo "$as_me:16831: WARNING: Variable $ac_name is used but was not set:
+              { echo "$as_me:17751: WARNING: Variable $ac_name is used but was not set:
 $ac_seen" >&5
 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
 $ac_seen" >&2;}
@@ -16839,7 +17759,7 @@ $ac_seen" >&2;}
     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
     if test -s $tmp/out; then
       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
-      { echo "$as_me:16842: WARNING: Some variables may not be substituted:
+      { echo "$as_me:17762: WARNING: Some variables may not be substituted:
 $ac_seen" >&5
 echo "$as_me: WARNING: Some variables may not be substituted:
 $ac_seen" >&2;}
@@ -16888,7 +17808,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:16891: creating $ac_file" >&5
+  test x"$ac_file" != x- && { echo "$as_me:17811: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
@@ -16899,7 +17819,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:16902: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:17822: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -16912,7 +17832,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:16915: error: cannot find input file: $f" >&5
+           { { echo "$as_me:17835: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -16970,7 +17890,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:16973: $ac_file is unchanged" >&5
+      { echo "$as_me:17893: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \