[GRASS-SVN] r44217 - in grass/branches/releasebranch_6_4: . include include/Make lib/vector/Vlib vector/v.select

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 7 12:37:50 EST 2010


Author: martinl
Date: 2010-11-07 09:37:50 -0800 (Sun, 07 Nov 2010)
New Revision: 44217

Added:
   grass/branches/releasebranch_6_4/lib/vector/Vlib/geos.c
   grass/branches/releasebranch_6_4/vector/v.select/args.c
   grass/branches/releasebranch_6_4/vector/v.select/geos.c
   grass/branches/releasebranch_6_4/vector/v.select/overlap.c
   grass/branches/releasebranch_6_4/vector/v.select/proto.h
Modified:
   grass/branches/releasebranch_6_4/configure
   grass/branches/releasebranch_6_4/configure.in
   grass/branches/releasebranch_6_4/include/Make/Grass.make.in
   grass/branches/releasebranch_6_4/include/Make/Platform.make.in
   grass/branches/releasebranch_6_4/include/Vect.h
   grass/branches/releasebranch_6_4/include/config.h.in
   grass/branches/releasebranch_6_4/lib/vector/Vlib/Makefile
   grass/branches/releasebranch_6_4/vector/v.select/description.html
   grass/branches/releasebranch_6_4/vector/v.select/main.c
Log:
v.select: backport geos operator from devbr6


Modified: grass/branches/releasebranch_6_4/configure
===================================================================
--- grass/branches/releasebranch_6_4/configure	2010-11-07 17:34:38 UTC (rev 44216)
+++ grass/branches/releasebranch_6_4/configure	2010-11-07 17:37:50 UTC (rev 44217)
@@ -92,6 +92,11 @@
                           e.g. '--with-wxwidgets=/usr/local/bin/wx-config',
                           default: no)"
 ac_help="$ac_help
+  --with-geos[=path/geos-config]
+                          enable GEOS support (geos-config with path,
+                          e.g. '--with-geos=/usr/local/bin/geos-config',
+                          default: no)"
+ac_help="$ac_help
   --with-includes=DIRS    site include files are in DIRS"
 ac_help="$ac_help
   --with-libs=DIRS        site library files are in DIRS"
@@ -750,7 +755,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:754: checking host system type" >&5
+echo "configure:759: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -773,7 +778,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:777: checking for $ac_word" >&5
+echo "configure:782: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -800,7 +805,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:804: checking for $ac_word" >&5
+echo "configure:809: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -848,7 +853,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:852: checking for $ac_word" >&5
+echo "configure:857: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -877,7 +882,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:881: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:886: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -888,12 +893,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 892 "configure"
+#line 897 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -919,19 +924,19 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:923: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:928: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:928: checking whether we are using GNU C" >&5
+echo "configure:933: checking whether we are using GNU C" >&5
 
 cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -949,7 +954,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:953: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:958: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -978,10 +983,10 @@
 fi
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:982: checking for Cygwin environment" >&5
+echo "configure:987: checking for Cygwin environment" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 985 "configure"
+#line 990 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -992,7 +997,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -1008,17 +1013,17 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1012: checking for mingw32 environment" >&5
+echo "configure:1017: checking for mingw32 environment" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 1015 "configure"
+#line 1020 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -1036,7 +1041,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1040: checking for executable suffix" >&5
+echo "configure:1045: checking for executable suffix" >&5
 
 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
   ac_cv_exeext=.exe
@@ -1055,23 +1060,23 @@
 IEEEFLAG=
 
 echo $ac_n "checking for full floating-point support""... $ac_c" 1>&6
-echo "configure:1059: checking for full floating-point support" >&5
+echo "configure:1064: checking for full floating-point support" >&5
 if test "$cross_compiling" = yes; then
      echo "$ac_t""unknown (cross-compiling)" 1>&6
      
 echo $ac_n "checking whether "cc -mieee" works""... $ac_c" 1>&6
-echo "configure:1064: checking whether "cc -mieee" works" >&5
+echo "configure:1069: checking whether "cc -mieee" works" >&5
 ac_save_cflags=${CFLAGS}
 CFLAGS="$CFLAGS -mieee"
 cat > conftest.$ac_ext <<EOF
-#line 1068 "configure"
+#line 1073 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
      echo "$ac_t""yes" 1>&6
         IEEEFLAG="-mieee"
@@ -1087,7 +1092,7 @@
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 1091 "configure"
+#line 1096 "configure"
 #include "confdefs.h"
 
 #include <float.h>
@@ -1101,7 +1106,7 @@
 }
 
 EOF
-if { (eval echo configure:1105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
      echo "$ac_t""yes" 1>&6
     
@@ -1114,14 +1119,14 @@
   CFLAGS=-mieee
   
 echo $ac_n "checking for full floating-point support with -mieee""... $ac_c" 1>&6
-echo "configure:1118: checking for full floating-point support with -mieee" >&5
+echo "configure:1123: checking for full floating-point support with -mieee" >&5
 if test "$cross_compiling" = yes; then
      echo "$ac_t""unknown (cross-compiling)" 1>&6
     { echo "configure: error: *** INTERNAL CONFIGURE ERROR" 1>&2; exit 1; }
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 1125 "configure"
+#line 1130 "configure"
 #include "confdefs.h"
 
 #include <float.h>
@@ -1135,7 +1140,7 @@
 }
 
 EOF
-if { (eval echo configure:1139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
      echo "$ac_t""yes" 1>&6
     IEEEFLAG="-mieee"
@@ -1172,7 +1177,7 @@
 # Extract the first word of "pwd", so it can be a program name with args.
 set dummy pwd; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1176: checking for $ac_word" >&5
+echo "configure:1181: checking for $ac_word" >&5
 
 case "$pwd" in
   /*)
@@ -1210,7 +1215,7 @@
 fi
 
 echo $ac_n "checking for source directory""... $ac_c" 1>&6
-echo "configure:1214: checking for source directory" >&5
+echo "configure:1219: checking for source directory" >&5
 
 if test -z "$srcdir" ; then
   SRCDIR=`$pwd`
@@ -1221,7 +1226,7 @@
 echo "$ac_t"""$SRCDIR"" 1>&6
 
 echo $ac_n "checking for build directory""... $ac_c" 1>&6
-echo "configure:1225: checking for build directory" >&5
+echo "configure:1230: checking for build directory" >&5
 
 DSTDIR=`$pwd`
 WINDSTDIR=`$winpwd`
@@ -1306,7 +1311,7 @@
 
 
 echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
-echo "configure:1310: checking for MacOSX App" >&5
+echo "configure:1315: checking for MacOSX App" >&5
 case "$enable_macosx_app" in
 	yes)	MACOSX_APP=1	;;
 	no)	MACOSX_APP=	;;
@@ -1318,7 +1323,7 @@
 # Check for MacOSX archs
 
 echo $ac_n "checking for MacOSX architectures""... $ac_c" 1>&6
-echo "configure:1322: checking for MacOSX architectures" >&5
+echo "configure:1327: checking for MacOSX architectures" >&5
 
 MACOSX_ARCHS=
 
@@ -1347,7 +1352,7 @@
 # Check for MacOSX SDK
 
 echo $ac_n "checking for MacOSX SDK""... $ac_c" 1>&6
-echo "configure:1351: checking for MacOSX SDK" >&5
+echo "configure:1356: checking for MacOSX SDK" >&5
 
 MACOSX_SDK=
 
@@ -1357,7 +1362,7 @@
   
 ac_safe=`echo "$with_macosx_sdk/SDKSettings.plist" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $with_macosx_sdk/SDKSettings.plist""... $ac_c" 1>&6
-echo "configure:1361: checking for $with_macosx_sdk/SDKSettings.plist" >&5
+echo "configure:1366: checking for $with_macosx_sdk/SDKSettings.plist" >&5
 
 if test "$cross_compiling" = yes; then
     { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
@@ -1401,7 +1406,7 @@
 
 
     echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:1405: checking how to build libraries" >&5
+echo "configure:1410: checking how to build libraries" >&5
     # Check whether --enable-shared or --disable-shared was given.
 if test "${enable_shared+set}" = set; then
   enableval="$enable_shared"
@@ -1444,7 +1449,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1448: checking for $ac_word" >&5
+echo "configure:1453: checking for $ac_word" >&5
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -1469,7 +1474,7 @@
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1473: checking how to run the C preprocessor" >&5
+echo "configure:1478: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1482,13 +1487,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1486 "configure"
+#line 1491 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1499,13 +1504,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1503 "configure"
+#line 1508 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1516,13 +1521,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1520 "configure"
+#line 1525 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1550,7 +1555,7 @@
     # Step 0.a: Enable 64 bit support?
 
     echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
-echo "configure:1554: checking if 64bit support is requested" >&5
+echo "configure:1559: checking if 64bit support is requested" >&5
     # Check whether --enable-64bit or --disable-64bit was given.
 if test "${enable_64bit+set}" = set; then
   enableval="$enable_64bit"
@@ -1570,7 +1575,7 @@
     # Step 0.b: Enable Solaris 64 bit VIS support?
 
     echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
-echo "configure:1574: checking if 64bit Sparc VIS support is requested" >&5
+echo "configure:1579: checking if 64bit Sparc VIS support is requested" >&5
     # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
 if test "${enable_64bit_vis+set}" = set; then
   enableval="$enable_64bit_vis"
@@ -1594,7 +1599,7 @@
     # there are a few systems, like Next, where this doesn't work.
 
     echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:1598: checking system version (for dynamic loading)" >&5
+echo "configure:1603: checking system version (for dynamic loading)" >&5
     if test -f /usr/lib/NextStep/software_version; then
 	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
     else
@@ -1620,13 +1625,13 @@
     # Linux can use either -ldl or -ldld for dynamic loading.
 
     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:1624: checking for dlopen in -ldl" >&5
+echo "configure:1629: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1630 "configure"
+#line 1635 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1637,7 +1642,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1684,7 +1689,7 @@
     # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1688: checking for $ac_word" >&5
+echo "configure:1693: checking for $ac_word" >&5
 
 if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -1813,13 +1818,13 @@
 	    # known GMT value.
 
 	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:1817: checking for gettimeofday in -lbsd" >&5
+echo "configure:1822: checking for gettimeofday in -lbsd" >&5
 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lbsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1823 "configure"
+#line 1828 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1830,7 +1835,7 @@
 gettimeofday()
 ; return 0; }
 EOF
-if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1871,13 +1876,13 @@
 	    # is always linked to, for compatibility.
 	    #-----------------------------------------------------------
 	    echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
-echo "configure:1875: checking for inet_ntoa in -lbind" >&5
+echo "configure:1880: checking for inet_ntoa in -lbind" >&5
 ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1881 "configure"
+#line 1886 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1888,7 +1893,7 @@
 inet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:1892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1949,13 +1954,13 @@
 
 	    SHLIB_SUFFIX=".sl"
 	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:1953: checking for shl_load in -ldld" >&5
+echo "configure:1958: checking for shl_load in -ldld" >&5
 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1959 "configure"
+#line 1964 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1966,7 +1971,7 @@
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:1970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2031,13 +2036,13 @@
 	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
 	    SHLIB_SUFFIX=".sl"
 	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:2035: checking for shl_load in -ldld" >&5
+echo "configure:2040: checking for shl_load in -ldld" >&5
 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2041 "configure"
+#line 2046 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2048,7 +2053,7 @@
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2170,15 +2175,15 @@
 	    else
 		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2174: checking for dld.h" >&5
+echo "configure:2179: checking for dld.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 2177 "configure"
+#line 2182 "configure"
 #include "confdefs.h"
 #include <dld.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2238,15 +2243,15 @@
 	    else
 		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2242: checking for dld.h" >&5
+echo "configure:2247: checking for dld.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 2245 "configure"
+#line 2250 "configure"
 #include "confdefs.h"
 #include <dld.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2343,9 +2348,9 @@
 	    CC_SEARCH_FLAGS=""
 	    LD_SEARCH_FLAGS=""
 	    echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:2347: checking for ELF" >&5
+echo "configure:2352: checking for ELF" >&5
 	    cat > conftest.$ac_ext <<EOF
-#line 2349 "configure"
+#line 2354 "configure"
 #include "confdefs.h"
 
 #ifdef __ELF__
@@ -2375,15 +2380,15 @@
 	    # Not available on all versions:  check for include file.
 	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:2379: checking for dlfcn.h" >&5
+echo "configure:2384: checking for dlfcn.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 2382 "configure"
+#line 2387 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2407,9 +2412,9 @@
 		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 		echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:2411: checking for ELF" >&5
+echo "configure:2416: checking for ELF" >&5
 		cat > conftest.$ac_ext <<EOF
-#line 2413 "configure"
+#line 2418 "configure"
 #include "confdefs.h"
 
 #ifdef __ELF__
@@ -2733,17 +2738,17 @@
 	    # that don't grok the -Bexport option.  Test that it does.
 	    hold_ldflags=$LDFLAGS
 	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:2737: checking for ld accepts -Bexport flag" >&5
+echo "configure:2742: checking for ld accepts -Bexport flag" >&5
 	    LDFLAGS="${LDFLAGS} -Wl,-Bexport"
 	    cat > conftest.$ac_ext <<EOF
-#line 2740 "configure"
+#line 2745 "configure"
 #include "confdefs.h"
 
 int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   found=yes
 else
@@ -3146,6 +3151,15 @@
 
 # With includes and libs options
 
+# Check whether --with-geos or --without-geos was given.
+if test "${with_geos+set}" = set; then
+  withval="$with_geos"
+  :
+else
+  with_geos="no"
+fi
+
+
 # Check whether --with-includes or --without-includes was given.
 if test "${with_includes+set}" = set; then
   withval="$with_includes"
@@ -3559,7 +3573,7 @@
 # Done checking fortran
 
 echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
-echo "configure:3563: checking for additional include dirs" >&5
+echo "configure:3577: checking for additional include dirs" >&5
 case "$with_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
@@ -3582,7 +3596,7 @@
 # With libs option
 
 echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
-echo "configure:3586: checking for additional library dirs" >&5
+echo "configure:3600: checking for additional library dirs" >&5
 case "$with_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
@@ -3616,7 +3630,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:3620: checking for a BSD compatible install" >&5
+echo "configure:3634: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 
   IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
@@ -3669,7 +3683,7 @@
 # Extract the first word of "flex", so it can be a program name with args.
 set dummy flex; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3673: checking for $ac_word" >&5
+echo "configure:3687: checking for $ac_word" >&5
 
 if test -n "$LEX"; then
   ac_cv_prog_LEX="$LEX" # Let the user override the test.
@@ -3700,13 +3714,13 @@
   *) ac_lib=l ;;
   esac
   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:3704: checking for yywrap in -l$ac_lib" >&5
+echo "configure:3718: checking for yywrap in -l$ac_lib" >&5
 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-l$ac_lib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3710 "configure"
+#line 3724 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3717,7 +3731,7 @@
 yywrap()
 ; return 0; }
 EOF
-if { (eval echo configure:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3742,7 +3756,7 @@
     # Extract the first word of "lex", so it can be a program name with args.
 set dummy lex; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3746: checking for $ac_word" >&5
+echo "configure:3760: checking for $ac_word" >&5
 
 case "$LEXPATH" in
   /*)
@@ -3782,7 +3796,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3786: checking for $ac_word" >&5
+echo "configure:3800: checking for $ac_word" >&5
 
 if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
@@ -3813,7 +3827,7 @@
     # Extract the first word of "yacc", so it can be a program name with args.
 set dummy yacc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3817: checking for $ac_word" >&5
+echo "configure:3831: checking for $ac_word" >&5
 
 case "$YACCPATH" in
   /*)
@@ -3851,7 +3865,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3855: checking for $ac_word" >&5
+echo "configure:3869: checking for $ac_word" >&5
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -3880,7 +3894,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3884: checking for $ac_word" >&5
+echo "configure:3898: checking for $ac_word" >&5
 
 if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -3911,7 +3925,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3915: checking for $ac_word" >&5
+echo "configure:3929: checking for $ac_word" >&5
 
 if test -n "$ENV"; then
   ac_cv_prog_ENV="$ENV" # Let the user override the test.
@@ -3940,7 +3954,7 @@
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3944: checking for $ac_word" >&5
+echo "configure:3958: checking for $ac_word" >&5
 
 case "$PERL" in
   /*)
@@ -3971,10 +3985,10 @@
 fi
   
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3975: checking for ANSI C header files" >&5
+echo "configure:3989: checking for ANSI C header files" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 3978 "configure"
+#line 3992 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3982,7 +3996,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3999,7 +4013,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 4003 "configure"
+#line 4017 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -4017,7 +4031,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 4021 "configure"
+#line 4035 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -4038,7 +4052,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 4042 "configure"
+#line 4056 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -4049,7 +4063,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:4053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -4076,15 +4090,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4080: checking for $ac_hdr" >&5
+echo "configure:4094: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4083 "configure"
+#line 4097 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4113,15 +4127,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4117: checking for $ac_hdr" >&5
+echo "configure:4131: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4120 "configure"
+#line 4134 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4150,15 +4164,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4154: checking for $ac_hdr" >&5
+echo "configure:4168: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4157 "configure"
+#line 4171 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4187,15 +4201,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4191: checking for $ac_hdr" >&5
+echo "configure:4205: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4194 "configure"
+#line 4208 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4224,15 +4238,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4228: checking for $ac_hdr" >&5
+echo "configure:4242: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4231 "configure"
+#line 4245 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4258,10 +4272,10 @@
 done
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4262: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4276: checking whether time.h and sys/time.h may both be included" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4265 "configure"
+#line 4279 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -4270,7 +4284,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -4290,10 +4304,10 @@
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:4294: checking for off_t" >&5
+echo "configure:4308: checking for off_t" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4297 "configure"
+#line 4311 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -4320,10 +4334,10 @@
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:4324: checking for uid_t in sys/types.h" >&5
+echo "configure:4338: checking for uid_t in sys/types.h" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4327 "configure"
+#line 4341 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -4351,10 +4365,10 @@
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:4355: checking return type of signal handlers" >&5
+echo "configure:4369: checking return type of signal handlers" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4358 "configure"
+#line 4372 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -4371,7 +4385,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:4375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -4389,10 +4403,10 @@
 
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:4393: checking for Cygwin environment" >&5
+echo "configure:4407: checking for Cygwin environment" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4396 "configure"
+#line 4410 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -4403,7 +4417,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:4407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -4421,10 +4435,10 @@
 for ac_func in ftime gethostname gettimeofday lseek nice time uname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4425: checking for $ac_func" >&5
+echo "configure:4439: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4428 "configure"
+#line 4442 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4447,7 +4461,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4473,10 +4487,10 @@
 for ac_func in seteuid setpriority setreuid setruid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4477: checking for $ac_func" >&5
+echo "configure:4491: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4480 "configure"
+#line 4494 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4499,7 +4513,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4525,10 +4539,10 @@
 for ac_func in drand48
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4529: checking for $ac_func" >&5
+echo "configure:4543: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4532 "configure"
+#line 4546 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4551,7 +4565,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4577,10 +4591,10 @@
 for ac_func in putenv setenv
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4581: checking for $ac_func" >&5
+echo "configure:4595: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4584 "configure"
+#line 4598 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4603,7 +4617,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4629,10 +4643,10 @@
 for ac_func in nanosleep
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4633: checking for $ac_func" >&5
+echo "configure:4647: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 4636 "configure"
+#line 4650 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4655,7 +4669,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4680,13 +4694,13 @@
 
 if test "$cross_compiling" != "yes" ; then
 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4684: checking whether setpgrp takes no argument" >&5
+echo "configure:4698: checking whether setpgrp takes no argument" >&5
 
 if test "$cross_compiling" = yes; then
   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
+#line 4704 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -4706,7 +4720,7 @@
 }
 
 EOF
-if { (eval echo configure:4710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_setpgrp_void=no
 else
@@ -4734,16 +4748,16 @@
 fi
 
 echo $ac_n "checking for long long int""... $ac_c" 1>&6
-echo "configure:4738: checking for long long int" >&5
+echo "configure:4752: checking for long long int" >&5
 cat > conftest.$ac_ext <<EOF
-#line 4740 "configure"
+#line 4754 "configure"
 #include "confdefs.h"
 
 int main() {
 long long int x;
 ; return 0; }
 EOF
-if { (eval echo configure:4747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 echo "$ac_t""yes" 1>&6
@@ -4763,7 +4777,7 @@
 rm -f conftest*
 
 echo $ac_n "checking for W11""... $ac_c" 1>&6
-echo "configure:4767: checking for W11" >&5
+echo "configure:4781: checking for W11" >&5
 case "$enable_w11" in
 	yes|no)	echo "$ac_t"""$enable_w11"" 1>&6	;;
 	*)	{ echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }	;;
@@ -4791,7 +4805,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:4795: checking for X" >&5
+echo "configure:4809: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -4851,12 +4865,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 4855 "configure"
+#line 4869 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4925,14 +4939,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4929 "configure"
+#line 4943 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:4936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -5037,17 +5051,17 @@
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:5041: checking whether -R must be followed by a space" >&5
+echo "configure:5055: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 5044 "configure"
+#line 5058 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -5063,14 +5077,14 @@
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 5067 "configure"
+#line 5081 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -5102,13 +5116,13 @@
     # libraries were built with DECnet support.  And karl at cs.umb.edu says
     # the Alpha needs dnet_stub (dnet does not exist).
     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:5106: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:5120: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5112 "configure"
+#line 5126 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5119,7 +5133,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:5123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5140,13 +5154,13 @@
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:5144: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:5158: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5150 "configure"
+#line 5164 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5157,7 +5171,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:5161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5185,10 +5199,10 @@
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey at clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:5189: checking for gethostbyname" >&5
+echo "configure:5203: checking for gethostbyname" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 5192 "configure"
+#line 5206 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -5211,7 +5225,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -5231,13 +5245,13 @@
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:5235: checking for gethostbyname in -lnsl" >&5
+echo "configure:5249: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5241 "configure"
+#line 5255 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5248,7 +5262,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:5252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5277,10 +5291,10 @@
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:5281: checking for connect" >&5
+echo "configure:5295: checking for connect" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 5284 "configure"
+#line 5298 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -5303,7 +5317,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -5323,13 +5337,13 @@
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:5327: checking for connect in -lsocket" >&5
+echo "configure:5341: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5333 "configure"
+#line 5347 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5340,7 +5354,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:5344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5363,10 +5377,10 @@
 
     # gomez at mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:5367: checking for remove" >&5
+echo "configure:5381: checking for remove" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 5370 "configure"
+#line 5384 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -5389,7 +5403,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -5409,13 +5423,13 @@
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:5413: checking for remove in -lposix" >&5
+echo "configure:5427: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5419 "configure"
+#line 5433 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5426,7 +5440,7 @@
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5449,10 +5463,10 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:5453: checking for shmat" >&5
+echo "configure:5467: checking for shmat" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 5456 "configure"
+#line 5470 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -5475,7 +5489,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -5495,13 +5509,13 @@
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:5499: checking for shmat in -lipc" >&5
+echo "configure:5513: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5505 "configure"
+#line 5519 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5512,7 +5526,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:5516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5544,13 +5558,13 @@
   # libraries we check for below, so use a different variable.
   #  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:5548: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:5562: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5554 "configure"
+#line 5568 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5561,7 +5575,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:5565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5599,7 +5613,7 @@
 
 
 echo $ac_n "checking whether to use Curses""... $ac_c" 1>&6
-echo "configure:5603: checking whether to use Curses" >&5
+echo "configure:5617: checking whether to use Curses" >&5
 echo "$ac_t"""$with_curses"" 1>&6
 case "$with_curses" in
 	"no")	USE_CURSES=	;;
@@ -5618,15 +5632,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5622: checking for $ac_hdr" >&5
+echo "configure:5636: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 5625 "configure"
+#line 5639 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5657,10 +5671,10 @@
 
 
 echo $ac_n "checking curses.h WINDOW structure component""... $ac_c" 1>&6
-echo "configure:5661: checking curses.h WINDOW structure component" >&5
+echo "configure:5675: checking curses.h WINDOW structure component" >&5
 CURSES_MAXY=NONE
 cat > conftest.$ac_ext <<EOF
-#line 5664 "configure"
+#line 5678 "configure"
 #include "confdefs.h"
 
 #include <curses.h>
@@ -5669,7 +5683,7 @@
 WINDOW w; w.maxy = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:5673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   CURSES_MAXY=maxy
 else
@@ -5678,7 +5692,7 @@
 fi
 rm -f conftest*
 cat > conftest.$ac_ext <<EOF
-#line 5682 "configure"
+#line 5696 "configure"
 #include "confdefs.h"
 
 #include <curses.h>
@@ -5687,7 +5701,7 @@
 WINDOW w; w._maxy = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:5691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   CURSES_MAXY=_maxy
 else
@@ -5703,13 +5717,13 @@
 echo "$ac_t""$CURSES_MAXY" 1>&6
 
 echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
-echo "configure:5707: checking for initscr in -lncurses" >&5
+echo "configure:5721: checking for initscr in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5713 "configure"
+#line 5727 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5720,7 +5734,7 @@
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:5724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5739,13 +5753,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
-echo "configure:5743: checking for initscr in -lcurses" >&5
+echo "configure:5757: checking for initscr in -lcurses" >&5
 ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5749 "configure"
+#line 5763 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5756,7 +5770,7 @@
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:5760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5785,13 +5799,13 @@
 
 
 echo $ac_n "checking for keypad in -lncurses""... $ac_c" 1>&6
-echo "configure:5789: checking for keypad in -lncurses" >&5
+echo "configure:5803: checking for keypad in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'keypad | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5795 "configure"
+#line 5809 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5802,7 +5816,7 @@
 keypad()
 ; return 0; }
 EOF
-if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5824,13 +5838,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for keypad in -lcurses""... $ac_c" 1>&6
-echo "configure:5828: checking for keypad in -lcurses" >&5
+echo "configure:5842: checking for keypad in -lcurses" >&5
 ac_lib_var=`echo curses'_'keypad | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5834 "configure"
+#line 5848 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5841,7 +5855,7 @@
 keypad()
 ; return 0; }
 EOF
-if { (eval echo configure:5845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5871,13 +5885,13 @@
 fi # $USE_CURSES
 
 echo $ac_n "checking for gtty in -lcompat""... $ac_c" 1>&6
-echo "configure:5875: checking for gtty in -lcompat" >&5
+echo "configure:5889: checking for gtty in -lcompat" >&5
 ac_lib_var=`echo compat'_'gtty | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lcompat  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5881 "configure"
+#line 5895 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5888,7 +5902,7 @@
 gtty()
 ; return 0; }
 EOF
-if { (eval echo configure:5892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5907,13 +5921,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for gtty in -lbsd-compat""... $ac_c" 1>&6
-echo "configure:5911: checking for gtty in -lbsd-compat" >&5
+echo "configure:5925: checking for gtty in -lbsd-compat" >&5
 ac_lib_var=`echo bsd-compat'_'gtty | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lbsd-compat  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5917 "configure"
+#line 5931 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5924,7 +5938,7 @@
 gtty()
 ; return 0; }
 EOF
-if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5943,13 +5957,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for gtty in -lbsd""... $ac_c" 1>&6
-echo "configure:5947: checking for gtty in -lbsd" >&5
+echo "configure:5961: checking for gtty in -lbsd" >&5
 ac_lib_var=`echo bsd'_'gtty | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lbsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5953 "configure"
+#line 5967 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5960,7 +5974,7 @@
 gtty()
 ; return 0; }
 EOF
-if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5994,12 +6008,12 @@
 LIBS=""
 
 echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
-echo "configure:5998: checking for library containing cuserid" >&5
+echo "configure:6012: checking for library containing cuserid" >&5
 
 ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_cuserid="no"
 cat > conftest.$ac_ext <<EOF
-#line 6003 "configure"
+#line 6017 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6010,7 +6024,7 @@
 cuserid()
 ; return 0; }
 EOF
-if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_cuserid="none required"
 else
@@ -6021,7 +6035,7 @@
 test "$ac_cv_search_cuserid" = "no" && for i in compat; do
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6025 "configure"
+#line 6039 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6032,7 +6046,7 @@
 cuserid()
 ; return 0; }
 EOF
-if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_cuserid="-l$i"
 break
@@ -6058,10 +6072,10 @@
 # Note: -lxdr -liberty -lws2_32 is for MinGW
 
 echo $ac_n "checking for xdrmem_create""... $ac_c" 1>&6
-echo "configure:6062: checking for xdrmem_create" >&5
+echo "configure:6076: checking for xdrmem_create" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6065 "configure"
+#line 6079 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char xdrmem_create(); below.  */
@@ -6084,7 +6098,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_xdrmem_create=yes"
 else
@@ -6102,13 +6116,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for xdrmem_create in -lsun""... $ac_c" 1>&6
-echo "configure:6106: checking for xdrmem_create in -lsun" >&5
+echo "configure:6120: checking for xdrmem_create in -lsun" >&5
 ac_lib_var=`echo sun'_'xdrmem_create | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lsun  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6112 "configure"
+#line 6126 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6119,7 +6133,7 @@
 xdrmem_create()
 ; return 0; }
 EOF
-if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6138,13 +6152,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for xdrmem_create in -lnsl""... $ac_c" 1>&6
-echo "configure:6142: checking for xdrmem_create in -lnsl" >&5
+echo "configure:6156: checking for xdrmem_create in -lnsl" >&5
 ac_lib_var=`echo nsl'_'xdrmem_create | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6148 "configure"
+#line 6162 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6155,7 +6169,7 @@
 xdrmem_create()
 ; return 0; }
 EOF
-if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6174,13 +6188,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for xdrmem_create in -lrpclib""... $ac_c" 1>&6
-echo "configure:6178: checking for xdrmem_create in -lrpclib" >&5
+echo "configure:6192: checking for xdrmem_create in -lrpclib" >&5
 ac_lib_var=`echo rpclib'_'xdrmem_create | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lrpclib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6184 "configure"
+#line 6198 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6191,7 +6205,7 @@
 xdrmem_create()
 ; return 0; }
 EOF
-if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6210,13 +6224,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for xdrmem_create in -lxdr""... $ac_c" 1>&6
-echo "configure:6214: checking for xdrmem_create in -lxdr" >&5
+echo "configure:6228: checking for xdrmem_create in -lxdr" >&5
 ac_lib_var=`echo xdr'_'xdrmem_create | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lxdr -liberty -lws2_32  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6220 "configure"
+#line 6234 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6227,7 +6241,7 @@
 xdrmem_create()
 ; return 0; }
 EOF
-if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6261,10 +6275,10 @@
 for ac_func in asprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6265: checking for $ac_func" >&5
+echo "configure:6279: checking for $ac_func" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6268 "configure"
+#line 6282 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6287,7 +6301,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6314,10 +6328,10 @@
 
 # Test if mathlib needs -lm flag or is included with libc
 echo $ac_n "checking for atan""... $ac_c" 1>&6
-echo "configure:6318: checking for atan" >&5
+echo "configure:6332: checking for atan" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6321 "configure"
+#line 6335 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char atan(); below.  */
@@ -6340,7 +6354,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_atan=yes"
 else
@@ -6358,13 +6372,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
-echo "configure:6362: checking for atan in -lm" >&5
+echo "configure:6376: checking for atan in -lm" >&5
 ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6368 "configure"
+#line 6382 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6375,7 +6389,7 @@
 atan()
 ; return 0; }
 EOF
-if { (eval echo configure:6379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6402,10 +6416,10 @@
 
 
 echo $ac_n "checking for dlsym""... $ac_c" 1>&6
-echo "configure:6406: checking for dlsym" >&5
+echo "configure:6420: checking for dlsym" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6409 "configure"
+#line 6423 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlsym(); below.  */
@@ -6428,7 +6442,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dlsym=yes"
 else
@@ -6446,13 +6460,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
-echo "configure:6450: checking for dlsym in -ldl" >&5
+echo "configure:6464: checking for dlsym in -ldl" >&5
 ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6456 "configure"
+#line 6470 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6463,7 +6477,7 @@
 dlsym()
 ; return 0; }
 EOF
-if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6490,10 +6504,10 @@
 
 
 echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:6494: checking for iconv" >&5
+echo "configure:6508: checking for iconv" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6497 "configure"
+#line 6511 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char iconv(); below.  */
@@ -6516,7 +6530,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_iconv=yes"
 else
@@ -6534,13 +6548,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
-echo "configure:6538: checking for iconv in -liconv" >&5
+echo "configure:6552: checking for iconv in -liconv" >&5
 ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-liconv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6544 "configure"
+#line 6558 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6551,7 +6565,7 @@
 iconv()
 ; return 0; }
 EOF
-if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6570,13 +6584,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
-echo "configure:6574: checking for iconv in -lgiconv" >&5
+echo "configure:6588: checking for iconv in -lgiconv" >&5
 ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lgiconv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6580 "configure"
+#line 6594 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6587,7 +6601,7 @@
 iconv()
 ; return 0; }
 EOF
-if { (eval echo configure:6591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6606,10 +6620,10 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for libiconv""... $ac_c" 1>&6
-echo "configure:6610: checking for libiconv" >&5
+echo "configure:6624: checking for libiconv" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6613 "configure"
+#line 6627 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char libiconv(); below.  */
@@ -6632,7 +6646,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_libiconv=yes"
 else
@@ -6650,13 +6664,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
-echo "configure:6654: checking for libiconv in -liconv" >&5
+echo "configure:6668: checking for libiconv in -liconv" >&5
 ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-liconv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6660 "configure"
+#line 6674 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6667,7 +6681,7 @@
 libiconv()
 ; return 0; }
 EOF
-if { (eval echo configure:6671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6686,13 +6700,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
-echo "configure:6690: checking for libiconv in -lgiconv" >&5
+echo "configure:6704: checking for libiconv in -lgiconv" >&5
 ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lgiconv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6696 "configure"
+#line 6710 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6703,7 +6717,7 @@
 libiconv()
 ; return 0; }
 EOF
-if { (eval echo configure:6707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6740,10 +6754,10 @@
 
 have_socket=1
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:6744: checking for socket" >&5
+echo "configure:6758: checking for socket" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6747 "configure"
+#line 6761 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -6766,7 +6780,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -6784,13 +6798,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:6788: checking for socket in -lsocket" >&5
+echo "configure:6802: checking for socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6794 "configure"
+#line 6808 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6801,7 +6815,7 @@
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:6805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6849,7 +6863,7 @@
 
 
 echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
-echo "configure:6853: checking for location of zlib includes" >&5
+echo "configure:6867: checking for location of zlib includes" >&5
 case "$with_zlib_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
@@ -6875,15 +6889,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6879: checking for $ac_hdr" >&5
+echo "configure:6893: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 6882 "configure"
+#line 6896 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6917,7 +6931,7 @@
 
 
 echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
-echo "configure:6921: checking for location of zlib library" >&5
+echo "configure:6935: checking for location of zlib library" >&5
 case "$with_zlib_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
@@ -6942,13 +6956,13 @@
 
 
 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
-echo "configure:6946: checking for deflate in -lz" >&5
+echo "configure:6960: checking for deflate in -lz" >&5
 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lz  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6952 "configure"
+#line 6966 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6959,7 +6973,7 @@
 deflate()
 ; return 0; }
 EOF
-if { (eval echo configure:6963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7007,7 +7021,7 @@
 
 
 echo $ac_n "checking for location of External PROJ.4 includes""... $ac_c" 1>&6
-echo "configure:7011: checking for location of External PROJ.4 includes" >&5
+echo "configure:7025: checking for location of External PROJ.4 includes" >&5
 case "$with_proj_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
@@ -7033,15 +7047,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7037: checking for $ac_hdr" >&5
+echo "configure:7051: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7040 "configure"
+#line 7054 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7078,7 +7092,7 @@
 else
     
 echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
-echo "configure:7082: checking External PROJ.4 version" >&5
+echo "configure:7096: checking External PROJ.4 version" >&5
 ac_save_cppflags="$CPPFLAGS"
 CPPFLAGS="$PROJINC $CPPFLAGS"
 if test "$cross_compiling" = yes; then
@@ -7086,7 +7100,7 @@
         echo "$ac_t""unknown (cross-compiling)" 1>&6 
 else
   cat > conftest.$ac_ext <<EOF
-#line 7090 "configure"
+#line 7104 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -7098,7 +7112,7 @@
 }
     
 EOF
-if { (eval echo configure:7102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
      proj_ver=`cat conftestdata`
         echo "$ac_t""$proj_ver" 1>&6
@@ -7123,7 +7137,7 @@
 
 
 echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
-echo "configure:7127: checking for location of External PROJ.4 library" >&5
+echo "configure:7141: checking for location of External PROJ.4 library" >&5
 case "$with_proj_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
@@ -7148,13 +7162,13 @@
 
 
 echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
-echo "configure:7152: checking for pj_get_def in -lproj" >&5
+echo "configure:7166: checking for pj_get_def in -lproj" >&5
 ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lproj  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7158 "configure"
+#line 7172 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7165,7 +7179,7 @@
 pj_get_def()
 ; return 0; }
 EOF
-if { (eval echo configure:7169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7199,7 +7213,7 @@
 
 
 echo $ac_n "checking for location of External PROJ.4 data files""... $ac_c" 1>&6
-echo "configure:7203: checking for location of External PROJ.4 data files" >&5
+echo "configure:7217: checking for location of External PROJ.4 data files" >&5
 case "$with_proj_share" in
 y | ye | yes | n | no)
         { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
@@ -7223,14 +7237,14 @@
 # LOC_CHECK_SHARE does not work when cross compiling
 if test "$cross_compiling" = "yes" ; then
     echo $ac_n "checking for epsg""... $ac_c" 1>&6
-echo "configure:7227: checking for epsg" >&5
+echo "configure:7241: checking for epsg" >&5
     echo "$ac_t""unknown (cross-compiling)" 1>&6
 else
     
 
 ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
-echo "configure:7234: checking for $PROJSHARE/epsg" >&5
+echo "configure:7248: checking for $PROJSHARE/epsg" >&5
 
 if test "$cross_compiling" = yes; then
     { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
@@ -7262,7 +7276,7 @@
 # Extract the first word of "nad2bin", so it can be a program name with args.
 set dummy nad2bin; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7266: checking for $ac_word" >&5
+echo "configure:7280: checking for $ac_word" >&5
 
 case "$NAD2BIN" in
   /*)
@@ -7302,7 +7316,7 @@
 
 
 echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
-echo "configure:7306: checking whether to use regex" >&5
+echo "configure:7320: checking whether to use regex" >&5
 echo "$ac_t"""$with_regex"" 1>&6
 case "$with_regex" in
 	"no")	USE_REGEX=	;;
@@ -7322,7 +7336,7 @@
 
 
 echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
-echo "configure:7326: checking for location of regex includes" >&5
+echo "configure:7340: checking for location of regex includes" >&5
 case "$with_regex_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
@@ -7348,15 +7362,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7352: checking for $ac_hdr" >&5
+echo "configure:7366: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7355 "configure"
+#line 7369 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7390,7 +7404,7 @@
 
 
 echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
-echo "configure:7394: checking for location of regex library" >&5
+echo "configure:7408: checking for location of regex library" >&5
 case "$with_regex_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
@@ -7415,10 +7429,10 @@
 LIBS="  $LIBS"
 LDFLAGS=" $LDFLAGS"
 echo $ac_n "checking for regcomp""... $ac_c" 1>&6
-echo "configure:7419: checking for regcomp" >&5
+echo "configure:7433: checking for regcomp" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7422 "configure"
+#line 7436 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char regcomp(); below.  */
@@ -7441,7 +7455,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_regcomp=yes"
 else
@@ -7468,13 +7482,13 @@
 
 
 echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
-echo "configure:7472: checking for regcomp in -lregex" >&5
+echo "configure:7486: checking for regcomp in -lregex" >&5
 ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lregex  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7478 "configure"
+#line 7492 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7485,7 +7499,7 @@
 regcomp()
 ; return 0; }
 EOF
-if { (eval echo configure:7489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7535,7 +7549,7 @@
 
 
 echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
-echo "configure:7539: checking whether to use Readline" >&5
+echo "configure:7553: checking whether to use Readline" >&5
 echo "$ac_t"""$with_readline"" 1>&6
 case "$with_readline" in
 	"no")	USE_READLINE=	;;
@@ -7556,7 +7570,7 @@
 
 
 echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
-echo "configure:7560: checking for location of Readline includes" >&5
+echo "configure:7574: checking for location of Readline includes" >&5
 case "$with_readline_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
@@ -7582,15 +7596,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7586: checking for $ac_hdr" >&5
+echo "configure:7600: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7589 "configure"
+#line 7603 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7626,15 +7640,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7630: checking for $ac_hdr" >&5
+echo "configure:7644: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7633 "configure"
+#line 7647 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7668,7 +7682,7 @@
 
 
 echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
-echo "configure:7672: checking for location of Readline library" >&5
+echo "configure:7686: checking for location of Readline library" >&5
 case "$with_readline_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
@@ -7693,13 +7707,13 @@
 
 
 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:7697: checking for readline in -lreadline" >&5
+echo "configure:7711: checking for readline in -lreadline" >&5
 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lreadline  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7703 "configure"
+#line 7717 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7710,7 +7724,7 @@
 readline()
 ; return 0; }
 EOF
-if { (eval echo configure:7714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7745,13 +7759,13 @@
 
 
 echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
-echo "configure:7749: checking for add_history in -lhistory" >&5
+echo "configure:7763: checking for add_history in -lhistory" >&5
 ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lhistory  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7755 "configure"
+#line 7769 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7762,7 +7776,7 @@
 add_history()
 ; return 0; }
 EOF
-if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7805,7 +7819,7 @@
 
 
 echo $ac_n "checking whether to use JPEG""... $ac_c" 1>&6
-echo "configure:7809: checking whether to use JPEG" >&5
+echo "configure:7823: checking whether to use JPEG" >&5
 echo "$ac_t"""$with_jpeg"" 1>&6
 case "$with_jpeg" in
 	"no")	USE_JPEG=	;;
@@ -7825,7 +7839,7 @@
 
 
 echo $ac_n "checking for location of JPEG includes""... $ac_c" 1>&6
-echo "configure:7829: checking for location of JPEG includes" >&5
+echo "configure:7843: checking for location of JPEG includes" >&5
 case "$with_jpeg_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-jpeg-includes." 1>&2; exit 1; }
@@ -7851,15 +7865,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7855: checking for $ac_hdr" >&5
+echo "configure:7869: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 7858 "configure"
+#line 7872 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7893,7 +7907,7 @@
 
 
 echo $ac_n "checking for location of JPEG library""... $ac_c" 1>&6
-echo "configure:7897: checking for location of JPEG library" >&5
+echo "configure:7911: checking for location of JPEG library" >&5
 case "$with_jpeg_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-jpeg-libs." 1>&2; exit 1; }
@@ -7920,13 +7934,13 @@
 
 
 echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
-echo "configure:7924: checking for jpeg_start_compress in -ljpeg" >&5
+echo "configure:7938: checking for jpeg_start_compress in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ljpeg  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7930 "configure"
+#line 7944 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7937,7 +7951,7 @@
 jpeg_start_compress()
 ; return 0; }
 EOF
-if { (eval echo configure:7941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7956,13 +7970,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
-echo "configure:7960: checking for jpeg_start_compress in -ljpeg" >&5
+echo "configure:7974: checking for jpeg_start_compress in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ljpeg $ZLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7966 "configure"
+#line 7980 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7973,7 +7987,7 @@
 jpeg_start_compress()
 ; return 0; }
 EOF
-if { (eval echo configure:7977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8022,7 +8036,7 @@
 # GDAL option
 
 echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
-echo "configure:8026: checking whether to use GDAL" >&5
+echo "configure:8040: checking whether to use GDAL" >&5
 
 GDAL_LIBS=
 GDAL_CFLAGS=
@@ -8040,7 +8054,7 @@
   # Extract the first word of "gdal-config", so it can be a program name with args.
 set dummy gdal-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8044: checking for $ac_word" >&5
+echo "configure:8058: checking for $ac_word" >&5
 
 case "$GDAL_CONFIG" in
   /*)
@@ -8095,14 +8109,14 @@
   LIBS="$LIBS $GDAL_LIBS"
   CFLAGS="$CFLAGS $GDAL_CFLAGS"
   cat > conftest.$ac_ext <<EOF
-#line 8099 "configure"
+#line 8113 "configure"
 #include "confdefs.h"
 #include <gdal.h>
 int main() {
 GDALOpen("foo", GA_ReadOnly);
 ; return 0; }
 EOF
-if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -8111,14 +8125,14 @@
   
   LIBS="$LIBS $GDAL_DEP_LIBS"
   cat > conftest.$ac_ext <<EOF
-#line 8115 "configure"
+#line 8129 "configure"
 #include "confdefs.h"
 #include <gdal.h>
 int main() {
 GDALOpen("foo", GA_ReadOnly);
 ; return 0; }
 EOF
-if { (eval echo configure:8122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
 else
@@ -8147,11 +8161,179 @@
 
 
 
+# GEOS option
+
+echo $ac_n "checking whether to use GEOS""... $ac_c" 1>&6
+echo "configure:8168: checking whether to use GEOS" >&5
+
+GEOS_LIBS=
+GGEOS_CFLAGS=
+USE_GEOS=
+
+# FIXME: "quote" $with_geos ?
+if test "`basename xx/$with_geos`" = "geos-config" ; then
+  GEOS_CONFIG="$with_geos"
+fi
+
+if test "$with_geos" = "no" ; then
+  echo "$ac_t""no" 1>&6
+else
+  echo "$ac_t""yes" 1>&6
+  # Extract the first word of "geos-config", so it can be a program name with args.
+set dummy geos-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:8186: checking for $ac_word" >&5
+
+case "$GEOS_CONFIG" in
+  /*)
+  ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_GEOS_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
+  ;;
+esac
+GEOS_CONFIG="$ac_cv_path_GEOS_CONFIG"
+if test -n "$GEOS_CONFIG"; then
+  echo "$ac_t""$GEOS_CONFIG" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  if test "$GEOS_CONFIG" = "no" ; then
+    { echo "configure: error: *** couldn't find geos-config" 1>&2; exit 1; }
+  fi
+  
+  if test "$GEOS_CONFIG" != "" ; then
+    GEOS_LIBS=`"$GEOS_CONFIG" --libs`
+    GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
+    USE_GEOS=1
+  fi
+  
+  
+ac_save_cppflags="$CPPFLAGS"
+CPPFLAGS="$GEOS_CFLAGS $CPPFLAGS"
+for ac_hdr in geos_c.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:8234: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8237 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: *** Unable to locate GEOS includes." 1>&2; exit 1; }
+
+fi
+done
+
+CPPFLAGS=$ac_save_cppflags
+
+  
+ac_save_ldflags="$LDFLAGS"
+LDFLAGS="$GEOS_LIBS $LDFLAGS"
+
+
+echo $ac_n "checking for initGEOS in -lgeos_c""... $ac_c" 1>&6
+echo "configure:8277: checking for initGEOS in -lgeos_c" >&5
+ac_lib_var=`echo geos_c'_'initGEOS | sed 'y%./+-%__p_%'`
+
+ac_save_LIBS="$LIBS"
+LIBS="-lgeos_c  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 8283 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char initGEOS();
+
+int main() {
+initGEOS()
+; return 0; }
+EOF
+if { (eval echo configure:8294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  GEOS_LIBS="$GEOS_LIBS -lgeos_c "
+else
+  echo "$ac_t""no" 1>&6
+
+LDFLAGS=${ac_save_ldflags}
+
+    { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
+
+
+fi
+
+
+
+LDFLAGS=${ac_save_ldflags}
+
+  cat >> confdefs.h <<\EOF
+#define HAVE_GEOS 1
+EOF
+
+fi
+
+
+
+
+
 # Enable TIFF option
 
 
 echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
-echo "configure:8155: checking whether to use TIFF" >&5
+echo "configure:8337: checking whether to use TIFF" >&5
 echo "$ac_t"""$with_tiff"" 1>&6
 case "$with_tiff" in
 	"no")	USE_TIFF=	;;
@@ -8171,7 +8353,7 @@
 
 
 echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
-echo "configure:8175: checking for location of TIFF includes" >&5
+echo "configure:8357: checking for location of TIFF includes" >&5
 case "$with_tiff_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
@@ -8197,15 +8379,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8201: checking for $ac_hdr" >&5
+echo "configure:8383: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 8204 "configure"
+#line 8386 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8239,7 +8421,7 @@
 
 
 echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
-echo "configure:8243: checking for location of TIFF library" >&5
+echo "configure:8425: checking for location of TIFF library" >&5
 case "$with_tiff_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
@@ -8270,13 +8452,13 @@
 
 
 echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:8274: checking for TIFFOpen in -ltiff" >&5
+echo "configure:8456: checking for TIFFOpen in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltiff  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8280 "configure"
+#line 8462 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8287,7 +8469,7 @@
 TIFFOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:8291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8306,13 +8488,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:8310: checking for TIFFOpen in -ltiff" >&5
+echo "configure:8492: checking for TIFFOpen in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltiff $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8316 "configure"
+#line 8498 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8323,7 +8505,7 @@
 TIFFOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:8327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8342,13 +8524,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:8346: checking for TIFFOpen in -ltiff" >&5
+echo "configure:8528: checking for TIFFOpen in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltiff $ZLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8352 "configure"
+#line 8534 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8359,7 +8541,7 @@
 TIFFOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:8363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8378,13 +8560,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:8382: checking for TIFFOpen in -ltiff" >&5
+echo "configure:8564: checking for TIFFOpen in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8388 "configure"
+#line 8570 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8395,7 +8577,7 @@
 TIFFOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:8399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8414,13 +8596,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:8418: checking for TIFFOpen in -ltiff" >&5
+echo "configure:8600: checking for TIFFOpen in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8424 "configure"
+#line 8606 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8431,7 +8613,7 @@
 TIFFOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:8435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8450,13 +8632,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:8454: checking for TIFFOpen in -ltiff" >&5
+echo "configure:8636: checking for TIFFOpen in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8460 "configure"
+#line 8642 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8467,7 +8649,7 @@
 TIFFOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8486,13 +8668,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:8490: checking for TIFFOpen in -ltiff" >&5
+echo "configure:8672: checking for TIFFOpen in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8496 "configure"
+#line 8678 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8503,7 +8685,7 @@
 TIFFOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:8507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8522,13 +8704,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
-echo "configure:8526: checking for TIFFOpen in -ltiff" >&5
+echo "configure:8708: checking for TIFFOpen in -ltiff" >&5
 ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8532 "configure"
+#line 8714 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8539,7 +8721,7 @@
 TIFFOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:8543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8637,7 +8819,7 @@
 
 
 echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
-echo "configure:8641: checking whether to use PNG" >&5
+echo "configure:8823: checking whether to use PNG" >&5
 echo "$ac_t"""$with_png"" 1>&6
 case "$with_png" in
 	"no")	USE_PNG=	;;
@@ -8656,7 +8838,7 @@
 
 
 echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
-echo "configure:8660: checking for location of PNG includes" >&5
+echo "configure:8842: checking for location of PNG includes" >&5
 case "$with_png_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
@@ -8682,15 +8864,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8686: checking for $ac_hdr" >&5
+echo "configure:8868: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 8689 "configure"
+#line 8871 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8724,7 +8906,7 @@
 
 
 echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
-echo "configure:8728: checking for location of PNG library" >&5
+echo "configure:8910: checking for location of PNG library" >&5
 case "$with_png_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
@@ -8749,13 +8931,13 @@
 
 
 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
-echo "configure:8753: checking for png_read_image in -lpng" >&5
+echo "configure:8935: checking for png_read_image in -lpng" >&5
 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lpng $ZLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8759 "configure"
+#line 8941 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8766,7 +8948,7 @@
 png_read_image()
 ; return 0; }
 EOF
-if { (eval echo configure:8770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8808,7 +8990,7 @@
 
 
 echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
-echo "configure:8812: checking whether to use PostgreSQL" >&5
+echo "configure:8994: checking whether to use PostgreSQL" >&5
 echo "$ac_t"""$with_postgres"" 1>&6
 case "$with_postgres" in
 	"no")	USE_POSTGRES=	;;
@@ -8835,7 +9017,7 @@
 
 
 echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
-echo "configure:8839: checking for location of PostgreSQL includes" >&5
+echo "configure:9021: checking for location of PostgreSQL includes" >&5
 case "$with_postgres_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
@@ -8861,15 +9043,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8865: checking for $ac_hdr" >&5
+echo "configure:9047: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 8868 "configure"
+#line 9050 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8907,7 +9089,7 @@
 
 
 echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
-echo "configure:8911: checking for location of PostgreSQL library" >&5
+echo "configure:9093: checking for location of PostgreSQL library" >&5
 case "$with_postgres_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
@@ -8936,13 +9118,13 @@
 
 
 echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
-echo "configure:8940: checking for PQsetdbLogin in -lpq" >&5
+echo "configure:9122: checking for PQsetdbLogin in -lpq" >&5
 ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8946 "configure"
+#line 9128 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8953,7 +9135,7 @@
 PQsetdbLogin()
 ; return 0; }
 EOF
-if { (eval echo configure:8957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8972,13 +9154,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
-echo "configure:8976: checking for PQsetdbLogin in -lpq" >&5
+echo "configure:9158: checking for PQsetdbLogin in -lpq" >&5
 ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lpq -lssl -lcrypto $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8982 "configure"
+#line 9164 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8989,7 +9171,7 @@
 PQsetdbLogin()
 ; return 0; }
 EOF
-if { (eval echo configure:8993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9008,13 +9190,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
-echo "configure:9012: checking for PQsetdbLogin in -lpq" >&5
+echo "configure:9194: checking for PQsetdbLogin in -lpq" >&5
 ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lpq -lcrypt $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9018 "configure"
+#line 9200 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9025,7 +9207,7 @@
 PQsetdbLogin()
 ; return 0; }
 EOF
-if { (eval echo configure:9029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9044,13 +9226,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
-echo "configure:9048: checking for PQsetdbLogin in -lpq" >&5
+echo "configure:9230: checking for PQsetdbLogin in -lpq" >&5
 ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9054 "configure"
+#line 9236 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9061,7 +9243,7 @@
 PQsetdbLogin()
 ; return 0; }
 EOF
-if { (eval echo configure:9065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9118,13 +9300,13 @@
 ac_save_ldflags="$LDFLAGS"
 LDFLAGS="$LDFLAGS $PQLIBPATH"
 echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
-echo "configure:9122: checking for PQcmdTuples in -lpq" >&5
+echo "configure:9304: checking for PQcmdTuples in -lpq" >&5
 ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9128 "configure"
+#line 9310 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9135,7 +9317,7 @@
 PQcmdTuples()
 ; return 0; }
 EOF
-if { (eval echo configure:9139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9157,13 +9339,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
-echo "configure:9161: checking for PQcmdTuples in -lpq" >&5
+echo "configure:9343: checking for PQcmdTuples in -lpq" >&5
 ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lpq -lcrypt $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9167 "configure"
+#line 9349 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9174,7 +9356,7 @@
 PQcmdTuples()
 ; return 0; }
 EOF
-if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9217,7 +9399,7 @@
 
 
 echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
-echo "configure:9221: checking whether to use MySQL" >&5
+echo "configure:9403: checking whether to use MySQL" >&5
 echo "$ac_t"""$with_mysql"" 1>&6
 case "$with_mysql" in
 	"no")	USE_MYSQL=	;;
@@ -9237,7 +9419,7 @@
 
 
 echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
-echo "configure:9241: checking for location of MySQL includes" >&5
+echo "configure:9423: checking for location of MySQL includes" >&5
 case "$with_mysql_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
@@ -9263,15 +9445,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9267: checking for $ac_hdr" >&5
+echo "configure:9449: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9270 "configure"
+#line 9452 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9308,7 +9490,7 @@
 
   
 echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
-echo "configure:9312: checking for location of MySQL library" >&5
+echo "configure:9494: checking for location of MySQL library" >&5
 case "$with_mysql_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
@@ -9339,13 +9521,13 @@
 
 
 echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:9343: checking for mysql_query in -lmysqlclient" >&5
+echo "configure:9525: checking for mysql_query in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9349 "configure"
+#line 9531 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9356,7 +9538,7 @@
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9375,13 +9557,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:9379: checking for mysql_query in -lmysqlclient" >&5
+echo "configure:9561: checking for mysql_query in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9385 "configure"
+#line 9567 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9392,7 +9574,7 @@
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:9396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9411,13 +9593,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:9415: checking for mysql_query in -lmysqlclient" >&5
+echo "configure:9597: checking for mysql_query in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient $SOCKLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9421 "configure"
+#line 9603 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9428,7 +9610,7 @@
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:9432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9447,13 +9629,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:9451: checking for mysql_query in -lmysqlclient" >&5
+echo "configure:9633: checking for mysql_query in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9457 "configure"
+#line 9639 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9464,7 +9646,7 @@
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:9468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9483,13 +9665,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:9487: checking for mysql_query in -lmysqlclient" >&5
+echo "configure:9669: checking for mysql_query in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient $ZLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9493 "configure"
+#line 9675 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9500,7 +9682,7 @@
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:9504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9519,13 +9701,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:9523: checking for mysql_query in -lmysqlclient" >&5
+echo "configure:9705: checking for mysql_query in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9529 "configure"
+#line 9711 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9536,7 +9718,7 @@
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:9540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9555,13 +9737,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:9559: checking for mysql_query in -lmysqlclient" >&5
+echo "configure:9741: checking for mysql_query in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9565 "configure"
+#line 9747 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9572,7 +9754,7 @@
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:9576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9591,13 +9773,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:9595: checking for mysql_query in -lmysqlclient" >&5
+echo "configure:9777: checking for mysql_query in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9601 "configure"
+#line 9783 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9608,7 +9790,7 @@
 mysql_query()
 ; return 0; }
 EOF
-if { (eval echo configure:9612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9698,7 +9880,7 @@
   # Extract the first word of "mysql_config", so it can be a program name with args.
 set dummy mysql_config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:9702: checking for $ac_word" >&5
+echo "configure:9884: checking for $ac_word" >&5
 
 case "$MYSQLD_CONFIG" in
   /*)
@@ -9739,10 +9921,10 @@
 
     LIBS="$MYSQLDLIB $LIBS"
     echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
-echo "configure:9743: checking for mysql_server_init" >&5
+echo "configure:9925: checking for mysql_server_init" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9746 "configure"
+#line 9928 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char mysql_server_init(); below.  */
@@ -9765,7 +9947,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_mysql_server_init=yes"
 else
@@ -9803,7 +9985,7 @@
 
 
 echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
-echo "configure:9807: checking whether to use SQLite" >&5
+echo "configure:9989: checking whether to use SQLite" >&5
 echo "$ac_t"""$with_sqlite"" 1>&6
 case "$with_sqlite" in
 	"no")	USE_SQLITE=	;;
@@ -9823,7 +10005,7 @@
 
 
 echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
-echo "configure:9827: checking for location of SQLite includes" >&5
+echo "configure:10009: checking for location of SQLite includes" >&5
 case "$with_sqlite_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
@@ -9849,15 +10031,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9853: checking for $ac_hdr" >&5
+echo "configure:10035: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 9856 "configure"
+#line 10038 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9900,7 +10082,7 @@
 
 
 echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
-echo "configure:9904: checking for location of SQLite library" >&5
+echo "configure:10086: checking for location of SQLite library" >&5
 case "$with_sqlite_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
@@ -9927,13 +10109,13 @@
 
 
 echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
-echo "configure:9931: checking for sqlite3_open in -lsqlite3" >&5
+echo "configure:10113: checking for sqlite3_open in -lsqlite3" >&5
 ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lsqlite3  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9937 "configure"
+#line 10119 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9944,7 +10126,7 @@
 sqlite3_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9963,13 +10145,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
-echo "configure:9967: checking for sqlite3_open in -lsqlite3" >&5
+echo "configure:10149: checking for sqlite3_open in -lsqlite3" >&5
 ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lsqlite3 $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9973 "configure"
+#line 10155 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9980,7 +10162,7 @@
 sqlite3_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10033,7 +10215,7 @@
 
 
 echo $ac_n "checking whether to use FFMPEG""... $ac_c" 1>&6
-echo "configure:10037: checking whether to use FFMPEG" >&5
+echo "configure:10219: checking whether to use FFMPEG" >&5
 echo "$ac_t"""$with_ffmpeg"" 1>&6
 case "$with_ffmpeg" in
 	"no")	USE_FFMPEG=	;;
@@ -10053,7 +10235,7 @@
 
 
 echo $ac_n "checking for location of FFMPEG includes""... $ac_c" 1>&6
-echo "configure:10057: checking for location of FFMPEG includes" >&5
+echo "configure:10239: checking for location of FFMPEG includes" >&5
 case "$with_ffmpeg_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-ffmpeg-includes." 1>&2; exit 1; }
@@ -10079,15 +10261,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10083: checking for $ac_hdr" >&5
+echo "configure:10265: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10086 "configure"
+#line 10268 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10123,15 +10305,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10127: checking for $ac_hdr" >&5
+echo "configure:10309: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10130 "configure"
+#line 10312 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10167,15 +10349,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10171: checking for $ac_hdr" >&5
+echo "configure:10353: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10174 "configure"
+#line 10356 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10218,7 +10400,7 @@
 
 
 echo $ac_n "checking for location of FFMPEG library""... $ac_c" 1>&6
-echo "configure:10222: checking for location of FFMPEG library" >&5
+echo "configure:10404: checking for location of FFMPEG library" >&5
 case "$with_ffmpeg_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-ffmpeg-libs." 1>&2; exit 1; }
@@ -10245,13 +10427,13 @@
 
 
 echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
-echo "configure:10249: checking for av_free in -lavutil" >&5
+echo "configure:10431: checking for av_free in -lavutil" >&5
 ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lavutil  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10255 "configure"
+#line 10437 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10262,7 +10444,7 @@
 av_free()
 ; return 0; }
 EOF
-if { (eval echo configure:10266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10281,13 +10463,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
-echo "configure:10285: checking for av_free in -lavutil" >&5
+echo "configure:10467: checking for av_free in -lavutil" >&5
 ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lavutil $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10291 "configure"
+#line 10473 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10298,7 +10480,7 @@
 av_free()
 ; return 0; }
 EOF
-if { (eval echo configure:10302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10343,13 +10525,13 @@
 
 
 echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
-echo "configure:10347: checking for avcodec_init in -lavcodec" >&5
+echo "configure:10529: checking for avcodec_init in -lavcodec" >&5
 ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lavcodec $FFMPEGLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10353 "configure"
+#line 10535 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10360,7 +10542,7 @@
 avcodec_init()
 ; return 0; }
 EOF
-if { (eval echo configure:10364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10379,13 +10561,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
-echo "configure:10383: checking for avcodec_init in -lavcodec" >&5
+echo "configure:10565: checking for avcodec_init in -lavcodec" >&5
 ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lavcodec $FFMPEGLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10389 "configure"
+#line 10571 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10396,7 +10578,7 @@
 avcodec_init()
 ; return 0; }
 EOF
-if { (eval echo configure:10400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10441,13 +10623,13 @@
 
 
 echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
-echo "configure:10445: checking for av_set_parameters in -lavformat" >&5
+echo "configure:10627: checking for av_set_parameters in -lavformat" >&5
 ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lavformat $FFMPEGLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10451 "configure"
+#line 10633 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10458,7 +10640,7 @@
 av_set_parameters()
 ; return 0; }
 EOF
-if { (eval echo configure:10462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10477,13 +10659,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
-echo "configure:10481: checking for av_set_parameters in -lavformat" >&5
+echo "configure:10663: checking for av_set_parameters in -lavformat" >&5
 ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lavformat $FFMPEGLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10487 "configure"
+#line 10669 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10494,7 +10676,7 @@
 av_set_parameters()
 ; return 0; }
 EOF
-if { (eval echo configure:10498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10553,7 +10735,7 @@
 OPENGL_WINDOWS=
 
 echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
-echo "configure:10557: checking whether to use OpenGL" >&5
+echo "configure:10739: checking whether to use OpenGL" >&5
 echo "$ac_t"""$with_opengl"" 1>&6
 case "$with_opengl" in
 	n|no)
@@ -10587,7 +10769,7 @@
 
 
 echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
-echo "configure:10591: checking for location of OpenGL includes" >&5
+echo "configure:10773: checking for location of OpenGL includes" >&5
 case "$with_opengl_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
@@ -10613,15 +10795,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10617: checking for $ac_hdr" >&5
+echo "configure:10799: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10620 "configure"
+#line 10802 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -10655,7 +10837,7 @@
 
 
 echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
-echo "configure:10659: checking for location of OpenGL library" >&5
+echo "configure:10841: checking for location of OpenGL library" >&5
 case "$with_opengl_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
@@ -10684,13 +10866,13 @@
 
 
 echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
-echo "configure:10688: checking for glBegin in -lGL" >&5
+echo "configure:10870: checking for glBegin in -lGL" >&5
 ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10694 "configure"
+#line 10876 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10701,7 +10883,7 @@
 glBegin()
 ; return 0; }
 EOF
-if { (eval echo configure:10705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10720,13 +10902,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
-echo "configure:10724: checking for glBegin in -lGL" >&5
+echo "configure:10906: checking for glBegin in -lGL" >&5
 ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10730 "configure"
+#line 10912 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10737,7 +10919,7 @@
 glBegin()
 ; return 0; }
 EOF
-if { (eval echo configure:10741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10756,13 +10938,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
-echo "configure:10760: checking for glBegin in -lGL" >&5
+echo "configure:10942: checking for glBegin in -lGL" >&5
 ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10766 "configure"
+#line 10948 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10773,7 +10955,7 @@
 glBegin()
 ; return 0; }
 EOF
-if { (eval echo configure:10777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10792,13 +10974,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
-echo "configure:10796: checking for glBegin in -lGL" >&5
+echo "configure:10978: checking for glBegin in -lGL" >&5
 ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10802 "configure"
+#line 10984 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10809,7 +10991,7 @@
 glBegin()
 ; return 0; }
 EOF
-if { (eval echo configure:10813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10871,13 +11053,13 @@
 
 
 echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
-echo "configure:10875: checking for gluBeginCurve in -lGLU" >&5
+echo "configure:11057: checking for gluBeginCurve in -lGLU" >&5
 ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10881 "configure"
+#line 11063 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10888,7 +11070,7 @@
 gluBeginCurve()
 ; return 0; }
 EOF
-if { (eval echo configure:10892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10907,13 +11089,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
-echo "configure:10911: checking for gluBeginCurve in -lGLU" >&5
+echo "configure:11093: checking for gluBeginCurve in -lGLU" >&5
 ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 10917 "configure"
+#line 11099 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -10924,7 +11106,7 @@
 gluBeginCurve()
 ; return 0; }
 EOF
-if { (eval echo configure:10928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -10968,10 +11150,10 @@
 ac_save_ldflags="$LDFLAGS"
 LDFLAGS="$LDFLAGS $OPENGLLIB"
 echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
-echo "configure:10972: checking for glXCreatePbuffer" >&5
+echo "configure:11154: checking for glXCreatePbuffer" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 10975 "configure"
+#line 11157 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char glXCreatePbuffer(); below.  */
@@ -10994,7 +11176,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:10998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_glXCreatePbuffer=yes"
 else
@@ -11016,10 +11198,10 @@
 fi
 
 echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
-echo "configure:11020: checking for glXCreateGLXPixmap" >&5
+echo "configure:11202: checking for glXCreateGLXPixmap" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11023 "configure"
+#line 11205 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char glXCreateGLXPixmap(); below.  */
@@ -11042,7 +11224,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_glXCreateGLXPixmap=yes"
 else
@@ -11081,7 +11263,7 @@
 
 
 echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
-echo "configure:11085: checking for location of OpenGL includes" >&5
+echo "configure:11267: checking for location of OpenGL includes" >&5
 case "$with_opengl_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
@@ -11107,15 +11289,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11111: checking for $ac_hdr" >&5
+echo "configure:11293: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11114 "configure"
+#line 11296 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11150,10 +11332,10 @@
 ac_save_ldflags="$LDFLAGS"
 LDFLAGS="$with_opengl_libs $LDFLAGS"
 echo $ac_n "checking for glBegin""... $ac_c" 1>&6
-echo "configure:11154: checking for glBegin" >&5
+echo "configure:11336: checking for glBegin" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11157 "configure"
+#line 11339 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char glBegin(); below.  */
@@ -11176,7 +11358,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_glBegin=yes"
 else
@@ -11191,10 +11373,10 @@
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
-echo "configure:11195: checking for gluBeginCurve" >&5
+echo "configure:11377: checking for gluBeginCurve" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11198 "configure"
+#line 11380 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gluBeginCurve(); below.  */
@@ -11217,7 +11399,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:11221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gluBeginCurve=yes"
 else
@@ -11261,7 +11443,7 @@
 
 
 echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
-echo "configure:11265: checking for location of OpenGL includes" >&5
+echo "configure:11447: checking for location of OpenGL includes" >&5
 case "$with_opengl_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
@@ -11287,15 +11469,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11291: checking for $ac_hdr" >&5
+echo "configure:11473: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11294 "configure"
+#line 11476 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11329,7 +11511,7 @@
 
 
 echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
-echo "configure:11333: checking for location of OpenGL library" >&5
+echo "configure:11515: checking for location of OpenGL library" >&5
 case "$with_opengl_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
@@ -11354,18 +11536,18 @@
 ac_save_ldflags="$LDFLAGS"
 ac_save_libs="$LIBS"
 echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
-echo "configure:11358: checking for OpenGL library" >&5
+echo "configure:11540: checking for OpenGL library" >&5
 LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
 LIBS="-lopengl32  "
 cat > conftest.$ac_ext <<EOF
-#line 11362 "configure"
+#line 11544 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 int main() {
 glEnd();
 ; return 0; }
 EOF
-if { (eval echo configure:11369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
 echo "$ac_t""found" 1>&6
@@ -11389,18 +11571,18 @@
 ac_save_ldflags="$LDFLAGS"
 ac_save_libs="$LIBS"
 echo $ac_n "checking for GLU library""... $ac_c" 1>&6
-echo "configure:11393: checking for GLU library" >&5
+echo "configure:11575: checking for GLU library" >&5
 LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
 LIBS="-lglu32 $OPENGLLIB "
 cat > conftest.$ac_ext <<EOF
-#line 11397 "configure"
+#line 11579 "configure"
 #include "confdefs.h"
 #include <GL/glu.h>
 int main() {
 gluNewQuadric();
 ; return 0; }
 EOF
-if { (eval echo configure:11404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
 echo "$ac_t""found" 1>&6
@@ -11449,7 +11631,7 @@
 
 
 echo $ac_n "checking whether to use Tcl/Tk""... $ac_c" 1>&6
-echo "configure:11453: checking whether to use Tcl/Tk" >&5
+echo "configure:11635: checking whether to use Tcl/Tk" >&5
 echo "$ac_t"""$with_tcltk"" 1>&6
 case "$with_tcltk" in
 	"no")	USE_TCLTK=	;;
@@ -11469,7 +11651,7 @@
 
 
 echo $ac_n "checking for location of Tcl/Tk includes""... $ac_c" 1>&6
-echo "configure:11473: checking for location of Tcl/Tk includes" >&5
+echo "configure:11655: checking for location of Tcl/Tk includes" >&5
 case "$with_tcltk_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-tcltk-includes." 1>&2; exit 1; }
@@ -11495,15 +11677,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11499: checking for $ac_hdr" >&5
+echo "configure:11681: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11502 "configure"
+#line 11684 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11540,15 +11722,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11544: checking for $ac_hdr" >&5
+echo "configure:11726: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 11547 "configure"
+#line 11729 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -11581,7 +11763,7 @@
 # Tcl/Tk version checks
 
 echo $ac_n "checking Tcl version""... $ac_c" 1>&6
-echo "configure:11585: checking Tcl version" >&5
+echo "configure:11767: checking Tcl version" >&5
 ac_save_cppflags="$CPPFLAGS"
 CPPFLAGS="$TCLINCDIR $CPPFLAGS"
 if test "$cross_compiling" = yes; then
@@ -11589,7 +11771,7 @@
     echo "$ac_t""unknown (cross-compiling)" 1>&6 
 else
   cat > conftest.$ac_ext <<EOF
-#line 11593 "configure"
+#line 11775 "configure"
 #include "confdefs.h"
 
 #include <stdio.h> 
@@ -11601,7 +11783,7 @@
 }
 
 EOF
-if { (eval echo configure:11605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
      tcl_ver=`cat conftestdata`
     echo "$ac_t""$tcl_ver" 1>&6
@@ -11619,7 +11801,7 @@
 
 
 echo $ac_n "checking Tk version""... $ac_c" 1>&6
-echo "configure:11623: checking Tk version" >&5
+echo "configure:11805: checking Tk version" >&5
 ac_save_cppflags="$CPPFLAGS"
 CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
 if test "$cross_compiling" = yes; then
@@ -11627,7 +11809,7 @@
     echo "$ac_t""unknown (cross-compiling)" 1>&6 
 else
   cat > conftest.$ac_ext <<EOF
-#line 11631 "configure"
+#line 11813 "configure"
 #include "confdefs.h"
 
 #include <stdio.h> 
@@ -11639,7 +11821,7 @@
 }
 
 EOF
-if { (eval echo configure:11643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
      tk_ver=`cat conftestdata`
     echo "$ac_t""$tk_ver" 1>&6
@@ -11670,7 +11852,7 @@
 
 
 echo $ac_n "checking for location of Tcl/Tk library""... $ac_c" 1>&6
-echo "configure:11674: checking for location of Tcl/Tk library" >&5
+echo "configure:11856: checking for location of Tcl/Tk library" >&5
 case "$with_tcltk_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-tcltk-libs." 1>&2; exit 1; }
@@ -11710,13 +11892,13 @@
 
 
 echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
-echo "configure:11714: checking for Tcl_Init in -ltcl" >&5
+echo "configure:11896: checking for Tcl_Init in -ltcl" >&5
 ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltcl $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11720 "configure"
+#line 11902 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -11727,7 +11909,7 @@
 Tcl_Init()
 ; return 0; }
 EOF
-if { (eval echo configure:11731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11746,13 +11928,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
-echo "configure:11750: checking for Tcl_Init in -ltcl" >&5
+echo "configure:11932: checking for Tcl_Init in -ltcl" >&5
 ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltcl $MATHLIB $DLLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11756 "configure"
+#line 11938 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -11763,7 +11945,7 @@
 Tcl_Init()
 ; return 0; }
 EOF
-if { (eval echo configure:11767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11790,13 +11972,13 @@
 
 
 echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
-echo "configure:11794: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
+echo "configure:11976: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
 ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltcl$tcltk_ver $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11800 "configure"
+#line 11982 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -11807,7 +11989,7 @@
 Tcl_Init()
 ; return 0; }
 EOF
-if { (eval echo configure:11811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11826,13 +12008,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
-echo "configure:11830: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
+echo "configure:12012: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
 ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltcl$tcltk_ver $MATHLIB $DLLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11836 "configure"
+#line 12018 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -11843,7 +12025,7 @@
 Tcl_Init()
 ; return 0; }
 EOF
-if { (eval echo configure:11847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11870,13 +12052,13 @@
 
 
 echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
-echo "configure:11874: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
+echo "configure:12056: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
 ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltcl$tcltk_ver2 $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11880 "configure"
+#line 12062 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -11887,7 +12069,7 @@
 Tcl_Init()
 ; return 0; }
 EOF
-if { (eval echo configure:11891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -11906,13 +12088,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
-echo "configure:11910: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
+echo "configure:12092: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
 ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltcl$tcltk_ver2 $MATHLIB $DLLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 11916 "configure"
+#line 12098 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -11923,7 +12105,7 @@
 Tcl_Init()
 ; return 0; }
 EOF
-if { (eval echo configure:11927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12001,13 +12183,13 @@
 
 
 echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
-echo "configure:12005: checking for Tk_MainWindow in -ltk" >&5
+echo "configure:12187: checking for Tk_MainWindow in -ltk" >&5
 ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltk $TCLLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12011 "configure"
+#line 12193 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12018,7 +12200,7 @@
 Tk_MainWindow()
 ; return 0; }
 EOF
-if { (eval echo configure:12022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12037,13 +12219,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
-echo "configure:12041: checking for Tk_MainWindow in -ltk" >&5
+echo "configure:12223: checking for Tk_MainWindow in -ltk" >&5
 ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltk $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12047 "configure"
+#line 12229 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12054,7 +12236,7 @@
 Tk_MainWindow()
 ; return 0; }
 EOF
-if { (eval echo configure:12058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12081,13 +12263,13 @@
 
 
 echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
-echo "configure:12085: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
+echo "configure:12267: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
 ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12091 "configure"
+#line 12273 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12098,7 +12280,7 @@
 Tk_MainWindow()
 ; return 0; }
 EOF
-if { (eval echo configure:12102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12117,13 +12299,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
-echo "configure:12121: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
+echo "configure:12303: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
 ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12127 "configure"
+#line 12309 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12134,7 +12316,7 @@
 Tk_MainWindow()
 ; return 0; }
 EOF
-if { (eval echo configure:12138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12161,13 +12343,13 @@
 
 
 echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
-echo "configure:12165: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
+echo "configure:12347: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
 ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12171 "configure"
+#line 12353 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12178,7 +12360,7 @@
 Tk_MainWindow()
 ; return 0; }
 EOF
-if { (eval echo configure:12182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12197,13 +12379,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
-echo "configure:12201: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
+echo "configure:12383: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
 ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12207 "configure"
+#line 12389 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12214,7 +12396,7 @@
 Tk_MainWindow()
 ; return 0; }
 EOF
-if { (eval echo configure:12218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12304,13 +12486,13 @@
   do
     # add only if in MACOSX_ARCHS
     echo $ac_n "checking for Tcl_Init in -l$tlib""... $ac_c" 1>&6
-echo "configure:12308: checking for Tcl_Init in -l$tlib" >&5
+echo "configure:12490: checking for Tcl_Init in -l$tlib" >&5
 ac_lib_var=`echo $tlib'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-l$tlib -arch $a $MACOSX_SDK $TCLTKLIBPATH $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12314 "configure"
+#line 12496 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12321,7 +12503,7 @@
 Tcl_Init()
 ; return 0; }
 EOF
-if { (eval echo configure:12325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12370,7 +12552,7 @@
 
 
 echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
-echo "configure:12374: checking whether to use ODBC" >&5
+echo "configure:12556: checking whether to use ODBC" >&5
 echo "$ac_t"""$with_odbc"" 1>&6
 case "$with_odbc" in
 	"no")	USE_ODBC=	;;
@@ -12389,7 +12571,7 @@
 
 
 echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
-echo "configure:12393: checking for location of ODBC includes" >&5
+echo "configure:12575: checking for location of ODBC includes" >&5
 case "$with_odbc_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
@@ -12415,15 +12597,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12419: checking for $ac_hdr" >&5
+echo "configure:12601: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12422 "configure"
+#line 12604 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -12457,7 +12639,7 @@
 
 
 echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
-echo "configure:12461: checking for location of ODBC library" >&5
+echo "configure:12643: checking for location of ODBC library" >&5
 case "$with_odbc_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
@@ -12482,13 +12664,13 @@
 
 
 echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
-echo "configure:12486: checking for SQLConnect in -lodbc" >&5
+echo "configure:12668: checking for SQLConnect in -lodbc" >&5
 ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lodbc $ICONVLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12492 "configure"
+#line 12674 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12499,7 +12681,7 @@
 SQLConnect()
 ; return 0; }
 EOF
-if { (eval echo configure:12503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12524,13 +12706,13 @@
 
 
 echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
-echo "configure:12528: checking for SQLConnect in -liodbc" >&5
+echo "configure:12710: checking for SQLConnect in -liodbc" >&5
 ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-liodbc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12534 "configure"
+#line 12716 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12541,7 +12723,7 @@
 SQLConnect()
 ; return 0; }
 EOF
-if { (eval echo configure:12545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12566,11 +12748,11 @@
 ac_save_ldflags="$LDFLAGS"
 ac_save_libs="$LIBS"
 echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
-echo "configure:12570: checking for ODBC library" >&5
+echo "configure:12752: checking for ODBC library" >&5
 LDFLAGS="$ODBCLIB $LDFLAGS"
 LIBS="-lodbc32  "
 cat > conftest.$ac_ext <<EOF
-#line 12574 "configure"
+#line 12756 "configure"
 #include "confdefs.h"
 #include <windows.h>
 #include <sql.h>
@@ -12578,7 +12760,7 @@
 SQLAllocEnv((SQLHENV *)0);
 ; return 0; }
 EOF
-if { (eval echo configure:12582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
 echo "$ac_t""found" 1>&6
@@ -12627,7 +12809,7 @@
 
 
 echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
-echo "configure:12631: checking whether to use FFTW" >&5
+echo "configure:12813: checking whether to use FFTW" >&5
 echo "$ac_t"""$with_fftw"" 1>&6
 case "$with_fftw" in
 	"no")	USE_FFTW=	;;
@@ -12646,7 +12828,7 @@
 
 
 echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
-echo "configure:12650: checking for location of FFTW includes" >&5
+echo "configure:12832: checking for location of FFTW includes" >&5
 case "$with_fftw_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
@@ -12672,15 +12854,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12676: checking for $ac_hdr" >&5
+echo "configure:12858: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12679 "configure"
+#line 12861 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -12708,15 +12890,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12712: checking for $ac_hdr" >&5
+echo "configure:12894: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12715 "configure"
+#line 12897 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -12744,15 +12926,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12748: checking for $ac_hdr" >&5
+echo "configure:12930: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 12751 "configure"
+#line 12933 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -12798,7 +12980,7 @@
 
 
 echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
-echo "configure:12802: checking for location of FFTW library" >&5
+echo "configure:12984: checking for location of FFTW library" >&5
 case "$with_fftw_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
@@ -12823,13 +13005,13 @@
 
 
 echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
-echo "configure:12827: checking for fftw_execute in -lfftw3" >&5
+echo "configure:13009: checking for fftw_execute in -lfftw3" >&5
 ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lfftw3 $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12833 "configure"
+#line 13015 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12840,7 +13022,7 @@
 fftw_execute()
 ; return 0; }
 EOF
-if { (eval echo configure:12844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12865,13 +13047,13 @@
 
 
 echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
-echo "configure:12869: checking for fftwnd_one in -lfftw" >&5
+echo "configure:13051: checking for fftwnd_one in -lfftw" >&5
 ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lfftw $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12875 "configure"
+#line 13057 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12882,7 +13064,7 @@
 fftwnd_one()
 ; return 0; }
 EOF
-if { (eval echo configure:12886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12907,13 +13089,13 @@
 
 
 echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
-echo "configure:12911: checking for fftwnd_one in -ldfftw" >&5
+echo "configure:13093: checking for fftwnd_one in -ldfftw" >&5
 ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ldfftw $MATHLIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 12917 "configure"
+#line 13099 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -12924,7 +13106,7 @@
 fftwnd_one()
 ; return 0; }
 EOF
-if { (eval echo configure:12928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -12981,7 +13163,7 @@
 
 
 echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
-echo "configure:12985: checking whether to use BLAS" >&5
+echo "configure:13167: checking whether to use BLAS" >&5
 echo "$ac_t"""$with_blas"" 1>&6
 case "$with_blas" in
 	"no")	USE_BLAS=	;;
@@ -13002,7 +13184,7 @@
 
 
 echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
-echo "configure:13006: checking for location of BLAS includes" >&5
+echo "configure:13188: checking for location of BLAS includes" >&5
 case "$with_blas_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
@@ -13022,7 +13204,7 @@
 
 
 echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
-echo "configure:13026: checking for location of BLAS library" >&5
+echo "configure:13208: checking for location of BLAS library" >&5
 case "$with_blas_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
@@ -13048,15 +13230,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:13052: checking for $ac_hdr" >&5
+echo "configure:13234: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13055 "configure"
+#line 13237 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -13091,13 +13273,13 @@
 
 
 echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
-echo "configure:13095: checking for dnrm2_ in -lblas" >&5
+echo "configure:13277: checking for dnrm2_ in -lblas" >&5
 ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lblas $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13101 "configure"
+#line 13283 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13108,7 +13290,7 @@
 dnrm2_()
 ; return 0; }
 EOF
-if { (eval echo configure:13112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13127,13 +13309,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
-echo "configure:13131: checking for dnrm2_ in -lblas" >&5
+echo "configure:13313: checking for dnrm2_ in -lblas" >&5
 ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lblas $MATHLIB -lg2c $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13137 "configure"
+#line 13319 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13144,7 +13326,7 @@
 dnrm2_()
 ; return 0; }
 EOF
-if { (eval echo configure:13148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13188,13 +13370,13 @@
 save_LDFLAGS="$LDFLAGS"
 LDFLAGS="$BLASLIB $LDFLAGS"
 echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
-echo "configure:13192: checking for ATL_xerbla in -latlas" >&5
+echo "configure:13374: checking for ATL_xerbla in -latlas" >&5
 ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-latlas  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13198 "configure"
+#line 13380 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13205,7 +13387,7 @@
 ATL_xerbla()
 ; return 0; }
 EOF
-if { (eval echo configure:13209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13220,13 +13402,13 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
-echo "configure:13224: checking for sgemm_ in -lf77blas" >&5
+echo "configure:13406: checking for sgemm_ in -lf77blas" >&5
 ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lf77blas -latlas $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13230 "configure"
+#line 13412 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13237,7 +13419,7 @@
 sgemm_()
 ; return 0; }
 EOF
-if { (eval echo configure:13241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13252,13 +13434,13 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
-echo "configure:13256: checking for cblas_dgemm in -lcblas" >&5
+echo "configure:13438: checking for cblas_dgemm in -lcblas" >&5
 ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lcblas -lf77blas -latlas $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13262 "configure"
+#line 13444 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13269,7 +13451,7 @@
 cblas_dgemm()
 ; return 0; }
 EOF
-if { (eval echo configure:13273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13315,16 +13497,16 @@
 	save_LIBS="$LIBS"
 	LIBS="$vlib_flags $LIBS"
 	echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
-echo "configure:13319: checking for sgemm in $vlib_flags" >&5
+echo "configure:13501: checking for sgemm in $vlib_flags" >&5
 	cat > conftest.$ac_ext <<EOF
-#line 13321 "configure"
+#line 13503 "configure"
 #include "confdefs.h"
 
 int main() {
 sgemm
 ; return 0; }
 EOF
-if { (eval echo configure:13328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   blas_ok=yes; BLASLIB="$vlib_flags"
 else
@@ -13342,13 +13524,13 @@
 # BLAS in PhiPACK libraries? (requires generic BLAS, too)
 if test $blas_ok = no; then
 	echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
-echo "configure:13346: checking for sgemm_ in -lblas" >&5
+echo "configure:13528: checking for sgemm_ in -lblas" >&5
 ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lblas  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13352 "configure"
+#line 13534 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13359,7 +13541,7 @@
 sgemm_()
 ; return 0; }
 EOF
-if { (eval echo configure:13363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13374,13 +13556,13 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
-echo "configure:13378: checking for dgemm_ in -ldgemm" >&5
+echo "configure:13560: checking for dgemm_ in -ldgemm" >&5
 ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-ldgemm -lblas $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13384 "configure"
+#line 13566 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13391,7 +13573,7 @@
 dgemm_()
 ; return 0; }
 EOF
-if { (eval echo configure:13395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13406,13 +13588,13 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
-echo "configure:13410: checking for sgemm_ in -lsgemm" >&5
+echo "configure:13592: checking for sgemm_ in -lsgemm" >&5
 ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lsgemm -lblas $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13416 "configure"
+#line 13598 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13423,7 +13605,7 @@
 sgemm_()
 ; return 0; }
 EOF
-if { (eval echo configure:13427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13457,13 +13639,13 @@
 if test $blas_ok = no; then
 	if test "x$GCC" != xyes; then # only works with Sun CC
 		echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
-echo "configure:13461: checking for acosp in -lsunmath" >&5
+echo "configure:13643: checking for acosp in -lsunmath" >&5
 ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lsunmath  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13467 "configure"
+#line 13649 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13474,7 +13656,7 @@
 acosp()
 ; return 0; }
 EOF
-if { (eval echo configure:13478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13489,13 +13671,13 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
-echo "configure:13493: checking for sgemm_ in -lsunperf" >&5
+echo "configure:13675: checking for sgemm_ in -lsunperf" >&5
 ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lsunperf -lsunmath $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13499 "configure"
+#line 13681 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13506,7 +13688,7 @@
 sgemm_()
 ; return 0; }
 EOF
-if { (eval echo configure:13510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13536,13 +13718,13 @@
 # Generic BLAS library
 if test $blas_ok = no; then
 	echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
-echo "configure:13540: checking for sgemm_ in -lblas" >&5
+echo "configure:13722: checking for sgemm_ in -lblas" >&5
 ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lblas  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13546 "configure"
+#line 13728 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13553,7 +13735,7 @@
 sgemm_()
 ; return 0; }
 EOF
-if { (eval echo configure:13557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13592,7 +13774,7 @@
 
 
 echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
-echo "configure:13596: checking whether to use LAPACK" >&5
+echo "configure:13778: checking whether to use LAPACK" >&5
 echo "$ac_t"""$with_lapack"" 1>&6
 case "$with_lapack" in
 	"no")	USE_LAPACK=	;;
@@ -13617,7 +13799,7 @@
 
 
 echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
-echo "configure:13621: checking for location of LAPACK includes" >&5
+echo "configure:13803: checking for location of LAPACK includes" >&5
 case "$with_lapack_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
@@ -13637,7 +13819,7 @@
 
 
 echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
-echo "configure:13641: checking for location of LAPACK library" >&5
+echo "configure:13823: checking for location of LAPACK library" >&5
 case "$with_lapack_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
@@ -13663,15 +13845,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:13667: checking for $ac_hdr" >&5
+echo "configure:13849: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13670 "configure"
+#line 13852 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -13703,10 +13885,10 @@
 	save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
 	save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
 	echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
-echo "configure:13707: checking for dsegv_" >&5
+echo "configure:13889: checking for dsegv_" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13710 "configure"
+#line 13892 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dsegv_(); below.  */
@@ -13729,7 +13911,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:13733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dsegv_=yes"
 else
@@ -13756,13 +13938,13 @@
 	save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
 	save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
 	echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
-echo "configure:13760: checking for desgv_ in -llapack" >&5
+echo "configure:13942: checking for desgv_ in -llapack" >&5
 ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-llapack $FLIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13766 "configure"
+#line 13948 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13773,7 +13955,7 @@
 desgv_()
 ; return 0; }
 EOF
-if { (eval echo configure:13777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13805,13 +13987,13 @@
 
 
 echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
-echo "configure:13809: checking for dgesv_ in -llapack" >&5
+echo "configure:13991: checking for dgesv_ in -llapack" >&5
 ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-llapack $BLASLIB $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13815 "configure"
+#line 13997 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13822,7 +14004,7 @@
 dgesv_()
 ; return 0; }
 EOF
-if { (eval echo configure:13826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13841,13 +14023,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
-echo "configure:13845: checking for dgesv_ in -llapack" >&5
+echo "configure:14027: checking for dgesv_ in -llapack" >&5
 ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 13851 "configure"
+#line 14033 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -13858,7 +14040,7 @@
 dgesv_()
 ; return 0; }
 EOF
-if { (eval echo configure:13862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -13914,7 +14096,7 @@
 
 
 echo $ac_n "checking whether to use Motif""... $ac_c" 1>&6
-echo "configure:13918: checking whether to use Motif" >&5
+echo "configure:14100: checking whether to use Motif" >&5
 echo "$ac_t"""$with_motif"" 1>&6
 case "$with_motif" in
 	"no")	USE_MOTIF=	;;
@@ -13933,7 +14115,7 @@
 
 
 echo $ac_n "checking for location of Motif includes""... $ac_c" 1>&6
-echo "configure:13937: checking for location of Motif includes" >&5
+echo "configure:14119: checking for location of Motif includes" >&5
 case "$with_motif_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-motif-includes." 1>&2; exit 1; }
@@ -13959,15 +14141,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:13963: checking for $ac_hdr" >&5
+echo "configure:14145: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 13966 "configure"
+#line 14148 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:14153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -14001,7 +14183,7 @@
 
 
 echo $ac_n "checking for location of Motif library""... $ac_c" 1>&6
-echo "configure:14005: checking for location of Motif library" >&5
+echo "configure:14187: checking for location of Motif library" >&5
 case "$with_motif_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-motif-libs." 1>&2; exit 1; }
@@ -14026,13 +14208,13 @@
 
 
 echo $ac_n "checking for XmStringCreate in -lXm""... $ac_c" 1>&6
-echo "configure:14030: checking for XmStringCreate in -lXm" >&5
+echo "configure:14212: checking for XmStringCreate in -lXm" >&5
 ac_lib_var=`echo Xm'_'XmStringCreate | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lXm $X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14036 "configure"
+#line 14218 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14043,7 +14225,7 @@
 XmStringCreate()
 ; return 0; }
 EOF
-if { (eval echo configure:14047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14084,7 +14266,7 @@
 
 
 echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
-echo "configure:14088: checking whether to use Cairo" >&5
+echo "configure:14270: checking whether to use Cairo" >&5
 echo "$ac_t"""$with_cairo"" 1>&6
 case "$with_cairo" in
 	"no")	USE_CAIRO=	;;
@@ -14110,7 +14292,7 @@
 
 
 echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
-echo "configure:14114: checking for location of cairo includes" >&5
+echo "configure:14296: checking for location of cairo includes" >&5
 case "$with_cairo_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
@@ -14136,15 +14318,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:14140: checking for $ac_hdr" >&5
+echo "configure:14322: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 14143 "configure"
+#line 14325 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:14330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -14180,7 +14362,7 @@
 
 
 echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
-echo "configure:14184: checking for location of cairo library" >&5
+echo "configure:14366: checking for location of cairo library" >&5
 case "$with_cairo_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
@@ -14200,7 +14382,7 @@
 
 
 echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
-echo "configure:14204: checking for cairo linking flags" >&5
+echo "configure:14386: checking for cairo linking flags" >&5
 case "$with_cairo_ldflags" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
@@ -14216,10 +14398,10 @@
 LIBS=" $CAIROLIB $LIBS"
 LDFLAGS=" $LDFLAGS"
 echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
-echo "configure:14220: checking for cairo_create" >&5
+echo "configure:14402: checking for cairo_create" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 14223 "configure"
+#line 14405 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char cairo_create(); below.  */
@@ -14242,7 +14424,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:14246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_cairo_create=yes"
 else
@@ -14276,10 +14458,10 @@
 LIBS=" $CAIROLIB $LIBS"
 LDFLAGS=" $LDFLAGS"
 echo $ac_n "checking for cairo_xlib_surface_create_with_xrender_format""... $ac_c" 1>&6
-echo "configure:14280: checking for cairo_xlib_surface_create_with_xrender_format" >&5
+echo "configure:14462: checking for cairo_xlib_surface_create_with_xrender_format" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 14283 "configure"
+#line 14465 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char cairo_xlib_surface_create_with_xrender_format(); below.  */
@@ -14302,7 +14484,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:14306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=yes"
 else
@@ -14344,7 +14526,7 @@
 
 
 echo $ac_n "checking whether to use GLw""... $ac_c" 1>&6
-echo "configure:14348: checking whether to use GLw" >&5
+echo "configure:14530: checking whether to use GLw" >&5
 echo "$ac_t"""$with_glw"" 1>&6
 case "$with_glw" in
 	"no")	USE_GLW=	;;
@@ -14363,7 +14545,7 @@
 
 
 echo $ac_n "checking for location of GLw includes""... $ac_c" 1>&6
-echo "configure:14367: checking for location of GLw includes" >&5
+echo "configure:14549: checking for location of GLw includes" >&5
 case "$with_glw_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-glw-includes." 1>&2; exit 1; }
@@ -14389,15 +14571,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:14393: checking for $ac_hdr" >&5
+echo "configure:14575: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 14396 "configure"
+#line 14578 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:14583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -14425,15 +14607,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:14429: checking for $ac_hdr" >&5
+echo "configure:14611: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 14432 "configure"
+#line 14614 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:14619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -14473,7 +14655,7 @@
 
 
 echo $ac_n "checking for location of GLw library""... $ac_c" 1>&6
-echo "configure:14477: checking for location of GLw library" >&5
+echo "configure:14659: checking for location of GLw library" >&5
 case "$with_glw_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-glw-libs." 1>&2; exit 1; }
@@ -14498,13 +14680,13 @@
 
 
 echo $ac_n "checking for GLwCreateMDrawingArea in -lGLw""... $ac_c" 1>&6
-echo "configure:14502: checking for GLwCreateMDrawingArea in -lGLw" >&5
+echo "configure:14684: checking for GLwCreateMDrawingArea in -lGLw" >&5
 ac_lib_var=`echo GLw'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14508 "configure"
+#line 14690 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14515,7 +14697,7 @@
 GLwCreateMDrawingArea()
 ; return 0; }
 EOF
-if { (eval echo configure:14519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14540,13 +14722,13 @@
 
 
 echo $ac_n "checking for GLwCreateM1DrawingArea in -lGLw""... $ac_c" 1>&6
-echo "configure:14544: checking for GLwCreateM1DrawingArea in -lGLw" >&5
+echo "configure:14726: checking for GLwCreateM1DrawingArea in -lGLw" >&5
 ac_lib_var=`echo GLw'_'GLwCreateM1DrawingArea | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14550 "configure"
+#line 14732 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14557,7 +14739,7 @@
 GLwCreateM1DrawingArea()
 ; return 0; }
 EOF
-if { (eval echo configure:14561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14582,13 +14764,13 @@
 
 
 echo $ac_n "checking for GLwCreateM2DrawingArea in -lGLw""... $ac_c" 1>&6
-echo "configure:14586: checking for GLwCreateM2DrawingArea in -lGLw" >&5
+echo "configure:14768: checking for GLwCreateM2DrawingArea in -lGLw" >&5
 ac_lib_var=`echo GLw'_'GLwCreateM2DrawingArea | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14592 "configure"
+#line 14774 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14599,7 +14781,7 @@
 GLwCreateM2DrawingArea()
 ; return 0; }
 EOF
-if { (eval echo configure:14603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14624,13 +14806,13 @@
 
 
 echo $ac_n "checking for GLwCreateMDrawingArea in -lGLwM""... $ac_c" 1>&6
-echo "configure:14628: checking for GLwCreateMDrawingArea in -lGLwM" >&5
+echo "configure:14810: checking for GLwCreateMDrawingArea in -lGLwM" >&5
 ac_lib_var=`echo GLwM'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14634 "configure"
+#line 14816 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14641,7 +14823,7 @@
 GLwCreateMDrawingArea()
 ; return 0; }
 EOF
-if { (eval echo configure:14645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14666,13 +14848,13 @@
 
 
 echo $ac_n "checking for GLwCreateM1DrawingArea in -lGLwM""... $ac_c" 1>&6
-echo "configure:14670: checking for GLwCreateM1DrawingArea in -lGLwM" >&5
+echo "configure:14852: checking for GLwCreateM1DrawingArea in -lGLwM" >&5
 ac_lib_var=`echo GLwM'_'GLwCreateM1DrawingArea | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14676 "configure"
+#line 14858 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14683,7 +14865,7 @@
 GLwCreateM1DrawingArea()
 ; return 0; }
 EOF
-if { (eval echo configure:14687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14708,13 +14890,13 @@
 
 
 echo $ac_n "checking for GLwCreateM2DrawingArea in -lGLwM""... $ac_c" 1>&6
-echo "configure:14712: checking for GLwCreateM2DrawingArea in -lGLwM" >&5
+echo "configure:14894: checking for GLwCreateM2DrawingArea in -lGLwM" >&5
 ac_lib_var=`echo GLwM'_'GLwCreateM2DrawingArea | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14718 "configure"
+#line 14900 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14725,7 +14907,7 @@
 GLwCreateM2DrawingArea()
 ; return 0; }
 EOF
-if { (eval echo configure:14729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14752,13 +14934,13 @@
 
 
 echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLw""... $ac_c" 1>&6
-echo "configure:14756: checking for GLwCreateMDrawingArea in -lMesaGLw" >&5
+echo "configure:14938: checking for GLwCreateMDrawingArea in -lMesaGLw" >&5
 ac_lib_var=`echo MesaGLw'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lMesaGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14762 "configure"
+#line 14944 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14769,7 +14951,7 @@
 GLwCreateMDrawingArea()
 ; return 0; }
 EOF
-if { (eval echo configure:14773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14788,13 +14970,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLw""... $ac_c" 1>&6
-echo "configure:14792: checking for GLwCreateMDrawingArea in -lMesaGLw" >&5
+echo "configure:14974: checking for GLwCreateMDrawingArea in -lMesaGLw" >&5
 ac_lib_var=`echo MesaGLw'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lMesaGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $OPENGLULIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14798 "configure"
+#line 14980 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14805,7 +14987,7 @@
 GLwCreateMDrawingArea()
 ; return 0; }
 EOF
-if { (eval echo configure:14809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14832,13 +15014,13 @@
 
 
 echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLwM""... $ac_c" 1>&6
-echo "configure:14836: checking for GLwCreateMDrawingArea in -lMesaGLwM" >&5
+echo "configure:15018: checking for GLwCreateMDrawingArea in -lMesaGLwM" >&5
 ac_lib_var=`echo MesaGLwM'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lMesaGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14842 "configure"
+#line 15024 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14849,7 +15031,7 @@
 GLwCreateMDrawingArea()
 ; return 0; }
 EOF
-if { (eval echo configure:14853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14868,13 +15050,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLwM""... $ac_c" 1>&6
-echo "configure:14872: checking for GLwCreateMDrawingArea in -lMesaGLwM" >&5
+echo "configure:15054: checking for GLwCreateMDrawingArea in -lMesaGLwM" >&5
 ac_lib_var=`echo MesaGLwM'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lMesaGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $OPENGLULIB $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 14878 "configure"
+#line 15060 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -14885,7 +15067,7 @@
 GLwCreateMDrawingArea()
 ; return 0; }
 EOF
-if { (eval echo configure:14889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -14998,7 +15180,7 @@
 
 
 echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
-echo "configure:15002: checking whether to use FreeType" >&5
+echo "configure:15184: checking whether to use FreeType" >&5
 echo "$ac_t"""$with_freetype"" 1>&6
 case "$with_freetype" in
 	"no")	USE_FREETYPE=	;;
@@ -15017,7 +15199,7 @@
 
 
 echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
-echo "configure:15021: checking for location of FreeType includes" >&5
+echo "configure:15203: checking for location of FreeType includes" >&5
 case "$with_freetype_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
@@ -15043,15 +15225,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:15047: checking for $ac_hdr" >&5
+echo "configure:15229: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 15050 "configure"
+#line 15232 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -15085,7 +15267,7 @@
 
 
 echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
-echo "configure:15089: checking for location of FreeType library" >&5
+echo "configure:15271: checking for location of FreeType library" >&5
 case "$with_freetype_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
@@ -15110,13 +15292,13 @@
 
 
 echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
-echo "configure:15114: checking for FT_Init_FreeType in -lfreetype" >&5
+echo "configure:15296: checking for FT_Init_FreeType in -lfreetype" >&5
 ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lfreetype  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15120 "configure"
+#line 15302 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -15127,7 +15309,7 @@
 FT_Init_FreeType()
 ; return 0; }
 EOF
-if { (eval echo configure:15131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -15168,7 +15350,7 @@
 
 
 echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
-echo "configure:15172: checking whether to use NLS" >&5
+echo "configure:15354: checking whether to use NLS" >&5
 echo "$ac_t"""$with_nls"" 1>&6
 case "$with_nls" in
 	"no")	USE_NLS=	;;
@@ -15188,10 +15370,10 @@
 
 
 echo $ac_n "checking for gettext""... $ac_c" 1>&6
-echo "configure:15192: checking for gettext" >&5
+echo "configure:15374: checking for gettext" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 15195 "configure"
+#line 15377 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gettext(); below.  */
@@ -15214,7 +15396,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:15218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gettext=yes"
 else
@@ -15232,13 +15414,13 @@
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
-echo "configure:15236: checking for gettext in -lintl" >&5
+echo "configure:15418: checking for gettext in -lintl" >&5
 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 15242 "configure"
+#line 15424 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -15249,7 +15431,7 @@
 gettext()
 ; return 0; }
 EOF
-if { (eval echo configure:15253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -15284,7 +15466,7 @@
  
 
 echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
-echo "configure:15288: checking whether to use C++" >&5
+echo "configure:15470: checking whether to use C++" >&5
 echo "$ac_t"""$with_cxx"" 1>&6
 case "$with_cxx" in
 	"no")	USE_CXX=	;;
@@ -15300,7 +15482,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:15304: checking for $ac_word" >&5
+echo "configure:15486: checking for $ac_word" >&5
 
 if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
@@ -15329,7 +15511,7 @@
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:15333: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:15515: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -15340,12 +15522,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 15344 "configure"
+#line 15526 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:15349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -15371,19 +15553,19 @@
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:15375: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:15557: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:15380: checking whether we are using GNU C++" >&5
+echo "configure:15562: checking whether we are using GNU C++" >&5
 
 cat > conftest.C <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:15387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:15569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -15401,7 +15583,7 @@
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:15405: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:15587: checking whether ${CXX-g++} accepts -g" >&5
 
 echo 'void f(){}' > conftest.cc
 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
@@ -15442,7 +15624,7 @@
 
 
 echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
-echo "configure:15446: checking whether to use openDWG" >&5
+echo "configure:15628: checking whether to use openDWG" >&5
 echo "$ac_t"""$with_opendwg"" 1>&6
 case "$with_opendwg" in
 	"no")	USE_OPENDWG=	;;
@@ -15462,7 +15644,7 @@
 
 
 echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
-echo "configure:15466: checking for location of openDGW includes" >&5
+echo "configure:15648: checking for location of openDGW includes" >&5
 case "$with_opendwg_includes" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
@@ -15488,15 +15670,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:15492: checking for $ac_hdr" >&5
+echo "configure:15674: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 15495 "configure"
+#line 15677 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -15530,7 +15712,7 @@
 
 
 echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
-echo "configure:15534: checking for location of openDWG library" >&5
+echo "configure:15716: checking for location of openDWG library" >&5
 case "$with_opendwg_libs" in
 y | ye | yes | n | no)
 	{ echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
@@ -15577,7 +15759,7 @@
    if test "$enable_largefile" = yes; then
 
      echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
-echo "configure:15581: checking for special C compiler options needed for large files" >&5
+echo "configure:15763: checking for special C compiler options needed for large files" >&5
 
 ac_cv_sys_largefile_CC=no
         largefile_cc_opt=""
@@ -15585,7 +15767,7 @@
 	  # IRIX 6.2 and later do not support large files by default,
 	  # so use the C compiler's -n32 option if that helps.
 	  cat > conftest.$ac_ext <<EOF
-#line 15589 "configure"
+#line 15771 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
     /* Check that off_t can represent 2**63 - 1 correctly.
@@ -15601,7 +15783,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:15605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -15610,7 +15792,7 @@
   ac_save_CC="${CC-cc}"
 	     CC="$CC -n32"
 	     cat > conftest.$ac_ext <<EOF
-#line 15614 "configure"
+#line 15796 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
     /* Check that off_t can represent 2**63 - 1 correctly.
@@ -15626,7 +15808,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:15630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sys_largefile_CC=' -n32'
 else
@@ -15646,11 +15828,11 @@
      fi
 
      echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
-echo "configure:15650: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+echo "configure:15832: checking for _FILE_OFFSET_BITS value needed for large files" >&5
 
 ac_cv_sys_file_offset_bits=no
       cat > conftest.$ac_ext <<EOF
-#line 15654 "configure"
+#line 15836 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
     /* Check that off_t can represent 2**63 - 1 correctly.
@@ -15666,14 +15848,14 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:15670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 15677 "configure"
+#line 15859 "configure"
 #include "confdefs.h"
 #define _FILE_OFFSET_BITS 64
 #include <sys/types.h>
@@ -15691,7 +15873,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:15695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sys_file_offset_bits=64
 else
@@ -15710,11 +15892,11 @@
 
    fi
      echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
-echo "configure:15714: checking for _LARGE_FILES value needed for large files" >&5
+echo "configure:15896: checking for _LARGE_FILES value needed for large files" >&5
 
 ac_cv_sys_large_files=no
       cat > conftest.$ac_ext <<EOF
-#line 15718 "configure"
+#line 15900 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
     /* Check that off_t can represent 2**63 - 1 correctly.
@@ -15730,14 +15912,14 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:15734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 15741 "configure"
+#line 15923 "configure"
 #include "confdefs.h"
 #define _LARGE_FILES 1
 #include <sys/types.h>
@@ -15755,7 +15937,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:15759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sys_large_files=1
 else
@@ -15774,25 +15956,25 @@
 
    fi
      echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
-echo "configure:15778: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+echo "configure:15960: checking for _LARGEFILE_SOURCE value needed for large files" >&5
 
 ac_cv_sys_largefile_source=no
       cat > conftest.$ac_ext <<EOF
-#line 15782 "configure"
+#line 15964 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 return !fseeko;
 ; return 0; }
 EOF
-if { (eval echo configure:15789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 15796 "configure"
+#line 15978 "configure"
 #include "confdefs.h"
 #define _LARGEFILE_SOURCE 1
 #include <stdio.h>
@@ -15801,7 +15983,7 @@
 return !fseeko;
 ; return 0; }
 EOF
-if { (eval echo configure:15805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sys_largefile_source=1
 else
@@ -15822,10 +16004,10 @@
    fi
   
 echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
-echo "configure:15826: checking if system supports Large Files at all" >&5
+echo "configure:16008: checking if system supports Large Files at all" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 15829 "configure"
+#line 16011 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <sys/types.h>
@@ -15857,7 +16039,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:15861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_largefiles=yes
 else
@@ -15886,7 +16068,7 @@
 # Python check
 
 echo $ac_n "checking whether to use Python""... $ac_c" 1>&6
-echo "configure:15890: checking whether to use Python" >&5
+echo "configure:16072: checking whether to use Python" >&5
 
 PYTHONINC=
 PYTHONCFLAGS=
@@ -15906,7 +16088,7 @@
   # Extract the first word of "python-config", so it can be a program name with args.
 set dummy python-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:15910: checking for $ac_word" >&5
+echo "configure:16092: checking for $ac_word" >&5
 
 case "$PY_CONFIG" in
   /*)
@@ -15948,15 +16130,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:15952: checking for $ac_hdr" >&5
+echo "configure:16134: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 15955 "configure"
+#line 16137 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -16026,7 +16208,7 @@
 # Enable wxWidgets support (for wxGUI)
 
 echo $ac_n "checking whether to use wxWidgets""... $ac_c" 1>&6
-echo "configure:16030: checking whether to use wxWidgets" >&5
+echo "configure:16212: checking whether to use wxWidgets" >&5
 
 WXVERSION=
 WXWIDGETSCXXFLAGS= 
@@ -16047,7 +16229,7 @@
   # Extract the first word of "wx-config", so it can be a program name with args.
 set dummy wx-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:16051: checking for $ac_word" >&5
+echo "configure:16233: checking for $ac_word" >&5
 
 case "$WX_CONFIG" in
   /*)
@@ -16095,7 +16277,7 @@
  REQWX="2.8.1"
 
  echo $ac_n "checking wxWidgets version""... $ac_c" 1>&6
-echo "configure:16099: checking wxWidgets version" >&5
+echo "configure:16281: checking wxWidgets version" >&5
  if WXVERSION=`"$WX_CONFIG" --version`; then
    echo "$ac_t""$WXVERSION" 1>&6
  else
@@ -16118,15 +16300,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16122: checking for $ac_hdr" >&5
+echo "configure:16304: checking for $ac_hdr" >&5
 
 cat > conftest.$ac_ext <<EOF
-#line 16125 "configure"
+#line 16307 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -16399,6 +16581,10 @@
 s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
 s%@USE_GDAL@%$USE_GDAL%g
 s%@USE_OGR@%$USE_OGR%g
+s%@GEOS_CONFIG@%$GEOS_CONFIG%g
+s%@GEOS_LIBS@%$GEOS_LIBS%g
+s%@GEOS_CFLAGS@%$GEOS_CFLAGS%g
+s%@USE_GEOS@%$USE_GEOS%g
 s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
 s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
 s%@TIFFLIB@%$TIFFLIB%g
@@ -16783,6 +16969,8 @@
 
 echo "  GDAL support:               `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
 
+echo "  GEOS support:               `if test -n "${USE_GEOS}" ; then echo yes ; else echo no ; fi`"
+
 echo "  GLw support:                `if test -n "${USE_GLW}" ; then echo yes ; else echo no ; fi`"
 
 echo "  JPEG support:               `if test -n "${USE_JPEG}" ; then echo yes ; else echo no ; fi`"

Modified: grass/branches/releasebranch_6_4/configure.in
===================================================================
--- grass/branches/releasebranch_6_4/configure.in	2010-11-07 17:34:38 UTC (rev 44216)
+++ grass/branches/releasebranch_6_4/configure.in	2010-11-07 17:37:50 UTC (rev 44217)
@@ -277,6 +277,12 @@
 
 # With includes and libs options
 
+AC_ARG_WITH(geos,
+[  --with-geos[=path/geos-config]
+                          enable GEOS support (geos-config with path,
+                          e.g. '--with-geos=/usr/local/bin/geos-config',
+                          default: no)],, with_geos="no")
+
 AC_ARG_WITH(includes,
 [  --with-includes=DIRS    site include files are in DIRS])
 
@@ -838,6 +844,44 @@
 AC_SUBST(USE_GDAL)
 AC_SUBST(USE_OGR)
 
+# GEOS option
+
+AC_MSG_CHECKING(whether to use GEOS)
+
+GEOS_LIBS=
+GGEOS_CFLAGS=
+USE_GEOS=
+
+# FIXME: "quote" $with_geos ?
+if test "`basename xx/$with_geos`" = "geos-config" ; then
+  GEOS_CONFIG="$with_geos"
+fi
+
+if test "$with_geos" = "no" ; then
+  AC_MSG_RESULT(no)
+else
+  AC_MSG_RESULT(yes)
+  AC_PATH_PROG(GEOS_CONFIG, geos-config, no)
+
+  if test "$GEOS_CONFIG" = "no" ; then
+    AC_MSG_ERROR([*** couldn't find geos-config])
+  fi
+  
+  if test "$GEOS_CONFIG" != "" ; then
+    GEOS_LIBS=`"$GEOS_CONFIG" --libs`
+    GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
+    USE_GEOS=1
+  fi
+  
+  LOC_CHECK_INCLUDES(geos_c.h,GEOS,$GEOS_CFLAGS)
+  LOC_CHECK_LIBS(geos_c,initGEOS,GEOS,$GEOS_LIBS,GEOS_LIBS)
+  AC_DEFINE(HAVE_GEOS)
+fi
+
+AC_SUBST(GEOS_LIBS)
+AC_SUBST(GEOS_CFLAGS)
+AC_SUBST(USE_GEOS)
+
 # Enable TIFF option
 
 LOC_CHECK_USE(tiff,TIFF,USE_TIFF)
@@ -1991,6 +2035,7 @@
 LOC_MSG_USE(FFTW support,USE_FFTW)
 LOC_MSG_USE(FreeType support,USE_FREETYPE)
 LOC_MSG_USE(GDAL support,USE_GDAL)
+LOC_MSG_USE(GEOS support,USE_GEOS)
 LOC_MSG_USE(GLw support,USE_GLW)
 LOC_MSG_USE(JPEG support,USE_JPEG)
 LOC_MSG_USE(LAPACK support,USE_LAPACK)

Modified: grass/branches/releasebranch_6_4/include/Make/Grass.make.in
===================================================================
--- grass/branches/releasebranch_6_4/include/Make/Grass.make.in	2010-11-07 17:34:38 UTC (rev 44216)
+++ grass/branches/releasebranch_6_4/include/Make/Grass.make.in	2010-11-07 17:37:50 UTC (rev 44217)
@@ -82,7 +82,7 @@
 CFLAGS      =  $(INC) $(COMPILE_FLAGS) $(USE_TERMIO)
 CXXFLAGS    =  $(INC) $(COMPILE_FLAGS_CXX) $(USE_TERMIO)
 LDFLAGS     =  $(LIBPATH) $(LINK_FLAGS) $(LD_SEARCH_FLAGS) $(PQLIBPATH) $(USE_TERMIO)
-VECT_CFLAGS =  $(GDALCFLAGS) 
+VECT_CFLAGS =  $(GDALCFLAGS) $(GEOSCFLAGS)
 
 # Object with _fmode which must be linked to each executable on Windows
 ifdef MINGW
@@ -244,7 +244,7 @@
 GRAPHLIB      = -l$(GRAPH_LIBNAME)
 RTREELIB      = -l$(RTREE_LIBNAME)
 VEDITLIB      = -l$(VEDIT_LIBNAME) $(GISLIB) $(VECTRLIB)
-VECTLIB       = $(VECTRLIB) $(DIG2LIB) $(GRAPHLIB) $(RTREELIB) $(LINKMLIB) $(DBMILIB) $(GDALLIBS)
+VECTLIB       = $(VECTRLIB) $(DIG2LIB) $(GRAPHLIB) $(RTREELIB) $(LINKMLIB) $(DBMILIB) $(GDALLIBS) $(GEOSLIBS)
 
 # Interpolation
 INTERPDATALIB = -l$(INTERPDATA_LIBNAME)

Modified: grass/branches/releasebranch_6_4/include/Make/Platform.make.in
===================================================================
--- grass/branches/releasebranch_6_4/include/Make/Platform.make.in	2010-11-07 17:34:38 UTC (rev 44216)
+++ grass/branches/releasebranch_6_4/include/Make/Platform.make.in	2010-11-07 17:37:50 UTC (rev 44217)
@@ -190,6 +190,11 @@
 USE_GDAL            = @USE_GDAL@
 USE_OGR             = @USE_OGR@
 
+#GEOS
+GEOSLIBS            = @GEOS_LIBS@
+GEOSCFLAGS          = @GEOS_CFLAGS@
+USE_GEOS            = @USE_GEOS@
+
 #FreeType:
 FTINC               = @FTINC@
 FTLIB               = @FTLIB@

Modified: grass/branches/releasebranch_6_4/include/Vect.h
===================================================================
--- grass/branches/releasebranch_6_4/include/Vect.h	2010-11-07 17:34:38 UTC (rev 44216)
+++ grass/branches/releasebranch_6_4/include/Vect.h	2010-11-07 17:37:50 UTC (rev 44217)
@@ -3,6 +3,14 @@
 #include <grass/gis.h>
 #include <grass/vect/digit.h>
 
+#ifdef HAVE_GEOS
+#include <geos_c.h>
+#if GEOS_VERSION_MAJOR < 3
+typedef struct GEOSGeom_t GEOSGeometry;
+typedef struct GEOSCoordSeq_t GEOSCoordSequence;
+#endif
+#endif
+
 /* --- ANSI prototypes for the lib/vector/Vlib functions --- */
 
 /*
@@ -466,4 +474,13 @@
 int Vect_attach_isles(struct Map_info *, BOUND_BOX *);
 int Vect_attach_centroids(struct Map_info *, BOUND_BOX *);
 
+    /* GEOS support */
+#ifdef HAVE_GEOS
+GEOSGeometry *Vect_read_line_geos(struct Map_info *, int, int*);
+GEOSGeometry *Vect_line_to_geos(struct Map_info *, const struct line_pnts*, int);
+GEOSGeometry *Vect_read_area_geos(struct Map_info *, int);
+GEOSCoordSequence *Vect_get_area_points_geos(struct Map_info *, int);
+GEOSCoordSequence *Vect_get_isle_points_geos(struct Map_info *, int);
+#endif
+
 #endif /* GRASS_VECT_H */

Modified: grass/branches/releasebranch_6_4/include/config.h.in
===================================================================
--- grass/branches/releasebranch_6_4/include/config.h.in	2010-11-07 17:34:38 UTC (rev 44216)
+++ grass/branches/releasebranch_6_4/include/config.h.in	2010-11-07 17:37:50 UTC (rev 44217)
@@ -152,6 +152,9 @@
 /* define if OGR is to be used */
 #undef HAVE_OGR
 
+/* define if GEOS is to be used */
+#undef HAVE_GEOS
+
 /* define if postgres client header exists */
 #undef HAVE_LIBPQ_FE_H
 

Modified: grass/branches/releasebranch_6_4/lib/vector/Vlib/Makefile
===================================================================
--- grass/branches/releasebranch_6_4/lib/vector/Vlib/Makefile	2010-11-07 17:34:38 UTC (rev 44216)
+++ grass/branches/releasebranch_6_4/lib/vector/Vlib/Makefile	2010-11-07 17:37:50 UTC (rev 44217)
@@ -5,13 +5,13 @@
 
 EXTRA_INC = $(VECT_INC)
 EXTRA_CFLAGS = $(GETHOSTNAME) $(ZLIBINCPATH) $(VECT_CFLAGS) $(DEFS)
-EXTRA_LIBS=$(GISLIB) $(DIG2LIB) $(GRAPHLIB) $(RTREELIB) $(LINKMLIB) $(DBMILIB) $(GDALLIBS) $(MATHLIB)
+EXTRA_LIBS=$(GISLIB) $(DIG2LIB) $(GRAPHLIB) $(RTREELIB) $(LINKMLIB) $(DBMILIB) $(GDALLIBS) $(MATHLIB) $(GEOSLIBS)
 
 LIB_NAME = $(VECTR_LIBNAME)
 DEPENDENCIES =  $(ARCH_INCDIR)/Vect.h $(ARCH_INCDIR)/V_.h \
 		$(ARCH_INCDIR)/vect/dig_defines.h \
 		$(ARCH_INCDIR)/vect/dig_macros.h $(ARCH_INCDIR)/vect/dig_structs.h \
-               	$(ARCH_INCDIR)/vect/dig_externs.h $(ARCH_INCDIR)/vect/dig_globs.h $(GISDEP)
+		$(ARCH_INCDIR)/vect/dig_externs.h $(ARCH_INCDIR)/vect/dig_globs.h $(GISDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 

Copied: grass/branches/releasebranch_6_4/lib/vector/Vlib/geos.c (from rev 44215, grass/branches/develbranch_6/lib/vector/Vlib/geos.c)
===================================================================
--- grass/branches/releasebranch_6_4/lib/vector/Vlib/geos.c	                        (rev 0)
+++ grass/branches/releasebranch_6_4/lib/vector/Vlib/geos.c	2010-11-07 17:37:50 UTC (rev 44217)
@@ -0,0 +1,518 @@
+/*!
+  \file geos.c
+  
+  \brief Vector library - GEOS support
+  
+  Higher level functions for reading/writing/manipulating vectors.
+  
+  (C) 2009 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2).  Read the file COPYING that comes with GRASS for details.
+  
+  \author Martin Landa <landa.martin gmail.com>
+ */
+
+#include <grass/config.h>
+#include <grass/gis.h>
+#include <grass/Vect.h>
+#include <grass/glocale.h>
+
+#ifdef HAVE_GEOS
+
+static GEOSGeometry *Vect__read_line_geos(struct Map_info *, long, int *);
+static GEOSCoordSequence *V1_read_line_geos(struct Map_info *, long, int *);
+static GEOSCoordSequence *V2_read_line_geos(struct Map_info *, int);
+static GEOSCoordSequence *read_polygon_points(struct Map_info *, int, int*);
+
+/*!
+   \brief Read vector feature and stores it as GEOSGeometry instance
+
+   Supported feature types:
+    - GV_POINT     -> POINT
+    - GV_LINE      -> LINESTRING
+    - GV_BOUNDARY  -> LINESTRING / LINEARRING
+   
+   You should free allocated memory by GEOSGeom_destroy().
+
+   \param Map pointer to Map_info structure
+   \param line feature id
+   \param[out] type feature type or NULL
+   
+   \return pointer to GEOSGeometry instance
+   \return empty GEOSGeometry for unsupported feature type
+   \return NULL on error
+ */
+GEOSGeometry *Vect_read_line_geos(struct Map_info *Map, int line, int *type)
+{
+    P_LINE *Line;
+    
+    G_debug(3, "Vect_read_line_geos(): line = %d", line);
+    
+    if (!VECT_OPEN(Map))
+	G_fatal_error("Vect_read_line_geos(): %s", _("vector map is not opened"));
+    
+    if (line < 1 || line > Map->plus.n_lines)
+	G_fatal_error(_("Vect_read_line_geos(): feature id %d is not reasonable "
+			"(max features in vector map <%s>: %d)"),
+		      line, Vect_get_full_name(Map), Map->plus.n_lines);
+    
+    if (Map->format != GV_FORMAT_NATIVE)
+	G_fatal_error("Vect_read_line_geos(): %s", _("only native format supported"));
+    
+    Line = Map->plus.Line[line];
+    if (Line == NULL)
+	G_fatal_error("Vect_read_line_geos(): %s %d",
+		      _("Attempt to read dead line"), line);
+    
+    return Vect__read_line_geos(Map, Line->offset, type);
+}
+
+/*!
+   \brief Read vector area and stores it as GEOSGeometry instance (polygon)
+
+   You should free allocated memory by GEOSGeom_destroy().
+
+   \param Map pointer to Map_info structure
+   \param area area id 
+
+   \return pointer to GEOSGeometry instance
+   \return NULL on error
+ */
+GEOSGeometry *Vect_read_area_geos(struct Map_info * Map, int area)
+{
+    int i, nholes, isle;
+    GEOSGeometry *boundary, **holes;
+    
+    G_debug(3, "Vect_read_area_geos(): area = %d", area);
+
+    boundary = GEOSGeom_createLinearRing(Vect_get_area_points_geos(Map, area));
+    if (!boundary) {
+	G_fatal_error(_("Vect_read_area_geos(): unable to read area id %d"),
+		      area);
+    }
+
+    nholes = Vect_get_area_num_isles(Map, area);
+    holes = (GEOSGeometry **) G_malloc(nholes * sizeof(GEOSGeometry *));
+    for (i = 0; i < nholes; i++) {
+	isle = Vect_get_area_isle(Map, area, i);
+	if (isle < 1) {
+	    nholes--;
+	    continue;
+	}
+	holes[i] = GEOSGeom_createLinearRing(Vect_get_isle_points_geos(Map, isle));
+	if (!(holes[i]))
+	    G_fatal_error(_("Vect_read_area_geos(): unable to read isle id %d of area id %d"),
+			  isle, area);
+    }
+    
+    return GEOSGeom_createPolygon(boundary, holes, nholes);
+}
+
+/*!
+   \brief Create GEOSGeometry of given type from feature points.
+
+   Supported types:
+   - GV_POINT    -> POINT
+   - GV_LINE     -> LINESTRING
+   - GV_BOUNDARY -> LINEARRING
+
+   You should free allocated memory by GEOSGeom_destroy().
+
+   \param Map pointer to Map_info structure
+   \param type feature type (see supported types)
+
+   \return pointer to GEOSGeometry instance
+   \return NULL on error
+ */
+GEOSGeometry *Vect_line_to_geos(struct Map_info *Map,
+				const struct line_pnts *points, int type)
+{
+    int i, with_z;
+    GEOSGeometry *geom;
+    GEOSCoordSequence *pseq;
+
+    G_debug(3, "Vect_line_to_geos(): type = %d", type);
+    
+    with_z = Vect_is_3d(Map);
+    
+    /* read only points / lines / boundaries */
+    if (!(type & (GV_POINT | GV_LINES)))
+	return NULL;
+
+    if (type == GV_POINT) { 
+	if (points->n_points != 1)
+	    /* point is not valid */
+	    return NULL;
+    }
+    else {			
+	if (points->n_points < 2)
+	    /* line/boundary is not valid */
+	    return NULL;
+    }
+    
+    pseq = GEOSCoordSeq_create(points->n_points, with_z ? 3 : 2);
+    
+    for (i = 0; i < points->n_points; i++) {
+	GEOSCoordSeq_setX(pseq, i, points->x[i]);
+	GEOSCoordSeq_setY(pseq, i, points->y[i]);
+	if (with_z)
+	    GEOSCoordSeq_setZ(pseq, i, points->z[i]);
+    }
+
+    if (type == GV_POINT)
+	geom = GEOSGeom_createPoint(pseq);
+    else if (type == GV_LINE)
+	geom = GEOSGeom_createLineString(pseq);
+    else { /* boundary */
+	geom = GEOSGeom_createLineString(pseq);
+	if (GEOSisRing(geom)) {
+	    /* GEOSGeom_destroy(geom); */
+	    geom = GEOSGeom_createLinearRing(pseq);
+	}
+    }
+    
+    /* GEOSCoordSeq_destroy(pseq); */
+
+    return geom;
+}
+
+/*!  
+  \brief Read line from coor file
+  
+  You should free allocated memory by GEOSGeom_destroy().
+
+  \param Map pointer to Map_info
+  \param offset line offset
+  \param[out] type feature type or NULL
+
+  \return pointer to GEOSGeometry
+  \return NULL on error
+  \return NULL dead line
+  \return NULL end of file
+*/
+GEOSGeometry *Vect__read_line_geos(struct Map_info *Map, long offset, int *type)
+{
+    int ftype;
+    
+    GEOSGeometry *geom;
+    GEOSCoordSequence *pseq;
+    
+    pseq = V1_read_line_geos(Map, offset, &ftype);
+    if (!pseq)
+	G_fatal_error(_("Unable to read line offset %ld"), offset);
+    
+    if (ftype & GV_POINT) {
+	G_debug(3, "    geos_type = point");
+	geom = GEOSGeom_createPoint(pseq);
+    }
+    else if (ftype & GV_LINE) {
+	G_debug(3, "    geos_type = linestring");
+	geom = GEOSGeom_createLineString(pseq);
+    }
+    else { /* boundary */
+	geom = GEOSGeom_createLineString(pseq);
+	if (GEOSisRing(geom)) {
+	    /* GEOSGeom_destroy(geom); */
+	    geom = GEOSGeom_createLinearRing(pseq);
+	    G_debug(3, "    geos_type = linearring");
+	}
+	else {
+	    G_debug(3, "    geos_type = linestring");
+	}
+    }
+        
+    /* GEOSCoordSeq_destroy(pseq); */
+    
+    if (type)
+      *type = ftype;
+    
+    return geom;
+}
+
+/*!  
+  \brief Read line from coor file into GEOSCoordSequence
+  
+  You should free allocated memory by GEOSCoordSeq_destroy().
+  
+  \param Map pointer to Map_info
+  \param line line id
+  
+  \return pointer to GEOSCoordSequence
+  \return empty GEOSCoordSequence for dead line or unsuppored feature type
+  \return NULL end of file
+*/
+GEOSCoordSequence *V2_read_line_geos(struct Map_info *Map, int line)
+{
+    int ftype;
+    P_LINE *Line;
+    
+    G_debug(3, "V2_read_line_geos(): line = %d", line);
+    
+    Line = Map->plus.Line[line];
+
+    if (Line == NULL)
+	G_fatal_error("V2_read_line_geos(): %s %d",
+		      _("Attempt to read dead line"), line);
+    
+    return V1_read_line_geos(Map, Line->offset, &ftype);
+}
+
+
+/*!  
+  \brief Read feature from coor file into GEOSCoordSequence
+
+  Note: Function reads only points, lines and boundaries, other
+  feature types are ignored (empty coord array is returned)!
+  
+  You should free allocated memory by GEOSCoordSeq_destroy().
+  
+  \param Map pointer to Map_info
+  \param offset line offset
+  \param[out] type feature type
+  
+  \return pointer to GEOSCoordSequence
+  \return empty GEOSCoordSequence for dead line or unsuppored feature type
+  \return NULL end of file
+*/
+GEOSCoordSequence *V1_read_line_geos(struct Map_info *Map, long offset, int *type)
+{
+    int i, n_points;
+    int do_cats, n_cats;
+    char rhead, nc;
+    long size;
+    double *x, *y, *z;
+    
+    GEOSCoordSequence *pseq;
+    
+    G_debug(3, "V1_read_line_geos(): offset = %ld", offset);
+    
+    Map->head.last_offset = offset;
+    
+    /* reads must set in_head, but writes use default */
+    dig_set_cur_port(&(Map->head.port));
+    
+    dig_fseek(&(Map->dig_fp), offset, 0);
+    
+    if (0 >= dig__fread_port_C(&rhead, 1, &(Map->dig_fp)))
+	return NULL;            /* end of file */
+    
+    if (!(rhead & 0x01))	/* dead line */
+	return GEOSCoordSeq_create(0, (Map->head.with_z) ? 3 : 2);
+
+    if (rhead & 0x02)		/* categories exists */
+	do_cats = 1;		/* do not return here let file offset moves forward to next */
+    else			/* line */
+	do_cats = 0;
+    
+    rhead >>= 2;
+    *type = dig_type_from_store((int) rhead);
+    
+    /* read only points / lines / boundaries */
+    if (!(*type & (GV_POINT | GV_LINES)))
+	return GEOSCoordSeq_create(0, (Map->head.with_z) ? 3 : 2);
+ 
+    /* skip categories */
+    if (do_cats) {
+	if (Map->head.Version_Minor == 1) {	/* coor format 5.1 */
+	    if (0 >= dig__fread_port_I(&n_cats, 1, &(Map->dig_fp)))
+		return NULL;
+	}
+	else {			                /* coor format 5.0 */
+	    if (0 >= dig__fread_port_C(&nc, 1, &(Map->dig_fp)))
+		return NULL;
+	    n_cats = (int) nc;
+	}
+	G_debug(3, "    n_cats = %d", n_cats);
+
+	if (Map->head.Version_Minor == 1) {	/* coor format 5.1 */
+	    size = (2 * PORT_INT) * n_cats;
+	}
+	else {		                /* coor format 5.0 */
+	    size = (PORT_SHORT + PORT_INT) * n_cats;
+	}
+	dig_fseek(&(Map->dig_fp), size, SEEK_CUR);
+    }
+
+    if (*type & GV_POINTS) {
+	    n_points = 1;
+    }
+    else {
+	if (0 >= dig__fread_port_I(&n_points, 1, &(Map->dig_fp)))
+	    return NULL;
+    }
+    
+    G_debug(3, "    n_points = %d dim = %d", n_points, (Map->head.with_z) ? 3 : 2);
+    
+    pseq = GEOSCoordSeq_create(n_points, (Map->head.with_z) ? 3 : 2);
+    
+    x = (double *) G_malloc(n_points * sizeof(double));
+    y = (double *) G_malloc(n_points * sizeof(double));
+    if (Map->head.with_z)
+	z = (double *) G_malloc(n_points * sizeof(double));
+    else
+	z = NULL;
+    
+    if (0 >= dig__fread_port_D(x, n_points, &(Map->dig_fp)))
+	return NULL; /* end of file */
+
+    if (0 >= dig__fread_port_D(y, n_points, &(Map->dig_fp)))
+	return NULL; /* end of file */
+
+    if (Map->head.with_z) {
+	if (0 >= dig__fread_port_D(z, n_points, &(Map->dig_fp)))
+	    return NULL; /* end of file */
+
+    }
+
+    for (i = 0; i < n_points; i++) {
+	GEOSCoordSeq_setX(pseq, i, x[i]);
+	GEOSCoordSeq_setY(pseq, i, y[i]);
+	if (Map->head.with_z)
+	    GEOSCoordSeq_setZ(pseq, i, z[i]);
+    }
+    
+    G_debug(3, "    off = %ld", dig_ftell(&(Map->dig_fp)));
+    
+    G_free((void *) x);
+    G_free((void *) y);
+    if (z)
+	G_free((void *) z);
+    
+    return pseq;
+}
+
+/*!
+   \brief Returns the polygon array of points, i.e. outer ring (shell)
+
+   You should free allocated memory by GEOSCoordSeq_destroy().
+
+   See also Vect_get_area_points().
+
+   \param Map pointer to Map_info
+   \param area area id
+
+   \return pointer to GEOSCoordSequence
+   \return empty GEOSCoordSequence for dead area
+   \return NULL on error
+ */
+GEOSCoordSequence *Vect_get_area_points_geos(struct Map_info *Map, int area)
+{
+    struct Plus_head *Plus;
+    P_AREA *Area;
+    
+    G_debug(3, "Vect_get_area_points_geos(): area = %d", area);
+    
+    Plus = &(Map->plus);
+    Area = Plus->Area[area];
+
+    if (Area == NULL) {		/* dead area */
+	G_warning(_("Attempt to read points of nonexistent area id %d"), area);
+	return NULL;		/* error , because we should not read dead areas */
+    }
+    
+    return read_polygon_points(Map, Area->n_lines, Area->lines);
+}
+
+/*!
+   \brief Returns the polygon (isle) array of points (inner ring)
+
+   You should free allocated memory by GEOSCoordSeq_destroy().
+   
+   See also Vect_get_isle_points().
+
+   \param Map pointer to Map_info
+   \param isle isel id
+
+   \return pointer to GEOSGeometry
+   \return NULL on error or dead line
+ */
+GEOSCoordSequence *Vect_get_isle_points_geos(struct Map_info *Map, int isle)
+{
+    struct Plus_head *Plus;
+    P_ISLE *Isle;
+    
+    G_debug(3, "Vect_get_isle_points_geos(): isle = %d", isle);
+
+    Plus = &(Map->plus);
+    Isle = Plus->Isle[isle];
+
+    return read_polygon_points(Map, Isle->n_lines, Isle->lines);
+}
+
+GEOSCoordSequence *read_polygon_points(struct Map_info *Map, int n_lines, int *lines)
+{
+    int i, j, k;
+    int line, aline;
+    unsigned int n_points, n_points_shell;
+    double x, y, z;
+    int *dir;
+    
+    GEOSCoordSequence **pseq, *pseq_shell;
+
+    G_debug(3, "  n_lines = %d", n_lines);
+    pseq = (GEOSCoordSequence **) G_malloc(n_lines * sizeof(GEOSCoordSequence *));
+    dir  = (int*) G_malloc(n_lines * sizeof(int));
+
+    n_points_shell = 0;
+    for (i = 0; i < n_lines; i++) {
+	line = lines[i];
+	aline = abs(line);
+	G_debug(3, "  append line(%d) = %d", i, line);
+
+	if (line > 0)
+	    dir[i] = GV_FORWARD;
+	else
+	    dir[i] = GV_BACKWARD;
+	
+	pseq[i] = V2_read_line_geos(Map, aline);
+	if (!(pseq[i])) {
+	    G_fatal_error(_("Unable to read feature id %d"), aline);
+	}
+	
+	GEOSCoordSeq_getSize(pseq[i], &n_points);
+	G_debug(3, "  line n_points = %d", n_points);
+	n_points_shell += n_points;
+    }
+
+    /* create shell (outer ring) */
+    pseq_shell = GEOSCoordSeq_create(n_points_shell, Map->head.with_z ? 3 : 2);
+    k = 0;
+    for (i = 0; i < n_lines; i++) {
+	GEOSCoordSeq_getSize(pseq[i], &n_points);
+	if (dir[i] == GV_FORWARD) {
+	    for (j = 0; j < (int) n_points; j++, k++) {
+		GEOSCoordSeq_getX(pseq[i], j, &x);
+		GEOSCoordSeq_setX(pseq_shell, k, x);
+		
+		GEOSCoordSeq_getY(pseq[i], j, &y);
+		GEOSCoordSeq_setY(pseq_shell, k, y);
+		
+		if (Map->head.with_z) {
+		    GEOSCoordSeq_getY(pseq[i], j, &z);
+		    GEOSCoordSeq_setZ(pseq_shell, k, z);
+		}
+	    }
+	}
+	else { /* GV_BACKWARD */
+	    for (j = (int) n_points - 1; j > -1; j--, k++) {
+		GEOSCoordSeq_getX(pseq[i], j, &x);
+		GEOSCoordSeq_setX(pseq_shell, k, x);
+		
+		GEOSCoordSeq_getY(pseq[i], j, &y);
+		GEOSCoordSeq_setY(pseq_shell, k, y);
+		
+		if (Map->head.with_z) {
+		    GEOSCoordSeq_getY(pseq[i], j, &z);
+		    GEOSCoordSeq_setZ(pseq_shell, k, z);
+		}
+	    }
+	}
+    }
+    
+    G_free((void *) pseq);
+    G_free((void *) dir);
+    
+    return pseq_shell;
+}
+#endif /* HAVE_GEOS */

Added: grass/branches/releasebranch_6_4/vector/v.select/args.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.select/args.c	                        (rev 0)
+++ grass/branches/releasebranch_6_4/vector/v.select/args.c	2010-11-07 17:37:50 UTC (rev 44217)
@@ -0,0 +1,89 @@
+#include <grass/gis.h>
+#include <grass/Vect.h>
+#include <grass/glocale.h>
+
+#include "proto.h"
+
+void parse_options(struct GParm *parm, struct GFlag *flag)
+{
+    parm->input[0] = G_define_standard_option(G_OPT_V_INPUT);
+    parm->input[0]->description = _("Name of input vector map (A)");
+    parm->input[0]->key = "ainput";
+    
+    parm->type[0] = G_define_standard_option(G_OPT_V_TYPE);
+    parm->type[0]->label = _("Feature type (vector map A)");
+    parm->type[0]->key = "atype";
+    parm->type[0]->guisection = _("Selection");
+
+    parm->field[0] = G_define_standard_option(G_OPT_V_FIELD);
+    parm->field[0]->label = _("Layer number (vector map A)");
+    parm->field[0]->key = "alayer";
+    parm->field[0]->guisection = _("Selection");
+
+    parm->input[1] = G_define_standard_option(G_OPT_V_INPUT);
+    parm->input[1]->description = _("Name of input vector map (B)");
+    parm->input[1]->key = "binput";
+
+    parm->type[1] = G_define_standard_option(G_OPT_V_TYPE);
+    parm->type[1]->label = _("Feature type (vector map B)");
+    parm->type[1]->key = "btype";
+    parm->type[1]->guisection = _("Selection");
+    
+    parm->field[1] = G_define_standard_option(G_OPT_V_FIELD);
+    parm->field[1]->label = _("Layer number (vector map B)");
+    parm->field[1]->key = "blayer";
+    parm->field[1]->guisection = _("Selection");
+    
+    parm->output = G_define_standard_option(G_OPT_V_OUTPUT);
+
+    parm->operator = G_define_option();
+    parm->operator->key = "operator";
+    parm->operator->type = TYPE_STRING;
+    parm->operator->required = NO;
+    parm->operator->multiple = NO;
+    parm->operator->label =
+	_("Operator defines required relation between features");
+    parm->operator->description =
+	_("A feature is written to output if the result of operation 'ainput operator binput' is true. "
+	  "An input feature is considered to be true, if category of given layer is defined.");
+    parm->operator->answer = "overlap";
+#ifndef HAVE_GEOS
+    parm->operator->options = "overlap";
+    parm->operator->descriptions = _("overlap;features partially or completely overlap");
+
+    parm->relate = NULL;
+#else
+    parm->operator->options = "overlap,equals,disjoint,intersects,touches,crosses,within,contains,overlaps,relate";
+    parm->operator->descriptions = _("overlap;features partially or completely overlap;"
+				     "equals;features are spatially equals (using GEOS);"
+				    "disjoint;features do not spatially intersect (using GEOS);"
+				    "intersects;features spatially intersect (using GEOS);"
+				    "touches;features spatially touches (using GEOS);"
+				    "crosses;features spatially crosses (using GEOS);"
+				    "within;feature A is completely inside feature B (using GEOS);"
+				    "contains;feature B is completely inside feature A (using GEOS);"
+				    "overlaps;features spatially overlap (using GEOS);"
+				    "relate;feature A is spatially related to feature B (using GEOS, "
+				    "requires 'relate' option);");
+    
+    parm->relate = G_define_option();
+    parm->relate->key = "relate";
+    parm->relate->type = TYPE_STRING;
+    parm->relate->required = NO;
+    parm->relate->multiple = NO;
+    parm->relate->description = _("Intersection Matrix Pattern used for 'relate' operator");
+#endif
+
+    flag->table = G_define_flag();
+    flag->table->key = 't';
+    flag->table->description = _("Do not create attribute table");
+    
+    flag->cat = G_define_flag();
+    flag->cat->key = 'c';
+    flag->cat->description = _("Do not skip features without category");
+    
+    flag->reverse = G_define_flag();
+    flag->reverse->key = 'r';
+    flag->reverse->description = _("Reverse selection");
+    flag->reverse->guisection = _("Selection");
+}


Property changes on: grass/branches/releasebranch_6_4/vector/v.select/args.c
___________________________________________________________________
Added: svn:mime-type
   + text/x-csrc
Added: svn:eol-style
   + native

Modified: grass/branches/releasebranch_6_4/vector/v.select/description.html
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.select/description.html	2010-11-07 17:34:38 UTC (rev 44216)
+++ grass/branches/releasebranch_6_4/vector/v.select/description.html	2010-11-07 17:37:50 UTC (rev 44217)
@@ -1,17 +1,37 @@
 <h2>DESCRIPTION</h2>
 
 <em>v.select</em> allows the user to select features from a vector 
-by features from another one.
+map by features from another one.
 
+<p>
+Supported operators (without GEOS):
+<ul>
+  <li><tt>overlap</tt> - features partially or completely overlap
+</ul>
+
+Supported operators (with GEOS):
+<ul>
+  <li><tt>equals</tt> - features are spatially equals</li>
+  <li><tt>disjoint</tt> - features do not spatially intersect</li>
+  <li><tt>intersects</tt> - features spatially intersect</li>
+  <li><tt>touches</tt> - features spatially touches</li>
+  <li><tt>crosses</tt> - features spatially crosses</li>
+  <li><tt>within</tt> - feature A is completely inside feature B</li>
+  <li><tt>contains</tt> - feature B is completely inside feature A</li>
+  <li><tt>overlaps</tt> - features spatially overlap</li>
+  <li><tt>relate</tt> - feature A is spatially related to feature B</li>
+</ul>
+
 <h2>NOTES</h2>
 
 Only features with category numbers will be considered. If required
-the <em>v.category</em> module can be used to add them. Typically
-boundaries do not need to be given a category number, as an area's
-attributes are inherited from the centroid. Typically points, lines, and
-centroids will always want to have a cat number.
+the <a href="v.category.html">v.category</a> module can be used to add
+them. Typically boundaries do not need to be given a category number,
+as an area's attributes are inherited from the centroid. Typically
+points, lines, and centroids will always want to have a cat number.
+
 <p>
-e.g. take a road which separates two farms. It is ambiguous as to which
+E.g. take a road which separates two farms. It is ambiguous as to which
 farm an attribute that is attached to the road belongs to. The boundary
 only needs a cat number if it will hold its own attributes, such as road
 name or pavement form. A centroid in each paddock holds the information
@@ -20,12 +40,11 @@
 
 <h2>EXAMPLES</h2>
 
-Extract forest fire points from larger fire map:
+Extract forest fire points from larger fire vector map:
 
 <div class="code"><pre>
-v.select ainput=fire binput=forest output=forest_fire
+v.select ainput=fire binput=forest output=forest_fire operator=overlap
 </pre></div>
-<P>
 
 Extract Italian rivers from VMAP0 watercourses map:
 
@@ -34,18 +53,29 @@
          output=watrcrsl_italy operator=overlap
 </pre></div>
 
+<h2>TODO</h2>
+ 
+Processing areas with GEOS is currently incredibly slow. Significant
+speed-up is required.
 
 <h2>SEE ALSO</h2>
 
 <em>
 <a HREF="v.category.html">v.category</a>,
-<a HREF="v.overlay.html">v.overlay</a>,
-<a HREF="sql.html">GRASS SQL interface</a></em>
+<a HREF="v.overlay.html">v.overlay</a>
+</em>
 
+<p>
+<em>
+<a HREF="sql.html">GRASS SQL interface</a>
+</em>
 
+
 <h2>AUTHORS</h2>
 
-Radim Blazek
+Radim Blazek<br>
 
+Updated by Martin Landa, CTU in Prague, Czech Republic (GEOS support)
+
 <p>
 <i>Last changed: $Date$</i>

Added: grass/branches/releasebranch_6_4/vector/v.select/geos.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.select/geos.c	                        (rev 0)
+++ grass/branches/releasebranch_6_4/vector/v.select/geos.c	2010-11-07 17:37:50 UTC (rev 44217)
@@ -0,0 +1,123 @@
+#include <grass/gis.h>
+#include <grass/dbmi.h>
+#include <grass/Vect.h>
+#include <grass/glocale.h>
+
+#include "proto.h"
+
+#ifdef HAVE_GEOS
+
+static int relate_geos(struct Map_info *, const GEOSGeometry *,
+		       int, int, const char *, int);
+
+int line_relate_geos(struct Map_info *BIn, const GEOSGeometry * AGeom,
+		     int bline, int operator, const char *relate)
+{
+    return relate_geos(BIn, AGeom, bline, operator, relate, 0);
+}
+
+int area_relate_geos(struct Map_info *BIn, const GEOSGeometry * AGeom,
+		     int barea, int operator, const char *relate)
+{
+    return relate_geos(BIn, AGeom, barea, operator, relate, 1);
+}
+
+int relate_geos(struct Map_info *BIn, const GEOSGeometry * AGeom,
+		int bfid, int operator, const char *relate, int area)
+{
+    GEOSGeometry *BGeom = NULL;
+    int found;
+
+    found = 0;
+    if (area)
+	BGeom = Vect_read_area_geos(BIn, bfid);
+    else
+	BGeom = Vect_read_line_geos(BIn, bfid, NULL);
+
+    if (!BGeom)
+	return 0;
+
+    /* 
+       if (!BGeom) {
+       if (area)
+       G_fatal_error(_("Unable to read area id %d from vector map <%s>"),
+       bfid, Vect_get_full_name(BIn));
+       else
+       G_fatal_error(_("Unable to read line id %d from vector map <%s>"),
+       bfid, Vect_get_full_name(BIn));
+       }
+     */
+    switch (operator) {
+    case OP_EQUALS:{
+	    if (GEOSEquals(AGeom, BGeom)) {
+		found = 1;
+		break;
+	    }
+	    break;
+	}
+    case OP_DISJOINT:{
+	    if (GEOSDisjoint(AGeom, BGeom)) {
+		found = 1;
+		break;
+	    }
+	    break;
+	}
+    case OP_INTERSECTS:{
+	    if (GEOSIntersects(AGeom, BGeom)) {
+		found = 1;
+		break;
+	    }
+	    break;
+	}
+    case OP_TOUCHES:{
+	    if (GEOSTouches(AGeom, BGeom)) {
+		found = 1;
+		break;
+	    }
+	    break;
+	}
+    case OP_CROSSES:{
+	    if (GEOSCrosses(AGeom, BGeom)) {
+		found = 1;
+		break;
+	    }
+	    break;
+	}
+    case OP_WITHIN:{
+	    if (GEOSWithin(AGeom, BGeom)) {
+		found = 1;
+		break;
+	    }
+	    break;
+	}
+    case OP_CONTAINS:{
+	    if (GEOSContains(AGeom, BGeom)) {
+		found = 1;
+		break;
+	    }
+	    break;
+	}
+    case OP_OVERLAPS:{
+	    if (GEOSOverlaps(AGeom, BGeom)) {
+		found = 1;
+		break;
+	    }
+	    break;
+	}
+    case OP_RELATE:{
+	    if (GEOSRelatePattern(AGeom, BGeom, relate)) {
+		found = 1;
+		break;
+	    }
+	    break;
+	}
+    default:
+	break;
+    }
+
+    if (BGeom)
+	GEOSGeom_destroy(BGeom);
+
+    return found;
+}
+#endif /* HAVE_GEOS */


Property changes on: grass/branches/releasebranch_6_4/vector/v.select/geos.c
___________________________________________________________________
Added: svn:mime-type
   + text/x-csrc
Added: svn:eol-style
   + native

Modified: grass/branches/releasebranch_6_4/vector/v.select/main.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.select/main.c	2010-11-07 17:34:38 UTC (rev 44216)
+++ grass/branches/releasebranch_6_4/vector/v.select/main.c	2010-11-07 17:37:50 UTC (rev 44217)
@@ -4,8 +4,9 @@
  * MODULE:       v.select - select features from one map by features in another map.
  * AUTHOR(S):    Radim Blazek <radim.blazek gmail.com> (original contributor)
  *               Glynn Clements <glynn gclements.plus.com>, Markus Neteler <neteler itc.it>
+ *               Martin Landa <landa.martin gmail.com> (GEOS support)
  * PURPOSE:      
- * COPYRIGHT:    (C) 2003-2008 by the GRASS Development Team
+ * COPYRIGHT:    (C) 2003-2010 by the GRASS Development Team
  *
  *               This program is free software under the GNU General Public
  *               License (>=v2). Read the file COPYING that comes with GRASS
@@ -16,110 +17,25 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+#include <grass/config.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>
 
-#define OP_OVERLAP 0
+#include "proto.h"
 
-/* Add all elements of area A to the list */
-void add_aarea(struct Map_info *In, int aarea, int *ALines)
-{
-    int i, j, aline, naisles, aisle, acentroid;
-    static struct ilist *BoundList = NULL;
-
-    if (!BoundList)
-	BoundList = Vect_new_list();
-
-    acentroid = Vect_get_area_centroid(In, aarea);
-    ALines[acentroid] = 1;
-
-    Vect_get_area_boundaries(In, aarea, BoundList);
-    for (i = 0; i < BoundList->n_values; i++) {
-	aline = abs(BoundList->value[i]);
-	ALines[aline] = 1;
-    }
-
-    naisles = Vect_get_area_num_isles(In, aarea);
-
-    for (j = 0; j < naisles; j++) {
-	aisle = Vect_get_area_isle(In, aarea, j);
-
-	Vect_get_isle_boundaries(In, aisle, BoundList);
-	for (i = 0; i < BoundList->n_values; i++) {
-	    aline = abs(BoundList->value[i]);
-	    ALines[aline] = 1;
-	}
-    }
-}
-
-/* Returns 1 if line1 from Map1 overlaps area2 from Map2,
- *         0 otherwise */
-int line_overlap_area(struct Map_info *LMap, int line, struct Map_info *AMap,
-		      int area)
-{
-    int i, nisles, isle;
-    static struct line_pnts *LPoints = NULL;
-    static struct line_pnts *APoints = NULL;
-
-    G_debug(4, "line_overlap_area line = %d area = %d", line, area);
-
-    if (!LPoints) {
-	LPoints = Vect_new_line_struct();
-	APoints = Vect_new_line_struct();
-    }
-
-    /* Read line coordinates */
-    Vect_read_line(LMap, LPoints, NULL, line);
-
-    /* Try if any of line vertices is within area */
-    for (i = 0; i < LPoints->n_points; i++) {
-	if (Vect_point_in_area(AMap, area, LPoints->x[i], LPoints->y[i])) {
-	    G_debug(4, "  -> line vertex inside area");
-	    return 1;
-	}
-    }
-
-    /* Skip points */
-    if (LPoints->n_points < 2)
-	return 0;
-    
-    /* Try intersections of line with area/isles boundary */
-    /* Outer boundary */
-    Vect_get_area_points(AMap, area, APoints);
-
-    if (Vect_line_check_intersection(LPoints, APoints, 0)) {
-	G_debug(4, "  -> line intersects outer area boundary");
-	return 1;
-    }
-
-    nisles = Vect_get_area_num_isles(AMap, area);
-
-    for (i = 0; i < nisles; i++) {
-	isle = Vect_get_area_isle(AMap, area, i);
-	Vect_get_isle_points(AMap, isle, APoints);
-
-	if (Vect_line_check_intersection(LPoints, APoints, 0)) {
-	    G_debug(4, "  -> line intersects area island boundary");
-	    return 1;
-	}
-    }
-    return 0;
-}
-
 int main(int argc, char *argv[])
 {
-    int i;
-    int input, operator;
-    int aline, nalines;
-    int type[2], field[2];
+    int i, iopt;
+    int operator;
+    int aline, nalines, nskipped;
+    int ltype, itype[2], ifield[2];
     int **cats, *ncats, nfields, *fields;
     char *mapset[2], *pre[2];
     struct GModule *module;
-    struct Option *in_opt[2], *out_opt, *type_opt[2], *field_opt[2],
-	*operator_opt;
-    struct Flag *table_flag, *r_flag;
+    struct GParm parm;
+    struct GFlag flag;
     struct Map_info In[2], Out;
     struct field_info *IFi, *OFi;
     struct line_pnts *APoints, *BPoints;
@@ -133,88 +49,67 @@
     pre[1] = "b";
 
     module = G_define_module();
-    module->keywords = _("vector, query");
+    module->keywords = _("vector, spatial query");
     module->description =
 	_("Selects features from vector map (A) by features from other vector map (B).");
 
-    in_opt[0] = G_define_standard_option(G_OPT_V_INPUT);
-    in_opt[0]->description = _("Name of input vector map (A)");
-    in_opt[0]->key = "ainput";
+    parse_options(&parm, &flag);
     
-    type_opt[0] = G_define_standard_option(G_OPT_V_TYPE);
-    type_opt[0]->label = _("Feature type (vector map A)");
-    type_opt[0]->key = "atype";
-    type_opt[0]->guisection = _("Selection");
-
-    field_opt[0] = G_define_standard_option(G_OPT_V_FIELD);
-    field_opt[0]->label = _("Layer number (vector map A)");
-    field_opt[0]->key = "alayer";
-    field_opt[0]->guisection = _("Selection");
-
-    in_opt[1] = G_define_standard_option(G_OPT_V_INPUT);
-    in_opt[1]->description = _("Name of input vector map (B)");
-    in_opt[1]->key = "binput";
-
-    type_opt[1] = G_define_standard_option(G_OPT_V_TYPE);
-    type_opt[1]->label = _("Feature type (vector map B)");
-    type_opt[1]->key = "btype";
-    type_opt[1]->guisection = _("Selection");
+    if (G_parser(argc, argv))
+	exit(EXIT_FAILURE);
     
-    field_opt[1] = G_define_standard_option(G_OPT_V_FIELD);
-    field_opt[1]->label = _("Layer number (vector map B)");
-    field_opt[1]->key = "blayer";
-    field_opt[1]->guisection = _("Selection");
+    if (parm.operator->answer[0] == 'e')
+	operator = OP_EQUALS;
+    else if (parm.operator->answer[0] == 'd') {
+	/* operator = OP_DISJOINT; */
+	operator = OP_INTERSECTS;
+	flag.reverse->answer = YES;
+    }
+    else if (parm.operator->answer[0] == 'i')
+	operator = OP_INTERSECTS;
+    else if (parm.operator->answer[0] == 't')
+	operator = OP_TOUCHES;
+    else if (parm.operator->answer[0] == 'c' && parm.operator->answer[1] == 'r')
+	operator = OP_CROSSES;
+    else if (parm.operator->answer[0] == 'w')
+	operator = OP_WITHIN;
+    else if (parm.operator->answer[0] == 'c' && parm.operator->answer[1] == 'o')
+	operator = OP_CONTAINS;
+    else if (parm.operator->answer[0] == 'o') {
+	if (strcmp(parm.operator->answer, "overlaps") == 0)
+	    operator = OP_OVERLAPS;
+	else
+	    operator = OP_OVERLAP;
+    }
+    else if (parm.operator->answer[0] == 'r')
+	operator = OP_RELATE;
+    else
+	G_fatal_error(_("Unknown operator"));
     
-    out_opt = G_define_standard_option(G_OPT_V_OUTPUT);
+    if (operator == OP_RELATE && !parm.relate->answer) {
+	G_fatal_error(_("Required parameter <%s> not set"),
+		      parm.relate->key);
+    }
+    
+    for (iopt = 0; iopt < 2; iopt++) {
+	itype[iopt] = Vect_option_to_types(parm.type[iopt]);
+	ifield[iopt] = atoi(parm.field[iopt]->answer);
 
-    operator_opt = G_define_option();
-    operator_opt->key = "operator";
-    operator_opt->type = TYPE_STRING;
-    operator_opt->required = NO;
-    operator_opt->multiple = NO;
-    operator_opt->options = "overlap";
-    operator_opt->answer = "overlap";
-    operator_opt->label =
-	_("Operator defines required relation between features");
-    operator_opt->description =
-	_("A feature is written to output if the result of operation 'ainput operator binput' is true. "
-	  "An input feature is considered to be true, if category of given layer is defined.");
-    operator_opt->descriptions = _("overlap;features partially or completely overlap");
-
-    table_flag = G_define_flag();
-    table_flag->key = 't';
-    table_flag->description = _("Do not create attribute table");
-
-    r_flag = G_define_flag();
-    r_flag->key = 'r';
-    r_flag->description = _("Reverse selection");
-    r_flag->guisection = _("Selection");
-
-    if (G_parser(argc, argv))
-	exit(EXIT_FAILURE);
-
-    if (operator_opt->answer[0] == 'o')
-	operator = OP_OVERLAP;
-
-    for (input = 0; input < 2; input++) {
-	type[input] = Vect_option_to_types(type_opt[input]);
-	field[input] = atoi(field_opt[input]->answer);
-
-	Vect_check_input_output_name(in_opt[input]->answer, out_opt->answer,
+	Vect_check_input_output_name(parm.input[iopt]->answer, parm.output->answer,
 				     GV_FATAL_EXIT);
 
-	if ((mapset[input] =
-	     G_find_vector2(in_opt[input]->answer, NULL)) == NULL) {
+	if ((mapset[iopt] =
+	     G_find_vector2(parm.input[iopt]->answer, NULL)) == NULL) {
 	    G_fatal_error(_("Vector map <%s> not found"),
-			  in_opt[input]->answer);
+			  parm.input[iopt]->answer);
 	}
-
+	
 	Vect_set_open_level(2);
-	Vect_open_old(&(In[input]), in_opt[input]->answer, mapset[input]);
+	Vect_open_old(&(In[iopt]), parm.input[iopt]->answer, mapset[iopt]);
     }
-
+    
     /* Read field info */
-    IFi = Vect_get_field(&(In[0]), field[0]);
+    IFi = Vect_get_field(&(In[0]), ifield[0]);
 
     APoints = Vect_new_line_struct();
     BPoints = Vect_new_line_struct();
@@ -225,20 +120,32 @@
     BoundList = Vect_new_list();
 
     /* Open output */
-    Vect_open_new(&Out, out_opt->answer, Vect_is_3d(&(In[0])));
-    Vect_set_map_name(&Out, "Output from v.select");
+    Vect_open_new(&Out, parm.output->answer, Vect_is_3d(&(In[0])));
+    Vect_set_map_name(&Out, _("Output from v.select"));
     Vect_set_person(&Out, G_whoami());
     Vect_copy_head_data(&(In[0]), &Out);
     Vect_hist_copy(&(In[0]), &Out);
     Vect_hist_command(&Out);
 
+    nskipped = 0;
     nalines = Vect_get_num_lines(&(In[0]));
 
+#ifdef HAVE_GEOS
+    initGEOS(G_message, G_fatal_error);
+    GEOSGeometry *AGeom = NULL;
+#else
+    void *AGeom = NULL;
+#endif
+
     /* Alloc space for input lines array */
     ALines = (int *)G_calloc(nalines + 1, sizeof(int));
 
+    G_message(_("Building spatial index..."));
+    Vect_build_spatial_index(&In[0]);
+    Vect_build_spatial_index(&In[1]);
+    
     /* Lines in A. Go through all lines and mark those that meets condition */
-    if (type[0] & (GV_POINTS | GV_LINES)) {
+    if (itype[0] & (GV_POINTS | GV_LINES)) {
 	G_message(_("Processing features..."));
 	
 	for (aline = 1; aline <= nalines; aline++) {
@@ -248,75 +155,124 @@
 	    G_percent(aline, nalines, 2);	/* must be before any continue */
 
 	    /* Check category */
-	    if (Vect_get_line_cat(&(In[0]), aline, field[0]) < 0)
+	    if (!flag.cat->answer && Vect_get_line_cat(&(In[0]), aline, ifield[0]) < 0) {
+		nskipped++;
 		continue;
+	    }
 
 	    /* Read line and check type */
-	    if (!(Vect_read_line(&(In[0]), APoints, NULL, aline) & type[0]))
+	    if (operator != OP_OVERLAP) {
+#ifdef HAVE_GEOS
+		AGeom = Vect_read_line_geos(&(In[0]), aline, &ltype);
+#endif
+		if (!(ltype & (GV_POINT | GV_LINE)))
+		    continue;
+
+		if (!AGeom)
+		    G_fatal_error(_("Unable to read line id %d from vector map <%s>"),
+				  aline, Vect_get_full_name(&(In[0])));
+	    }
+	    else {
+		ltype = Vect_read_line(&(In[0]), APoints, NULL, aline);
+	    }
+	    
+	    if (!(ltype & itype[0]))
 		continue;
-
+	    
 	    Vect_get_line_box(&(In[0]), aline, &abox);
 	    abox.T = PORT_DOUBLE_MAX;
 	    abox.B = -PORT_DOUBLE_MAX;
 
 	    /* Check if this line overlaps any feature in B */
-
 	    /* x Lines in B */
-	    if (type[1] & (GV_POINTS | GV_LINES)) {
+	    if (itype[1] & (GV_POINTS | GV_LINES)) {
 		int i;
 		int found = 0;
-
+		
 		/* Lines */
-		Vect_select_lines_by_box(&(In[1]), &abox, type[1], List);
+		Vect_select_lines_by_box(&(In[1]), &abox, itype[1], List);
 		for (i = 0; i < List->n_values; i++) {
 		    int bline;
-
+		    
 		    bline = List->value[i];
 		    G_debug(3, "  bline = %d", bline);
-
+		    
 		    /* Check category */
-		    if (!Vect_get_line_cat(&(In[1]), bline, field[1]) < 0)
+		    if (!flag.cat->answer && Vect_get_line_cat(&(In[1]), bline, ifield[1]) < 0) {
+			nskipped++;
 			continue;
+		    }
+		    
+		    if (operator != OP_OVERLAP) {
+#ifdef HAVE_GEOS
+			if(line_relate_geos(&(In[1]), AGeom,
+					    bline, operator, parm.relate->answer)) {
 
-		    Vect_read_line(&(In[1]), BPoints, NULL, bline);
+			    found = 1;
+			    break;
+			}
+#endif
+		    }
+		    else {
+			Vect_read_line(&(In[1]), BPoints, NULL, bline);
 
-		    if (Vect_line_check_intersection(APoints, BPoints, 0)) {
-			found = 1;
-			break;
+			if (Vect_line_check_intersection(APoints, BPoints, 0)) {
+			    found = 1;
+			    break;
+			}
 		    }
 		}
-
+		
 		if (found) {
 		    ALines[aline] = 1;
 		    continue;	/* Go to next A line */
 		}
 	    }
-
+	    
 	    /* x Areas in B. */
-	    if (type[1] & GV_AREA) {
+	    if (itype[1] & GV_AREA) {
 		int i;
-
+		
 		Vect_select_areas_by_box(&(In[1]), &abox, List);
 		for (i = 0; i < List->n_values; i++) {
 		    int barea;
-
+		    
 		    barea = List->value[i];
 		    G_debug(3, "  barea = %d", barea);
-
-		    if (Vect_get_area_cat(&(In[1]), barea, field[1]) < 0)
+		    
+		    if (Vect_get_area_cat(&(In[1]), barea, ifield[1]) < 0) {
+			nskipped++;
 			continue;
+		    }
 
-		    if (line_overlap_area(&(In[0]), aline, &(In[1]), barea)) {
-			ALines[aline] = 1;
-			break;
+		    if (operator != OP_OVERLAP) {
+#ifdef HAVE_GEOS
+			if(area_relate_geos(&(In[1]), AGeom,
+					    barea, operator, parm.relate->answer)) {
+			    ALines[aline] = 1;
+			    break;
+			}
+#endif
 		    }
+		    else {
+			if (line_overlap_area(&(In[0]), aline, &(In[1]), barea)) {
+			    ALines[aline] = 1;
+			    break;
+			}
+		    }
 		}
 	    }
+	    if (operator != OP_OVERLAP) {
+#ifdef HAVE_GEOS
+		GEOSGeom_destroy(AGeom);
+#endif
+		AGeom = NULL;
+	    }
 	}
     }
-
+    
     /* Areas in A. */
-    if (type[0] & GV_AREA) {
+    if (itype[0] & GV_AREA) {
 	int aarea, naareas;
 
 	G_message(_("Processing areas..."));
@@ -324,38 +280,62 @@
 	naareas = Vect_get_num_areas(&(In[0]));
 
 	for (aarea = 1; aarea <= naareas; aarea++) {
-	    int i;
 	    BOUND_BOX abox;
 
 	    G_percent(aarea, naareas, 2);	/* must be before any continue */
 
-	    if (Vect_get_area_cat(&(In[0]), aarea, field[0]) < 0)
+	    if (Vect_get_area_cat(&(In[0]), aarea, ifield[0]) < 0) {
+		nskipped++;
 		continue;
+	    }
+	
 	    Vect_get_area_box(&(In[0]), aarea, &abox);
 	    abox.T = PORT_DOUBLE_MAX;
 	    abox.B = -PORT_DOUBLE_MAX;
 
+	    if (operator != OP_OVERLAP) {
+#ifdef HAVE_GEOS
+		AGeom = Vect_read_area_geos(&(In[0]), aarea);
+#endif
+		if (!AGeom)
+		    G_fatal_error(_("Unable to read area id %d from vector map <%s>"),
+				  aline, Vect_get_full_name(&(In[0])));
+	    }
+
 	    /* x Lines in B */
-	    if (type[1] & (GV_POINTS | GV_LINES)) {
-		Vect_select_lines_by_box(&(In[1]), &abox, type[1], List);
+	    if (itype[1] & (GV_POINTS | GV_LINES)) {
+		Vect_select_lines_by_box(&(In[1]), &abox, itype[1], List);
 
 		for (i = 0; i < List->n_values; i++) {
 		    int bline;
 
 		    bline = List->value[i];
 
-		    if (Vect_get_line_cat(&(In[1]), bline, field[1]) < 0)
+		    if (!flag.cat->answer && Vect_get_line_cat(&(In[1]), bline, ifield[1]) < 0) {
+			nskipped++;
 			continue;
-
-		    if (line_overlap_area(&(In[1]), bline, &(In[0]), aarea)) {
-			add_aarea(&(In[0]), aarea, ALines);
-			continue;
 		    }
+		    
+		    if (operator != OP_OVERLAP) {
+#ifdef HAVE_GEOS
+			if(line_relate_geos(&(In[1]), AGeom,
+					    bline, operator, parm.relate->answer)) {
+			    add_aarea(&(In[0]), aarea, ALines);
+			    break;
+			}
+#endif
+		    }
+		    else {
+			if (line_overlap_area(&(In[1]), bline, &(In[0]), aarea)) {
+			    add_aarea(&(In[0]), aarea, ALines);
+			    continue;
+			}
+		    }
 		}
 	    }
 
 	    /* x Areas in B */
-	    if (type[1] & GV_AREA) {
+	    if (itype[1] & GV_AREA) {
 		int naisles;
 		int found = 0;
 
@@ -395,25 +375,38 @@
 			barea = TmpList->value[j];
 			G_debug(3, "  barea = %d", barea);
 
-			if (Vect_get_area_cat(&(In[1]), barea, field[1]) < 0)
+			if (Vect_get_area_cat(&(In[1]), barea, ifield[1]) < 0) {
+			    nskipped++;
 			    continue;
+			}
 
 			/* Check if any centroid of area B is in area A.
 			 * This test is important in if area B is completely within area A */
 			bcentroid = Vect_get_area_centroid(&(In[1]), barea);
 			Vect_read_line(&(In[1]), BPoints, NULL, bcentroid);
 
-			if (Vect_point_in_area
-			    (&(In[0]), aarea, BPoints->x[0], BPoints->y[0])) {
-			    found = 1;
-			    break;
+			if (operator != OP_OVERLAP) {
+#ifdef HAVE_GEOS
+			    if(area_relate_geos(&(In[1]), AGeom,
+						barea, operator, parm.relate->answer)) {
+				found = 1;
+				break;
+			    }
+#endif
 			}
-
-			/* Check intersectin of lines from List with area B */
-			if (line_overlap_area
-			    (&(In[0]), aline, &(In[1]), barea)) {
-			    found = 1;
-			    break;
+			else {
+			    if (Vect_point_in_area(&(In[0]), aarea,
+						   BPoints->x[0], BPoints->y[0])) {
+				found = 1;
+				break;
+			    }
+			    
+			    /* Check intersectin of lines from List with area B */
+			    if (line_overlap_area(&(In[0]), aline,
+						  &(In[1]), barea)) {
+				found = 1;
+				break;
+			    }
 			}
 		    }
 		    if (found) {
@@ -422,11 +415,21 @@
 		    }
 		}
 	    }
+	    if (operator != OP_OVERLAP) {
+#ifdef HAVE_GEOS
+		GEOSGeom_destroy(AGeom);
+#endif
+		AGeom = NULL;
+	    }
 	}
     }
-
+    
     Vect_close(&(In[1]));
 
+#ifdef HAVE_GEOS
+    finishGEOS();
+#endif
+
     /* Write lines */
     nfields = Vect_cidx_get_num_fields(&(In[0]));
     cats = (int **)G_malloc(nfields * sizeof(int *));
@@ -447,14 +450,14 @@
 	G_debug(4, "aline = %d ALines[aline] = %d", aline, ALines[aline]);
 	G_percent(aline, nalines, 2);
 	
-	if ((!r_flag->answer && !(ALines[aline])) ||
-	    (r_flag->answer && ALines[aline]))
+	if ((!flag.reverse->answer && !(ALines[aline])) ||
+	    (flag.reverse->answer && ALines[aline]))
 	    continue;
 
 	atype = Vect_read_line(&(In[0]), APoints, ACats, aline);
 	Vect_write_line(&Out, atype, APoints, ACats);
 
-	if (!(table_flag->answer) && (IFi != NULL)) {
+	if (!(flag.table->answer) && (IFi != NULL)) {
 	    for (i = 0; i < ACats->n_cats; i++) {
 		int f, j;
 
@@ -471,7 +474,7 @@
     }
 
     /* Copy tables */
-    if (!(table_flag->answer)) {
+    if (!(flag.table->answer)) {
 	int ttype, ntabs = 0;
 
 	G_message(_("Writing attributes..."));
@@ -535,7 +538,11 @@
     Vect_build(&Out);
     Vect_close(&Out);
 
-    G_done_msg(" ");
+    if (nskipped > 0) {
+      G_warning(_("%d features without category skipped"), nskipped);
+    }
 
+    G_done_msg(_("%d features written to output."), Vect_get_num_lines(&Out));
+
     exit(EXIT_SUCCESS);
 }

Added: grass/branches/releasebranch_6_4/vector/v.select/overlap.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.select/overlap.c	                        (rev 0)
+++ grass/branches/releasebranch_6_4/vector/v.select/overlap.c	2010-11-07 17:37:50 UTC (rev 44217)
@@ -0,0 +1,90 @@
+#include <grass/gis.h>
+#include <grass/dbmi.h>
+#include <grass/Vect.h>
+
+#include "proto.h"
+
+/* Add all elements of area A to the list */
+void add_aarea(struct Map_info *In, int aarea, int *ALines)
+{
+    int i, j, aline, naisles, aisle, acentroid;
+    static struct ilist *BoundList = NULL;
+
+    if (!BoundList)
+	BoundList = Vect_new_list();
+
+    acentroid = Vect_get_area_centroid(In, aarea);
+    ALines[acentroid] = 1;
+
+    Vect_get_area_boundaries(In, aarea, BoundList);
+    for (i = 0; i < BoundList->n_values; i++) {
+	aline = abs(BoundList->value[i]);
+	ALines[aline] = 1;
+    }
+
+    naisles = Vect_get_area_num_isles(In, aarea);
+
+    for (j = 0; j < naisles; j++) {
+	aisle = Vect_get_area_isle(In, aarea, j);
+
+	Vect_get_isle_boundaries(In, aisle, BoundList);
+	for (i = 0; i < BoundList->n_values; i++) {
+	    aline = abs(BoundList->value[i]);
+	    ALines[aline] = 1;
+	}
+    }
+}
+
+/* Returns 1 if line1 from Map1 overlaps area2 from Map2,
+ *         0 otherwise */
+int line_overlap_area(struct Map_info *LMap, int line, struct Map_info *AMap,
+		      int area)
+{
+    int i, nisles, isle;
+    static struct line_pnts *LPoints = NULL;
+    static struct line_pnts *APoints = NULL;
+
+    G_debug(4, "line_overlap_area line = %d area = %d", line, area);
+
+    if (!LPoints) {
+	LPoints = Vect_new_line_struct();
+	APoints = Vect_new_line_struct();
+    }
+
+    /* Read line coordinates */
+    Vect_read_line(LMap, LPoints, NULL, line);
+
+    /* Try if any of line vertices is within area */
+    for (i = 0; i < LPoints->n_points; i++) {
+	if (Vect_point_in_area(AMap, area, LPoints->x[i], LPoints->y[i])) {
+	    G_debug(4, "  -> line vertex inside area");
+	    return 1;
+	}
+    }
+
+    /* Skip points */
+    if (LPoints->n_points < 2)
+	return 0;
+
+    /* Try intersections of line with area/isles boundary */
+    /* Outer boundary */
+    Vect_get_area_points(AMap, area, APoints);
+
+    if (Vect_line_check_intersection(LPoints, APoints, 0)) {
+	G_debug(4, "  -> line intersects outer area boundary");
+	return 1;
+    }
+
+    nisles = Vect_get_area_num_isles(AMap, area);
+
+    for (i = 0; i < nisles; i++) {
+	isle = Vect_get_area_isle(AMap, area, i);
+	Vect_get_isle_points(AMap, isle, APoints);
+
+	if (Vect_line_check_intersection(LPoints, APoints, 0)) {
+	    G_debug(4, "  -> line intersects area island boundary");
+	    return 1;
+	}
+    }
+    return 0;
+}


Property changes on: grass/branches/releasebranch_6_4/vector/v.select/overlap.c
___________________________________________________________________
Added: svn:mime-type
   + text/x-csrc
Added: svn:eol-style
   + native

Added: grass/branches/releasebranch_6_4/vector/v.select/proto.h
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.select/proto.h	                        (rev 0)
+++ grass/branches/releasebranch_6_4/vector/v.select/proto.h	2010-11-07 17:37:50 UTC (rev 44217)
@@ -0,0 +1,38 @@
+#ifndef PROTO_H
+#define PROTO_H
+
+#define OP_EQUALS     0
+#define OP_DISJOINT   1
+#define OP_INTERSECTS 2
+#define OP_TOUCHES    3
+#define OP_CROSSES    4
+#define OP_WITHIN     5
+#define OP_CONTAINS   6
+#define OP_OVERLAPS   7
+#define OP_OVERLAP    8
+#define OP_RELATE     9
+
+struct GParm {
+    struct Option *input[2], *output, *type[2], *field[2],
+	*operator, *relate;
+};
+struct GFlag {
+    struct Flag *table, *reverse, *cat;
+};
+
+/* args.c */
+void parse_options(struct GParm *, struct GFlag *);
+
+#ifdef HAVE_GEOS
+/* geos.c */
+int line_relate_geos(struct Map_info *, const GEOSGeometry *,
+		     int, int, const char *);
+int area_relate_geos(struct Map_info *, const GEOSGeometry *,
+		     int, int, const char *);
+#endif
+
+/* overlap.c */
+void add_aarea(struct Map_info *, int, int *);
+int line_overlap_area(struct Map_info *, int, struct Map_info *, int);
+
+#endif /* PROTO_H */


Property changes on: grass/branches/releasebranch_6_4/vector/v.select/proto.h
___________________________________________________________________
Added: svn:mime-type
   + text/x-chdr
Added: svn:eol-style
   + native



More information about the grass-commit mailing list