[DebianGIS-dev] r2004 - in packages/ogdi-dfsg/branches/upstream/current: . config include include/win32 include/win32/compat include/win32/rpc include/win32/sys ogdi/c-api ogdi/driver/vrf ogdi/glutil ogdi/include vpflib

frankie at alioth.debian.org frankie at alioth.debian.org
Thu Mar 12 20:16:25 UTC 2009


Author: frankie
Date: 2009-03-12 20:16:24 +0000 (Thu, 12 Mar 2009)
New Revision: 2004

Added:
   packages/ogdi-dfsg/branches/upstream/current/include/win32/
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/dirent.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/dirent2.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/fixstrtod.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/float.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/getcwd.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/license.terms
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/limits.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntexit.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntforkexec.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntgetcwd.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntgettod.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntisatty.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntopendir.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntpipe.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/nttempnam.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntunlink.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntwaitpid.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/opendir.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/readme
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/stdlib.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strerror.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/string.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strncasecmp.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strstr.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtod.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtol.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtoul.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/tmpnam.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/unistd.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/waitpid.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/wsa_strerror.c
   packages/ogdi-dfsg/branches/upstream/current/include/win32/dirent.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/glutil.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/netconfig.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/ogdi_macro.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/auth.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/auth_uni.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/bcopy.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/clnt.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/netdb.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_cln.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_clnt.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_pro.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_rmt.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/rpc.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/rpc_msg.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/svc.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/svc_auth.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/types.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/xdr.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/stropts.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/sys/
   packages/ogdi-dfsg/branches/upstream/current/include/win32/sys/resource.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/sys/socket.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/sys/ttycom.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/syslog.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/unistd.h
   packages/ogdi-dfsg/branches/upstream/current/include/win32/values.h
   packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.mak
   packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.rc
   packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.vcp
   packages/ogdi-dfsg/branches/upstream/current/patch
Removed:
   packages/ogdi-dfsg/branches/upstream/current/VERSION
   packages/ogdi-dfsg/branches/upstream/current/config.guess
   packages/ogdi-dfsg/branches/upstream/current/config.log
   packages/ogdi-dfsg/branches/upstream/current/config.sub
   packages/ogdi-dfsg/branches/upstream/current/config/Linux.mak
   packages/ogdi-dfsg/branches/upstream/current/config/common.mak
   packages/ogdi-dfsg/branches/upstream/current/ogdi-config
   packages/ogdi-dfsg/branches/upstream/current/ogdi.pc
   packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/gmath.c
   packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/gmath.h
Modified:
   packages/ogdi-dfsg/branches/upstream/current/ChangeLog
   packages/ogdi-dfsg/branches/upstream/current/NEWS
   packages/ogdi-dfsg/branches/upstream/current/config/common.mak.in
   packages/ogdi-dfsg/branches/upstream/current/config/unix.mak
   packages/ogdi-dfsg/branches/upstream/current/configure
   packages/ogdi-dfsg/branches/upstream/current/configure.in
   packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/client.c
   packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/matrix.c
   packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/feature.c
   packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/object.c
   packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/utils.c
   packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/vrf.c
   packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/vrfswq.c
   packages/ogdi-dfsg/branches/upstream/current/ogdi/include/ecs_util.h
   packages/ogdi-dfsg/branches/upstream/current/vpflib/musedir.c
   packages/ogdi-dfsg/branches/upstream/current/vpflib/strfunc.c
   packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfbrows.c
   packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfprop.c
   packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfquery.c
   packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfread.c
   packages/ogdi-dfsg/branches/upstream/current/vpflib/vpftable.c
Log:
[svn-upgrade] Integrating new upstream version, ogdi-dfsg (3.2.0~beta2)

Modified: packages/ogdi-dfsg/branches/upstream/current/ChangeLog
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ChangeLog	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ChangeLog	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,4 +1,58 @@
 ============================================================================
+
+2008-05-28  Balint Cristian  <rezso at rdsor.ro>
+
+        * New 3.2.0beta2 release
+        * fix path case sensitive problem for vpf driver
+        * fix build on GNU/kFreeBSD
+        * avoid bashism in makefiles
+
+2007-05-09  Balint Cristian  <cbalint at redhat.com>
+
+        * Prepare for 3.2.0beta2 release.
+
+2007-05-09  Balint Cristian  <cbalint at redhat.com>
+
+From: Even Rouault <even.rouault at mines-paris.org>
+Date: Friday 21:14:18
+
+        * fix filename case sensitivy problems (for Unix-like systems).  
+
+        * fix incorrect use of sprintf in vrf_GetMetadata.
+
+        * report wgs84 instead of nad83, not sure whether that is true 
+        for all VPF products, but at least it's correct for VMAP products 
+        that *must* be WGS84. A better fix would be to read the VPF table 
+        that contains this information.
+
+        * fix a few minor memory leaks and memory usage issues.
+
+        * enable XMIN, YMIN, XMAX and YMAX columns to be of type double 
+        in EBR and FBR files (for read the VMAP2i 'MIG2i000' product).
+
+        * add .pjt and .tjt as possible extensions for join tables
+        (VMAP2i 'MIG2i000' product).
+        
+        * fix duplicated layers report (VMAP2i 'MIG2i000' product).
+        
+        * handle 'L' (Latin1) type for text files (GEOCAPI 'MIGxxx' products).
+        
+        * optionnaly, convert text to UTF-8 when environment variable 
+        CONVERT_OGDI_TXT_TO_UTF8 is defined. This part is not portable 
+        on Windows I guess (only tested on Linux) and maybe too specific.
+        
+        * enable reading of VPF products without table indexes file 
+        (GEOCAPI 'MIG013' and 'MIG016' products). VPF norm says that when 
+        there is a variable length field in one table, an index should exist, 
+        but some test products don't follow this. The approach here is to read 
+        the whole table content and build the index in memory.
+
+2007-03-26  Frank Warmerdam  <warmerdam at pobox.com>
+
+        * ogdi/glutil/RCa00246 temp file removed, per request from 
+	frankie at debiangis. 
+
+============================================================================
 2007-02-24  Balint Cristian  <cbalint at redhat.com>
 
         * Prepare for 3.2.0beta1 release.

Modified: packages/ogdi-dfsg/branches/upstream/current/NEWS
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/NEWS	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/NEWS	2009-03-12 20:16:24 UTC (rev 2004)
@@ -4,6 +4,19 @@
 View the ChangeLog file for detailed, file by file notes on changes.  The
 NEWS file is just used to sumarize major changes, and new features. 
 
+3.2.0beta2
+==========
+
+ o  Fix filename case sensitivity problems.  
+
+ o  Further fix memory leaks.
+
+ o  Fix read the VMAP2i 'MIG2i000' product.
+
+ o  Handle 'L' (Latin1) type for text files.
+
+ o  Suport optional text to UTF-8 convert. 
+
 3.2.0beta1
 ==========
 

Deleted: packages/ogdi-dfsg/branches/upstream/current/VERSION
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/VERSION	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/VERSION	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1 +0,0 @@
-3.2.0.beta1: Sat Feb 24 18:49:04 CET 2007

Deleted: packages/ogdi-dfsg/branches/upstream/current/config/Linux.mak
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/config/Linux.mak	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/config/Linux.mak	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,109 +0,0 @@
-# Copyright (C) 2001 Her Majesty the Queen in Right of Canada.
-# Permission to use, copy, modify and distribute this software and
-# its documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appear in all copies, that
-# both the copyright notice and this permission notice appear in
-# supporting documentation, and that the name of Her Majesty the Queen
-# in Right  of Canada not be used in advertising or publicity pertaining
-# to distribution of the software without specific, written prior
-# permission.  Her Majesty the Queen in Right of Canada makes no
-# representations about the suitability of this software for any purpose.
-# It is provided "as is" without express or implied warranty.
-
-# Generic unix configuration file, processed by configure to make 
-# platform specific.
-
-#
-# Read in the configuration common to all Unix
-#
-include $(TOPDIR)/config/unix.mak
-
-#
-# platform specific Symbols
-#
-PLATFORM	= $(TARGET)
-_SOLARIS	= 1
-USE_TERMIO	= -DUSE_TERMIO
-
-# 
-# platform specific tools
-#
-AR		= ar cr
-
-
-#
-# Compilation and linking flags
-#
-SHLIB_CFLAGS	= -fPIC
-COMMON_CFLAGS	= $(OPTIMIZATION) -Wall   -Wall -DUNIX=1
-
-SHLIB_LDFLAGS	= -shared 
-COMMON_LDFLAGS  = $(OPTIMIZATION) 
-
-RPC_INCLUDES = -DHAVE_STD_RPC_INCLUDES
-
-UCB_STATICLIB = 
-
-TCL_INCLUDE = -I/usr/include/tcl8.3
-TCL_LINKLIB =
-
-#
-#	Install Locations
-#
-prefix		= /usr
-exec_prefix 	= ${prefix}
-INST_INCLUDE	= ${prefix}/include
-INST_LIB	= ${exec_prefix}/lib
-INST_BIN	= ${exec_prefix}/bin
-
-#
-# platform specific file locations
-#
-#RPC_LINKLIB	= -lrpcsvc -lnsl -lsocket
-#RPC_LINKLIB	=	-ldl -ldbmalloc
-RPC_LINKLIB	=	-ldl 
-
-#
-# Endian definition, could be little or big
-#
-BIG_ENDIAN          = 0
-
-#
-# Handle internal/external PROJ.4 library usage.
-#
-
-PROJ_SETTING=external
-
-ifeq ($(PROJ_SETTING),external)
-PROJ_INCLUDE :=	-I/usr/include
-PROJ_STATICLIB := -lproj
-endif
-
-#
-# Handle internal/external ZLIB library usage.
-#
-
-ZLIB_SETTING=external
-
-ifeq ($(ZLIB_SETTING),external)
-ZLIB_INCLUDE :=	-I/usr/include
-ZLIB_LINKLIB := -lz
-endif
-
-#
-# Handle internal/external/disabled "Expat" library handling.
-#
-
-EXPAT_SETTING=external
-
-ifeq ($(EXPAT_SETTING),external)
-EXPAT_INCLUDE := -I/usr/include
-EXPAT_LINKLIB := -lexpat
-endif
-
-ifeq ($(EXPAT_SETTING),disabled)
-EXPAT_INCLUDE := -DEXPAT_DISABLED
-EXPAT_LINKLIB := 
-endif
-
-

Deleted: packages/ogdi-dfsg/branches/upstream/current/config/common.mak
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/config/common.mak	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/config/common.mak	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,277 +0,0 @@
-# Copyright (C) 1996 Her Majesty the Queen in Right of Canada.
-# Permission to use, copy, modify and distribute this software and
-# its documentation for any purpose and without fee is hereby granted,
-# provided that the above copyright notice appear in all copies, that
-# both the copyright notice and this permission notice appear in
-# supporting documentation, and that the name of Her Majesty the Queen
-# in Right  of Canada not be used in advertising or publicity pertaining
-# to distribution of the software without specific, written prior
-# permission.  Her Majesty the Queen in Right of Canada makes no
-# representations about the suitability of this software for any purpose.
-# It is provided "as is" without express or implied warranty.
-
-# Release versioning.
-# 
-# MAJOR releases represent major ABI changes in the exposed shared lib.
-# This should not be so offen, only once with major code change wich due
-# to a change in how ogdi is called external by other applications.
-#
-# MINOR releases represents revisions or bugfixes over ogdi.
-#
-# The exposed soname of lib is libogdi.so.($major) an lies in $(INST_LIB)
-# Plugins lies in $(INST_LIB)/ogdi/
-#
-
-OGDI_MAJOR	  = 3
-OGDI_MINOR	  = 2
-
-OGDI_VERSION      = $(OGDI_MAJOR)$(OGDI_MINOR)
-
-# Common macros and symbols used by all platforms
-#
-#
-#
-# !!! IMPORTANT !!!
-#
-# $TARGET and $TOPDIR must be defined in the environment
-#
-#	- $TARGET is the platform on which you compile;
-#	  it could be 'solaris' or 'win32'
-#	- $TOPDIR is the root directory of OGDI source files
-#
-#
-
-
-#
-# Default definitions
-#
-
-ifndef CFG
-CFG = release
-endif
-
-ifndef TARGET
-TARGET = $(shell uname)
-endif
-
-#
-# Standard location of external components (not maintained
-# by LAS)
-#
-
-
-#
-# Standard location of compiled component libraries
-#
-
-BINDIR		= $(TOPDIR)/bin/$(TARGET)
-LIBDIR		= $(TOPDIR)/lib/$(TARGET)
-
-#
-#	Final OS installation location.
-#
-prefix		= /usr/local
-exec_prefix 	= ${prefix}
-INST_INCLUDE	= ${prefix}/include
-INST_LIB	= ${exec_prefix}/lib
-INST_BIN	= ${exec_prefix}/bin
-
-#
-# A location named $(LINKDIR) will be defined in the system
-# specific configuration files.  Under win32 this will point 
-# to the location of the export libs $(LIBDIR), but under
-# Unix it is the location of the shared objects $(BINDIR).
-#
-
-#
-# Standard location of software components.
-#
-
-CURRENT_DIR	= ./
-VPF_DIR		= $(topdir)/vpflib
-
-#
-#	The following can be internal or external depending on whether we
-#	want to use the built-in versions of these libraries.
-#
-EXPAT_SETTING	=	internal
-ZLIB_SETTING	=	internal
-PROJ_SETTING	=	internal
-
-#
-# Standard location of include files.
-#
-
-CURRENT_INCLUDE	= $(patsubst %,$(INCL_SW)%,$(subst :, ,$(VPATH)))
-GENERAL_INCLUDE = $(INCL_SW)$(TOPDIR)/include/$(TARGET)
-
-
-OGDI_INCLUDE	= $(INCL_SW)$(TOPDIR)/ogdi/include
-VRF_INCLUDE	= $(INCL_SW)$(TOPDIR)/ogdi/driver/vrf
-PROJ_INCLUDE	= $(INCL_SW)$(TOPDIR)/proj
-VPF_INCLUDE	= $(INCL_SW)$(TOPDIR)/vpflib/include $(INCL_SW)$(TOPDIR)/vpflib
-ZLIB_INCLUDE	= $(INCL_SW)$(TOPDIR)/external/zlib
-GLUTIL_INCLUDE	= $(INCL_SW)$(TOPDIR)/ogdi/glutil
-EXPAT_INCLUDE   = $(INCL_SW)$(TOPDIR)/external/expat
-
-#
-# Dynamic libraries (shared objects)
-#
-
-ODBCEXT_LINKLIB	= $(LINK_SW)$(LINKDIR)$(LIB_SW)odbcext$(LIB_SUFFIX)
-OGDI_LINKLIB	= $(LINK_SW)$(LINKDIR)$(LIB_SW)ogdi$(LIB_SUFFIX)
-ZLIB_LINKLIB	= $(LINK_SW)$(LINKDIR)$(LIB_SW)zlib_ogdi$(OGDI_VERSION)$(LIB_SUFFIX)
-EXPAT_LINKLIB	= $(LINK_SW)$(LINKDIR)$(LIB_SW)expat_ogdi$(OGDI_VERSION)$(LIB_SUFFIX)
-
-#
-# Static libraries (archives)
-#
-
-PROJ_STATICLIB		= $(LINK_SW)$(LIBDIR)/static$(LIB_SW)proj$(LIB_SUFFIX)
-VPF_STATICLIB		= $(LINK_SW)$(LIBDIR)/static$(LIB_SW)vpf$(LIB_SUFFIX)
-REMOTE_STATICLIB	= $(LINK_SW)$(LIBDIR)/static$(LIB_SW)remote$(LIB_SUFFIX)
-GLUTIL_STATICLIB =	$(LINK_SW)$(LIBDIR)/static$(LIB_SW)glutil$(LIB_SUFFIX)
-
-
-#
-# Library aggregations
-#
-
- 
-#
-# Location of resulting object files
-#
-
-OBJDIR		=OBJ.$(TARGET)
-DEPENDFILE	= depend.d
-OBJECTS		= $(SOURCES:.c=.$(OBJ_EXT))
-
-#
-# When compiling in the OBJ.$(TARGET) directory, search for
-# the source code files in the parent directory.
-#
-
-VPATH		= ..
-
-#
-# Standard target names.  Do not redefine them if they have
-# already been set in the enclosing makefile.
-#
-
-TOBEGEN_STRIPPED=$(patsubst %$(OGDI_VERSION),%,$(TOBEGEN))
-
-ifndef ARCGEN
-ARCHGEN = $(TOPDIR)/lib/$(TARGET)/static/$(LIB_PREFIX)$(TOBEGEN).$(ARCH_EXT)
-endif
-ifndef DYNAGEN
-DYNAGEN = $(TOPDIR)/bin/$(TARGET)/$(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT)
-endif
-ifndef SHRDGEN
-SHRDGEN = $(TOPDIR)/bin/$(TARGET)/$(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR)
-endif
-ifndef PROGGEN
-PROGGEN = $(TOPDIR)/bin/$(TARGET)/$(TOBEGEN)$(APP_EXT)
-endif
-
-STANDARD_TARGETS	= clean install
-
-#
-# Default target to be used if no others are specified.
-# This implies that all makefiles that include this configuration
-# must provide an 'all' target.
-#
-
-all:
-
-#
-# Include the platform specific configuration
-#
-
-include $(TOPDIR)/config/$(TARGET).mak
-
-
-#
-# Standard targets provided for all sub-makefiles
-#
-
-#
-# Create a platform-specific object directory
-#
-
-MKOBJECTDIR:
-	$(MKINSTALLDIR) $(OBJDIR)
-
-#
-# Build the dependency file using 'makedepend'
-#
-
-$(DEPENDFILE): $(SOURCES)
-	touch depend.tmp
-	makedepend -f depend.tmp -- $(subst /I,-I,$(subst /D,-D,$(SYSTEM_INCLUDE) $(CFLAGS))) -- $^
-	sed  -e 's?^\.\./??g' -e 's?:/?:\\?g' depend.tmp > $@
-#
-# Clean all possible junk
-#
-
-default-clean:
-	-$(RMALL) $(OBJDIR) $(TOPDIR)/lib/$(TARGET)/static/$(LIB_PREFIX)$(TOBEGEN).* $(OBJDIR) $(TOPDIR)/lib/$(TARGET)/$(LIB_PREFIX)$(TOBEGEN).* $(TOPDIR)/bin/$(TARGET)/$(LIB_PREFIX)$(TOBEGEN).* $(PROGGEN)
-
-#
-#	Default rule(s) to install stuff if appropriate.
-#
-
-ifeq ($(TARGETGEN),$(DYNAGEN))
-default-install:
-	mkdir -p $(INST_LIB)/ogdi
-	cp $(TARGETGEN) $(INST_LIB)/ogdi
-endif
-
-ifeq ($(TARGETGEN),$(SHRDGEN))
-default-install:
-	cp $(TARGETGEN) $(INST_LIB)
-	pushd $(INST_LIB); \
-	      ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) \
-	            $(LIB_PREFIX)$(TOBEGEN_STRIPPED).$(SHLIB_EXT).$(OGDI_MAJOR); \
-	      ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) \
-	            $(LIB_PREFIX)$(TOBEGEN_STRIPPED).$(SHLIB_EXT); \
-	popd
-endif
-
-ifeq ($(TARGETGEN),$(ARCHGEN))
-default-install:
-endif
-
-ifeq ($(TARGETGEN),$(PROGGEN))
-default-install:
-	cp $(TARGETGEN) $(INST_BIN)
-endif
-
-ifeq ($(TARGETGEN),)
-default-install:
-endif
-
-install-so-link:
-	mv -f $(INST_LIB)/$(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) $(INST_LIB)
-	mv -f $(INST_LIB)/$(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR) $(INST_LIB)
-	pushd $(INST_LIB); ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) \
-	      $(LIB_PREFIX)$(TOBEGEN_STRIPPED).$(SHLIB_EXT) ; \
-	popd
-
-install:	default-install $(EXTRA_INSTALL_TARGETS)
-
-#
-# Include the auto-generated dependency rules.  Only include
-# this file if executing from within the OBJ.$(TARGET) directory.
-#
-
-# ifeq ($(PASS),depend)
-# include $(DEPENDFILE)
-# endif
-
-#
-# End of the common configuration
-#
-
-
-
-

Modified: packages/ogdi-dfsg/branches/upstream/current/config/common.mak.in
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/config/common.mak.in	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/config/common.mak.in	2009-03-12 20:16:24 UTC (rev 2004)
@@ -52,7 +52,10 @@
 
 ifndef TARGET
 TARGET = $(shell uname)
+ifeq ($(TARGET), GNU/kFreeBSD)
+TARGET = Linux
 endif
+endif
 
 #
 # Standard location of external components (not maintained
@@ -229,12 +232,12 @@
 ifeq ($(TARGETGEN),$(SHRDGEN))
 default-install:
 	cp $(TARGETGEN) $(INST_LIB)
-	pushd $(INST_LIB); \
+	cd $(INST_LIB); \
 	      ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) \
 	            $(LIB_PREFIX)$(TOBEGEN_STRIPPED).$(SHLIB_EXT).$(OGDI_MAJOR); \
 	      ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) \
 	            $(LIB_PREFIX)$(TOBEGEN_STRIPPED).$(SHLIB_EXT); \
-	popd
+	cd $(CURDIR)
 endif
 
 ifeq ($(TARGETGEN),$(ARCHGEN))
@@ -253,9 +256,9 @@
 install-so-link:
 	mv -f $(INST_LIB)/$(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) $(INST_LIB)
 	mv -f $(INST_LIB)/$(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR) $(INST_LIB)
-	pushd $(INST_LIB); ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) \
+	cd $(INST_LIB); ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) \
 	      $(LIB_PREFIX)$(TOBEGEN_STRIPPED).$(SHLIB_EXT) ; \
-	popd
+	cd $(CURDIR)
 
 install:	default-install $(EXTRA_INSTALL_TARGETS)
 

Modified: packages/ogdi-dfsg/branches/upstream/current/config/unix.mak
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/config/unix.mak	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/config/unix.mak	2009-03-12 20:16:24 UTC (rev 2004)
@@ -94,8 +94,8 @@
 $(SHRDGEN): $(OBJECTS)
 	@echo Making shared library: $@
 	$(SHLIB_LD) $(SHLIB_LDFLAGS) $(COMMON_LDFLAGS) $(COMMON_CFLAGS) -Wl,-soname,$(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR) -o $@ $^ $(LINK_LIBS) 
-	pushd $(TOPDIR)/bin/$(TARGET); ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT); \
-	ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR); popd
+	cd $(TOPDIR)/bin/$(TARGET); ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT); \
+	ln -s $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR).$(OGDI_MINOR) $(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR); cd $(CURDIR)
 	@echo $@ made successfully ...
 
 $(DYNAGEN): $(OBJECTS)

Deleted: packages/ogdi-dfsg/branches/upstream/current/config.guess
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/config.guess	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/config.guess	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,1500 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2006-07-02'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per at bothner.com>.
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-	        os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit ;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-	exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
- 	exit ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit ;;
-    *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    i*:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    x86:Interix*:[3456]*)
-	echo i586-pc-interix${UNAME_RELEASE}
-	exit ;;
-    EM64T:Interix*:[3456]*)
-	echo x86_64-unknown-interix${UNAME_RELEASE}
-	exit ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
-    arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    mips:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^LIBC/{
-		s: ::g
-		p
-	    }'`"
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-	;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit ;;
-    i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel at ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes at openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
-    *:*:*:FTX*)
-	# From seanf at swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
-    *:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-    i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
-	exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:

Deleted: packages/ogdi-dfsg/branches/upstream/current/config.log
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/config.log	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/config.log	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,600 +0,0 @@
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by configure, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
-
-  $ ./configure --host=i486-linux-gnu --build=i486-linux-gnu --prefix=/usr --mandir=${prefix}/share/man --infodir=${prefix}/share/info CFLAGS=-Wall -g -O2 LDFLAGS=-Wl,-z,defs --with-projinc=/usr/include --with-projlib=-lproj --with-proj=yes --with-zliblib=-lz --with-zlibinc=/usr/include --with-zlib=yes --with-expatlib=-lexpat --with-expatinc=/usr/include --with-expat=yes --with-pkgconfigdir=/usr/lib/pkgconfig
-
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = klecker
-uname -m = i686
-uname -r = 2.6.18-3-686
-uname -s = Linux
-uname -v = #1 SMP Sun Dec 10 19:37:06 UTC 2006
-
-/usr/bin/uname -p = unknown
-/bin/uname -X     = unknown
-
-/bin/arch              = i686
-/usr/bin/arch -k       = unknown
-/usr/convex/getsysinfo = unknown
-hostinfo               = unknown
-/bin/machine           = unknown
-/usr/bin/oslevel       = unknown
-/bin/universe          = unknown
-
-PATH: /usr/local/sbin
-PATH: /usr/local/bin
-PATH: /usr/sbin
-PATH: /usr/bin
-PATH: /sbin
-PATH: /bin
-PATH: /usr/bin/X11
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-configure:1334: checking for i486-linux-gnu-gcc
-configure:1350: found /usr/bin/i486-linux-gnu-gcc
-configure:1360: result: i486-linux-gnu-gcc
-configure:1642: checking for C compiler version
-configure:1645: i486-linux-gnu-gcc --version </dev/null >&5
-i486-linux-gnu-gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
-Copyright (C) 2006 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-configure:1648: $? = 0
-configure:1650: i486-linux-gnu-gcc -v </dev/null >&5
-Using built-in specs.
-Target: i486-linux-gnu
-Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-tune=i686 --enable-checking=release i486-linux-gnu
-Thread model: posix
-gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
-configure:1653: $? = 0
-configure:1655: i486-linux-gnu-gcc -V </dev/null >&5
-i486-linux-gnu-gcc: '-V' option must have argument
-configure:1658: $? = 1
-configure:1681: checking for C compiler default output file name
-configure:1684: i486-linux-gnu-gcc -Wall -g -O2  -Wl,-z,defs conftest.c  >&5
-configure:1687: $? = 0
-configure:1733: result: a.out
-configure:1738: checking whether the C compiler works
-configure:1744: ./a.out
-configure:1747: $? = 0
-configure:1764: result: yes
-configure:1771: checking whether we are cross compiling
-configure:1773: result: no
-configure:1776: checking for suffix of executables
-configure:1778: i486-linux-gnu-gcc -o conftest -Wall -g -O2  -Wl,-z,defs conftest.c  >&5
-configure:1781: $? = 0
-configure:1806: result: 
-configure:1812: checking for suffix of object files
-configure:1833: i486-linux-gnu-gcc -c -Wall -g -O2  conftest.c >&5
-configure:1836: $? = 0
-configure:1858: result: o
-configure:1862: checking whether we are using the GNU C compiler
-configure:1886: i486-linux-gnu-gcc -c -Wall -g -O2  conftest.c >&5
-configure:1892: $? = 0
-configure:1896: test -z 
-			 || test ! -s conftest.err
-configure:1899: $? = 0
-configure:1902: test -s conftest.o
-configure:1905: $? = 0
-configure:1918: result: yes
-configure:1924: checking whether i486-linux-gnu-gcc accepts -g
-configure:1945: i486-linux-gnu-gcc -c -g  conftest.c >&5
-configure:1951: $? = 0
-configure:1955: test -z 
-			 || test ! -s conftest.err
-configure:1958: $? = 0
-configure:1961: test -s conftest.o
-configure:1964: $? = 0
-configure:1975: result: yes
-configure:1992: checking for i486-linux-gnu-gcc option to accept ANSI C
-configure:2062: i486-linux-gnu-gcc  -c -Wall -g -O2  conftest.c >&5
-configure:2068: $? = 0
-configure:2072: test -z 
-			 || test ! -s conftest.err
-configure:2075: $? = 0
-configure:2078: test -s conftest.o
-configure:2081: $? = 0
-configure:2099: result: none needed
-configure:2117: i486-linux-gnu-gcc -c -Wall -g -O2  conftest.c >&5
-conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
-configure:2123: $? = 1
-configure: failed program was:
-| #ifndef __cplusplus
-|   choke me
-| #endif
-configure:2260: checking for dlopen in -ldl
-configure:2290: i486-linux-gnu-gcc -o conftest -Wall -g -O2  -Wl,-z,defs conftest.c -ldl   >&5
-configure:2296: $? = 0
-configure:2300: test -z 
-			 || test ! -s conftest.err
-configure:2303: $? = 0
-configure:2306: test -s conftest
-configure:2309: $? = 0
-configure:2322: result: yes
-configure:2435: checking how to run the C preprocessor
-configure:2470: i486-linux-gnu-gcc -E  conftest.c
-configure:2476: $? = 0
-configure:2508: i486-linux-gnu-gcc -E  conftest.c
-conftest.c:11:28: error: ac_nonexistent.h: No such file or directory
-configure:2514: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| 
-| #define PACKAGE_NAME ""
-| #define PACKAGE_TARNAME ""
-| #define PACKAGE_VERSION ""
-| #define PACKAGE_STRING ""
-| #define PACKAGE_BUGREPORT ""
-| #define HAVE_LIBDL 1
-| #define USE_GNUCC 1
-| /* end confdefs.h.  */
-| #include <ac_nonexistent.h>
-configure:2553: result: i486-linux-gnu-gcc -E
-configure:2577: i486-linux-gnu-gcc -E  conftest.c
-configure:2583: $? = 0
-configure:2615: i486-linux-gnu-gcc -E  conftest.c
-conftest.c:11:28: error: ac_nonexistent.h: No such file or directory
-configure:2621: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| 
-| #define PACKAGE_NAME ""
-| #define PACKAGE_TARNAME ""
-| #define PACKAGE_VERSION ""
-| #define PACKAGE_STRING ""
-| #define PACKAGE_BUGREPORT ""
-| #define HAVE_LIBDL 1
-| #define USE_GNUCC 1
-| /* end confdefs.h.  */
-| #include <ac_nonexistent.h>
-configure:2665: checking for egrep
-configure:2675: result: grep -E
-configure:2680: checking for ANSI C header files
-configure:2705: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2711: $? = 0
-configure:2715: test -z 
-			 || test ! -s conftest.err
-configure:2718: $? = 0
-configure:2721: test -s conftest.o
-configure:2724: $? = 0
-configure:2813: i486-linux-gnu-gcc -o conftest -Wall    -Wl,-z,defs conftest.c -ldl  >&5
-conftest.c: In function 'main':
-conftest.c:28: warning: implicit declaration of function 'exit'
-conftest.c:28: warning: incompatible implicit declaration of built-in function 'exit'
-configure:2816: $? = 0
-configure:2818: ./conftest
-configure:2821: $? = 0
-configure:2836: result: yes
-configure:2860: checking for sys/types.h
-configure:2876: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2882: $? = 0
-configure:2886: test -z 
-			 || test ! -s conftest.err
-configure:2889: $? = 0
-configure:2892: test -s conftest.o
-configure:2895: $? = 0
-configure:2906: result: yes
-configure:2860: checking for sys/stat.h
-configure:2876: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2882: $? = 0
-configure:2886: test -z 
-			 || test ! -s conftest.err
-configure:2889: $? = 0
-configure:2892: test -s conftest.o
-configure:2895: $? = 0
-configure:2906: result: yes
-configure:2860: checking for stdlib.h
-configure:2876: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2882: $? = 0
-configure:2886: test -z 
-			 || test ! -s conftest.err
-configure:2889: $? = 0
-configure:2892: test -s conftest.o
-configure:2895: $? = 0
-configure:2906: result: yes
-configure:2860: checking for string.h
-configure:2876: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2882: $? = 0
-configure:2886: test -z 
-			 || test ! -s conftest.err
-configure:2889: $? = 0
-configure:2892: test -s conftest.o
-configure:2895: $? = 0
-configure:2906: result: yes
-configure:2860: checking for memory.h
-configure:2876: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2882: $? = 0
-configure:2886: test -z 
-			 || test ! -s conftest.err
-configure:2889: $? = 0
-configure:2892: test -s conftest.o
-configure:2895: $? = 0
-configure:2906: result: yes
-configure:2860: checking for strings.h
-configure:2876: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2882: $? = 0
-configure:2886: test -z 
-			 || test ! -s conftest.err
-configure:2889: $? = 0
-configure:2892: test -s conftest.o
-configure:2895: $? = 0
-configure:2906: result: yes
-configure:2860: checking for inttypes.h
-configure:2876: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2882: $? = 0
-configure:2886: test -z 
-			 || test ! -s conftest.err
-configure:2889: $? = 0
-configure:2892: test -s conftest.o
-configure:2895: $? = 0
-configure:2906: result: yes
-configure:2860: checking for stdint.h
-configure:2876: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2882: $? = 0
-configure:2886: test -z 
-			 || test ! -s conftest.err
-configure:2889: $? = 0
-configure:2892: test -s conftest.o
-configure:2895: $? = 0
-configure:2906: result: yes
-configure:2860: checking for unistd.h
-configure:2876: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2882: $? = 0
-configure:2886: test -z 
-			 || test ! -s conftest.err
-configure:2889: $? = 0
-configure:2892: test -s conftest.o
-configure:2895: $? = 0
-configure:2906: result: yes
-configure:2934: checking rpc/pmap_clnt.h usability
-configure:2946: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2952: $? = 0
-configure:2956: test -z 
-			 || test ! -s conftest.err
-configure:2959: $? = 0
-configure:2962: test -s conftest.o
-configure:2965: $? = 0
-configure:2975: result: yes
-configure:2979: checking rpc/pmap_clnt.h presence
-configure:2989: i486-linux-gnu-gcc -E  conftest.c
-configure:2995: $? = 0
-configure:3015: result: yes
-configure:3050: checking for rpc/pmap_clnt.h
-configure:3057: result: yes
-configure:2934: checking float.h usability
-configure:2946: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2952: $? = 0
-configure:2956: test -z 
-			 || test ! -s conftest.err
-configure:2959: $? = 0
-configure:2962: test -s conftest.o
-configure:2965: $? = 0
-configure:2975: result: yes
-configure:2979: checking float.h presence
-configure:2989: i486-linux-gnu-gcc -E  conftest.c
-configure:2995: $? = 0
-configure:3015: result: yes
-configure:3050: checking for float.h
-configure:3057: result: yes
-configure:2934: checking dlfcn.h usability
-configure:2946: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:2952: $? = 0
-configure:2956: test -z 
-			 || test ! -s conftest.err
-configure:2959: $? = 0
-configure:2962: test -s conftest.o
-configure:2965: $? = 0
-configure:2975: result: yes
-configure:2979: checking dlfcn.h presence
-configure:2989: i486-linux-gnu-gcc -E  conftest.c
-configure:2995: $? = 0
-configure:3015: result: yes
-configure:3050: checking for dlfcn.h
-configure:3057: result: yes
-configure:3086: checking whether byte ordering is bigendian
-configure:3113: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:3119: $? = 0
-configure:3123: test -z 
-			 || test ! -s conftest.err
-configure:3126: $? = 0
-configure:3129: test -s conftest.o
-configure:3132: $? = 0
-configure:3156: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-conftest.c: In function 'main':
-conftest.c:31: error: 'not' undeclared (first use in this function)
-conftest.c:31: error: (Each undeclared identifier is reported only once
-conftest.c:31: error: for each function it appears in.)
-conftest.c:31: error: expected ';' before 'big'
-configure:3162: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| 
-| #define PACKAGE_NAME ""
-| #define PACKAGE_TARNAME ""
-| #define PACKAGE_VERSION ""
-| #define PACKAGE_STRING ""
-| #define PACKAGE_BUGREPORT ""
-| #define HAVE_LIBDL 1
-| #define USE_GNUCC 1
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_RPC_PMAP_CLNT_H 1
-| #define HAVE_FLOAT_H 1
-| #define HAVE_DLFCN_H 1
-| /* end confdefs.h.  */
-| #include <sys/types.h>
-| #include <sys/param.h>
-| 
-| int
-| main ()
-| {
-| #if BYTE_ORDER != BIG_ENDIAN
-|  not big endian
-| #endif
-| 
-|   ;
-|   return 0;
-| }
-configure:3297: result: no
-configure:3339: checking for pj_init in -lproj
-configure:3369: i486-linux-gnu-gcc -o conftest -Wall    -Wl,-z,defs conftest.c -lproj  -ldl  >&5
-configure:3375: $? = 0
-configure:3379: test -z 
-			 || test ! -s conftest.err
-configure:3382: $? = 0
-configure:3385: test -s conftest
-configure:3388: $? = 0
-configure:3401: result: yes
-configure:3423: checking projects.h usability
-configure:3435: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:3441: $? = 0
-configure:3445: test -z 
-			 || test ! -s conftest.err
-configure:3448: $? = 0
-configure:3451: test -s conftest.o
-configure:3454: $? = 0
-configure:3464: result: yes
-configure:3468: checking projects.h presence
-configure:3478: i486-linux-gnu-gcc -E  conftest.c
-configure:3484: $? = 0
-configure:3504: result: yes
-configure:3539: checking for projects.h
-configure:3546: result: yes
-configure:3655: checking for deflateInit_ in -lz
-configure:3685: i486-linux-gnu-gcc -o conftest -Wall    -Wl,-z,defs conftest.c -lz  -ldl  >&5
-configure:3691: $? = 0
-configure:3695: test -z 
-			 || test ! -s conftest.err
-configure:3698: $? = 0
-configure:3701: test -s conftest
-configure:3704: $? = 0
-configure:3717: result: yes
-configure:3739: checking zlib.h usability
-configure:3751: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:3757: $? = 0
-configure:3761: test -z 
-			 || test ! -s conftest.err
-configure:3764: $? = 0
-configure:3767: test -s conftest.o
-configure:3770: $? = 0
-configure:3780: result: yes
-configure:3784: checking zlib.h presence
-configure:3794: i486-linux-gnu-gcc -E  conftest.c
-configure:3800: $? = 0
-configure:3820: result: yes
-configure:3855: checking for zlib.h
-configure:3862: result: yes
-configure:3946: result: Using ZLIB_LIB=-lz for ZLIB library.
-configure:3960: result: Using ZLIB_INCLUDE=-I/usr/include for ZLIB includes.
-configure:3991: checking for XML_ParserCreate in -lexpat
-configure:4021: i486-linux-gnu-gcc -o conftest -Wall    -Wl,-z,defs conftest.c -lexpat  -ldl  >&5
-configure:4027: $? = 0
-configure:4031: test -z 
-			 || test ! -s conftest.err
-configure:4034: $? = 0
-configure:4037: test -s conftest
-configure:4040: $? = 0
-configure:4053: result: yes
-configure:4075: checking expat.h usability
-configure:4087: i486-linux-gnu-gcc -c -Wall    conftest.c >&5
-configure:4093: $? = 0
-configure:4097: test -z 
-			 || test ! -s conftest.err
-configure:4100: $? = 0
-configure:4103: test -s conftest.o
-configure:4106: $? = 0
-configure:4116: result: yes
-configure:4120: checking expat.h presence
-configure:4130: i486-linux-gnu-gcc -E  conftest.c
-configure:4136: $? = 0
-configure:4156: result: yes
-configure:4191: checking for expat.h
-configure:4198: result: yes
-configure:4316: pkgconfig directory is /usr/lib/pkgconfig
-configure:4471: creating ./config.status
-
-## ---------------------- ##
-## Running config.status. ##
-## ---------------------- ##
-
-This file was extended by config.status, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
-
-  CONFIG_FILES    = 
-  CONFIG_HEADERS  = 
-  CONFIG_LINKS    = 
-  CONFIG_COMMANDS = 
-  $ ./config.status 
-
-on klecker
-
-config.status:657: creating config/common.mak
-config.status:657: creating ogdi.pc
-config.status:657: creating ogdi-config
-config.status:657: creating config/generic.mak
-
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-
-ac_cv_c_bigendian=no
-ac_cv_c_compiler_gnu=yes
-ac_cv_env_CC_set=
-ac_cv_env_CC_value=
-ac_cv_env_CFLAGS_set=set
-ac_cv_env_CFLAGS_value='-Wall -g -O2'
-ac_cv_env_CPPFLAGS_set=
-ac_cv_env_CPPFLAGS_value=
-ac_cv_env_CPP_set=
-ac_cv_env_CPP_value=
-ac_cv_env_LDFLAGS_set=set
-ac_cv_env_LDFLAGS_value=-Wl,-z,defs
-ac_cv_env_build_alias_set=set
-ac_cv_env_build_alias_value=i486-linux-gnu
-ac_cv_env_host_alias_set=set
-ac_cv_env_host_alias_value=i486-linux-gnu
-ac_cv_env_target_alias_set=
-ac_cv_env_target_alias_value=
-ac_cv_exeext=
-ac_cv_header_dlfcn_h=yes
-ac_cv_header_expat_h=yes
-ac_cv_header_float_h=yes
-ac_cv_header_inttypes_h=yes
-ac_cv_header_memory_h=yes
-ac_cv_header_projects_h=yes
-ac_cv_header_rpc_pmap_clnt_h=yes
-ac_cv_header_stdc=yes
-ac_cv_header_stdint_h=yes
-ac_cv_header_stdlib_h=yes
-ac_cv_header_string_h=yes
-ac_cv_header_strings_h=yes
-ac_cv_header_sys_stat_h=yes
-ac_cv_header_sys_types_h=yes
-ac_cv_header_unistd_h=yes
-ac_cv_header_zlib_h=yes
-ac_cv_lib_dl_dlopen=yes
-ac_cv_lib_expat_XML_ParserCreate=yes
-ac_cv_lib_proj_pj_init=yes
-ac_cv_lib_z_deflateInit_=yes
-ac_cv_objext=o
-ac_cv_prog_CC=i486-linux-gnu-gcc
-ac_cv_prog_CPP='i486-linux-gnu-gcc -E'
-ac_cv_prog_cc_g=yes
-ac_cv_prog_cc_stdc=
-ac_cv_prog_egrep='grep -E'
-
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-
-BIG_ENDIAN='0'
-CC='i486-linux-gnu-gcc'
-CFLAGS='-Wall  '
-CPP='i486-linux-gnu-gcc -E'
-CPPFLAGS=''
-CXX_PIC='-fPIC'
-CXX_WFLAGS=''
-C_PIC='-fPIC'
-C_WFLAGS='-Wall'
-DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBDL=1 -DUSE_GNUCC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_RPC_PMAP_CLNT_H=1 -DHAVE_FLOAT_H=1 -DHAVE_DLFCN_H=1 -DHAVE_PROJECTS_H=1 -DHAVE_ZLIB_H=1 -DHAVE_EXPAT_H=1 '
-ECHO_C=''
-ECHO_N='-n'
-ECHO_T=''
-EGREP='grep -E'
-EXEEXT=''
-EXPAT_INCLUDE='-I/usr/include'
-EXPAT_LIB='-lexpat'
-EXPAT_SETTING='external'
-LDFLAGS='-Wl,-z,defs'
-LD_SHARED='ld -shared'
-LIBOBJS=''
-LIBS='-ldl '
-LTLIBOBJS=''
-OBJEXT='o'
-OGDI_MAJOR='3'
-OGDI_MINOR='2'
-OGDI_VERSION='3.2.0beta1'
-PACKAGE_BUGREPORT=''
-PACKAGE_NAME=''
-PACKAGE_STRING=''
-PACKAGE_TARNAME=''
-PACKAGE_VERSION=''
-PATH_SEPARATOR=':'
-PROJ_INCLUDE='-I/usr/include'
-PROJ_LIB='-lproj'
-PROJ_SETTING='external'
-RPC_INCLUDES='-DHAVE_STD_RPC_INCLUDES'
-SHELL='/bin/sh'
-ZLIB_INCLUDE='-I/usr/include'
-ZLIB_LIB='-lz'
-ZLIB_SETTING='external'
-ac_ct_CC=''
-binconfigs='${binconfigs}'
-bindir='${exec_prefix}/bin'
-build_alias='i486-linux-gnu'
-datadir='${prefix}/share'
-exec_prefix='${prefix}'
-host_alias='i486-linux-gnu'
-includedir='${prefix}/include'
-infodir='${prefix}/share/info'
-libdir='${exec_prefix}/lib'
-libexecdir='${exec_prefix}/libexec'
-localstatedir='${prefix}/var'
-mandir='${prefix}/share/man'
-oldincludedir='/usr/include'
-pkgconfigdir='/usr/lib/pkgconfig'
-prefix='/usr'
-program_transform_name='s,x,x,'
-sbindir='${exec_prefix}/sbin'
-sharedstatedir='${prefix}/com'
-sysconfdir='${prefix}/etc'
-target_alias=''
-
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-
-#define HAVE_DLFCN_H 1
-#define HAVE_EXPAT_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_LIBDL 1
-#define HAVE_MEMORY_H 1
-#define HAVE_PROJECTS_H 1
-#define HAVE_RPC_PMAP_CLNT_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_UNISTD_H 1
-#define HAVE_ZLIB_H 1
-#define PACKAGE_BUGREPORT ""
-#define PACKAGE_NAME ""
-#define PACKAGE_STRING ""
-#define PACKAGE_TARNAME ""
-#define PACKAGE_VERSION ""
-#define STDC_HEADERS 1
-#define USE_GNUCC 1
-
-configure: exit 0

Deleted: packages/ogdi-dfsg/branches/upstream/current/config.sub
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/config.sub	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/config.sub	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,1616 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2006-09-20'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray)
-		os=
-		basic_machine=$1
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
- 	-chorusrdb)
- 		os=-chorusrdb
-		basic_machine=$1
- 		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco6)
-		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
-	| mips64orion | mips64orionel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| mt \
-	| msp430 \
-	| nios | nios2 \
-	| ns16k | ns32k \
-	| or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-	| pyramid \
-	| score \
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
-	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k)
-		basic_machine=$basic_machine-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-	ms1)
-		basic_machine=mt-unknown
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* | avr32-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| m32c-* | m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
-	| msp430-* \
-	| nios-* | nios2-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tron-* \
-	| v850-* | v850e-* | vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| xstormy16-* | xtensa-* \
-	| ymp-* \
-	| z8k-*)
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-    	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16c)
-		basic_machine=cr16c-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	openrisc | openrisc-*)
-		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pc98)
-		basic_machine=i386-pc
-		;;
-	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rdos)
-		basic_machine=i386-pc
-		os=-rdos
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sde)
-		basic_machine=mipsisa32-sde
-		os=-elf
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-        -os400*)
-		os=-os400
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-syllable*)
-		os=-syllable
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-        -tpf*)
-		os=-tpf
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-        score-*)
-		os=-elf
-		;;
-        spu-*)
-		os=-elf
-		;;
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-        c4x-* | tic4x-*)
-        	os=-coff
-		;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-haiku)
-		os=-haiku
-		;;
-	*-ibm)
-		os=-aix
-		;;
-    	*-knuth)
-		os=-mmixware
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-os400*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-tpf*)
-				vendor=ibm
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:

Modified: packages/ogdi-dfsg/branches/upstream/current/configure
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/configure	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/configure	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,26 +1,55 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
+# Generated by GNU Autoconf 2.61.
 #
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
 fi
-DUALCASE=1; export DUALCASE # for MKS sh
 
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
 # Support unset when possible.
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   as_unset=unset
@@ -29,8 +58,43 @@
 fi
 
 
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -44,18 +108,19 @@
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    $as_unset $as_var
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
 done
 
 # Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 else
   as_basename=false
@@ -63,157 +128,388 @@
 
 
 # Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)$' \| \
-	 .     : '\(.\)' 2>/dev/null ||
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\/\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
 
+# CDPATH.
+$as_unset CDPATH
 
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
 fi
 
+  if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
 
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-	 case $as_dir in
+  case $as_dir in
 	 /*)
-	   if ("$as_dir/$as_base" -c '
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-	     CONFIG_SHELL=$as_dir/$as_base
-	     export CONFIG_SHELL
-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-	   fi;;
-	 esac
-       done
-done
-;;
-  esac
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
 
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf at gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
   # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
     sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
       N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
       t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
+      s/-\n.*//
     ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
+  chmod +x "$as_me.lineno" ||
     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
    { (exit 1); exit 1; }; }
 
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
   # Exit status is that of the last command.
   exit
 }
 
 
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='	' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
 rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
 echo >conf$$.file
 if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
     as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
 elif ln conf$$.file conf$$ 2>/dev/null; then
   as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
   as_mkdir_p=:
@@ -222,7 +518,28 @@
   as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -231,39 +548,27 @@
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
 
-# CDPATH.
-$as_unset CDPATH
+exec 7<&0 </dev/null 6>&1
 
-
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
-exec 6>&1
-
 #
 # Initializations.
 #
 ac_default_prefix=/usr/local
+ac_clean_files=
 ac_config_libobj_dir=.
+LIBOBJS=
 cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete.  It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
 # Identity of this package.
 PACKAGE_NAME=
 PACKAGE_TARNAME=
@@ -275,43 +580,121 @@
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
 #endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS OGDI_VERSION OGDI_MAJOR OGDI_MINOR CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX_WFLAGS C_WFLAGS CXX_PIC C_PIC LD_SHARED CPP EGREP RPC_INCLUDES BIG_ENDIAN PROJ_SETTING PROJ_INCLUDE PROJ_LIB ZLIB_SETTING ZLIB_INCLUDE ZLIB_LIB EXPAT_SETTING EXPAT_INCLUDE EXPAT_LIB pkgconfigdir binconfigs LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+OGDI_VERSION
+OGDI_MAJOR
+OGDI_MINOR
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+CXX_WFLAGS
+C_WFLAGS
+CXX_PIC
+C_PIC
+LD_SHARED
+CPP
+GREP
+EGREP
+RPC_INCLUDES
+BIG_ENDIAN
+PROJ_SETTING
+PROJ_INCLUDE
+PROJ_LIB
+ZLIB_SETTING
+ZLIB_INCLUDE
+ZLIB_LIB
+EXPAT_SETTING
+EXPAT_INCLUDE
+EXPAT_LIB
+pkgconfigdir
+binconfigs
+LIBOBJS
+LTLIBOBJS'
 ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
 
+
 # Initialize some variables set by options.
 ac_init_help=
 ac_init_version=false
@@ -337,34 +720,48 @@
 # and all the variables that are supposed to be based on exec_prefix
 # by default will actually change.
 # Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
 
 ac_prev=
+ac_dashdash=
 for ac_option
 do
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
+    eval $ac_prev=\$ac_option
     ac_prev=
     continue
   fi
 
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case $ac_option in
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
@@ -386,33 +783,45 @@
   --config-cache | -C)
     cache_file=config.cache ;;
 
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+  -datadir | --datadir | --datadi | --datad)
     ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
     datadir=$ac_optarg ;;
 
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
   -disable-* | --disable-*)
     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    eval "enable_$ac_feature=no" ;;
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=no ;;
 
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
   -enable-* | --enable-*)
     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_$ac_feature='$ac_optarg'" ;;
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -439,6 +848,12 @@
   -host=* | --host=* | --hos=* | --ho=*)
     host_alias=$ac_optarg ;;
 
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
@@ -463,13 +878,16 @@
   | --libexe=* | --libex=* | --libe=*)
     libexecdir=$ac_optarg ;;
 
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
   -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
+  | --localstate | --localstat | --localsta | --localst | --locals)
     ac_prev=localstatedir ;;
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
     localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -534,6 +952,16 @@
   | --progr-tra=* | --program-tr=* | --program-t=*)
     program_transform_name=$ac_optarg ;;
 
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
@@ -586,24 +1014,20 @@
   -with-* | --with-*)
     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_$ac_package='$ac_optarg'" ;;
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
 
   -without-* | --without-*)
     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/-/_/g'`
-    eval "with_$ac_package=no" ;;
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -634,8 +1058,7 @@
     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
    { (exit 1); exit 1; }; }
-    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
-    eval "$ac_envvar='$ac_optarg'"
+    eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
   *)
@@ -655,29 +1078,21 @@
    { (exit 1); exit 1; }; }
 fi
 
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
 do
-  eval ac_val=$`echo $ac_var`
+  eval ac_val=\$$ac_var
   case $ac_val in
-    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
 done
 
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-	      localstatedir libdir includedir oldincludedir infodir mandir
-do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
 # There might be people who depend on the old broken behavior: `$host'
 # used to hold the argument of --host etc.
 # FIXME: To remove some day.
@@ -702,74 +1117,76 @@
 test "$silent" = yes && exec 6>/dev/null
 
 
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_confdir=`(dirname "$0") 2>/dev/null ||
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$0" : 'X\(//\)[^/]' \| \
 	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 echo X"$0" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
   srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
+  if test ! -r "$srcdir/$ac_unique_file"; then
     srcdir=..
   fi
 else
   ac_srcdir_defaulted=no
 fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
    { (exit 1); exit 1; }; }
-  else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
    { (exit 1); exit 1; }; }
-  fi
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
 fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
-  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
-   { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
 
 #
 # Report the --help message.
@@ -798,9 +1215,6 @@
   -n, --no-create         do not create output files
       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
-_ACEOF
-
-  cat <<_ACEOF
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
 			  [$ac_default_prefix]
@@ -818,15 +1232,22 @@
   --bindir=DIR           user executables [EPREFIX/bin]
   --sbindir=DIR          system admin executables [EPREFIX/sbin]
   --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
   --libdir=DIR           object code libraries [EPREFIX/lib]
   --includedir=DIR       C header files [PREFIX/include]
   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --infodir=DIR          info documentation [PREFIX/info]
-  --mandir=DIR           man documentation [PREFIX/man]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -859,126 +1280,95 @@
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
-  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
-              headers in a nonstandard directory <include dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
 _ACEOF
+ac_status=$?
 fi
 
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
-  ac_popdir=`pwd`
   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d $ac_dir || continue
+    test -d "$ac_dir" || continue
     ac_builddir=.
 
-if test "$ac_dir" != .; then
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
+  .)  # We are building in place.
     ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
-
-    cd $ac_dir
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_srcdir/configure.gnu; then
-      echo
-      $SHELL $ac_srcdir/configure.gnu  --help=recursive
-    elif test -f $ac_srcdir/configure; then
-      echo
-      $SHELL $ac_srcdir/configure  --help=recursive
-    elif test -f $ac_srcdir/configure.ac ||
-	   test -f $ac_srcdir/configure.in; then
-      echo
-      $ac_configure --help
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
     else
       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi
-    cd $ac_popdir
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
   done
 fi
 
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.61
 
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
-  exit 0
+  exit
 fi
-exec 5>config.log
-cat >&5 <<_ACEOF
+cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
+generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
 
 _ACEOF
+exec 5>>config.log
 {
 cat <<_ASUNAME
 ## --------- ##
@@ -997,7 +1387,7 @@
 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
@@ -1011,6 +1401,7 @@
   test -z "$as_dir" && as_dir=.
   echo "PATH: $as_dir"
 done
+IFS=$as_save_IFS
 
 } >&5
 
@@ -1032,7 +1423,6 @@
 ac_configure_args=
 ac_configure_args0=
 ac_configure_args1=
-ac_sep=
 ac_must_keep_next=false
 for ac_pass in 1 2
 do
@@ -1043,7 +1433,7 @@
     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
     | -silent | --silent | --silen | --sile | --sil)
       continue ;;
-    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+    *\'*)
       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
@@ -1065,9 +1455,7 @@
 	  -* ) ac_must_keep_next=true ;;
 	esac
       fi
-      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-      # Get rid of the leading space.
-      ac_sep=" "
+      ac_configure_args="$ac_configure_args '$ac_arg'"
       ;;
     esac
   done
@@ -1078,8 +1466,8 @@
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
 # would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
 trap 'exit_status=$?
   # Save into config.log some information that might help in debugging.
   {
@@ -1092,20 +1480,34 @@
 _ASBOX
     echo
     # The following way of writing the cache mishandles newlines in values,
-{
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
   (set) 2>&1 |
-    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
       sed -n \
-	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-      ;;
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
     *)
-      sed -n \
-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
       ;;
-    esac;
-}
+    esac |
+    sort
+)
     echo
 
     cat <<\_ASBOX
@@ -1116,22 +1518,28 @@
     echo
     for ac_var in $ac_subst_vars
     do
-      eval ac_val=$`echo $ac_var`
-      echo "$ac_var='"'"'$ac_val'"'"'"
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
     done | sort
     echo
 
     if test -n "$ac_subst_files"; then
       cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
 _ASBOX
       echo
       for ac_var in $ac_subst_files
       do
-	eval ac_val=$`echo $ac_var`
-	echo "$ac_var='"'"'$ac_val'"'"'"
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
       done | sort
       echo
     fi
@@ -1143,26 +1551,24 @@
 ## ----------- ##
 _ASBOX
       echo
-      sed "/^$/d" confdefs.h | sort
+      cat confdefs.h
       echo
     fi
     test "$ac_signal" != 0 &&
       echo "$as_me: caught signal $ac_signal"
     echo "$as_me: exit $exit_status"
   } >&5
-  rm -f core *.core &&
-  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
     exit $exit_status
-     ' 0
+' 0
 for ac_signal in 1 2 13 15; do
   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
 done
 ac_signal=0
 
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
 
 # Predefined preprocessor variables.
 
@@ -1193,14 +1599,17 @@
 
 # Let the site file select an alternate cache file if it wants to.
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
 fi
-for ac_site_file in $CONFIG_SITE; do
+shift
+for ac_site_file
+do
   if test -r "$ac_site_file"; then
     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
 echo "$as_me: loading site script $ac_site_file" >&6;}
@@ -1216,8 +1625,8 @@
     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
-      [\\/]* | ?:[\\/]* ) . $cache_file;;
-      *)                      . ./$cache_file;;
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
     esac
   fi
 else
@@ -1229,12 +1638,11 @@
 # Check that the precious variables saved in the cache have kept the same
 # value.
 ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
-	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+for ac_var in $ac_precious_vars; do
   eval ac_old_set=\$ac_cv_env_${ac_var}_set
   eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
-  eval ac_new_val="\$ac_env_${ac_var}_value"
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
   case $ac_old_set,$ac_new_set in
     set,)
       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
@@ -1259,8 +1667,7 @@
   # Pass precious variables to config.status.
   if test "$ac_new_set" = set; then
     case $ac_new_val in
-    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
     *) ac_arg=$ac_var=$ac_new_val ;;
     esac
     case " $ac_configure_args " in
@@ -1277,11 +1684,6 @@
    { (exit 1); exit 1; }; }
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
@@ -1298,11 +1700,15 @@
 
 
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-
-OGDI_VERSION=3.2.0beta1
+OGDI_VERSION=3.2.0beta2
 OGDI_MAJOR=3
 OGDI_MINOR=2
 
@@ -1331,8 +1737,8 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1345,32 +1751,34 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
+
 fi
 if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1383,36 +1791,51 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 else
   CC="$ac_cv_prog_CC"
 fi
 
 if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1425,74 +1848,34 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+
   fi
-done
-done
-
 fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1506,7 +1889,7 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -1517,6 +1900,7 @@
   fi
 done
 done
+IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
   # We found a bogon in the path, so make sure we never use it.
@@ -1534,22 +1918,23 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
+
 fi
 if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
+  for ac_prog in cl.exe
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1562,36 +1947,38 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
+
     test -n "$CC" && break
   done
 fi
 if test -z "$CC"; then
   ac_ct_CC=$CC
-  for ac_prog in cl
+  for ac_prog in cl.exe
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1604,29 +1991,45 @@
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
+
   test -n "$ac_ct_CC" && break
 done
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 fi
 
 fi
@@ -1639,21 +2042,35 @@
    { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
-     "checking for C compiler version" >&5
+echo "$as_me:$LINENO: checking for C compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
@@ -1678,47 +2095,77 @@
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
-  (eval $ac_link_default) 2>&5
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort.  b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions.  Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link_default") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  # Find the output, starting from the most likely.  This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
 do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
 	;;
-    conftest.$ac_ext )
-	# This is the source file.
-	;;
     [ab].out )
 	# We found the default executable, but exeext='' is most
 	# certainly right.
 	break;;
     *.* )
-	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	# FIXME: I believe we export ac_cv_exeext for Libtool,
-	# but it would be cool to find out if it's true.  Does anybody
-	# maintain Libtool? --akim.
-	export ac_cv_exeext
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
 	break;;
     * )
 	break;;
   esac
 done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
 else
+  ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
@@ -1730,19 +2177,21 @@
 fi
 
 ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
 
-# Check the compiler produces executables we can run.  If not, either
+# Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
 # If not cross compiling, check that we can run a simple program.
 if test "$cross_compiling" != yes; then
   if { ac_try='./$ac_file'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
@@ -1761,22 +2210,27 @@
     fi
   fi
 fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 rm -f a.out a.exe conftest$ac_cv_exeext b.out
 ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run.  If not, either
+# Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
 
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
@@ -1787,9 +2241,8 @@
 for ac_file in conftest.exe conftest conftest.*; do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  export ac_cv_exeext
 	  break;;
     * ) break;;
   esac
@@ -1803,14 +2256,14 @@
 fi
 
 rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
 if test "${ac_cv_objext+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1830,14 +2283,20 @@
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac
@@ -1855,12 +2314,12 @@
 
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
 if test "${ac_cv_c_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1883,50 +2342,49 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_compiler_gnu=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_compiler_gnu=no
+	ac_compiler_gnu=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
 GCC=`test $ac_compiler_gnu = yes && echo yes`
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
 if test "${ac_cv_prog_cc_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -1942,38 +2400,118 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_cc_g=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cc_g=no
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
@@ -1989,12 +2527,12 @@
     CFLAGS=
   fi
 fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_prog_cc_stdc=no
+  ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -2028,12 +2566,17 @@
 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
    function prototypes and stuff, but not '\xHH' hex character constants.
    These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std1 is added to get
+   as 'x'.  The following induces an error, until -std is added to get
    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
    array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std1.  */
+   that's true only with -std.  */
 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
 
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
 int test (int i, double x);
 struct s1 {int (*f) (int a);};
 struct s2 {int (*f) (double a);};
@@ -2048,205 +2591,57 @@
   return 0;
 }
 _ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX			-qlanglvl=ansi
-# Ultrix and OSF/1	-std1
-# HP-UX 10.20 and later	-Ae
-# HP-UX older versions	-Aa -D_HPUX_SOURCE
-# SVR4			-Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
   rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_stdc=$ac_arg
-break
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
 CC=$ac_save_CC
 
 fi
-
-case "x$ac_cv_prog_cc_stdc" in
-  x|xno)
-    echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+  xno)
+    { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
   *)
-    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-    CC="$CC $ac_cv_prog_cc_stdc" ;;
+    CC="$CC $ac_cv_prog_cc_c89"
+    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
 esac
 
-# Some people use a C++ compiler to compile C.  Since we use `exit',
-# in C++ we need to declare it.  In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
-  choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  for ac_declaration in \
-   '' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
-fi
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2257,8 +2652,8 @@
 
 
 
-echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -2271,56 +2666,53 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char dlopen ();
 int
 main ()
 {
-dlopen ();
+return dlopen ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_dl_dlopen=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_dl_dlopen=no
+	ac_cv_lib_dl_dlopen=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
 if test $ac_cv_lib_dl_dlopen = yes; then
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBDL 1
@@ -2425,15 +2817,14 @@
 
 
 
-CFLAGS=`echo "$CFLAGS " | sed "s/-O2 //"`
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2467,24 +2858,22 @@
 #endif
 		     Syntax error
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -2493,9 +2882,10 @@
   # Broken: fails on valid input.
 continue
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether non-existent headers
+  # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -2505,24 +2895,22 @@
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   # Broken: success on invalid input.
 continue
 else
@@ -2533,6 +2921,7 @@
 ac_preproc_ok=:
 break
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
 done
@@ -2550,8 +2939,8 @@
 else
   ac_cv_prog_CPP=$CPP
 fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
@@ -2574,24 +2963,22 @@
 #endif
 		     Syntax error
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   :
 else
   echo "$as_me: failed program was:" >&5
@@ -2600,9 +2987,10 @@
   # Broken: fails on valid input.
 continue
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether non-existent headers
+  # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -2612,24 +3000,22 @@
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   # Broken: success on invalid input.
 continue
 else
@@ -2640,6 +3026,7 @@
 ac_preproc_ok=:
 break
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
 done
@@ -2662,23 +3049,170 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
+  # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+    # Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
     fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_GREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
 
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in egrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+    # Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_EGREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+
+   fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
 if test "${ac_cv_header_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -2702,36 +3236,32 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_header_stdc=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_header_stdc=no
+	ac_cv_header_stdc=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
   cat >conftest.$ac_ext <<_ACEOF
@@ -2786,6 +3316,7 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <ctype.h>
+#include <stdlib.h>
 #if ((' ' & 0x0FF) == 0x020)
 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -2805,18 +3336,27 @@
   for (i = 0; i < 256; i++)
     if (XOR (islower (i), ISLOWER (i))
 	|| toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
+      return 2;
+  return 0;
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
@@ -2829,12 +3369,14 @@
 ( exit $ac_status )
 ac_cv_header_stdc=no
 fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
+
+
 fi
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
 if test $ac_cv_header_stdc = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -2857,9 +3399,9 @@
 		  inttypes.h stdint.h unistd.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -2873,38 +3415,35 @@
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "$as_ac_Header=no"
+	eval "$as_ac_Header=no"
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -2921,18 +3460,19 @@
 for ac_header in rpc/pmap_clnt.h float.h dlfcn.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -2943,41 +3483,37 @@
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -2986,24 +3522,22 @@
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -3011,9 +3545,10 @@
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -3037,25 +3572,19 @@
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -3083,8 +3612,8 @@
   CFLAGS="$CFLAGS -DMISSING_DLFCN_H"
 fi
 
-echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
 if test "${ac_cv_c_bigendian+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3101,7 +3630,8 @@
 int
 main ()
 {
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
+	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
  bogus endian macros
 #endif
 
@@ -3110,27 +3640,22 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3153,40 +3678,36 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_c_bigendian=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_c_bigendian=no
+	ac_cv_c_bigendian=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-# It does not; compile a test program.
+	# It does not; compile a test program.
 if test "$cross_compiling" = yes; then
   # try to guess the endianness by grepping values into an object file
   ac_cv_c_bigendian=unknown
@@ -3196,11 +3717,11 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
 int
 main ()
@@ -3211,27 +3732,22 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
   ac_cv_c_bigendian=yes
 fi
@@ -3247,8 +3763,10 @@
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3256,27 +3774,41 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+$ac_includes_default
 int
 main ()
 {
+
   /* Are we little or big endian?  From Harbison&Steele.  */
   union
   {
-    long l;
-    char c[sizeof (long)];
+    long int l;
+    char c[sizeof (long int)];
   } u;
   u.l = 1;
-  exit (u.c[sizeof (long) - 1] == 1);
+  return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
@@ -3289,13 +3821,16 @@
 ( exit $ac_status )
 ac_cv_c_bigendian=yes
 fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
+
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
 case $ac_cv_c_bigendian in
   yes)
 
@@ -3328,16 +3863,16 @@
 export PROJ_LIB PROJ_INCLUDE PROJ_SETTING
 
 
-# Check whether --with-proj or --without-proj was given.
+# Check whether --with-proj was given.
 if test "${with_proj+set}" = set; then
-  withval="$with_proj"
+  withval=$with_proj;
+fi
 
-fi;
 
 if test "$with_proj" = "yes" ; then
 
-  echo "$as_me:$LINENO: checking for pj_init in -lproj" >&5
-echo $ECHO_N "checking for pj_init in -lproj... $ECHO_C" >&6
+  { echo "$as_me:$LINENO: checking for pj_init in -lproj" >&5
+echo $ECHO_N "checking for pj_init in -lproj... $ECHO_C" >&6; }
 if test "${ac_cv_lib_proj_pj_init+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3350,56 +3885,53 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char pj_init ();
 int
 main ()
 {
-pj_init ();
+return pj_init ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_proj_pj_init=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_proj_pj_init=no
+	ac_cv_lib_proj_pj_init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_proj_pj_init" >&5
-echo "${ECHO_T}$ac_cv_lib_proj_pj_init" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_proj_pj_init" >&5
+echo "${ECHO_T}$ac_cv_lib_proj_pj_init" >&6; }
 if test $ac_cv_lib_proj_pj_init = yes; then
   PROJ_SETTING=external
 else
@@ -3410,18 +3942,19 @@
 for ac_header in projects.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3432,41 +3965,37 @@
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3475,24 +4004,22 @@
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -3500,9 +4027,10 @@
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -3526,25 +4054,19 @@
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -3601,11 +4123,11 @@
 fi
 
 
-# Check whether --with-projlib or --without-projlib was given.
+# Check whether --with-projlib was given.
 if test "${with_projlib+set}" = set; then
-  withval="$with_projlib"
+  withval=$with_projlib;
+fi
 
-fi;
 
 if test "$with_projlib" != "" ; then
   PROJ_LIB=$with_projlib
@@ -3614,11 +4136,11 @@
 fi
 
 
-# Check whether --with-projinc or --without-projinc was given.
+# Check whether --with-projinc was given.
 if test "${with_projinc+set}" = set; then
-  withval="$with_projinc"
+  withval=$with_projinc;
+fi
 
-fi;
 
 if test "$with_projinc" != "" ; then
   PROJ_INCLUDE=-I${with_projinc}
@@ -3644,16 +4166,16 @@
 export ZLIB_LIB ZLIB_INCLUDE ZLIB_SETTING
 
 
-# Check whether --with-zlib or --without-zlib was given.
+# Check whether --with-zlib was given.
 if test "${with_zlib+set}" = set; then
-  withval="$with_zlib"
+  withval=$with_zlib;
+fi
 
-fi;
 
 if test "$with_zlib" = "yes" ; then
 
-  echo "$as_me:$LINENO: checking for deflateInit_ in -lz" >&5
-echo $ECHO_N "checking for deflateInit_ in -lz... $ECHO_C" >&6
+  { echo "$as_me:$LINENO: checking for deflateInit_ in -lz" >&5
+echo $ECHO_N "checking for deflateInit_ in -lz... $ECHO_C" >&6; }
 if test "${ac_cv_lib_z_deflateInit_+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -3666,56 +4188,53 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char deflateInit_ ();
 int
 main ()
 {
-deflateInit_ ();
+return deflateInit_ ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_z_deflateInit_=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_z_deflateInit_=no
+	ac_cv_lib_z_deflateInit_=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflateInit_" >&5
-echo "${ECHO_T}$ac_cv_lib_z_deflateInit_" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflateInit_" >&5
+echo "${ECHO_T}$ac_cv_lib_z_deflateInit_" >&6; }
 if test $ac_cv_lib_z_deflateInit_ = yes; then
   ZLIB_SETTING=external
 else
@@ -3726,18 +4245,19 @@
 for ac_header in zlib.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3748,41 +4268,37 @@
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3791,24 +4307,22 @@
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -3816,9 +4330,10 @@
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -3842,25 +4357,19 @@
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -3890,12 +4399,12 @@
 elif test "$with_zlib" != "no" -a "$with_zlib" != "" ; then
 
   if test -r $with_zlib/include/zlib.h ; then
-    echo "$as_me:$LINENO: result: checking for $with_zlib/include/zlib.h ... found" >&5
-echo "${ECHO_T}checking for $with_zlib/include/zlib.h ... found" >&6
+    { echo "$as_me:$LINENO: result: checking for $with_zlib/include/zlib.h ... found" >&5
+echo "${ECHO_T}checking for $with_zlib/include/zlib.h ... found" >&6; }
     ZLIB_INCLUDE=-I$with_zlib/include
   elif test -r $with_zlib/zlib.h ; then
-    echo "$as_me:$LINENO: result: checking for $with_zlib/zlib.h ... found" >&5
-echo "${ECHO_T}checking for $with_zlib/zlib.h ... found" >&6
+    { echo "$as_me:$LINENO: result: checking for $with_zlib/zlib.h ... found" >&5
+echo "${ECHO_T}checking for $with_zlib/zlib.h ... found" >&6; }
     ZLIB_INCLUDE=-I$with_zlib
   else
     { { echo "$as_me:$LINENO: error: Unable to find $with_zlib/include/zlib.h" >&5
@@ -3905,23 +4414,23 @@
 
   if test -r $with_zlib/lib/libz.so ; then
     ZLIB_LIB=$with_zlib/lib/libz.so
-    echo "$as_me:$LINENO: result: checking for $ZLIB_LIB ... found" >&5
-echo "${ECHO_T}checking for $ZLIB_LIB ... found" >&6
+    { echo "$as_me:$LINENO: result: checking for $ZLIB_LIB ... found" >&5
+echo "${ECHO_T}checking for $ZLIB_LIB ... found" >&6; }
 
   elif test -r $with_zlib/lib/libz.a ; then
     ZLIB_LIB=$with_zlib/lib/libz.a
-    echo "$as_me:$LINENO: result: checking for $ZLIB_LIB ... found" >&5
-echo "${ECHO_T}checking for $ZLIB_LIB ... found" >&6
+    { echo "$as_me:$LINENO: result: checking for $ZLIB_LIB ... found" >&5
+echo "${ECHO_T}checking for $ZLIB_LIB ... found" >&6; }
 
   elif test -r $with_zlib/libz.so ; then
     ZLIB_LIB=$with_zlib/libz.so
-    echo "$as_me:$LINENO: result: checking for $ZLIB_LIB ... found" >&5
-echo "${ECHO_T}checking for $ZLIB_LIB ... found" >&6
+    { echo "$as_me:$LINENO: result: checking for $ZLIB_LIB ... found" >&5
+echo "${ECHO_T}checking for $ZLIB_LIB ... found" >&6; }
 
   elif test -r $with_zlib/libz.a ; then
     ZLIB_LIB=$with_zlib/libz.a
-    echo "$as_me:$LINENO: result: checking for $ZLIB_LIB ... found" >&5
-echo "${ECHO_T}checking for $ZLIB_LIB ... found" >&6
+    { echo "$as_me:$LINENO: result: checking for $ZLIB_LIB ... found" >&5
+echo "${ECHO_T}checking for $ZLIB_LIB ... found" >&6; }
 
   else
     { { echo "$as_me:$LINENO: error: Unable to find $with_zlib/{lib/,}libz.{so,a}" >&5
@@ -3934,36 +4443,36 @@
 fi
 
 
-# Check whether --with-zliblib or --without-zliblib was given.
+# Check whether --with-zliblib was given.
 if test "${with_zliblib+set}" = set; then
-  withval="$with_zliblib"
+  withval=$with_zliblib;
+fi
 
-fi;
 
 if test "$with_zliblib" != "" ; then
   ZLIB_LIB=$with_zliblib
   ZLIB_SETTING=external
-  echo "$as_me:$LINENO: result: Using ZLIB_LIB=$ZLIB_LIB for ZLIB library." >&5
-echo "${ECHO_T}Using ZLIB_LIB=$ZLIB_LIB for ZLIB library." >&6
+  { echo "$as_me:$LINENO: result: Using ZLIB_LIB=$ZLIB_LIB for ZLIB library." >&5
+echo "${ECHO_T}Using ZLIB_LIB=$ZLIB_LIB for ZLIB library." >&6; }
 fi
 
 
-# Check whether --with-zlibinc or --without-zlibinc was given.
+# Check whether --with-zlibinc was given.
 if test "${with_zlibinc+set}" = set; then
-  withval="$with_zlibinc"
+  withval=$with_zlibinc;
+fi
 
-fi;
 
 if test "$with_zlibinc" != "" ; then
   ZLIB_INCLUDE=-I${with_zlibinc}
   ZLIB_SETTING=external
-  echo "$as_me:$LINENO: result: Using ZLIB_INCLUDE=$ZLIB_INCLUDE for ZLIB includes." >&5
-echo "${ECHO_T}Using ZLIB_INCLUDE=$ZLIB_INCLUDE for ZLIB includes." >&6
+  { echo "$as_me:$LINENO: result: Using ZLIB_INCLUDE=$ZLIB_INCLUDE for ZLIB includes." >&5
+echo "${ECHO_T}Using ZLIB_INCLUDE=$ZLIB_INCLUDE for ZLIB includes." >&6; }
 fi
 
 if test "$ZLIB_SETTING" = "internal" ; then
-  echo "$as_me:$LINENO: result: Using internal ZLIB implementation." >&5
-echo "${ECHO_T}Using internal ZLIB implementation." >&6
+  { echo "$as_me:$LINENO: result: Using internal ZLIB implementation." >&5
+echo "${ECHO_T}Using internal ZLIB implementation." >&6; }
 fi
 
 ZLIB_SETTING=$ZLIB_SETTING
@@ -3980,16 +4489,16 @@
 export EXPAT_LIB EXPAT_INCLUDE EXPAT_SETTING
 
 
-# Check whether --with-expat or --without-expat was given.
+# Check whether --with-expat was given.
 if test "${with_expat+set}" = set; then
-  withval="$with_expat"
+  withval=$with_expat;
+fi
 
-fi;
 
 if test "$with_expat" = "yes" ; then
 
-  echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5
-echo $ECHO_N "checking for XML_ParserCreate in -lexpat... $ECHO_C" >&6
+  { echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5
+echo $ECHO_N "checking for XML_ParserCreate in -lexpat... $ECHO_C" >&6; }
 if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -4002,56 +4511,53 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char XML_ParserCreate ();
 int
 main ()
 {
-XML_ParserCreate ();
+return XML_ParserCreate ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_expat_XML_ParserCreate=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_expat_XML_ParserCreate=no
+	ac_cv_lib_expat_XML_ParserCreate=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5
-echo "${ECHO_T}$ac_cv_lib_expat_XML_ParserCreate" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5
+echo "${ECHO_T}$ac_cv_lib_expat_XML_ParserCreate" >&6; }
 if test $ac_cv_lib_expat_XML_ParserCreate = yes; then
   EXPAT_SETTING=external
 else
@@ -4062,18 +4568,19 @@
 for ac_header in expat.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -4084,41 +4591,37 @@
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -4127,24 +4630,22 @@
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
@@ -4152,9 +4653,10 @@
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -4178,25 +4680,19 @@
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -4267,11 +4763,11 @@
 fi
 
 
-# Check whether --with-expatlib or --without-expatlib was given.
+# Check whether --with-expatlib was given.
 if test "${with_expatlib+set}" = set; then
-  withval="$with_expatlib"
+  withval=$with_expatlib;
+fi
 
-fi;
 
 if test "$with_expatlib" != "" ; then
   EXPAT_LIB=$with_expatlib
@@ -4280,11 +4776,11 @@
 fi
 
 
-# Check whether --with-expatinc or --without-expatinc was given.
+# Check whether --with-expatinc was given.
 if test "${with_expatinc+set}" = set; then
-  withval="$with_expatinc"
+  withval=$with_expatinc;
+fi
 
-fi;
 
 if test "$with_expatinc" != "" ; then
   EXPAT_INCLUDE=-I${with_expatinc}
@@ -4305,23 +4801,22 @@
 
 # Allow the pkg-config directory to be set
 
-# Check whether --with-pkgconfigdir or --without-pkgconfigdir was given.
+# Check whether --with-pkgconfigdir was given.
 if test "${with_pkgconfigdir+set}" = set; then
-  withval="$with_pkgconfigdir"
-  pkgconfigdir=${withval}
+  withval=$with_pkgconfigdir; pkgconfigdir=${withval}
 else
   pkgconfigdir='${libdir}/pkgconfig'
-fi;
+fi
 
+
 { echo "$as_me:$LINENO: pkgconfig directory is ${pkgconfigdir}" >&5
 echo "$as_me: pkgconfig directory is ${pkgconfigdir}" >&6;}
 
 # Make the *-config binary config scripts optional
 
-# Check whether --with-binconfigs or --without-binconfigs was given.
+# Check whether --with-binconfigs was given.
 if test "${with_binconfigs+set}" = set; then
-  withval="$with_binconfigs"
-  if test "${withval}" = no; then
+  withval=$with_binconfigs; if test "${withval}" = no; then
 		binconfigs=
 		{ echo "$as_me:$LINENO: ogdi-config scripts will not be built" >&5
 echo "$as_me: ogdi-config scripts will not be built" >&6;}
@@ -4330,18 +4825,20 @@
 	fi
 else
   binconfigs='${binconfigs}'
-fi;
+fi
 
 
+
 # Config files, substituting as above
-          ac_config_files="$ac_config_files config/common.mak:config/common.mak.in"
+ac_config_files="$ac_config_files config/common.mak:config/common.mak.in"
 
-          ac_config_files="$ac_config_files ogdi.pc:ogdi.pc.in"
+ac_config_files="$ac_config_files ogdi.pc:ogdi.pc.in"
 
-          ac_config_files="$ac_config_files ogdi-config:ogdi-config.in"
+ac_config_files="$ac_config_files ogdi-config:ogdi-config.in"
 
 
-          ac_config_files="$ac_config_files config/generic.mak"
+ac_config_files="$ac_config_files config/generic.mak"
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -4360,39 +4857,58 @@
 
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
-{
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
   (set) 2>&1 |
-    case `(ac_space=' '; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
       # `set' does not quote correctly, so add quotes (double-quote
       # substitution turns \\\\ into \\, and sed turns \\ into \).
       sed -n \
 	"s/'/'\\\\''/g;
 	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;;
+      ;; #(
     *)
       # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n \
-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
       ;;
-    esac;
-} |
+    esac |
+    sort
+) |
   sed '
+     /^ac_cv_env_/b end
      t clear
-     : clear
+     :clear
      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
      t end
-     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
-  if test -w $cache_file; then
-    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
     cat confcache >$cache_file
   else
-    echo "not updating unwritable cache $cache_file"
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
 rm -f confcache
@@ -4401,63 +4917,48 @@
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[	 ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[	 ]*$//;
-}'
-fi
-
 # Transform confdefs.h into DEFS.
 # Protect against shell expansion while executing Makefile rules.
 # Protect against Makefile macro expansion.
 #
 # If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section.  Otherwise,
+# take arguments), then branch to the quote section.  Otherwise,
 # look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
+ac_script='
 t clear
-: clear
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\),-D\1=\2,g
+:clear
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
 t quote
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\),-D\1=\2,g
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
 t quote
-d
-: quote
-s,[	 `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output.  A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
+b any
+:quote
+s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+	g
+	s/^\n//
+	s/\n/ /g
+	p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
 
 
 ac_libobjs=
 ac_ltlibobjs=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
-  ac_i=`echo "$ac_i" |
-	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-  # 2. Add them.
-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 LIBOBJS=$ac_libobjs
 
@@ -4488,18 +4989,46 @@
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
 fi
-DUALCASE=1; export DUALCASE # for MKS sh
 
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
 # Support unset when possible.
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   as_unset=unset
@@ -4508,8 +5037,43 @@
 fi
 
 
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -4523,18 +5087,19 @@
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    $as_unset $as_var
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
 done
 
 # Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 else
   as_basename=false
@@ -4542,159 +5107,120 @@
 
 
 # Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)$' \| \
-	 .     : '\(.\)' 2>/dev/null ||
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\/\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
 
+# CDPATH.
+$as_unset CDPATH
 
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
 
-
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
 
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-	 case $as_dir in
-	 /*)
-	   if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-	     CONFIG_SHELL=$as_dir/$as_base
-	     export CONFIG_SHELL
-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-	   fi;;
-	 esac
-       done
-done
-;;
-  esac
-
   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
   # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
     sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
       N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
       t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
+      s/-\n.*//
     ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
    { (exit 1); exit 1; }; }
 
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
   # Exit status is that of the last command.
   exit
 }
 
 
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='	' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
 rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
 echo >conf$$.file
 if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
     as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
 elif ln conf$$.file conf$$ 2>/dev/null; then
   as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
   as_mkdir_p=:
@@ -4703,7 +5229,28 @@
   as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -4712,31 +5259,14 @@
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
 exec 6>&1
 
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# Save the log message, to keep $[0] and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.  Logging --version etc. is OK.
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
+# values after options handling.
+ac_log="
 This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
+generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -4744,30 +5274,18 @@
   CONFIG_COMMANDS = $CONFIG_COMMANDS
   $ $0 $@
 
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
 _ACEOF
 
+cat >>$CONFIG_STATUS <<_ACEOF
 # Files that config.status was made for.
-if test -n "$ac_config_files"; then
-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+config_files="$ac_config_files"
 
-if test -n "$ac_config_headers"; then
-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
+_ACEOF
 
-if test -n "$ac_config_links"; then
-  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
-  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
 cat >>$CONFIG_STATUS <<\_ACEOF
-
 ac_cs_usage="\
 \`$as_me' instantiates files from templates according to the
 current configuration.
@@ -4775,7 +5293,7 @@
 Usage: $0 [OPTIONS] [FILE]...
 
   -h, --help       print this help, then exit
-  -V, --version    print version number, then exit
+  -V, --version    print version number and configuration settings, then exit
   -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
@@ -4786,18 +5304,20 @@
 $config_files
 
 Report bugs to <bug-autoconf at gnu.org>."
+
 _ACEOF
-
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.59,
-  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.61,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2006 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF
@@ -4808,60 +5328,42 @@
 do
   case $1 in
   --*=*)
-    ac_option=`expr "x$1" : 'x\([^=]*\)='`
-    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
-  -*)
+  *)
     ac_option=$1
     ac_optarg=$2
     ac_shift=shift
     ;;
-  *) # This is not an option, so the user has probably given explicit
-     # arguments.
-     ac_option=$1
-     ac_need_defaults=false;;
   esac
 
   case $ac_option in
   # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
-  --version | --vers* | -V )
-    echo "$ac_cs_version"; exit 0 ;;
-  --he | --h)
-    # Conflict between --help and --header
-    { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit 0 ;;
-  --debug | --d* | -d )
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
     ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
-    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
    { (exit 1); exit 1; }; } ;;
 
-  *) ac_config_targets="$ac_config_targets $1" ;;
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
 
   esac
   shift
@@ -4877,31 +5379,45 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 if \$ac_cs_recheck; then
-  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
 fi
 
 _ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  echo "$ac_log"
+} >&5
 
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
 
+cat >>$CONFIG_STATUS <<\_ACEOF
 
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Handling of arguments.
 for ac_config_target in $ac_config_targets
 do
-  case "$ac_config_target" in
-  # Handling of arguments.
-  "config/common.mak" ) CONFIG_FILES="$CONFIG_FILES config/common.mak:config/common.mak.in" ;;
-  "ogdi.pc" ) CONFIG_FILES="$CONFIG_FILES ogdi.pc:ogdi.pc.in" ;;
-  "ogdi-config" ) CONFIG_FILES="$CONFIG_FILES ogdi-config:ogdi-config.in" ;;
-  "config/generic.mak" ) CONFIG_FILES="$CONFIG_FILES config/generic.mak" ;;
+  case $ac_config_target in
+    "config/common.mak") CONFIG_FILES="$CONFIG_FILES config/common.mak:config/common.mak.in" ;;
+    "ogdi.pc") CONFIG_FILES="$CONFIG_FILES ogdi.pc:ogdi.pc.in" ;;
+    "ogdi-config") CONFIG_FILES="$CONFIG_FILES ogdi-config:ogdi-config.in" ;;
+    "config/generic.mak") CONFIG_FILES="$CONFIG_FILES config/generic.mak" ;;
+
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
 done
 
+
 # If the user did not use the arguments to specify the items to instantiate,
 # then the envvar interface is used.  Set only those that are not.
 # We use the long form for the default assignment because of an extremely
@@ -4911,346 +5427,426 @@
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
 # creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
   trap '{ (exit 1); exit 1; }' 1 2 13 15
 }
-
 # Create a (secure) tmp directory for tmp files.
 
 {
-  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {
-  tmp=./confstat$$-$RANDOM
-  (umask 077 && mkdir $tmp)
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
 } ||
 {
    echo "$me: cannot create a temporary directory in ." >&2
    { (exit 1); exit 1; }
 }
 
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
 #
-# CONFIG_FILES section.
+# Set up the sed scripts for CONFIG_FILES section.
 #
 
 # No need to generate the scripts if there are no CONFIG_FILES.
 # This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
-  # Protect against being on the right side of a sed subst in config.status.
-  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
-   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s, at SHELL@,$SHELL,;t t
-s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s, at exec_prefix@,$exec_prefix,;t t
-s, at prefix@,$prefix,;t t
-s, at program_transform_name@,$program_transform_name,;t t
-s, at bindir@,$bindir,;t t
-s, at sbindir@,$sbindir,;t t
-s, at libexecdir@,$libexecdir,;t t
-s, at datadir@,$datadir,;t t
-s, at sysconfdir@,$sysconfdir,;t t
-s, at sharedstatedir@,$sharedstatedir,;t t
-s, at localstatedir@,$localstatedir,;t t
-s, at libdir@,$libdir,;t t
-s, at includedir@,$includedir,;t t
-s, at oldincludedir@,$oldincludedir,;t t
-s, at infodir@,$infodir,;t t
-s, at mandir@,$mandir,;t t
-s, at build_alias@,$build_alias,;t t
-s, at host_alias@,$host_alias,;t t
-s, at target_alias@,$target_alias,;t t
-s, at DEFS@,$DEFS,;t t
-s, at ECHO_C@,$ECHO_C,;t t
-s, at ECHO_N@,$ECHO_N,;t t
-s, at ECHO_T@,$ECHO_T,;t t
-s, at LIBS@,$LIBS,;t t
-s, at OGDI_VERSION@,$OGDI_VERSION,;t t
-s, at OGDI_MAJOR@,$OGDI_MAJOR,;t t
-s, at OGDI_MINOR@,$OGDI_MINOR,;t t
-s, at CC@,$CC,;t t
-s, at CFLAGS@,$CFLAGS,;t t
-s, at LDFLAGS@,$LDFLAGS,;t t
-s, at CPPFLAGS@,$CPPFLAGS,;t t
-s, at ac_ct_CC@,$ac_ct_CC,;t t
-s, at EXEEXT@,$EXEEXT,;t t
-s, at OBJEXT@,$OBJEXT,;t t
-s, at CXX_WFLAGS@,$CXX_WFLAGS,;t t
-s, at C_WFLAGS@,$C_WFLAGS,;t t
-s, at CXX_PIC@,$CXX_PIC,;t t
-s, at C_PIC@,$C_PIC,;t t
-s, at LD_SHARED@,$LD_SHARED,;t t
-s, at CPP@,$CPP,;t t
-s, at EGREP@,$EGREP,;t t
-s, at RPC_INCLUDES@,$RPC_INCLUDES,;t t
-s, at BIG_ENDIAN@,$BIG_ENDIAN,;t t
-s, at PROJ_SETTING@,$PROJ_SETTING,;t t
-s, at PROJ_INCLUDE@,$PROJ_INCLUDE,;t t
-s, at PROJ_LIB@,$PROJ_LIB,;t t
-s, at ZLIB_SETTING@,$ZLIB_SETTING,;t t
-s, at ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t
-s, at ZLIB_LIB@,$ZLIB_LIB,;t t
-s, at EXPAT_SETTING@,$EXPAT_SETTING,;t t
-s, at EXPAT_INCLUDE@,$EXPAT_INCLUDE,;t t
-s, at EXPAT_LIB@,$EXPAT_LIB,;t t
-s, at pkgconfigdir@,$pkgconfigdir,;t t
-s, at binconfigs@,$binconfigs,;t t
-s, at LIBOBJS@,$LIBOBJS,;t t
-s, at LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
+if test -n "$CONFIG_FILES"; then
 
 _ACEOF
 
-  cat >>$CONFIG_STATUS <<\_ACEOF
-  # Split the substitutions into bite-sized pieces for seds with
-  # small command number limits, like on Digital OSF/1 and HP-UX.
-  ac_max_sed_lines=48
-  ac_sed_frag=1 # Number of current file.
-  ac_beg=1 # First line for current file.
-  ac_end=$ac_max_sed_lines # Line after last line for current file.
-  ac_more_lines=:
-  ac_sed_cmds=
-  while $ac_more_lines; do
-    if test $ac_beg -gt 1; then
-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    else
-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    fi
-    if test ! -s $tmp/subs.frag; then
-      ac_more_lines=false
-    else
-      # The purpose of the label and of the branching condition is to
-      # speed up the sed processing (if there are no `@' at all, there
-      # is no need to browse any of the substitutions).
-      # These are the two extra sed commands mentioned above.
-      (echo ':t
-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
-      if test -z "$ac_sed_cmds"; then
-	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-      else
-	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-      fi
-      ac_sed_frag=`expr $ac_sed_frag + 1`
-      ac_beg=$ac_end
-      ac_end=`expr $ac_end + $ac_max_sed_lines`
-    fi
-  done
-  if test -z "$ac_sed_cmds"; then
-    ac_sed_cmds=cat
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+OGDI_VERSION!$OGDI_VERSION$ac_delim
+OGDI_MAJOR!$OGDI_MAJOR$ac_delim
+OGDI_MINOR!$OGDI_MINOR$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+CXX_WFLAGS!$CXX_WFLAGS$ac_delim
+C_WFLAGS!$C_WFLAGS$ac_delim
+CXX_PIC!$CXX_PIC$ac_delim
+C_PIC!$C_PIC$ac_delim
+LD_SHARED!$LD_SHARED$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+RPC_INCLUDES!$RPC_INCLUDES$ac_delim
+BIG_ENDIAN!$BIG_ENDIAN$ac_delim
+PROJ_SETTING!$PROJ_SETTING$ac_delim
+PROJ_INCLUDE!$PROJ_INCLUDE$ac_delim
+PROJ_LIB!$PROJ_LIB$ac_delim
+ZLIB_SETTING!$ZLIB_SETTING$ac_delim
+ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim
+ZLIB_LIB!$ZLIB_LIB$ac_delim
+EXPAT_SETTING!$EXPAT_SETTING$ac_delim
+EXPAT_INCLUDE!$EXPAT_INCLUDE$ac_delim
+EXPAT_LIB!$EXPAT_LIB$ac_delim
+pkgconfigdir!$pkgconfigdir$ac_delim
+binconfigs!$binconfigs$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 70; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
-fi # test -n "$CONFIG_FILES"
+done
 
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
 _ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
 cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-	cat >$tmp/stdin
-	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
   esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
 
-  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$ac_file" : 'X\(//\)[^/]' \| \
 	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
 echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
     as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$as_dir" : 'X\(//\)[^/]' \| \
 	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
     done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
    { (exit 1); exit 1; }; }; }
-
   ac_builddir=.
 
-if test "$ac_dir" != .; then
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
+  .)  # We are building in place.
     ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
 
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
 
+_ACEOF
 
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    configure_input=
-  else
-    configure_input="$ac_file.  "
-  fi
-  configure_input=$configure_input"Generated from `echo $ac_file_in |
-				     sed 's,.*/,,'` by configure."
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
 
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-	 # Absolute (can't be DOS-style, as IFS=:)
-	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 echo "$f";;
-      *) # Relative
-	 if test -f "$f"; then
-	   # Build tree
-	   echo "$f"
-	 elif test -f "$srcdir/$f"; then
-	   # Source tree
-	   echo "$srcdir/$f"
-	 else
-	   # /dev/null tree
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 fi;;
-      esac
-    done` || { (exit 1); exit 1; }
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
   sed "$ac_vpsub
 $extrasub
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF
 :t
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s, at configure_input@,$configure_input,;t t
-s, at srcdir@,$ac_srcdir,;t t
-s, at abs_srcdir@,$ac_abs_srcdir,;t t
-s, at top_srcdir@,$ac_top_srcdir,;t t
-s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s, at builddir@,$ac_builddir,;t t
-s, at abs_builddir@,$ac_abs_builddir,;t t
-s, at top_builddir@,$ac_top_builddir,;t t
-s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-  rm -f $tmp/stdin
-  if test x"$ac_file" != x-; then
-    mv $tmp/out $ac_file
-  else
-    cat $tmp/out
-    rm -f $tmp/out
-  fi
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
 
-  # Run the commands associated with the file.
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
   case $ac_file in
-    ogdi-config ) chmod +x ogdi-config ;;
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
   esac
-done
-_ACEOF
+ ;;
 
-cat >>$CONFIG_STATUS <<\_ACEOF
 
+
+  esac
+
+
+  case $ac_file$ac_mode in
+    "ogdi-config":F) chmod +x ogdi-config ;;
+
+  esac
+done # for ac_tag
+
+
 { (exit 0); exit 0; }
 _ACEOF
 chmod +x $CONFIG_STATUS
@@ -5278,5 +5874,9 @@
   $ac_cs_success || { (exit 1); exit 1; }
 fi
 
-mv config/generic.mak config/`uname`.mak
 
+target=`uname`
+if test "$target" = "GNU/kFreeBSD" ; then
+  target=Linux
+fi
+mv config/generic.mak config/$target.mak

Modified: packages/ogdi-dfsg/branches/upstream/current/configure.in
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/configure.in	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/configure.in	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(config/unix.mak)
 
-OGDI_VERSION=3.2.0beta1
+OGDI_VERSION=3.2.0beta2
 OGDI_MAJOR=3
 OGDI_MINOR=2
 
@@ -36,8 +36,6 @@
 AC_COMPILER_PIC
 AC_LD_SHARED
 
-dnl Strip out optimization if already added
-CFLAGS=`echo "$CFLAGS " | sed "s/-O2 //"`
 
 dnl ---------------------------------------------------------------------------
 dnl	Do we have rpc/pmap_clnt.h, float.h, dlfcn.h?
@@ -349,5 +347,9 @@
 		[chmod +x ogdi-config])
 
 AC_OUTPUT(config/generic.mak)
-mv config/generic.mak config/`uname`.mak
 
+target=`uname`
+if test "$target" = "GNU/kFreeBSD" ; then
+  target=Linux
+fi
+mv config/generic.mak config/$target.mak

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/dirent.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/dirent.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/dirent.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,64 @@
+/* 
+ * @(#) dirent.h 2.0 17 Jun 91   Public Domain. 
+ * 
+ *  A public domain implementation of BSD directory routines for 
+ *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael at garfield), 
+ *  August 1987 
+ * 
+ *  Enhanced and ported to OS/2 by Kai Uwe Rommel; added scandir() prototype 
+ *  December 1989, February 1990 
+ *  Change of MAXPATHLEN for HPFS, October 1990 
+ *   
+ *  Unenhanced and ported to Windows NT by Bill Gallagher 
+ *  17 Jun 91 
+ *  changed d_name to char * instead of array, removed non-std extensions 
+ *  
+ *  Cleanup, other hackery, Summer '92, Brian Moran , brianmo at microsoft.com 
+ */ 
+
+#ifndef _DIRENT
+#define _DIRENT
+
+#ifndef _WINDOWS
+#include <sys/dir.h>
+
+#define dirent direct
+
+#else
+
+#include <direct.h>
+
+struct dirent 
+{ 
+    ino_t    d_ino;                   /* a bit of a farce */ 
+    short    d_reclen;                /* more farce */ 
+    short    d_namlen;                /* length of d_name */ 
+    char    *d_name;
+}; 
+ 
+struct _dircontents 
+{ 
+    char *_d_entry; 
+    struct _dircontents *_d_next; 
+}; 
+ 
+typedef struct _dirdesc 
+{ 
+    int  dd_id;			   /* uniquely identify each open directory*/ 
+    long dd_loc;			/* where we are in directory entry */ 
+    struct _dircontents *dd_contents;	/* pointer to contents of dir */ 
+    struct _dircontents *dd_cp;		/* pointer to current position */ 
+} 
+DIR; 
+ 
+extern DIR *opendir(char *); 
+extern struct dirent *readdir(DIR *); 
+extern void seekdir(DIR *, long); 
+extern long telldir(DIR *); 
+extern void closedir(DIR *); 
+#define rewinddir(dirp) seekdir(dirp, 0L) 
+
+#endif /* _WINDOWS */ 
+#endif /* _DIRENT */
+
+/* end of dirent.h */ 

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/dirent2.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/dirent2.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/dirent2.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,59 @@
+/*
+ * dirent.h --
+ *
+ *	Declarations of a library of directory-reading procedures
+ *	in the POSIX style ("struct dirent").
+ *
+ * Copyright (c) 1991 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * @(#) dirent2.h 1.3 94/12/17 16:26:16
+ */
+
+#ifndef _DIRENT
+#define _DIRENT
+
+#ifndef _TCL
+#include <tcl.h>
+#endif
+
+/*
+ * Dirent structure, which holds information about a single
+ * directory entry.
+ */
+
+#define MAXNAMLEN 255
+#define DIRBLKSIZ 512
+
+struct dirent {
+    long d_ino;			/* Inode number of entry */
+    short d_reclen;		/* Length of this record */
+    short d_namlen;		/* Length of string in d_name */
+    char d_name[MAXNAMLEN + 1];	/* Name must be no longer than this */
+};
+
+/*
+ * State that keeps track of the reading of a directory (clients
+ * should never look inside this structure;  the fields should
+ * only be accessed by the library procedures).
+ */
+
+typedef struct _dirdesc {
+    int dd_fd;
+    long dd_loc;
+    long dd_size;
+    char dd_buf[DIRBLKSIZ];
+} DIR;
+
+/*
+ * Procedures defined for reading directories:
+ */
+
+extern void		closedir _ANSI_ARGS_((DIR *dirp));
+extern DIR *		opendir _ANSI_ARGS_((char *name));
+extern struct dirent *	readdir _ANSI_ARGS_((DIR *dirp));
+
+#endif /* _DIRENT */

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/fixstrtod.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/fixstrtod.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/fixstrtod.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,30 @@
+/* 
+ * fixstrtod.c --
+ *
+ *	Source code for the "fixstrtod" procedure.  This procedure is
+ *	used in place of strtod under Solaris 2.4, in order to fix
+ *	a bug where the "end" pointer gets set incorrectly.
+ *
+ * Copyright (c) 1995 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+static char sccsid[] = "@(#) fixstrtod.c 1.1 95/05/06 17:40:33";
+
+#undef strtod
+#include <stdlib.h>
+
+double
+fixstrtod(string, endPtr)
+    char *string;
+    char **endPtr;
+{
+    double d;
+    d = strtod(string, endPtr);
+    if ((*endPtr != string) && ((*endPtr)[-1] == 0)) {
+	*endPtr -= 1;
+    }
+    return d;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/float.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/float.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/float.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,16 @@
+/*
+ * float.h --
+ *
+ *	This is a dummy header file to #include in Tcl when there
+ *	is no float.h in /usr/include.  Right now this file is empty:
+ *	Tcl contains #ifdefs to deal with the lack of definitions;
+ *	all it needs is for the #include statement to work.
+ *
+ * Copyright (c) 1993 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * @(#) float.h 1.2 94/12/17 16:26:17
+ */

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/getcwd.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/getcwd.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/getcwd.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,49 @@
+/* 
+ * getcwd.c --
+ *
+ *	This file provides an implementation of the getcwd procedure
+ *	that uses getwd, for systems with getwd but without getcwd.
+ *
+ * Copyright (c) 1993 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#) getcwd.c 1.4 94/12/17 16:26:18";
+#endif /* not lint */
+
+#include "tclInt.h"
+#include "tclPort.h"
+
+extern char *getwd _ANSI_ARGS_((char *pathname));
+
+char *
+getcwd(buf, size)
+    char *buf;			/* Where to put path for current directory. */
+    size_t size;		/* Number of bytes at buf. */
+{
+    char realBuffer[MAXPATHLEN+1];
+    int length;
+
+    if (getwd(realBuffer) == NULL) {
+	/*
+	 * There's not much we can do besides guess at an errno to
+	 * use for the result (the error message in realBuffer isn't
+	 * much use...).
+	 */
+
+	errno = EACCES;
+	return NULL;
+    }
+    length = strlen(realBuffer);
+    if (length >= size) {
+	errno = ERANGE;
+	return NULL;
+    }
+    strcpy(buf, realBuffer);
+    return buf;
+}
+

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/license.terms
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/license.terms	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/license.terms	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,32 @@
+This software is copyrighted by the Regents of the University of
+California, Sun Microsystems, Inc., and other parties.  The following
+terms apply to all files associated with the software unless explicitly
+disclaimed in individual files.
+
+The authors hereby grant permission to use, copy, modify, distribute,
+and license this software and its documentation for any purpose, provided
+that existing copyright notices are retained in all copies and that this
+notice is included verbatim in any distributions. No written agreement,
+license, or royalty fee is required for any of the authorized uses.
+Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
+FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
+DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
+IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
+NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
+MODIFICATIONS.
+
+RESTRICTED RIGHTS: Use, duplication or disclosure by the government
+is subject to the restrictions as set forth in subparagraph (c) (1) (ii)
+of the Rights in Technical Data and Computer Software Clause as DFARS
+252.227-7013 and FAR 52.227-19.

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/limits.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/limits.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/limits.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,22 @@
+/*
+ * limits.h --
+ *
+ *	This is a dummy header file to #include in Tcl when there
+ *	is no limits.h in /usr/include.  There are only a few
+ *	definitions here;  also see tclPort.h, which already
+ *	#defines some of the things here if they're not arleady
+ *	defined.
+ *
+ * Copyright (c) 1991 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * @(#) limits.h 1.6 94/12/17 16:26:19
+ */
+
+#define LONG_MIN		0x80000000
+#define LONG_MAX		0x7fffffff
+#define INT_MIN			0x80000000
+#define INT_MAX			0x7fffffff

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntexit.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntexit.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntexit.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,21 @@
+/*
+ * exit.c ---
+ *   This replaces exit() with one unlinks any temporary files that
+ *   are still lying around.
+ */
+
+#include <windows.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+compat_exit(int status)
+{
+    extern int compat_unlink();
+
+    compat_unlink(NULL);
+    fflush(stdout);
+    fflush(stderr);
+    ExitProcess(status);
+}
+

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntforkexec.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntforkexec.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntforkexec.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,431 @@
+#include <windows.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <io.h>
+#include <fcntl.h>
+#include <process.h>
+#include <math.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <tcl.h>
+
+static char *FindExec(char *);
+static int Directory(char *);
+
+static char *argv0_dir;
+
+static int WindowsNT = -1;
+
+/*
+ *----------------------------------------------------------------------
+ * FindExec --
+ *
+ *	Find <command> by going through the directories in the 'PATH' or
+ *	'Path' environment variable
+ *
+ * Results:
+ *	A fully qualified path to the executable.
+ *----------------------------------------------------------------------
+ */
+static char *
+FindExec(char *command)
+{
+    char *path = NULL;
+    char *newpath, *bp, *start, *dir;
+    char save;
+    int len, need, cmdlen, dirlen;
+    static int have = 0;
+    static char *exec = NULL;
+
+    /*
+     * Check for the case where the command name has some path. In
+     * this case we just check for possible extensions.
+     */
+    len = strlen(command);
+    if (len > 2) {
+	if (command[1] == ':' ||
+	    strchr(command, '/') != NULL || strchr(command, '\\') != NULL) {
+	    cmdlen = strlen(command);
+	    need = cmdlen + 5;
+	    if (need > have) {
+		if (exec) {
+		    ckfree(exec);
+		}
+		exec = (char *) ckalloc(need);
+		if (exec == NULL) {
+		    return command;
+		}
+		have = need;
+	    }
+	    strcpy(exec, command);
+	    strcpy(&exec[cmdlen], ".exe");
+	    if (access(exec, 0) == 0) {
+		if (! Directory(exec)) {
+		    goto fixSlashes;
+		}
+	    }
+	    strcpy(&exec[cmdlen], ".bat");
+	    if (access(exec, 0) == 0) {
+		if (! Directory(exec)) {
+		    goto fixSlashes;
+		}
+	    }
+	    if (WindowsNT == 1) {
+		strcpy(&exec[cmdlen], ".cmd");
+		if (access(exec, 0) == 0) {
+		    if (! Directory(exec)) {
+			goto fixSlashes;
+		    }
+		}
+	    }
+	    strcpy(&exec[cmdlen], ".com");
+	    if (access(exec, 0) == 0) {
+		if (! Directory(exec)) {
+		    goto fixSlashes;
+		}
+	    }
+	    strcpy(&exec[cmdlen], ".tcl");
+	    if (access(exec, 0) == 0) {
+		if (! Directory(exec)) {
+		    goto fixSlashes;
+		}
+	    }
+	    return command;
+	}
+    }
+
+    path = getenv("PATH");
+    if (path == NULL) {
+	path = getenv("Path");
+	if (path == NULL) {
+	    return command;
+	}
+    }
+
+    len = (argv0_dir) ? strlen(argv0_dir) : 0;
+    newpath = ckalloc(len + strlen(path) + 2);
+    if (newpath == NULL) {
+	ckfree(path);
+	return command;
+    }
+
+    if (len > 0) {
+	strcpy(newpath, argv0_dir);
+	newpath[len-1] = ';';
+    }
+    strcpy(&newpath[len], path);
+    path = newpath;
+    
+    /*
+     * the command has no path part so go looking through all the paths
+     * in the "Path" or "PATH" environment variable.
+     */
+    for (start = path, bp = start; *start != '\0'; start = bp) {
+	while(*bp != '\0' && *bp != ';') {
+	    bp++;
+	}
+	save = *bp;
+	*bp = '\0';
+	dirlen = strlen(start);
+	if (dirlen == 0) {
+	    dir = "./";
+	    dirlen = 2;
+	} else {
+	    dir = start;
+	}
+	cmdlen = strlen(command);
+	need = cmdlen + dirlen + 6;
+	if (need > have) {
+	    if (exec) {
+		ckfree(exec);
+	    }
+	    exec = (char *) ckalloc(need);
+	    if (exec == NULL) {
+		ckfree(path);
+		return command;
+	    }
+	    have = need;
+	}
+	strcpy(exec, dir);
+	if (dir[dirlen-1] != '/' && dir[dirlen-1] != '\\') {
+	    exec[dirlen] = '\\';
+	    dirlen++;
+	}
+	strcpy(&exec[dirlen], command);
+	if (access(exec, 0) == 0) {
+	    if (! Directory(exec)) {
+		goto fixSlashes;
+	    }
+	}
+	len = dirlen + cmdlen;
+	strcpy(&exec[len], ".exe");
+	if (access(exec, 0) == 0) {
+	    if (! Directory(exec)) {
+		goto fixSlashes;
+	    }
+	}
+	strcpy(&exec[len], ".bat");
+	if (access(exec, 0) == 0) {
+	    if (! Directory(exec)) {
+		goto fixSlashes;
+	    }
+	}
+	if (WindowsNT == 1) {
+	    strcpy(&exec[len], ".cmd");
+	    if (access(exec, 0) == 0) {
+		if (! Directory(exec)) {
+		    goto fixSlashes;
+		}
+	    }
+	}
+	strcpy(&exec[len], ".com");
+	if (access(exec, 0) == 0) {
+	    if (! Directory(exec)) {
+		goto fixSlashes;
+	    }
+	}
+	strcpy(&exec[len], ".tcl");
+	if (access(exec, 0) == 0) {
+	    if (! Directory(exec)) {
+		goto fixSlashes;
+	    }
+	}
+	*bp = save;
+	bp++;
+    }
+    ckfree(path);
+    return command;
+
+  fixSlashes:
+    if (path) {
+	ckfree(path);
+    }
+    for (bp = exec; *bp != '\0' && *bp != ' '; bp++) {
+	if (*bp == '/') {
+	    *bp = '\\';
+	}
+    }
+    return exec;
+}
+
+/*
+ *----------------------------------------------------------------------
+ * forkexec --
+ * 
+ *	Execute a program. The program name is <execName> and the
+ *	arguments are in <argv>.   <fdstdin>, <fdstdout>, and <fdstderr>
+ *	are the file ids of the files to use for stdin,  stdout, and
+ *	stderr. <joinThisError> is 1 if stderr should be piped through
+ *	<fdstdout>.
+ *
+ *	This better process handling code came from the ts package by
+ *	Grant Munsey <grant at cognicon.com>
+ *	
+ *----------------------------------------------------------------------
+ */
+int
+forkexec(char *execName, char **argv,
+	 int fdstdin, int fdstdout, int fdstderr,
+	 int joinThisError)
+{
+    PROCESS_INFORMATION pi;
+    STARTUPINFO si;
+    DWORD err;
+    char *argstr;
+    int rslt = -1;
+    HANDLE hin = INVALID_HANDLE_VALUE;
+    HANDLE hout = INVALID_HANDLE_VALUE;
+    HANDLE herr = INVALID_HANDLE_VALUE;
+    HANDLE savestdout, savestdin, savestderr;
+    int newfdstdin = -1, newfdstdout = -1, newfdstderr = -1;
+    extern int errno;
+    char *ep, *sp;
+    int hasconsole;
+    Tcl_DString dString;
+    char **s;
+    
+    hasconsole = 1;
+    
+    if (WindowsNT == -1) {
+	OSVERSIONINFO version;
+	version.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+	if (GetVersionEx(&version)) {
+	    WindowsNT = (version.dwPlatformId == VER_PLATFORM_WIN32_NT) ? 1 : 0;
+	} else {
+	    WindowsNT = 0;
+	}
+    }
+
+    /*
+     * use DuplicateHandle to get inheritable handles for each of the files
+     * that is not already ok
+     */
+    if (fdstdin != -1) {
+	if (fdstdin > 2) {
+	    newfdstdin = dup(fdstdin);
+	} else {
+	    newfdstdin = fdstdin;
+	}
+	hin = (HANDLE)_get_osfhandle(newfdstdin);
+	savestdin = GetStdHandle(STD_INPUT_HANDLE);
+	SetStdHandle(STD_INPUT_HANDLE, hin);
+    }
+
+    if (fdstdout != -1) {
+	if (fdstdout > 2) {
+	    newfdstdout = dup(fdstdout);
+	} else {
+	    newfdstdout = fdstdout;
+	}
+	hout = (HANDLE)_get_osfhandle(newfdstdout);
+	savestdout = GetStdHandle(STD_OUTPUT_HANDLE);
+	SetStdHandle(STD_OUTPUT_HANDLE, hout);
+    }
+    
+    if (joinThisError) {
+	herr = (HANDLE)_get_osfhandle(newfdstdout);
+	savestderr = GetStdHandle(STD_ERROR_HANDLE);
+	SetStdHandle(STD_ERROR_HANDLE, herr);
+    }
+    
+    if (!joinThisError && fdstderr != -1) {
+	if (fdstderr > 2) {
+	    newfdstderr = dup(fdstderr);
+	} else {
+	    newfdstderr = fdstderr;
+	}
+	herr = (HANDLE)_get_osfhandle(newfdstderr);
+	savestderr = GetStdHandle(STD_ERROR_HANDLE);
+	SetStdHandle(STD_ERROR_HANDLE, herr);
+    }
+    
+    memset((void *) &si, 0, sizeof(STARTUPINFO));
+    si.cb = sizeof(STARTUPINFO);
+    si.dwFlags = STARTF_USESTDHANDLES;
+    si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
+    si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
+    si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
+    
+    /*
+     * get the actual fully qualified path name to the executable
+     */
+    ep = FindExec(execName);
+
+    /*
+     * If the executable is '.bat' or '.cmd' file then we must make sure
+     * the path seperator character in the passed argument string for the
+     * first parameter is '\'
+     */
+
+    Tcl_DStringInit(&dString);
+    Tcl_DStringAppend(&dString, execName, -1);
+    for (s = &argv[1]; *s != NULL; s++) {
+	Tcl_DStringAppend(&dString, " ", 1);
+	Tcl_DStringAppend(&dString, *s, -1);
+    }
+
+    argstr = Tcl_DStringValue(&dString);
+
+    /*
+     * Change all occurrences of '/' to '\\' in program file name
+     * and command name since there seem to be some programs that
+     * aren't happy any other way.
+     */
+    for (sp = argstr; *sp != '\0' && *sp != ' '; sp++) {
+	if (*sp == '/') {
+	    *sp = '\\';
+	}
+    }
+
+    errno = 0;
+    if (!CreateProcess(ep, argstr, NULL, NULL, TRUE /* bInheritHandles */,
+		       (hasconsole ? CREATE_NEW_PROCESS_GROUP:
+			DETACHED_PROCESS),
+		       NULL, NULL, &si, &pi))
+    {
+	err = GetLastError();
+	if (err == ERROR_ACCESS_DENIED) {
+	    errno = EACCES;
+	} else if (err == ERROR_BAD_EXE_FORMAT) {
+	    errno = ENOEXEC;
+	} else {
+	    errno = ENOENT;
+	}
+	Tcl_DStringFree(&dString);
+	Tcl_DStringInit(&dString);
+	if (WindowsNT) {
+	    Tcl_DStringAppend(&dString, "cmd.exe /c ", 10);
+	} else {
+	    Tcl_DStringAppend(&dString, "command.com /c ", 14);
+	}
+	Tcl_DStringAppend(&dString, " ", 1);
+	Tcl_DStringAppend(&dString, ep, -1);
+
+	for (s = &argv[1]; *s != NULL; s++) {
+	    Tcl_DStringAppend(&dString, " ", 1);
+	    Tcl_DStringAppend(&dString, *s, -1);
+	}
+	if (WindowsNT) {
+	    ep = FindExec("cmd.exe");
+	} else {
+	    ep = FindExec("command.com");
+	}
+	if (CreateProcess(ep, argstr, NULL, NULL, TRUE /* bInheritHandles */,
+			  (hasconsole ? CREATE_NEW_PROCESS_GROUP:
+			   DETACHED_PROCESS),
+			  NULL, NULL, &si, &pi))
+	{
+	    errno = 0;
+	}
+    }
+    if (errno == 0) {
+	extern void addpid(DWORD, HANDLE); /* Defined in ntwaitpid.c */
+	rslt = (int)pi.dwProcessId;
+	addpid(pi.dwProcessId, pi.hProcess);
+	CloseHandle(pi.hThread);
+    }
+    Tcl_DStringFree(&dString);
+
+    if (hin != INVALID_HANDLE_VALUE) {
+	SetStdHandle(STD_INPUT_HANDLE, savestdin);
+	if (newfdstdin != fdstdin) {
+	    close(newfdstdin);
+	}
+    }
+    if (hout != INVALID_HANDLE_VALUE) {
+	SetStdHandle(STD_OUTPUT_HANDLE, savestdout);
+	if (newfdstdout != fdstdout) {
+	    close(newfdstdout);
+	}
+    }
+    if (herr != INVALID_HANDLE_VALUE) {
+	SetStdHandle(STD_ERROR_HANDLE, savestderr);
+	if (newfdstderr != fdstderr) {
+	    close(newfdstderr);
+	}
+    }
+	
+    return rslt;
+}
+
+void
+forkexec_setargv0_dir(char *largv0_dir)
+{
+    argv0_dir = largv0_dir;
+}
+
+int
+Directory(char *path)
+{
+    struct stat statBuf;
+
+    if (stat(path, &statBuf) == -1) {
+	return 0;
+    }
+    if (_S_IFDIR & statBuf.st_mode) {
+	return 1;
+    }
+    return 0;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntgetcwd.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntgetcwd.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntgetcwd.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,19 @@
+#include <stdio.h>
+#include <direct.h>
+
+char *
+compat_getcwd(char *buffer, int maxlen)
+{
+    char *bp;
+
+    if (getcwd(buffer, maxlen) == (void *) 0) {
+	return NULL;
+    }
+
+    for (bp = buffer; *bp != '\0'; bp++) {
+	if (*bp == '\\') {
+	    *bp = '/';
+	}
+    }
+    return buffer;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntgettod.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntgettod.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntgettod.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,12 @@
+#include <winsock.h>
+#include <sys/timeb.h>
+
+void _cdecl
+gettimeofday(struct timeval *tv, struct timezone *tz)
+{                                
+    struct timeb tb;
+
+    ftime(&tb);
+    tv->tv_sec = tb.time;
+    tv->tv_usec = tb.millitm * 1000;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntisatty.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntisatty.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntisatty.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,19 @@
+static int ttyset = 0;
+static int ttyvalue;
+
+int
+compat_isatty(int x)
+{
+    if (ttyset) {
+	return ttyvalue;
+    } else {
+	return isatty(x);
+    }
+}
+
+void
+compat_setisatty(int value)
+{
+    ttyset = 1;
+    ttyvalue = value;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntopendir.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntopendir.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntopendir.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,289 @@
+/* 
+   dir.c for MS-DOS by Samuel Lam <skl at van-bc.UUCP>, June/87 
+*/ 
+ 
+/* #ifdef WIN32 */
+/* 
+ * @(#)dir.c 1.4 87/11/06 Public Domain. 
+ * 
+ *  A public domain implementation of BSD directory routines for 
+ *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael at garfield), 
+ *  August 1897 
+ *  Ported to OS/2 by Kai Uwe Rommel 
+ *  December 1989, February 1990 
+ *  Ported to Windows NT 22 May 91 
+ *    other mods Summer '92 brianmo at microsoft.com 
+ *  opendirx() was horribly written, very inefficient, and did not take care
+ *    of all cases.  It is still not too clean, but it is far more efficient.
+ *    Changes made by Gordon Chaffee (chaffee at bugs-bunny.cs.berkeley.edu)
+ */ 
+ 
+ 
+/*Includes: 
+ *	crt 
+ */ 
+#include <windows.h>
+#include <stdlib.h> 
+#include <string.h> 
+#include <sys\types.h> 
+#include <sys\stat.h> 
+#include "dirent.h" 
+#include "tknt_memory.h"
+
+#define stat _stat
+
+/* 
+ *	NT specific 
+ */ 
+#include <stdio.h> 
+ 
+/* 
+ *	random typedefs 
+ */ 
+#define HDIR        HANDLE 
+#define HFILE       HANDLE 
+#define PHFILE      PHANDLE 
+ 
+/* 
+ *	local functions 
+ */ 
+static char *getdirent(char *); 
+static void free_dircontents(struct _dircontents *); 
+ 
+static HDIR				FindHandle; 
+static WIN32_FIND_DATA	FileFindData; 
+ 
+static struct dirent dp; 
+ 
+DIR *opendirx(char *name, char *pattern) 
+{ 
+    struct stat statb; 
+    DIR *dirp; 
+    char c; 
+    char *s; 
+    struct _dircontents *dp; 
+    int len;
+    int unc;
+    char path[ OFS_MAXPATHNAME ]; 
+    register char *ip, *op;
+
+    for (ip = name, op = path; ; op++, ip++) {
+	*op = *ip;
+	if (*ip == '\0') {
+	    break;
+	}
+    }
+    len = ip - name;
+    if (len > 0) {
+	unc = ((path[0] == '\\' || path[0] == '/') &&
+	       (path[1] == '\\' || path[1] == '/'));
+	c = path[len - 1];
+	if (unc) {
+	    if (c != '\\' && c != '/') {
+		path[len] = '/';
+		len++;
+		path[len] ='\0';
+	    }
+	} else {
+	    if ((c == '\\' || c == '/') && (len > 1)) {
+		len--;
+		path[len] = '\0';
+ 
+		if (path[len - 1] == ':' ) {
+		    path[len] = '/'; len++;
+		    path[len] = '.'; len++;
+		    path[len] = '\0';
+		}
+	    } else if (c == ':' ) {
+		path[len] = '.';
+		len++;
+		path[len] ='\0';
+	    }
+	}
+    } else {
+	unc = 0;
+	path[0] = '.';
+	path[1] = '\0';
+	len = 1;
+    }
+ 
+    if (stat(path, &statb) < 0 || (statb.st_mode & S_IFMT) != S_IFDIR) {
+	return NULL; 
+    }
+
+    dirp = ckalloc(sizeof(DIR));
+    if (dirp == NULL) {
+	return dirp;
+    }
+ 
+    c = path[len - 1];
+    if (c == '.' ) {
+	if (len == 1) {
+	    len--;
+	} else {
+	    c = path[len - 2];
+	    if (c == '\\' || c == ':') {
+		len--;
+	    } else {
+		path[len] = '/';
+		len++;
+	    }
+	}
+    } else if (!unc && ((len != 1) || (c != '\\' && c != '/'))) {
+	path[len] = '/';
+	len++;
+    }
+    strcpy(path + len, pattern);
+ 
+    dirp -> dd_loc = 0; 
+    dirp -> dd_contents = dirp -> dd_cp = NULL; 
+ 
+    if ((s = getdirent(path)) == NULL) {
+	return dirp;
+    }
+ 
+    do 
+    { 
+	if (((dp = ckalloc(sizeof(struct _dircontents))) == NULL) || 
+	    ((dp -> _d_entry = ckalloc(strlen(s) + 1)) == NULL)      ) 
+	{ 
+	    if (dp) 
+		ckfree(dp); 
+	    free_dircontents(dirp -> dd_contents); 
+ 
+	    return NULL; 
+	} 
+ 
+	if (dirp -> dd_contents) 
+	    dirp -> dd_cp = dirp -> dd_cp -> _d_next = dp; 
+	else 
+	    dirp -> dd_contents = dirp -> dd_cp = dp; 
+ 
+	strcpy(dp -> _d_entry, s); 
+	dp -> _d_next = NULL; 
+ 
+    } 
+    while ((s = getdirent(NULL)) != NULL); 
+ 
+    dirp -> dd_cp = dirp -> dd_contents; 
+    return dirp; 
+} 
+ 
+DIR *opendir(char *name)
+{
+  return opendirx(name, "*");
+} 
+
+void closedir(DIR * dirp) 
+{ 
+  free_dircontents(dirp -> dd_contents); 
+  ckfree(dirp); 
+} 
+ 
+struct dirent *readdir(DIR * dirp) 
+{ 
+  /* static struct dirent dp; */ 
+  if (dirp -> dd_cp == NULL) 
+    return NULL; 
+ 
+  /*strcpy(dp.d_name,dirp->dd_cp->_d_entry); */ 
+ 
+  dp.d_name = dirp->dd_cp->_d_entry; 
+ 
+  dp.d_namlen = dp.d_reclen = 
+    strlen(dp.d_name); 
+ 
+  dp.d_ino = dirp->dd_loc+1; /* fake the inode */ 
+ 
+  dirp -> dd_cp = dirp -> dd_cp -> _d_next; 
+  dirp -> dd_loc++; 
+ 
+ 
+  return &dp; 
+} 
+ 
+void seekdir(DIR * dirp, long off) 
+{ 
+  long i = off; 
+  struct _dircontents *dp; 
+ 
+  if (off >= 0) 
+  { 
+    for (dp = dirp -> dd_contents; --i >= 0 && dp; dp = dp -> _d_next); 
+ 
+    dirp -> dd_loc = off - (i + 1); 
+    dirp -> dd_cp = dp; 
+  } 
+} 
+ 
+ 
+long telldir(DIR * dirp) 
+{ 
+  return dirp -> dd_loc; 
+} 
+ 
+static void free_dircontents(struct _dircontents * dp) 
+{ 
+  struct _dircontents *odp; 
+ 
+  while (dp) 
+  { 
+    if (dp -> _d_entry) 
+      ckfree(dp -> _d_entry); 
+ 
+    dp = (odp = dp) -> _d_next; 
+    ckfree(odp); 
+  } 
+} 
+/* end of "free_dircontents" */ 
+ 
+static char *getdirent(char *dir) 
+{ 
+    int got_dirent; 
+
+    if (dir != NULL) 
+    {				       /* get first entry */ 
+	if ((FindHandle = FindFirstFile( dir, &FileFindData )) 
+	    == (HDIR)0xffffffff) 
+	{ 
+	    return NULL; 
+	} 
+	got_dirent = 1;
+    } 
+    else				       /* get next entry */ 
+	got_dirent = FindNextFile( FindHandle, &FileFindData ); 
+ 
+    if (got_dirent) 
+	return FileFindData.cFileName; 
+    else 
+    { 
+	FindClose(FindHandle); 
+	return NULL; 
+    } 
+} 
+/* end of getdirent() */ 
+
+struct passwd * _cdecl
+getpwnam(char *name)
+{
+    return NULL;
+}
+
+struct passwd * _cdecl
+getpwuid(int uid)
+{
+    return NULL;
+}
+
+int
+getuid()
+{
+    return 0;
+}
+
+void _cdecl
+endpwent(void)
+{
+}
+
+/* #endif */

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntpipe.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntpipe.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntpipe.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,8 @@
+#include <io.h>
+#include <fcntl.h>
+
+int
+pipe(int *phandles)
+{
+    return _pipe(phandles, 8192, O_NOINHERIT);
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/nttempnam.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/nttempnam.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/nttempnam.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,98 @@
+#ifdef _WINDOWS
+#  define WIN32_LEAN_AND_MEAN
+#  include <windows.h>
+#  undef WIN32_LEAN_AND_MEAN
+#endif /* ifdef _WINDOWS */
+#include <tcl.h>
+#include <stdlib.h>
+#include <io.h>
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * try_create --
+ *
+ *	Try to find a valid temporary filename that can be written to.
+ *
+ * Notes:
+ *	XXX: This uses an incredibly stupid algorithm to decide failures.
+ *	It needs to be changed to find out if we don't have permission
+ *	to write in the directory.
+ *
+ * Results:
+ *	TRUE if successful, FALSE if not.
+ *
+ * Side Effects:
+ *	The filename is set in name
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+try_create(char *name, char *dir, char *prefix)
+{
+    HANDLE file;
+    int first, len, plen;
+
+    static int last_prefix = 0;
+
+    if (_access(dir, 06) != 0) {
+	return FALSE;
+    }
+    len = strlen(dir);
+    memcpy(name, dir, len);
+    if (len && (dir[len-1] != '/' && dir[len-1] != '\\')) {
+	name[len] = '\\';
+	len++;
+    }
+    plen = strlen(prefix);
+    memcpy(&name[len], prefix, plen);
+    len += plen;
+	
+    for (first = last_prefix, last_prefix++; last_prefix != first;
+	 last_prefix %= 65536) {
+	sprintf(&name[len], "%d", last_prefix);
+	file = CreateFile(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
+			  FILE_FLAG_DELETE_ON_CLOSE, NULL);
+	if (file != INVALID_HANDLE_VALUE) {
+	    CloseHandle(file);
+	    return TRUE;
+	}
+    }
+    return FALSE;
+}
+
+char *
+compat_tempnam(char *dir, char *prefix)
+{
+    char *tmpdir;
+    int len, maxlen;
+    char *name;
+
+    maxlen = strlen(dir);
+    tmpdir = getenv("TMP");
+    if (tmpdir != NULL) {
+	len = strlen(tmpdir);
+	if (len > maxlen) {
+	    maxlen = len;
+	}
+    }
+    len = strlen(_P_tmpdir);
+    if (len > maxlen) {
+	maxlen = len;
+    }
+
+    maxlen += strlen(prefix) + 10;
+    name = ckalloc(maxlen);
+    if (tmpdir && try_create(name, tmpdir, prefix)) {
+	return name;
+    }
+    if (try_create(name, dir, prefix)) {
+	return name;
+    }
+
+    if (try_create(name, _P_tmpdir, prefix)) {
+	return name;
+    }
+    ckfree(name);
+    return NULL;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntunlink.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntunlink.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntunlink.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,78 @@
+/*
+ *----------------------------------------------------------------------
+ * File: unlink.c
+ * Purpose:
+ *   Provide a way to unlink files without changing the source code of
+ *   tclUnix*.c for Windows NT
+ *
+ * Notes:
+ *   This is not perfect.  It only tries to unlink files when a new unlink
+ *   is called.  At this point, is runs through all old files that it could
+ *   not previously remove and it removes them.
+ *----------------------------------------------------------------------
+ */
+
+#include <io.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include "tknt_memory.h"
+
+typedef struct _LinkedFile {
+    char *fname;
+    struct _LinkedFile *next;
+} LinkedFile;
+
+LinkedFile *fileList = NULL;
+
+int
+compat_unlink(const char *fname)
+{
+    int ret, error;
+    LinkedFile *new, *prev, *curr, *next;
+
+    /* To make this multithread safe, we should use a semaphore to
+     * allow continuation here
+     */
+
+    /* Run through all names in out list of files to unlink.  Unlink
+     * all that we can
+     */
+    for (prev = NULL, curr = fileList; curr != NULL; curr = next)
+    {
+	next = curr->next;
+	ret = _unlink(curr->fname);
+	if (ret == 0) {
+	    if (prev) {
+		prev->next = curr->next;
+	    } else {
+		fileList = curr->next;
+	    }
+	    ckfree(curr);
+	} else {
+	    prev = curr;
+	}
+    }
+
+    if (fname == NULL) {
+	return 0;
+    }
+
+    ret = _unlink(fname);
+    if (ret == -1) {
+	error = errno;
+	if (error == EACCES) {
+	    /* Add to the list */
+	    new = (LinkedFile *) ckalloc(sizeof(*new));
+	    new->fname = ckstrdup(fname);
+	    if (new->fname != NULL) {
+		new->next = fileList;
+		fileList = new;
+	    } else {
+		ckfree(new);
+	    }
+	    ret = 0;
+	}
+    }
+    return ret;
+}	

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntwaitpid.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntwaitpid.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/ntwaitpid.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,77 @@
+#include <windows.h>
+#include <process.h>
+#include <sys/wait.h>
+#include <io.h>
+#include "tknt_memory.h"
+
+typedef struct pid_node {
+    pid_t pid;
+    HANDLE process;
+    struct pid_node *next;
+} pid_node;
+
+static pid_node *pidList = NULL;
+
+void
+addpid(DWORD pid, HANDLE process)
+{
+    pid_node *new;
+
+    new = (pid_node *) ckalloc(sizeof(pid_node));
+    new->pid = (pid_t) pid;
+    new->process = process;
+    new->next = pidList;
+    pidList = new;
+}
+
+HANDLE
+tclnt_getprocesshandle(DWORD pid)
+{
+    pid_node *p;
+
+    for (p = pidList; p; p = p->next) {
+	if (p->pid == (pid_t) pid) {
+	    return p->process;
+	}
+    }
+    return NULL;
+}
+
+pid_t
+waitpid(pid_t pid, int *stat_loc, int options)
+{
+    DWORD timeout;
+    HANDLE process;
+    pid_node *prev, *curr;
+
+    for (prev = NULL, curr = pidList; curr != NULL;
+	 prev = curr, curr = curr->next)
+    {
+	if (curr->pid == pid) {
+	    break;
+	}
+    }
+    if (curr == NULL) {
+	return 0;
+    }
+
+    if (options == WNOHANG) {
+	timeout = 0;
+    } else {
+	timeout = INFINITE;
+    }
+    process = curr->process;
+    if (WaitForSingleObject(process, timeout) == WAIT_OBJECT_0) {
+	pid = _cwait(stat_loc, (pid_t) process, 0);
+	CloseHandle(process);
+	if (prev) {
+	    prev->next = curr->next;
+	} else {
+	    pidList = curr->next;
+	}
+	ckfree((char *) prev);
+	return pid;
+    }
+    return 0;
+}
+

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/opendir.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/opendir.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/opendir.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,108 @@
+/* 
+ * opendir.c --
+ *
+ *	This file provides dirent-style directory-reading procedures
+ *	for V7 Unix systems that don't have such procedures.  The
+ *	origin of this code is unclear, but it seems to have come
+ *	originally from Larry Wall.
+ *
+ */
+
+static char sccsid[] = "@(#) opendir.c 1.2 94/11/04 13:55:02";
+
+#include "tclInt.h"
+#include "tclPort.h"
+
+#undef DIRSIZ
+#define DIRSIZ(dp) \
+    ((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
+
+/*
+ * open a directory.
+ */
+DIR *
+opendir(name)
+char *name;
+{
+	register DIR *dirp;
+	register int fd;
+	char *myname;
+
+	myname = ((*name == '\0') ? "." : name);
+	if ((fd = open(myname, 0, 0)) == -1)
+		return NULL;
+	if ((dirp = (DIR *)ckalloc(sizeof(DIR))) == NULL) {
+		close (fd);
+		return NULL;
+	}
+	dirp->dd_fd = fd;
+	dirp->dd_loc = 0;
+	return dirp;
+}
+
+/*
+ * read an old style directory entry and present it as a new one
+ */
+#ifndef pyr
+#define	ODIRSIZ	14
+
+struct	olddirect {
+	ino_t	od_ino;
+	char	od_name[ODIRSIZ];
+};
+#else	/* a Pyramid in the ATT universe */
+#define	ODIRSIZ	248
+
+struct	olddirect {
+	long	od_ino;
+	short	od_fill1, od_fill2;
+	char	od_name[ODIRSIZ];
+};
+#endif
+
+/*
+ * get next entry in a directory.
+ */
+struct dirent *
+readdir(dirp)
+register DIR *dirp;
+{
+	register struct olddirect *dp;
+	static struct dirent dir;
+
+	for (;;) {
+		if (dirp->dd_loc == 0) {
+			dirp->dd_size = read(dirp->dd_fd, dirp->dd_buf,
+			    DIRBLKSIZ);
+			if (dirp->dd_size <= 0)
+				return NULL;
+		}
+		if (dirp->dd_loc >= dirp->dd_size) {
+			dirp->dd_loc = 0;
+			continue;
+		}
+		dp = (struct olddirect *)(dirp->dd_buf + dirp->dd_loc);
+		dirp->dd_loc += sizeof(struct olddirect);
+		if (dp->od_ino == 0)
+			continue;
+		dir.d_ino = dp->od_ino;
+		strncpy(dir.d_name, dp->od_name, ODIRSIZ);
+		dir.d_name[ODIRSIZ] = '\0'; /* insure null termination */
+		dir.d_namlen = strlen(dir.d_name);
+		dir.d_reclen = DIRSIZ(&dir);
+		return (&dir);
+	}
+}
+
+/*
+ * close a directory.
+ */
+void
+closedir(dirp)
+register DIR *dirp;
+{
+	close(dirp->dd_fd);
+	dirp->dd_fd = -1;
+	dirp->dd_loc = 0;
+	ckfree((char *) dirp);
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/readme
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/readme	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/readme	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,8 @@
+This directory contains various header and code files that are
+used make Tcl compatible with various releases of UNIX and UNIX-like
+systems.  Typically, files from this directory are used to compile
+Tcl when a system doesn't contain the corresponding files or when
+they are known to be incorrect.  When the whole world becomes POSIX-
+compliant this directory should be unnecessary.
+
+sccsid = @(#) README 1.2 94/11/04 15:17:09

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/stdlib.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/stdlib.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/stdlib.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,45 @@
+/*
+ * stdlib.h --
+ *
+ *	Declares facilities exported by the "stdlib" portion of
+ *	the C library.  This file isn't complete in the ANSI-C
+ *	sense;  it only declares things that are needed by Tcl.
+ *	This file is needed even on many systems with their own
+ *	stdlib.h (e.g. SunOS) because not all stdlib.h files
+ *	declare all the procedures needed here (such as strtod).
+ *
+ * Copyright (c) 1991 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * @(#) stdlib.h 1.9 94/12/17 16:26:20
+ */
+
+#ifndef _STDLIB
+#define _STDLIB
+
+#include <tcl.h>
+
+extern void		abort _ANSI_ARGS_((void));
+extern double		atof _ANSI_ARGS_((CONST char *string));
+extern int		atoi _ANSI_ARGS_((CONST char *string));
+extern long		atol _ANSI_ARGS_((CONST char *string));
+extern char *		calloc _ANSI_ARGS_((unsigned int numElements,
+			    unsigned int size));
+extern void		exit _ANSI_ARGS_((int status));
+extern int		free _ANSI_ARGS_((char *blockPtr));
+extern char *		getenv _ANSI_ARGS_((CONST char *name));
+extern char *		malloc _ANSI_ARGS_((unsigned int numBytes));
+extern void		qsort _ANSI_ARGS_((VOID *base, int n, int size,
+			    int (*compar)(CONST VOID *element1, CONST VOID
+			    *element2)));
+extern char *		realloc _ANSI_ARGS_((char *ptr, unsigned int numBytes));
+extern double		strtod _ANSI_ARGS_((CONST char *string, char **endPtr));
+extern long		strtol _ANSI_ARGS_((CONST char *string, char **endPtr,
+			    int base));
+extern unsigned long	strtoul _ANSI_ARGS_((CONST char *string,
+			    char **endPtr, int base));
+
+#endif /* _STDLIB */

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strerror.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strerror.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strerror.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,470 @@
+/* 
+ * strerror.c --
+ *
+ *	Source code for the "strerror" library routine.
+ *
+ * Copyright (c) 1991-1993 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#) strerror.c 1.10 94/12/17 16:26:21";
+#endif /* not lint */
+
+#include "tclInt.h"
+#include "tclPort.h"
+
+extern int sys_nerr;
+extern char *sys_errlist[];
+/*
+ *----------------------------------------------------------------------
+ *
+ * strerror --
+ *
+ *	Map an integer error number into a printable string.
+ *
+ * Results:
+ *	The return value is a pointer to a string describing
+ *	error.  The first character of string isn't capitalized.
+ *
+ * Side effects:
+ *	Each call to this procedure may overwrite the value returned
+ *	by the previous call.
+ *
+ *----------------------------------------------------------------------
+ */
+
+char *
+strerror(error)
+    int error;			/* Integer identifying error (must be
+				 * one of the officially-defined Sprite
+				 * errors, as defined in errno.h). */
+{
+    static char msg[50];
+
+#ifndef NO_SYS_ERRLIST
+    if ((error <= sys_nerr) && (error > 0)) {
+	return sys_errlist[error];
+    }
+#else
+    switch (error) {
+#ifdef E2BIG
+	case E2BIG: return "argument list too long";
+#endif
+#ifdef EACCES
+	case EACCES: return "permission denied";
+#endif
+#ifdef EADDRINUSE
+	case EADDRINUSE: return "address already in use";
+#endif
+#ifdef EADDRNOTAVAIL
+	case EADDRNOTAVAIL: return "can't assign requested address";
+#endif
+#ifdef EADV
+	case EADV: return "advertise error";
+#endif
+#ifdef EAFNOSUPPORT
+	case EAFNOSUPPORT: return "address family not supported by protocol family";
+#endif
+#ifdef EAGAIN
+	case EAGAIN: return "no more processes";
+#endif
+#ifdef EALIGN
+	case EALIGN: return "EALIGN";
+#endif
+#ifdef EALREADY
+	case EALREADY: return "operation already in progress";
+#endif
+#ifdef EBADE
+	case EBADE: return "bad exchange descriptor";
+#endif
+#ifdef EBADF
+	case EBADF: return "bad file number";
+#endif
+#ifdef EBADFD
+	case EBADFD: return "file descriptor in bad state";
+#endif
+#ifdef EBADMSG
+	case EBADMSG: return "not a data message";
+#endif
+#ifdef EBADR
+	case EBADR: return "bad request descriptor";
+#endif
+#ifdef EBADRPC
+	case EBADRPC: return "RPC structure is bad";
+#endif
+#ifdef EBADRQC
+	case EBADRQC: return "bad request code";
+#endif
+#ifdef EBADSLT
+	case EBADSLT: return "invalid slot";
+#endif
+#ifdef EBFONT
+	case EBFONT: return "bad font file format";
+#endif
+#ifdef EBUSY
+	case EBUSY: return "mount device busy";
+#endif
+#ifdef ECHILD
+	case ECHILD: return "no children";
+#endif
+#ifdef ECHRNG
+	case ECHRNG: return "channel number out of range";
+#endif
+#ifdef ECOMM
+	case ECOMM: return "communication error on send";
+#endif
+#ifdef ECONNABORTED
+	case ECONNABORTED: return "software caused connection abort";
+#endif
+#ifdef ECONNREFUSED
+	case ECONNREFUSED: return "connection refused";
+#endif
+#ifdef ECONNRESET
+	case ECONNRESET: return "connection reset by peer";
+#endif
+#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK))
+	case EDEADLK: return "resource deadlock avoided";
+#endif
+#ifdef EDEADLOCK
+	case EDEADLOCK: return "resource deadlock avoided";
+#endif
+#ifdef EDESTADDRREQ
+	case EDESTADDRREQ: return "destination address required";
+#endif
+#ifdef EDIRTY
+	case EDIRTY: return "mounting a dirty fs w/o force";
+#endif
+#ifdef EDOM
+	case EDOM: return "math argument out of range";
+#endif
+#ifdef EDOTDOT
+	case EDOTDOT: return "cross mount point";
+#endif
+#ifdef EDQUOT
+	case EDQUOT: return "disk quota exceeded";
+#endif
+#ifdef EDUPPKG
+	case EDUPPKG: return "duplicate package name";
+#endif
+#ifdef EEXIST
+	case EEXIST: return "file already exists";
+#endif
+#ifdef EFAULT
+	case EFAULT: return "bad address in system call argument";
+#endif
+#ifdef EFBIG
+	case EFBIG: return "file too large";
+#endif
+#ifdef EHOSTDOWN
+	case EHOSTDOWN: return "host is down";
+#endif
+#ifdef EHOSTUNREACH
+	case EHOSTUNREACH: return "host is unreachable";
+#endif
+#ifdef EIDRM
+	case EIDRM: return "identifier removed";
+#endif
+#ifdef EINIT
+	case EINIT: return "initialization error";
+#endif
+#ifdef EINPROGRESS
+	case EINPROGRESS: return "operation now in progress";
+#endif
+#ifdef EINTR
+	case EINTR: return "interrupted system call";
+#endif
+#ifdef EINVAL
+	case EINVAL: return "invalid argument";
+#endif
+#ifdef EIO
+	case EIO: return "I/O error";
+#endif
+#ifdef EISCONN
+	case EISCONN: return "socket is already connected";
+#endif
+#ifdef EISDIR
+	case EISDIR: return "illegal operation on a directory";
+#endif
+#ifdef EISNAME
+	case EISNAM: return "is a name file";
+#endif
+#ifdef ELBIN
+	case ELBIN: return "ELBIN";
+#endif
+#ifdef EL2HLT
+	case EL2HLT: return "level 2 halted";
+#endif
+#ifdef EL2NSYNC
+	case EL2NSYNC: return "level 2 not synchronized";
+#endif
+#ifdef EL3HLT
+	case EL3HLT: return "level 3 halted";
+#endif
+#ifdef EL3RST
+	case EL3RST: return "level 3 reset";
+#endif
+#ifdef ELIBACC
+	case ELIBACC: return "can not access a needed shared library";
+#endif
+#ifdef ELIBBAD
+	case ELIBBAD: return "accessing a corrupted shared library";
+#endif
+#ifdef ELIBEXEC
+	case ELIBEXEC: return "can not exec a shared library directly";
+#endif
+#ifdef ELIBMAX
+	case ELIBMAX: return
+		"attempting to link in more shared libraries than system limit";
+#endif
+#ifdef ELIBSCN
+	case ELIBSCN: return ".lib section in a.out corrupted";
+#endif
+#ifdef ELNRNG
+	case ELNRNG: return "link number out of range";
+#endif
+#ifdef ELOOP
+	case ELOOP: return "too many levels of symbolic links";
+#endif
+#ifdef EMFILE
+	case EMFILE: return "too many open files";
+#endif
+#ifdef EMLINK
+	case EMLINK: return "too many links";
+#endif
+#ifdef EMSGSIZE
+	case EMSGSIZE: return "message too long";
+#endif
+#ifdef EMULTIHOP
+	case EMULTIHOP: return "multihop attempted";
+#endif
+#ifdef ENAMETOOLONG
+	case ENAMETOOLONG: return "file name too long";
+#endif
+#ifdef ENAVAIL
+	case ENAVAIL: return "not available";
+#endif
+#ifdef ENET
+	case ENET: return "ENET";
+#endif
+#ifdef ENETDOWN
+	case ENETDOWN: return "network is down";
+#endif
+#ifdef ENETRESET
+	case ENETRESET: return "network dropped connection on reset";
+#endif
+#ifdef ENETUNREACH
+	case ENETUNREACH: return "network is unreachable";
+#endif
+#ifdef ENFILE
+	case ENFILE: return "file table overflow";
+#endif
+#ifdef ENOANO
+	case ENOANO: return "anode table overflow";
+#endif
+#if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR))
+	case ENOBUFS: return "no buffer space available";
+#endif
+#ifdef ENOCSI
+	case ENOCSI: return "no CSI structure available";
+#endif
+#ifdef ENODATA
+	case ENODATA: return "no data available";
+#endif
+#ifdef ENODEV
+	case ENODEV: return "no such device";
+#endif
+#ifdef ENOENT
+	case ENOENT: return "no such file or directory";
+#endif
+#ifdef ENOEXEC
+	case ENOEXEC: return "exec format error";
+#endif
+#ifdef ENOLCK
+	case ENOLCK: return "no locks available";
+#endif
+#ifdef ENOLINK
+	case ENOLINK: return "link has be severed";
+#endif
+#ifdef ENOMEM
+	case ENOMEM: return "not enough memory";
+#endif
+#ifdef ENOMSG
+	case ENOMSG: return "no message of desired type";
+#endif
+#ifdef ENONET
+	case ENONET: return "machine is not on the network";
+#endif
+#ifdef ENOPKG
+	case ENOPKG: return "package not installed";
+#endif
+#ifdef ENOPROTOOPT
+	case ENOPROTOOPT: return "bad proocol option";
+#endif
+#ifdef ENOSPC
+	case ENOSPC: return "no space left on device";
+#endif
+#ifdef ENOSR
+	case ENOSR: return "out of stream resources";
+#endif
+#ifdef ENOSTR
+	case ENOSTR: return "not a stream device";
+#endif
+#ifdef ENOSYM
+	case ENOSYM: return "unresolved symbol name";
+#endif
+#ifdef ENOSYS
+	case ENOSYS: return "function not implemented";
+#endif
+#ifdef ENOTBLK
+	case ENOTBLK: return "block device required";
+#endif
+#ifdef ENOTCONN
+	case ENOTCONN: return "socket is not connected";
+#endif
+#ifdef ENOTDIR
+	case ENOTDIR: return "not a directory";
+#endif
+#ifdef ENOTEMPTY
+	case ENOTEMPTY: return "directory not empty";
+#endif
+#ifdef ENOTNAM
+	case ENOTNAM: return "not a name file";
+#endif
+#ifdef ENOTSOCK
+	case ENOTSOCK: return "socket operation on non-socket";
+#endif
+#ifdef ENOTTY
+	case ENOTTY: return "inappropriate device for ioctl";
+#endif
+#ifdef ENOTUNIQ
+	case ENOTUNIQ: return "name not unique on network";
+#endif
+#ifdef ENXIO
+	case ENXIO: return "no such device or address";
+#endif
+#ifdef EOPNOTSUPP
+	case EOPNOTSUPP: return "operation not supported on socket";
+#endif
+#ifdef EPERM
+	case EPERM: return "not owner";
+#endif
+#ifdef EPFNOSUPPORT
+	case EPFNOSUPPORT: return "protocol family not supported";
+#endif
+#ifdef EPIPE
+	case EPIPE: return "broken pipe";
+#endif
+#ifdef EPROCLIM
+	case EPROCLIM: return "too many processes";
+#endif
+#ifdef EPROCUNAVAIL
+	case EPROCUNAVAIL: return "bad procedure for program";
+#endif
+#ifdef EPROGMISMATCH
+	case EPROGMISMATCH: return "program version wrong";
+#endif
+#ifdef EPROGUNAVAIL
+	case EPROGUNAVAIL: return "RPC program not available";
+#endif
+#ifdef EPROTO
+	case EPROTO: return "protocol error";
+#endif
+#ifdef EPROTONOSUPPORT
+	case EPROTONOSUPPORT: return "protocol not suppored";
+#endif
+#ifdef EPROTOTYPE
+	case EPROTOTYPE: return "protocol wrong type for socket";
+#endif
+#ifdef ERANGE
+	case ERANGE: return "math result unrepresentable";
+#endif
+#if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED))
+	case EREFUSED: return "EREFUSED";
+#endif
+#ifdef EREMCHG
+	case EREMCHG: return "remote address changed";
+#endif
+#ifdef EREMDEV
+	case EREMDEV: return "remote device";
+#endif
+#ifdef EREMOTE
+	case EREMOTE: return "pathname hit remote file system";
+#endif
+#ifdef EREMOTEIO
+	case EREMOTEIO: return "remote i/o error";
+#endif
+#ifdef EREMOTERELEASE
+	case EREMOTERELEASE: return "EREMOTERELEASE";
+#endif
+#ifdef EROFS
+	case EROFS: return "read-only file system";
+#endif
+#ifdef ERPCMISMATCH
+	case ERPCMISMATCH: return "RPC version is wrong";
+#endif
+#ifdef ERREMOTE
+	case ERREMOTE: return "object is remote";
+#endif
+#ifdef ESHUTDOWN
+	case ESHUTDOWN: return "can't send afer socket shutdown";
+#endif
+#ifdef ESOCKTNOSUPPORT
+	case ESOCKTNOSUPPORT: return "socket type not supported";
+#endif
+#ifdef ESPIPE
+	case ESPIPE: return "invalid seek";
+#endif
+#ifdef ESRCH
+	case ESRCH: return "no such process";
+#endif
+#ifdef ESRMNT
+	case ESRMNT: return "srmount error";
+#endif
+#ifdef ESTALE
+	case ESTALE: return "stale remote file handle";
+#endif
+#ifdef ESUCCESS
+	case ESUCCESS: return "Error 0";
+#endif
+#ifdef ETIME
+	case ETIME: return "timer expired";
+#endif
+#ifdef ETIMEDOUT
+	case ETIMEDOUT: return "connection timed out";
+#endif
+#ifdef ETOOMANYREFS
+	case ETOOMANYREFS: return "too many references: can't splice";
+#endif
+#ifdef ETXTBSY
+	case ETXTBSY: return "text file or pseudo-device busy";
+#endif
+#ifdef EUCLEAN
+	case EUCLEAN: return "structure needs cleaning";
+#endif
+#ifdef EUNATCH
+	case EUNATCH: return "protocol driver not attached";
+#endif
+#ifdef EUSERS
+	case EUSERS: return "too many users";
+#endif
+#ifdef EVERSION
+	case EVERSION: return "version mismatch";
+#endif
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
+	case EWOULDBLOCK: return "operation would block";
+#endif
+#ifdef EXDEV
+	case EXDEV: return "cross-domain link";
+#endif
+#ifdef EXFULL
+	case EXFULL: return "message tables full";
+#endif
+    }
+#endif /* ! NO_SYS_ERRLIST */
+    sprintf(msg, "unknown error (%d)", error);
+    return msg;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/string.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/string.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/string.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,64 @@
+/*
+ * string.h --
+ *
+ *	Declarations of ANSI C library procedures for string handling.
+ *
+ * Copyright (c) 1991-1993 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * @(#) string.h 1.10 94/12/17 16:26:22
+ */
+
+#ifndef _STRING
+#define _STRING
+
+#include <tcl.h>
+
+/*
+ * The following #include is needed to define size_t. (This used to
+ * include sys/stdtypes.h but that doesn't exist on older versions
+ * of SunOS, e.g. 4.0.2, so I'm trying sys/types.h now.... hopefully
+ * it exists everywhere)
+ */
+
+#include <sys/types.h>
+
+extern char *		memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n));
+extern int		memcmp _ANSI_ARGS_((CONST VOID *s1, CONST VOID *s2,
+			    size_t n));
+extern char *		memcpy _ANSI_ARGS_((VOID *t, CONST VOID *f, size_t n));
+extern char *		memmove _ANSI_ARGS_((VOID *t, CONST VOID *f,
+			    size_t n));
+extern char *		memset _ANSI_ARGS_((VOID *s, int c, size_t n));
+
+extern int		strcasecmp _ANSI_ARGS_((CONST char *s1,
+			    CONST char *s2));
+extern char *		strcat _ANSI_ARGS_((char *dst, CONST char *src));
+extern char *		strchr _ANSI_ARGS_((CONST char *string, int c));
+extern int		strcmp _ANSI_ARGS_((CONST char *s1, CONST char *s2));
+extern char *		strcpy _ANSI_ARGS_((char *dst, CONST char *src));
+extern size_t		strcspn _ANSI_ARGS_((CONST char *string,
+			    CONST char *chars));
+extern char *		strdup _ANSI_ARGS_((CONST char *string));
+extern char *		strerror _ANSI_ARGS_((int error));
+extern size_t		strlen _ANSI_ARGS_((CONST char *string));
+extern int		strncasecmp _ANSI_ARGS_((CONST char *s1,
+			    CONST char *s2, size_t n));
+extern char *		strncat _ANSI_ARGS_((char *dst, CONST char *src,
+			    size_t numChars));
+extern int		strncmp _ANSI_ARGS_((CONST char *s1, CONST char *s2,
+			    size_t nChars));
+extern char *		strncpy _ANSI_ARGS_((char *dst, CONST char *src,
+			    size_t numChars));
+extern char *		strpbrk _ANSI_ARGS_((CONST char *string, char *chars));
+extern char *		strrchr _ANSI_ARGS_((CONST char *string, int c));
+extern size_t		strspn _ANSI_ARGS_((CONST char *string,
+			    CONST char *chars));
+extern char *		strstr _ANSI_ARGS_((CONST char *string,
+			    CONST char *substring));
+extern char *		strtok _ANSI_ARGS_((CONST char *s, CONST char *delim));
+
+#endif /* _STRING */

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strncasecmp.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strncasecmp.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strncasecmp.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,95 @@
+/* 
+ * strncasecmp.c --
+ *
+ *	Source code for the "strncasecmp" library routine.
+ *
+ * Copyright (c) 1988-1993 The Regents of the University of California.
+ * Copyright (c) 1995 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+static char sccsid[] = "@(#) strncasecmp.c 1.1 94/12/26 15:13:47";
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * strncasecmp --
+ *
+ *	Compares two strings, ignoring case differences.
+ *
+ * Results:
+ *	Compares up to length chars of s1 and s2, returning -1, 0, or 1
+ *	if s1 is lexicographically less than, equal to, or greater
+ *	than s2 over those characters.
+ *
+ * Side effects:
+ *	None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+strncasecmp(s1, s2, length)
+    char *s1;			/* First string. */
+    char *s2;			/* Second string. */
+    int length;			/* Maximum number of characters to compare
+				 * (stop earlier if the end of either string
+				 * is reached). */
+{
+    unsigned char u1, u2;
+
+    /*
+     * This array is designed for mapping upper and lower case letter
+     * together for a case independent comparison.  The mappings are
+     * based upon ASCII character sequences.
+     */
+
+    static unsigned char charmap[] = {
+	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+	0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+	0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+	0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
+	0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+	0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+	0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+	0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
+	0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+	0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
+	0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+	0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
+	0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+	0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
+	0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+	0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
+	0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
+	0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
+	0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+	0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
+	0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
+	0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
+	0xc0, 0xe1, 0xe2, 0xe3, 0xe4, 0xc5, 0xe6, 0xe7,
+	0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
+	0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
+	0xf8, 0xf9, 0xfa, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
+	0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
+	0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
+	0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
+	0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
+    };
+
+    for (; length != 0; length--, s1++, s2++) {
+	u1 = (unsigned char) *s1;
+	u2 = (unsigned char) *s2;
+	if (charmap[u1] != charmap[u2]) {
+	    return charmap[u1] - charmap[u2];
+	}
+	if (u1 == '\0') {
+	    return 0;
+	}
+    }
+    return 0;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strstr.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strstr.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strstr.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,70 @@
+/* 
+ * strstr.c --
+ *
+ *	Source code for the "strstr" library routine.
+ *
+ * Copyright (c) 1988-1993 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#) strstr.c 1.3 94/12/17 16:26:23";
+#endif /* not lint */
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * strstr --
+ *
+ *	Locate the first instance of a substring in a string.
+ *
+ * Results:
+ *	If string contains substring, the return value is the
+ *	location of the first matching instance of substring
+ *	in string.  If string doesn't contain substring, the
+ *	return value is 0.  Matching is done on an exact
+ *	character-for-character basis with no wildcards or special
+ *	characters.
+ *
+ * Side effects:
+ *	None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+char *
+strstr(string, substring)
+    register char *string;	/* String to search. */
+    char *substring;		/* Substring to try to find in string. */
+{
+    register char *a, *b;
+
+    /* First scan quickly through the two strings looking for a
+     * single-character match.  When it's found, then compare the
+     * rest of the substring.
+     */
+
+    b = substring;
+    if (*b == 0) {
+	return string;
+    }
+    for ( ; *string != 0; string += 1) {
+	if (*string != *b) {
+	    continue;
+	}
+	a = string;
+	while (1) {
+	    if (*b == 0) {
+		return string;
+	    }
+	    if (*a++ != *b++) {
+		break;
+	    }
+	}
+	b = substring;
+    }
+    return (char *) 0;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtod.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtod.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtod.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,259 @@
+/* 
+ * strtod.c --
+ *
+ *	Source code for the "strtod" library procedure.
+ *
+ * Copyright (c) 1988-1993 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#) strtod.c 1.7 94/12/17 16:26:24";
+#endif /* not lint */
+
+#include "tcl.h"
+#ifdef NO_STDLIB_H
+#   include "compat/stdlib.h"
+#else
+#   include <stdlib.h>
+#endif
+#include <ctype.h>
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+#ifndef NULL
+#define NULL 0
+#endif
+
+static int maxExponent = 511;	/* Largest possible base 10 exponent.  Any
+				 * exponent larger than this will already
+				 * produce underflow or overflow, so there's
+				 * no need to worry about additional digits.
+				 */
+static double powersOf10[] = {	/* Table giving binary powers of 10.  Entry */
+    10.,			/* is 10^2^i.  Used to convert decimal */
+    100.,			/* exponents into floating-point numbers. */
+    1.0e4,
+    1.0e8,
+    1.0e16,
+    1.0e32,
+    1.0e64,
+    1.0e128,
+    1.0e256
+};
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * strtod --
+ *
+ *	This procedure converts a floating-point number from an ASCII
+ *	decimal representation to internal double-precision format.
+ *
+ * Results:
+ *	The return value is the double-precision floating-point
+ *	representation of the characters in string.  If endPtr isn't
+ *	NULL, then *endPtr is filled in with the address of the
+ *	next character after the last one that was part of the
+ *	floating-point number.
+ *
+ * Side effects:
+ *	None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+double
+strtod(string, endPtr)
+    CONST char *string;		/* A decimal ASCII floating-point number,
+				 * optionally preceded by white space.
+				 * Must have form "-I.FE-X", where I is the
+				 * integer part of the mantissa, F is the
+				 * fractional part of the mantissa, and X
+				 * is the exponent.  Either of the signs
+				 * may be "+", "-", or omitted.  Either I
+				 * or F may be omitted, or both.  The decimal
+				 * point isn't necessary unless F is present.
+				 * The "E" may actually be an "e".  E and X
+				 * may both be omitted (but not just one).
+				 */
+    char **endPtr;		/* If non-NULL, store terminating character's
+				 * address here. */
+{
+    int sign, expSign = FALSE;
+    double fraction, dblExp, *d;
+    register CONST char *p;
+    register int c;
+    int exp = 0;		/* Exponent read from "EX" field. */
+    int fracExp = 0;		/* Exponent that derives from the fractional
+				 * part.  Under normal circumstatnces, it is
+				 * the negative of the number of digits in F.
+				 * However, if I is very long, the last digits
+				 * of I get dropped (otherwise a long I with a
+				 * large negative exponent could cause an
+				 * unnecessary overflow on I alone).  In this
+				 * case, fracExp is incremented one for each
+				 * dropped digit. */
+    int mantSize;		/* Number of digits in mantissa. */
+    int decPt;			/* Number of mantissa digits BEFORE decimal
+				 * point. */
+    CONST char *pExp;		/* Temporarily holds location of exponent
+				 * in string. */
+
+    /*
+     * Strip off leading blanks and check for a sign.
+     */
+
+    p = string;
+    while (isspace(*p)) {
+	p += 1;
+    }
+    if (*p == '-') {
+	sign = TRUE;
+	p += 1;
+    } else {
+	if (*p == '+') {
+	    p += 1;
+	}
+	sign = FALSE;
+    }
+
+    /*
+     * Count the number of digits in the mantissa (including the decimal
+     * point), and also locate the decimal point.
+     */
+
+    decPt = -1;
+    for (mantSize = 0; ; mantSize += 1)
+    {
+	c = *p;
+	if (!isdigit(c)) {
+	    if ((c != '.') || (decPt >= 0)) {
+		break;
+	    }
+	    decPt = mantSize;
+	}
+	p += 1;
+    }
+
+    /*
+     * Now suck up the digits in the mantissa.  Use two integers to
+     * collect 9 digits each (this is faster than using floating-point).
+     * If the mantissa has more than 18 digits, ignore the extras, since
+     * they can't affect the value anyway.
+     */
+    
+    pExp  = p;
+    p -= mantSize;
+    if (decPt < 0) {
+	decPt = mantSize;
+    } else {
+	mantSize -= 1;			/* One of the digits was the point. */
+    }
+    if (mantSize > 18) {
+	fracExp = decPt - 18;
+	mantSize = 18;
+    } else {
+	fracExp = decPt - mantSize;
+    }
+    if (mantSize == 0) {
+	fraction = 0.0;
+	p = string;
+	goto done;
+    } else {
+	int frac1, frac2;
+	frac1 = 0;
+	for ( ; mantSize > 9; mantSize -= 1)
+	{
+	    c = *p;
+	    p += 1;
+	    if (c == '.') {
+		c = *p;
+		p += 1;
+	    }
+	    frac1 = 10*frac1 + (c - '0');
+	}
+	frac2 = 0;
+	for (; mantSize > 0; mantSize -= 1)
+	{
+	    c = *p;
+	    p += 1;
+	    if (c == '.') {
+		c = *p;
+		p += 1;
+	    }
+	    frac2 = 10*frac2 + (c - '0');
+	}
+	fraction = (1.0e9 * frac1) + frac2;
+    }
+
+    /*
+     * Skim off the exponent.
+     */
+
+    p = pExp;
+    if ((*p == 'E') || (*p == 'e')) {
+	p += 1;
+	if (*p == '-') {
+	    expSign = TRUE;
+	    p += 1;
+	} else {
+	    if (*p == '+') {
+		p += 1;
+	    }
+	    expSign = FALSE;
+	}
+	while (isdigit(*p)) {
+	    exp = exp * 10 + (*p - '0');
+	    p += 1;
+	}
+    }
+    if (expSign) {
+	exp = fracExp - exp;
+    } else {
+	exp = fracExp + exp;
+    }
+
+    /*
+     * Generate a floating-point number that represents the exponent.
+     * Do this by processing the exponent one bit at a time to combine
+     * many powers of 2 of 10. Then combine the exponent with the
+     * fraction.
+     */
+    
+    if (exp < 0) {
+	expSign = TRUE;
+	exp = -exp;
+    } else {
+	expSign = FALSE;
+    }
+    if (exp > maxExponent) {
+	exp = maxExponent;
+    }
+    dblExp = 1.0;
+    for (d = powersOf10; exp != 0; exp >>= 1, d += 1) {
+	if (exp & 01) {
+	    dblExp *= *d;
+	}
+    }
+    if (expSign) {
+	fraction /= dblExp;
+    } else {
+	fraction *= dblExp;
+    }
+
+done:
+    if (endPtr != NULL) {
+	*endPtr = (char *) p;
+    }
+
+    if (sign) {
+	return -fraction;
+    }
+    return fraction;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtol.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtol.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtol.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,85 @@
+/* 
+ * strtol.c --
+ *
+ *	Source code for the "strtol" library procedure.
+ *
+ * Copyright (c) 1988 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#) strtol.c 1.3 94/12/17 16:26:25";
+#endif /* not lint */
+
+#include <ctype.h>
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * strtol --
+ *
+ *	Convert an ASCII string into an integer.
+ *
+ * Results:
+ *	The return value is the integer equivalent of string.  If endPtr
+ *	is non-NULL, then *endPtr is filled in with the character
+ *	after the last one that was part of the integer.  If string
+ *	doesn't contain a valid integer value, then zero is returned
+ *	and *endPtr is set to string.
+ *
+ * Side effects:
+ *	None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+long int
+strtol(string, endPtr, base)
+    char *string;		/* String of ASCII digits, possibly
+				 * preceded by white space.  For bases
+				 * greater than 10, either lower- or
+				 * upper-case digits may be used.
+				 */
+    char **endPtr;		/* Where to store address of terminating
+				 * character, or NULL. */
+    int base;			/* Base for conversion.  Must be less
+				 * than 37.  If 0, then the base is chosen
+				 * from the leading characters of string:
+				 * "0x" means hex, "0" means octal, anything
+				 * else means decimal.
+				 */
+{
+    register char *p;
+    int result;
+
+    /*
+     * Skip any leading blanks.
+     */
+
+    p = string;
+    while (isspace(*p)) {
+	p += 1;
+    }
+
+    /*
+     * Check for a sign.
+     */
+
+    if (*p == '-') {
+	p += 1;
+	result = -(strtoul(p, endPtr, base));
+    } else {
+	if (*p == '+') {
+	    p += 1;
+	}
+	result = strtoul(p, endPtr, base);
+    }
+    if ((result == 0) && (endPtr != 0) && (*endPtr == p)) {
+	*endPtr = string;
+    }
+    return result;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtoul.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtoul.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/strtoul.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,185 @@
+/* 
+ * strtoul.c --
+ *
+ *	Source code for the "strtoul" library procedure.
+ *
+ * Copyright (c) 1988 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#) strtoul.c 1.4 94/12/17 16:26:26";
+#endif /* not lint */
+
+#include <ctype.h>
+
+/*
+ * The table below is used to convert from ASCII digits to a
+ * numerical equivalent.  It maps from '0' through 'z' to integers
+ * (100 for non-digit characters).
+ */
+
+static char cvtIn[] = {
+    0, 1, 2, 3, 4, 5, 6, 7, 8, 9,		/* '0' - '9' */
+    100, 100, 100, 100, 100, 100, 100,		/* punctuation */
+    10, 11, 12, 13, 14, 15, 16, 17, 18, 19,	/* 'A' - 'Z' */
+    20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+    30, 31, 32, 33, 34, 35,
+    100, 100, 100, 100, 100, 100,		/* punctuation */
+    10, 11, 12, 13, 14, 15, 16, 17, 18, 19,	/* 'a' - 'z' */
+    20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+    30, 31, 32, 33, 34, 35};
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * strtoul --
+ *
+ *	Convert an ASCII string into an integer.
+ *
+ * Results:
+ *	The return value is the integer equivalent of string.  If endPtr
+ *	is non-NULL, then *endPtr is filled in with the character
+ *	after the last one that was part of the integer.  If string
+ *	doesn't contain a valid integer value, then zero is returned
+ *	and *endPtr is set to string.
+ *
+ * Side effects:
+ *	None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+unsigned long int
+strtoul(string, endPtr, base)
+    char *string;		/* String of ASCII digits, possibly
+				 * preceded by white space.  For bases
+				 * greater than 10, either lower- or
+				 * upper-case digits may be used.
+				 */
+    char **endPtr;		/* Where to store address of terminating
+				 * character, or NULL. */
+    int base;			/* Base for conversion.  Must be less
+				 * than 37.  If 0, then the base is chosen
+				 * from the leading characters of string:
+				 * "0x" means hex, "0" means octal, anything
+				 * else means decimal.
+				 */
+{
+    register char *p;
+    register unsigned long int result = 0;
+    register unsigned digit;
+    int anyDigits = 0;
+
+    /*
+     * Skip any leading blanks.
+     */
+
+    p = string;
+    while (isspace(*p)) {
+	p += 1;
+    }
+
+    /*
+     * If no base was provided, pick one from the leading characters
+     * of the string.
+     */
+    
+    if (base == 0)
+    {
+	if (*p == '0') {
+	    p += 1;
+	    if (*p == 'x') {
+		p += 1;
+		base = 16;
+	    } else {
+
+		/*
+		 * Must set anyDigits here, otherwise "0" produces a
+		 * "no digits" error.
+		 */
+
+		anyDigits = 1;
+		base = 8;
+	    }
+	}
+	else base = 10;
+    } else if (base == 16) {
+
+	/*
+	 * Skip a leading "0x" from hex numbers.
+	 */
+
+	if ((p[0] == '0') && (p[1] == 'x')) {
+	    p += 2;
+	}
+    }
+
+    /*
+     * Sorry this code is so messy, but speed seems important.  Do
+     * different things for base 8, 10, 16, and other.
+     */
+
+    if (base == 8) {
+	for ( ; ; p += 1) {
+	    digit = *p - '0';
+	    if (digit > 7) {
+		break;
+	    }
+	    result = (result << 3) + digit;
+	    anyDigits = 1;
+	}
+    } else if (base == 10) {
+	for ( ; ; p += 1) {
+	    digit = *p - '0';
+	    if (digit > 9) {
+		break;
+	    }
+	    result = (10*result) + digit;
+	    anyDigits = 1;
+	}
+    } else if (base == 16) {
+	for ( ; ; p += 1) {
+	    digit = *p - '0';
+	    if (digit > ('z' - '0')) {
+		break;
+	    }
+	    digit = cvtIn[digit];
+	    if (digit > 15) {
+		break;
+	    }
+	    result = (result << 4) + digit;
+	    anyDigits = 1;
+	}
+    } else {
+	for ( ; ; p += 1) {
+	    digit = *p - '0';
+	    if (digit > ('z' - '0')) {
+		break;
+	    }
+	    digit = cvtIn[digit];
+	    if (digit >= base) {
+		break;
+	    }
+	    result = result*base + digit;
+	    anyDigits = 1;
+	}
+    }
+
+    /*
+     * See if there were any digits at all.
+     */
+
+    if (!anyDigits) {
+	p = string;
+    }
+
+    if (endPtr != 0) {
+	*endPtr = p;
+    }
+
+    return result;
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/tmpnam.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/tmpnam.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/tmpnam.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that this notice is preserved and that due credit is given
+ * to the University of California at Berkeley. The name of the University
+ * may not be used to endorse or promote products derived from this
+ * software without specific written prior permission. This software
+ * is provided ``as is'' without express or implied warranty.
+ */
+
+static char sccsid[] = "@(#) tmpnam.c 1.1 94/08/09 13:17:13";
+
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/file.h>
+#include <stdio.h>
+
+/*
+ * Use /tmp instead of /usr/tmp, because L_tmpname is only 14 chars
+ * on some machines (like NeXT machines) and /usr/tmp will cause
+ * buffer overflows.
+ */
+
+#define	P_tmpdir	"/tmp"
+
+char *
+tmpnam(s)
+	char *s;
+{
+	static char name[50];
+	char *mktemp();
+
+	if (!s)
+		s = name;
+	(void)sprintf(s, "%s/XXXXXX", P_tmpdir);
+	return(mktemp(s));
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/unistd.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/unistd.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/unistd.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,83 @@
+/*
+ * unistd.h --
+ *
+ *      Macros, CONSTants and prototypes for Posix conformance.
+ *
+ * Copyright 1989 Regents of the University of California
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies.  The University of California
+ * makes no representations about the suitability of this
+ * software for any purpose.  It is provided "as is" without
+ * express or implied warranty.
+ *
+ * @(#) unistd.h 1.5 94/12/17 16:26:27
+ */
+
+#ifndef _UNISTD
+#define _UNISTD
+
+#include <sys/types.h>
+#ifndef _TCL
+#   include "tcl.h"
+#endif
+
+#ifndef NULL
+#define NULL    0
+#endif
+
+/* 
+ * Strict POSIX stuff goes here.  Extensions go down below, in the 
+ * ifndef _POSIX_SOURCE section.
+ */
+
+extern void _exit _ANSI_ARGS_((int status));
+extern int access _ANSI_ARGS_((CONST char *path, int mode));
+extern int chdir _ANSI_ARGS_((CONST char *path));
+extern int chown _ANSI_ARGS_((CONST char *path, uid_t owner, gid_t group));
+extern int close _ANSI_ARGS_((int fd));
+extern int dup _ANSI_ARGS_((int oldfd));
+extern int dup2 _ANSI_ARGS_((int oldfd, int newfd));
+extern int execl _ANSI_ARGS_((CONST char *path, ...));
+extern int execle _ANSI_ARGS_((CONST char *path, ...));
+extern int execlp _ANSI_ARGS_((CONST char *file, ...));
+extern int execv _ANSI_ARGS_((CONST char *path, char **argv));
+extern int execve _ANSI_ARGS_((CONST char *path, char **argv, char **envp));
+extern int execvp _ANSI_ARGS_((CONST char *file, char **argv));
+extern pid_t fork _ANSI_ARGS_((void));
+extern char *getcwd _ANSI_ARGS_((char *buf, size_t size));
+extern gid_t getegid _ANSI_ARGS_((void));
+extern uid_t geteuid _ANSI_ARGS_((void));
+extern gid_t getgid _ANSI_ARGS_((void));
+extern int getgroups _ANSI_ARGS_((int bufSize, int *buffer));
+extern pid_t getpid _ANSI_ARGS_((void));
+extern uid_t getuid _ANSI_ARGS_((void));
+extern int isatty _ANSI_ARGS_((int fd));
+extern long lseek _ANSI_ARGS_((int fd, long offset, int whence));
+extern int pipe _ANSI_ARGS_((int *fildes));
+extern int read _ANSI_ARGS_((int fd, char *buf, size_t size));
+extern int setgid _ANSI_ARGS_((gid_t group));
+extern int setuid _ANSI_ARGS_((uid_t user));
+extern unsigned sleep _ANSI_ARGS_ ((unsigned seconds));
+extern char *ttyname _ANSI_ARGS_((int fd));
+extern int unlink _ANSI_ARGS_((CONST char *path));
+extern int write _ANSI_ARGS_((int fd, CONST char *buf, size_t size));
+
+#ifndef	_POSIX_SOURCE
+extern char *crypt _ANSI_ARGS_((CONST char *, CONST char *));
+extern int fchown _ANSI_ARGS_((int fd, uid_t owner, gid_t group));
+extern int flock _ANSI_ARGS_((int fd, int operation));
+extern int ftruncate _ANSI_ARGS_((int fd, unsigned long length));
+extern int readlink _ANSI_ARGS_((CONST char *path, char *buf, int bufsize));
+extern int setegid _ANSI_ARGS_((gid_t group));
+extern int seteuid _ANSI_ARGS_((uid_t user));
+extern int setreuid _ANSI_ARGS_((int ruid, int euid));
+extern int symlink _ANSI_ARGS_((CONST char *, CONST char *));
+extern int ttyslot _ANSI_ARGS_((void));
+extern int truncate _ANSI_ARGS_((CONST char *path, unsigned long length));
+extern int vfork _ANSI_ARGS_((void));
+#endif /* _POSIX_SOURCE */
+
+#endif /* _UNISTD */
+

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/waitpid.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/waitpid.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/waitpid.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,172 @@
+/* 
+ * waitpid.c --
+ *
+ *	This procedure emulates the POSIX waitpid kernel call on
+ *	BSD systems that don't have waitpid but do have wait3.
+ *	This code is based on a prototype version written by
+ *	Mark Diekhans and Karl Lehenbauer.
+ *
+ * Copyright (c) 1993 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#) waitpid.c 1.7 94/12/17 16:26:27";
+#endif /* not lint */
+
+#include "tclInt.h"
+#include "tclPort.h"
+
+/*
+ * A linked list of the following structures is used to keep track
+ * of processes for which we received notification from the kernel,
+ * but the application hasn't waited for them yet (this can happen
+ * because wait may not return the process we really want).  We
+ * save the information here until the application finally does
+ * wait for the process.
+ */
+
+typedef struct WaitInfo {
+    int pid;				/* Pid of process that exited. */
+    WAIT_STATUS_TYPE status;		/* Status returned when child exited
+					 * or suspended. */
+    struct WaitInfo *nextPtr;		/* Next in list of exited processes. */
+} WaitInfo;
+
+static WaitInfo *deadList = NULL;	/* First in list of all dead
+					 * processes. */
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * waitpid --
+ *
+ *	This procedure emulates the functionality of the POSIX
+ *	waitpid kernel call, using the BSD wait3 kernel call.
+ *	Note:  it doesn't emulate absolutely all of the waitpid
+ *	functionality, in that it doesn't support pid's of 0
+ *	or < -1.
+ *
+ * Results:
+ *	-1 is returned if there is an error in the wait kernel call.
+ *	Otherwise the pid of an exited or suspended process is
+ *	returned and *statusPtr is set to the status value of the
+ *	process.
+ *
+ * Side effects:
+ *	None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+#ifdef waitpid
+#   undef waitpid
+#endif
+
+int
+waitpid(pid, statusPtr, options)
+    int pid;			/* The pid to wait on.  Must be -1 or
+				 * greater than zero. */
+    int *statusPtr;		/* Where to store wait status for the
+				 * process. */
+    int options;		/* OR'ed combination of WNOHANG and
+				 * WUNTRACED. */
+{
+    register WaitInfo *waitPtr, *prevPtr;
+    int result;
+    WAIT_STATUS_TYPE status;
+
+    if ((pid < -1) || (pid == 0)) {
+	errno = EINVAL;
+	return -1;
+    }
+
+    /*
+     * See if there's a suitable process that has already stopped or
+     * exited. If so, remove it from the list of exited processes and
+     * return its information.
+     */
+
+    for (waitPtr = deadList, prevPtr = NULL; waitPtr != NULL;
+	    prevPtr = waitPtr, waitPtr = waitPtr->nextPtr) {
+	if ((pid != waitPtr->pid) && (pid != -1)) {
+	    continue;
+	}
+	if (!(options & WUNTRACED) && (WIFSTOPPED(waitPtr->status))) {
+	    continue;
+	}
+	result = waitPtr->pid;
+	*statusPtr = *((int *) &waitPtr->status);
+	if (prevPtr == NULL) {
+	    deadList = waitPtr->nextPtr;
+	} else {
+	    prevPtr->nextPtr = waitPtr->nextPtr;
+	}
+	ckfree((char *) waitPtr);
+	return result;
+    }
+
+    /*
+     * Wait for any process to stop or exit.  If it's an acceptable one
+     * then return it to the caller;  otherwise store information about it
+     * in the list of exited processes and try again.  On systems that
+     * have only wait but not wait3, there are several situations we can't
+     * handle, but we do the best we can (e.g. can still handle some
+     * combinations of options by invoking wait instead of wait3).
+     */
+
+    while (1) {
+#if NO_WAIT3
+	if (options & WNOHANG) {
+	    return 0;
+	}
+	if (options != 0) {
+	    errno = EINVAL;
+	    return -1;
+	}
+	result = wait(&status);
+#else
+	result = wait3(&status, options, 0);
+#endif
+	if ((result == -1) && (errno == EINTR)) {
+	    continue;
+	}
+	if (result <= 0) {
+	    return result;
+	}
+
+	if ((pid != result) && (pid != -1)) {
+	    goto saveInfo;
+	}
+	if (!(options & WUNTRACED) && (WIFSTOPPED(status))) {
+	    goto saveInfo;
+	}
+	*statusPtr = *((int *) &status);
+	return result;
+
+	/*
+	 * Can't return this info to caller.  Save it in the list of
+	 * stopped or exited processes.  Tricky point: first check for
+	 * an existing entry for the process and overwrite it if it
+	 * exists (e.g. a previously stopped process might now be dead).
+	 */
+
+	saveInfo:
+	for (waitPtr = deadList; waitPtr != NULL; waitPtr = waitPtr->nextPtr) {
+	    if (waitPtr->pid == result) {
+		waitPtr->status = status;
+		goto waitAgain;
+	    }
+	}
+	waitPtr = (WaitInfo *) ckalloc(sizeof(WaitInfo));
+	waitPtr->pid = result;
+	waitPtr->status = status;
+	waitPtr->nextPtr = deadList;
+	deadList = waitPtr;
+
+	waitAgain: continue;
+    }
+}

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/wsa_strerror.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/wsa_strerror.c	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/compat/wsa_strerror.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,144 @@
+#include <windows.h>
+#include <winsock.h>
+
+char *
+wsa_strerror(error)
+    int error;
+{
+    switch (error) {
+    /*
+     * Windows Sockets definitions of regular Microsoft C error constants
+     */
+    case WSAEINTR:
+	return "Winsock call interrupted.";
+    case WSAEBADF:
+	return "Bad file in call to Winsock.";
+    case WSAEACCES:
+	return "Bad access in call to Winsock.";
+    case WSAEFAULT:
+	return "Bad argument in call to Winsock.";
+    case WSAEINVAL:
+	return "Invalid call to Winsock.";
+    case WSAEMFILE:
+	return "Out of file descriptors in call to Winsock.";
+
+    /*
+     * Windows Sockets definitions of regular Berkeley error constants
+     */
+    case WSAEWOULDBLOCK:
+	return "Winsock call would block.";
+    case WSAEINPROGRESS:
+	return "Blocking call to Winsock in progress.";
+    case WSAEALREADY:
+	return "Winsock call already?";
+    case WSAENOTSOCK:
+	return "Descriptor is not a socket.";
+    case WSAEDESTADDRREQ:
+	return "Need destination address in call to Winsock.";
+    case WSAEMSGSIZE:
+	return "Bad message size in call to Winsock.";
+    case WSAEPROTOTYPE:
+	return "Bad protocol in call to Winsock.";
+    case WSAENOPROTOOPT:
+	return "Protocol option is unsupported in call to Winsock.";
+    case WSAEPROTONOSUPPORT:
+	return "Protocol is unsupported in call to Winsock.";
+    case WSAESOCKTNOSUPPORT:
+	return "Socket is unsupported by Winsock.";
+    case WSAEOPNOTSUPP:
+	return "Operation not supported in call to Winsock.";
+    case WSAEPFNOSUPPORT:
+	return "Address family not supported this protocol in Winsock.";
+    case WSAEADDRINUSE:
+	return "Address already in use in call to Winsock.";
+    case WSAEADDRNOTAVAIL:
+        return "Address not available in call to Winsock.";
+    case WSAENETDOWN:
+	return "Network subsystem has failed in call to Winsock.";
+    case WSAENETUNREACH:
+	return "Network is unreachable in call to Winsock.";
+    case WSAENETRESET:
+	return "Network has been reset in call to Winsock.";
+    case WSAECONNABORTED:
+	return "Connection was apported in call to Winsock.";
+    case WSAECONNRESET:
+	return "Connection was reset in call to Winsock.";
+    case WSAENOBUFS:
+	return "No buffer space is available in call to Winsock.";
+    case WSAEISCONN:
+	return "Socket is already connected in call to Winsock.";
+    case WSAENOTCONN:
+	return "Socket is not connected in call to Winsock.";
+    case WSAESHUTDOWN:
+	return "Socket has been shut down in call to Winsock.";
+    case WSAETOOMANYREFS:
+	return "Too many references in call to Winsock.";
+    case WSAETIMEDOUT:
+	return "Timed out in call to Winsock.";
+    case WSAECONNREFUSED:
+	return "Connection refused";
+    case WSAELOOP:
+	return "Loop in call to Winsock.";
+    case WSAENAMETOOLONG:
+	return "Name too long in call to Winsock.";
+    case WSAEHOSTDOWN:
+	return "Host is down in call to Winsock.";
+    case WSAEHOSTUNREACH:
+	return "Host is unreachable in call to Winsock.";
+    case WSAENOTEMPTY:
+	return "Not empty in call to Winsock.";
+    case WSAEPROCLIM:
+	return "Proclim? in call to Winsock.";
+    case WSAEUSERS:
+	return "Users? in call to Winsock.";
+    case WSAEDQUOT:
+	return "Bad quote? in call to Winsock.";
+    case WSAESTALE:
+	return "Something is stale in call to Winsock.";
+    case WSAEREMOTE:
+	return "Remote error in call to Winsock.";
+    case WSAEDISCON:
+	return "Disconnected in call to Winsock.";
+	
+    /*
+     * Extended Windows Sockets error constant definitions
+     */
+    case WSASYSNOTREADY:
+	return "Winsock library is not yet ready for use.";
+    case WSAVERNOTSUPPORTED:
+	return "Winsock version not supported.";
+    case WSANOTINITIALISED:
+	return "Winsock library has not been initalized before use.";
+
+    /*
+     * Error return codes from gethostbyname() and gethostbyaddr()
+     * (when using the resolver). Note that these errors are
+     * retrieved via WSAGetLastError() and must therefore follow
+     * the rules for avoiding clashes with error numbers from
+     * specific implementations or language run-time systems.
+     * For this reason the codes are based at WSABASEERR+1001.
+     * Note also that [WSA]NO_ADDRESS is defined only for
+     * compatibility purposes.
+     */
+
+    /* Authoritative Answer: Host not found */
+    case WSAHOST_NOT_FOUND:
+	return "Host not found.";
+
+    /* Non-Authoritative: Host not found, or SERVERFAIL */
+    case WSATRY_AGAIN:
+	return "Host not found, try again.";
+
+    /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
+    case WSANO_RECOVERY:
+	return "Unrecoverable error in call to nameserver.";
+
+    /* Valid name, no data record of requested type */
+    case WSANO_DATA:
+	return "No data record of requested type.";
+
+    default:
+	return strerror(error);
+    }
+}
+

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/dirent.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/dirent.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/dirent.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,56 @@
+/* 
+ * @(#) dirent.h 2.0 17 Jun 91   Public Domain. 
+ * 
+ *  A public domain implementation of BSD directory routines for 
+ *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael at garfield), 
+ *  August 1987 
+ * 
+ *  Enhanced and ported to OS/2 by Kai Uwe Rommel; added scandir() prototype 
+ *  December 1989, February 1990 
+ *  Change of MAXPATHLEN for HPFS, October 1990 
+ *   
+ *  Unenhanced and ported to Windows NT by Bill Gallagher 
+ *  17 Jun 91 
+ *  changed d_name to char * instead of array, removed non-std extensions 
+ *  
+ *  Cleanup, other hackery, Summer '92, Brian Moran , brianmo at microsoft.com 
+ */ 
+
+#ifndef _DIRENT
+#define _DIRENT
+
+#include <direct.h>
+
+struct dirent 
+{ 
+    ino_t    d_ino;                   /* a bit of a farce */ 
+    short    d_reclen;                /* more farce */ 
+    short    d_namlen;                /* length of d_name */ 
+    char    *d_name;
+}; 
+ 
+struct _dircontents 
+{ 
+    char *_d_entry; 
+    struct _dircontents *_d_next; 
+}; 
+ 
+typedef struct _dirdesc 
+{ 
+    int  dd_id;			   /* uniquely identify each open directory*/ 
+    long dd_loc;			/* where we are in directory entry */ 
+    struct _dircontents *dd_contents;	/* pointer to contents of dir */ 
+    struct _dircontents *dd_cp;		/* pointer to current position */ 
+} 
+DIR; 
+ 
+extern DIR *opendir(char *); 
+extern struct dirent *readdir(DIR *); 
+extern void seekdir(DIR *, long); 
+extern long telldir(DIR *); 
+extern void closedir(DIR *); 
+#define rewinddir(dirp) seekdir(dirp, 0L) 
+
+#endif /* _DIRENT */
+
+/* end of dirent.h */ 

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/glutil.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/glutil.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/glutil.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,23 @@
+#define GLHOME "SOFTWARE\\GRASSLAND\\HOME"
+#define GLINFO "SOFTWARE\\GRASSLAND\\INFO"
+#define APPLICATION_NAME "GRASSLAND"
+#define APPLICATION_USER_HOME "USRHOME"
+#define APPLICATION_USER_GISRC "GISRC"
+#define APPLICATION_USER_GISBASE "GISBASE"
+
+
+
+/* PROTOTYPE */
+char *getGLenv(void);
+char *getUSRHOMEenv(void);
+char *getGISRCenv();
+char *getGISBASEenv();
+int remove_dir(char *path);
+char *ConvertFStoBSString(char *in);
+char *ConvertBStoFSString(char *in);
+
+int bCreate_status_d_text(char *text1,char *text2);
+int bUpdate_status_d_text(char *text1,char *text2);
+int bIs_status_d_Cancel_checked();
+void close_status_d();
+

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/netconfig.h
===================================================================

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/ogdi_macro.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/ogdi_macro.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/ogdi_macro.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,53 @@
+/*										*/
+/*  Macro to use for win32 platform. It adds basic hooks to some functions,	*/
+/* and check their returned result messages for errors.				*/
+/*										*/
+
+#include <signal.h>
+#include <stdio.h>
+
+
+// On win32 env we dont have IXDR_PUT_INT32.
+#define IXDR_PUT_INT32(buf, v)		(*(buf)++ = (long)htonl((u_long)v))
+
+#define ogdi_IXDR_PUT_LONG(buf, v) { \
+	    long ZF = ((long)IXDR_PUT_INT32(buf, (long)(v))); \
+	    ZF = ZF; \
+	    } 
+
+#define ogdi_IXDR_PUT_U_LONG(buf, v)  	ogdi_IXDR_PUT_LONG(buf, (long)(v))
+
+
+// Hook fread/fwrite/fgets/system. Check returns for errors and print tham verbose if any.
+
+#define ogdi_read(p,s,fp)   { \
+        unsigned int ZF = read(p,s,fp); \
+            if (ZF == -1 ) \
+                printf("Error: read error\n"); \
+                               }
+
+#define ogdi_fread(p,s,n,fp)   { \
+        unsigned int ZF = fread(p,s,n,fp); \
+            if (ZF != (unsigned) (n)) \
+                printf("Error: fread found %d bytes, not %d at %d\n", ZF, (int)(n), (int) ftell(fp)); \
+                               }
+
+#define ogdi_fwrite(p,s,n,fp) { \
+	unsigned int ZF = fwrite(p,s,n,fp); \
+            if (ZF != (unsigned) (n)) \
+                printf("Error: fwrite wrote %d bytes, not %d at %d\n", ZF, (int)(n), (int) ftell(fp)); \
+                              }
+
+#define ogdi_fgets(p,n,fp) { \
+        void *ZF = fgets(p,n,fp); \
+             if (ZF == NULL) \
+                printf("Error: fgets seek error at %d byte\n",  (int)(n)); \
+                              }
+
+#define ogdi_system(fp) { \
+	int ZF = system(fp); \
+           if (WIFSIGNALED(ZF) && \
+              (WTERMSIG(ZF) == SIGINT || WTERMSIG(ZF) == SIGQUIT)) \
+	            printf("Error: shell not found or command error.\n"); \
+                              }
+

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/auth.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/auth.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/auth.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,190 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)auth.h	2.3 88/08/07 4.0 RPCSRC; from 1.17 88/02/08 SMI */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+
+/*
+ * auth.h, Authentication interface.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ *
+ * The data structures are completely opaque to the client.  The client
+ * is required to pass a AUTH * to routines that create rpc
+ * "sessions".
+ */
+
+#ifndef __AUTH_HEADER__
+#define __AUTH_HEADER__
+
+#define MAX_AUTH_BYTES	400
+#define MAXNETNAMELEN	255	/* maximum length of network user's name */
+
+/*
+ * Status returned from authentication check
+ */
+enum auth_stat {
+	AUTH_OK=0,
+	/*
+	 * failed at remote end
+	 */
+	AUTH_BADCRED=1,			/* bogus credentials (seal broken) */
+	AUTH_REJECTEDCRED=2,		/* client should begin new session */
+	AUTH_BADVERF=3,			/* bogus verifier (seal broken) */
+	AUTH_REJECTEDVERF=4,		/* verifier expired or was replayed */
+	AUTH_TOOWEAK=5,			/* rejected due to security reasons */
+	/*
+	 * failed locally
+	*/
+	AUTH_INVALIDRESP=6,		/* bogus response verifier */
+	AUTH_FAILED=7			/* some unknown reason */
+};
+
+#if (mc68000 || sparc || vax || i386)
+typedef u_long u_int32;	/* 32-bit unsigned integers */
+
+union des_block {
+	struct {
+		u_int32 high;
+		u_int32 low;
+	} key;
+	char c[8];
+};
+#else
+union des_block {
+        struct {
+                u_long high;
+                u_long low;
+        } key;
+        char c[8];
+};
+#endif
+typedef union des_block des_block;
+extern bool_t xdr_des_block();
+
+/*
+ * Authentication info.  Opaque to client.
+ */
+struct opaque_auth {
+	enum_t	oa_flavor;		/* flavor of auth */
+	caddr_t	oa_base;		/* address of more auth stuff */
+	u_int	oa_length;		/* not to exceed MAX_AUTH_BYTES */
+};
+
+
+/*
+ * Auth handle, interface to client side authenticators.
+ */
+typedef struct {
+	struct	opaque_auth	ah_cred;
+	struct	opaque_auth	ah_verf;
+	union	des_block	ah_key;
+	struct auth_ops {
+		void	(*ah_nextverf)();
+		int	(*ah_marshal)();	/* nextverf & serialize */
+		int	(*ah_validate)();	/* validate varifier */
+		int	(*ah_refresh)();	/* refresh credentials */
+		void	(*ah_destroy)();	/* destroy this structure */
+	} *ah_ops;
+	caddr_t ah_private;
+} AUTH;
+
+
+/*
+ * Authentication ops.
+ * The ops and the auth handle provide the interface to the authenticators.
+ *
+ * AUTH	*auth;
+ * XDR	*xdrs;
+ * struct opaque_auth verf;
+ */
+#define AUTH_NEXTVERF(auth)		\
+		((*((auth)->ah_ops->ah_nextverf))(auth))
+#define auth_nextverf(auth)		\
+		((*((auth)->ah_ops->ah_nextverf))(auth))
+
+#define AUTH_MARSHALL(auth, xdrs)	\
+		((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
+#define auth_marshall(auth, xdrs)	\
+		((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
+
+#define AUTH_VALIDATE(auth, verfp)	\
+		((*((auth)->ah_ops->ah_validate))((auth), verfp))
+#define auth_validate(auth, verfp)	\
+		((*((auth)->ah_ops->ah_validate))((auth), verfp))
+
+#define AUTH_REFRESH(auth)		\
+		((*((auth)->ah_ops->ah_refresh))(auth))
+#define auth_refresh(auth)		\
+		((*((auth)->ah_ops->ah_refresh))(auth))
+
+#define AUTH_DESTROY(auth)		\
+		((*((auth)->ah_ops->ah_destroy))(auth))
+#define auth_destroy(auth)		\
+		((*((auth)->ah_ops->ah_destroy))(auth))
+
+
+extern struct opaque_auth _null_auth;
+
+
+/*
+ * These are the various implementations of client side authenticators.
+ */
+
+/*
+ * Unix style authentication
+ * AUTH *authunix_create(machname, uid, gid, len, aup_gids)
+ *	char *machname;
+ *	int uid;
+ *	int gid;
+ *	int len;
+ *	int *aup_gids;
+ */
+extern AUTH *authunix_create();
+extern AUTH *authunix_create_default();	/* takes no parameters */
+extern AUTH *authnone_create();		/* takes no parameters */
+extern AUTH *authdes_create();
+
+#define AUTH_NONE	0		/* no authentication */
+#define	AUTH_NULL	0		/* backward compatibility */
+#define	AUTH_UNIX	1		/* unix style (uid, gids) */
+#define	AUTH_SHORT	2		/* short hand unix style */
+#define AUTH_DES	3		/* des style (encrypted timestamps) */
+
+#endif	/* __AUTH_HEADER__ */
+

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/auth_uni.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/auth_uni.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/auth_uni.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,89 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)auth_unix.h	2.2 88/07/29 4.0 RPCSRC; from 1.8 88/02/08 SMI */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+/*      @(#)auth_unix.h 1.5 86/07/16 SMI      */
+
+/*
+ * auth_unix.h, Protocol for UNIX style authentication parameters for RPC
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ */
+
+/*
+ * The system is very weak.  The client uses no encryption for  it
+ * credentials and only sends null verifiers.  The server sends backs
+ * null verifiers or optionally a verifier that suggests a new short hand
+ * for the credentials.
+ */
+
+#ifndef __AUTH_UNIX_HEADER__
+#define __AUTH_UNIX_HEADER__
+
+/* The machine name is part of a credential; it may not exceed 255 bytes */
+#define MAX_MACHINE_NAME 255
+
+/* gids compose part of a credential; there may not be more than 16 of them */
+#define NGRPS 16
+
+/*
+ * Unix style credentials.
+ */
+struct authunix_parms {
+	u_long	 aup_time;
+	char	*aup_machname;
+	int	 aup_uid;
+	int	 aup_gid;
+	u_int	 aup_len;
+	int	*aup_gids;
+};
+
+extern bool_t xdr_authunix_parms();
+
+/* 
+ * If a response verifier has flavor AUTH_SHORT, 
+ * then the body of the response verifier encapsulates the following structure;
+ * again it is serialized in the obvious fashion.
+ */
+struct short_hand_verf {
+	struct opaque_auth new_cred;
+};
+
+#endif	/* __AUTH_UNIX_HEADER__ */
+

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/bcopy.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/bcopy.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/bcopy.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,14 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+void bcopy(char *,char*,int);
+void bcopy_nf(char *,char *,int);
+void bcopy_fn(char *,char *,int);
+void bcopy_ff(char *,char *,int);
+void bzero(char*,int);

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/clnt.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/clnt.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/clnt.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,342 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)clnt.h	2.1 88/07/29 4.0 RPCSRC; from 1.31 88/02/08 SMI*/
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+
+/*
+ * clnt.h - Client side remote procedure call interface.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ */
+
+#ifndef _CLNT_
+#define _CLNT_
+
+/*
+ * Rpc calls return an enum clnt_stat.  This should be looked at more,
+ * since each implementation is required to live with this (implementation
+ * independent) list of errors.
+ */
+enum clnt_stat {
+	RPC_SUCCESS=0,			/* call succeeded */
+	/*
+	 * local errors
+	 */
+	RPC_CANTENCODEARGS=1,		/* can't encode arguments */
+	RPC_CANTDECODERES=2,		/* can't decode results */
+	RPC_CANTSEND=3,			/* failure in sending call */
+	RPC_CANTRECV=4,			/* failure in receiving result */
+	RPC_TIMEDOUT=5,			/* call timed out */
+	/*
+	 * remote errors
+	 */
+	RPC_VERSMISMATCH=6,		/* rpc versions not compatible */
+	RPC_AUTHERROR=7,		/* authentication error */
+	RPC_PROGUNAVAIL=8,		/* program not available */
+	RPC_PROGVERSMISMATCH=9,		/* program version mismatched */
+	RPC_PROCUNAVAIL=10,		/* procedure unavailable */
+	RPC_CANTDECODEARGS=11,		/* decode arguments error */
+	RPC_SYSTEMERROR=12,		/* generic "other problem" */
+
+	/*
+	 * callrpc & clnt_create errors
+	 */
+	RPC_UNKNOWNHOST=13,		/* unknown host name */
+	RPC_UNKNOWNPROTO=17,		/* unkown protocol */
+
+	/*
+	 * _ create errors
+	 */
+	RPC_PMAPFAILURE=14,		/* the pmapper failed in its call */
+	RPC_PROGNOTREGISTERED=15,	/* remote program is not registered */
+	/*
+	 * unspecified error
+	 */
+	RPC_FAILED=16
+};
+
+
+/*
+ * Error info.
+ */
+struct rpc_err {
+	enum clnt_stat re_status;
+	union {
+		int RE_errno;		/* realated system error */
+		enum auth_stat RE_why;	/* why the auth error occurred */
+		struct {
+			u_long low;	/* lowest verion supported */
+			u_long high;	/* highest verion supported */
+		} RE_vers;
+		struct {		/* maybe meaningful if RPC_FAILED */
+			long s1;
+			long s2;
+		} RE_lb;		/* life boot & debugging only */
+	} ru;
+#define	re_errno	ru.RE_errno
+#define	re_why		ru.RE_why
+#define	re_vers		ru.RE_vers
+#define	re_lb		ru.RE_lb
+};
+
+
+/*
+ * Client rpc handle.
+ * Created by individual implementations, see e.g. rpc_udp.c.
+ * Client is responsible for initializing auth, see e.g. auth_none.c.
+ */
+typedef struct {
+	AUTH	*cl_auth;			/* authenticator */
+	struct clnt_ops {
+		enum clnt_stat	(*cl_call)();	/* call remote procedure */
+		void		(*cl_abort)();	/* abort a call */
+		void		(*cl_geterr)();	/* get specific error code */
+		bool_t		(*cl_freeres)(); /* frees results */
+		void		(*cl_destroy)();/* destroy this structure */
+		bool_t          (*cl_control)();/* the ioctl() of rpc */
+	} *cl_ops;
+	caddr_t			cl_private;	/* private stuff */
+} CLIENT;
+
+
+/*
+ * client side rpc interface ops
+ *
+ * Parameter types are:
+ *
+ */
+
+/*
+ * enum clnt_stat
+ * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)
+ * 	CLIENT *rh;
+ *	u_long proc;
+ *	xdrproc_t xargs;
+ *	caddr_t argsp;
+ *	xdrproc_t xres;
+ *	caddr_t resp;
+ *	struct timeval timeout;
+ */
+#define	CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs)	\
+	((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
+#define	clnt_call(rh, proc, xargs, argsp, xres, resp, secs)	\
+	((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
+
+/*
+ * void
+ * CLNT_ABORT(rh);
+ * 	CLIENT *rh;
+ */
+#define	CLNT_ABORT(rh)	((*(rh)->cl_ops->cl_abort)(rh))
+#define	clnt_abort(rh)	((*(rh)->cl_ops->cl_abort)(rh))
+
+/*
+ * struct rpc_err
+ * CLNT_GETERR(rh);
+ * 	CLIENT *rh;
+ */
+#define	CLNT_GETERR(rh,errp)	((*(rh)->cl_ops->cl_geterr)(rh, errp))
+#define	clnt_geterr(rh,errp)	((*(rh)->cl_ops->cl_geterr)(rh, errp))
+
+
+/*
+ * bool_t
+ * CLNT_FREERES(rh, xres, resp);
+ * 	CLIENT *rh;
+ *	xdrproc_t xres;
+ *	caddr_t resp;
+ */
+#define	CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
+#define	clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
+
+/*
+ * bool_t
+ * CLNT_CONTROL(cl, request, info)
+ *      CLIENT *cl;
+ *      u_int request;
+ *      char *info;
+ */
+#define	CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
+#define	clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
+
+/*
+ * control operations that apply to both udp and tcp transports
+ */
+#define CLSET_TIMEOUT       1   /* set timeout (timeval) */
+#define CLGET_TIMEOUT       2   /* get timeout (timeval) */
+#define CLGET_SERVER_ADDR   3   /* get server's address (sockaddr) */
+/*
+ * udp only control operations
+ */
+#define CLSET_RETRY_TIMEOUT 4   /* set retry timeout (timeval) */
+#define CLGET_RETRY_TIMEOUT 5   /* get retry timeout (timeval) */
+
+/*
+ * void
+ * CLNT_DESTROY(rh);
+ * 	CLIENT *rh;
+ */
+#define	CLNT_DESTROY(rh)	((*(rh)->cl_ops->cl_destroy)(rh))
+#define	clnt_destroy(rh)	((*(rh)->cl_ops->cl_destroy)(rh))
+
+
+/*
+ * RPCTEST is a test program which is accessable on every rpc
+ * transport/port.  It is used for testing, performance evaluation,
+ * and network administration.
+ */
+
+#define RPCTEST_PROGRAM		((u_long)1)
+#define RPCTEST_VERSION		((u_long)1)
+#define RPCTEST_NULL_PROC	((u_long)2)
+#define RPCTEST_NULL_BATCH_PROC	((u_long)3)
+
+/*
+ * By convention, procedure 0 takes null arguments and returns them
+ */
+
+#define NULLPROC ((u_long)0)
+
+/*
+ * Below are the client handle creation routines for the various
+ * implementations of client side rpc.  They can return NULL if a 
+ * creation failure occurs.
+ */
+
+/*
+ * Memory based rpc (for speed check and testing)
+ * CLIENT *
+ * clntraw_create(prog, vers)
+ *	u_long prog;
+ *	u_long vers;
+ */
+extern CLIENT *clntraw_create();
+
+
+/*
+ * Generic client creation routine. Supported protocols are "udp" and "tcp"
+ */
+extern CLIENT *
+clnt_create(/*host, prog, vers, prot*/); /*
+	char *host; 	-- hostname
+	u_long prog;	-- program number
+	u_long vers;	-- version number
+	char *prot;	-- protocol
+*/
+
+
+
+
+/*
+ * TCP based rpc
+ * CLIENT *
+ * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
+ *	struct sockaddr_in *raddr;
+ *	u_long prog;
+ *	u_long version;
+ *	register int *sockp;
+ *	u_int sendsz;
+ *	u_int recvsz;
+ */
+extern CLIENT *clnttcp_create();
+
+/*
+ * UDP based rpc.
+ * CLIENT *
+ * clntudp_create(raddr, program, version, wait, sockp)
+ *	struct sockaddr_in *raddr;
+ *	u_long program;
+ *	u_long version;
+ *	struct timeval wait;
+ *	int *sockp;
+ *
+ * Same as above, but you specify max packet sizes.
+ * CLIENT *
+ * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
+ *	struct sockaddr_in *raddr;
+ *	u_long program;
+ *	u_long version;
+ *	struct timeval wait;
+ *	int *sockp;
+ *	u_int sendsz;
+ *	u_int recvsz;
+ */
+extern CLIENT *clntudp_create();
+extern CLIENT *clntudp_bufcreate();
+
+/*
+ * Print why creation failed
+ */
+void clnt_pcreateerror(/* char *msg */);	/* stderr */
+char *clnt_spcreateerror(/* char *msg */);	/* string */
+
+/*
+ * Like clnt_perror(), but is more verbose in its output
+ */ 
+void clnt_perrno(/* enum clnt_stat num */);	/* stderr */
+
+/*
+ * Print an English error message, given the client error code
+ */
+void clnt_perror(/* CLIENT *clnt, char *msg */); 	/* stderr */
+char *clnt_sperror(/* CLIENT *clnt, char *msg */);	/* string */
+
+/* 
+ * If a creation fails, the following allows the user to figure out why.
+ */
+struct rpc_createerr {
+	enum clnt_stat cf_stat;
+	struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
+};
+
+extern struct rpc_createerr rpc_createerr;
+
+
+
+/*
+ * Copy error message to buffer.
+ */
+char *clnt_sperrno(/* enum clnt_stat num */);	/* string */
+
+
+
+#define UDPMSGSIZE	8800	/* rpc imposed limit on udp msg size */
+#define RPCSMALLMSGSIZE	400	/* a more reasonable packet size */
+
+#endif /*!_CLNT_*/

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/netdb.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/netdb.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/netdb.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,51 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)netdb.h	2.1 88/07/29 3.9 RPCSRC */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+/*	@(#)rpc.h 1.8 87/07/24 SMI	*/
+
+/* Really belongs in <netdb.h> */
+
+struct rpcent {
+      char    *r_name;        /* name of server for this rpc program */
+      char    **r_aliases;    /* alias list */
+      int     r_number;       /* rpc program number */
+};
+
+struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent();

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_cln.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_cln.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_cln.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,76 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)pmap_clnt.h	2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+
+/*
+ * pmap_clnt.h
+ * Supplies C routines to get to portmap services.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ */
+
+/*
+ * Usage:
+ *	success = pmap_set(program, version, protocol, port);
+ *	success = pmap_unset(program, version);
+ *	port = pmap_getport(address, program, version, protocol);
+ *	head = pmap_getmaps(address);
+ *	clnt_stat = pmap_rmtcall(address, program, version, procedure,
+ *		xdrargs, argsp, xdrres, resp, tout, port_ptr)
+ *		(works for udp only.) 
+ * 	clnt_stat = clnt_broadcast(program, version, procedure,
+ *		xdrargs, argsp,	xdrres, resp, eachresult)
+ *		(like pmap_rmtcall, except the call is broadcasted to all
+ *		locally connected nets.  For each valid response received,
+ *		the procedure eachresult is called.  Its form is:
+ *	done = eachresult(resp, raddr)
+ *		bool_t done;
+ *		caddr_t resp;
+ *		struct sockaddr_in raddr;
+ *		where resp points to the results of the call and raddr is the
+ *		address if the responder to the broadcast.
+ */
+
+extern bool_t		pmap_set();
+extern bool_t		pmap_unset();
+extern struct pmaplist	*pmap_getmaps();
+enum clnt_stat		pmap_rmtcall();
+enum clnt_stat		clnt_broadcast();
+extern u_short		pmap_getport();

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_clnt.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_clnt.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_clnt.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,76 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)pmap_clnt.h	2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+
+/*
+ * pmap_clnt.h
+ * Supplies C routines to get to portmap services.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ */
+
+/*
+ * Usage:
+ *	success = pmap_set(program, version, protocol, port);
+ *	success = pmap_unset(program, version);
+ *	port = pmap_getport(address, program, version, protocol);
+ *	head = pmap_getmaps(address);
+ *	clnt_stat = pmap_rmtcall(address, program, version, procedure,
+ *		xdrargs, argsp, xdrres, resp, tout, port_ptr)
+ *		(works for udp only.) 
+ * 	clnt_stat = clnt_broadcast(program, version, procedure,
+ *		xdrargs, argsp,	xdrres, resp, eachresult)
+ *		(like pmap_rmtcall, except the call is broadcasted to all
+ *		locally connected nets.  For each valid response received,
+ *		the procedure eachresult is called.  Its form is:
+ *	done = eachresult(resp, raddr)
+ *		bool_t done;
+ *		caddr_t resp;
+ *		struct sockaddr_in raddr;
+ *		where resp points to the results of the call and raddr is the
+ *		address if the responder to the broadcast.
+ */
+
+extern bool_t		pmap_set();
+extern bool_t		pmap_unset();
+extern struct pmaplist	*pmap_getmaps();
+enum clnt_stat		pmap_rmtcall();
+enum clnt_stat		clnt_broadcast();
+extern u_short		pmap_getport();

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_pro.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_pro.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_pro.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,105 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)pmap_prot.h	2.1 88/07/29 4.0 RPCSRC; from 1.14 88/02/08 SMI */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+
+/*
+ * pmap_prot.h
+ * Protocol for the local binder service, or pmap.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ *
+ * The following procedures are supported by the protocol:
+ *
+ * PMAPPROC_NULL() returns ()
+ * 	takes nothing, returns nothing
+ *
+ * PMAPPROC_SET(struct pmap) returns (bool_t)
+ * 	TRUE is success, FALSE is failure.  Registers the tuple
+ *	[prog, vers, prot, port].
+ *
+ * PMAPPROC_UNSET(struct pmap) returns (bool_t)
+ *	TRUE is success, FALSE is failure.  Un-registers pair
+ *	[prog, vers].  prot and port are ignored.
+ *
+ * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
+ *	0 is failure.  Otherwise returns the port number where the pair
+ *	[prog, vers] is registered.  It may lie!
+ *
+ * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
+ *
+ * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
+ * 	RETURNS (port, string<>);
+ * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
+ * 	Calls the procedure on the local machine.  If it is not registered,
+ *	this procedure is quite; ie it does not return error information!!!
+ *	This procedure only is supported on rpc/udp and calls via
+ *	rpc/udp.  This routine only passes null authentication parameters.
+ *	This file has no interface to xdr routines for PMAPPROC_CALLIT.
+ *
+ * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
+ */
+
+#define PMAPPORT		((u_short)111)
+#define PMAPPROG		((u_long)100000)
+#define PMAPVERS		((u_long)2)
+#define PMAPVERS_PROTO		((u_long)2)
+#define PMAPVERS_ORIG		((u_long)1)
+#define PMAPPROC_NULL		((u_long)0)
+#define PMAPPROC_SET		((u_long)1)
+#define PMAPPROC_UNSET		((u_long)2)
+#define PMAPPROC_GETPORT	((u_long)3)
+#define PMAPPROC_DUMP		((u_long)4)
+#define PMAPPROC_CALLIT		((u_long)5)
+
+struct pmap {
+	long unsigned pm_prog;
+	long unsigned pm_vers;
+	long unsigned pm_prot;
+	long unsigned pm_port;
+};
+
+extern bool_t xdr_pmap();
+
+struct pmaplist {
+	struct pmap	pml_map;
+	struct pmaplist *pml_next;
+};
+
+extern bool_t xdr_pmaplist();

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_rmt.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_rmt.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/pmap_rmt.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,64 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)pmap_rmt.h	2.1 88/07/29 4.0 RPCSRC; from 1.2 88/02/08 SMI */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+
+/*
+ * Structures and XDR routines for parameters to and replies from
+ * the portmapper remote-call-service.
+ *
+ * Copyright (C) 1986, Sun Microsystems, Inc.
+ */
+
+struct rmtcallargs {
+	u_long prog, vers, proc, arglen;
+	caddr_t args_ptr;
+	xdrproc_t xdr_args;
+};
+
+bool_t xdr_rmtcall_args();
+
+struct rmtcallres {
+	u_long *port_ptr;
+	u_long resultslen;
+	caddr_t results_ptr;
+	xdrproc_t xdr_results;
+};
+
+bool_t xdr_rmtcallres();

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/rpc.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/rpc.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/rpc.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,108 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)rpc.h	2.3 88/08/10 4.0 RPCSRC; from 1.9 88/02/08 SMI */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+
+/*
+ * rpc.h, Just includes the billions of rpc header files necessary to
+ * do remote procedure calling.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ */
+#ifndef __RPC_HEADER__
+#define __RPC_HEADER__
+
+#ifdef WIN32
+#define FD_SETSIZE	128
+
+#include <stdlib.h>
+#include <winsock.h>
+#include <rpc/types.h>		/* some typedefs */
+#include <process.h>
+
+#define WSAerrno (WSAGetLastError())
+#define gettimeofday(tv,tz) ((tv)->tv_sec = time(0), (tv)->tv_usec = 0)
+
+extern int rpc_nt_init(void);
+extern int rpc_nt_exit(void);
+extern void nt_rpc_report();
+
+#include <rpc/bcopy.h>
+extern int xdr_opaque_auth();
+
+#else
+#include <rpc/types.h>		/* some typedefs */
+#include <netinet/in.h>
+#endif
+
+/* external data representation interfaces */
+#include <rpc/xdr.h>		/* generic (de)serializer */
+
+/* Client side only authentication */
+#include <rpc/auth.h>		/* generic authenticator (client side) */
+
+/* Client side (mostly) remote procedure call */
+#include <rpc/clnt.h>		/* generic rpc stuff */
+
+/* semi-private protocol headers */
+#include <rpc/rpc_msg.h>	/* protocol for rpc messages */
+#ifdef WIN32
+#include <rpc/auth_uni.h>	/* protocol for unix style cred */
+#else
+#include <rpc/auth_unix.h>	/* protocol for unix style cred */
+#endif
+/*
+ *  Uncomment-out the next line if you are building the rpc library with
+ *  DES Authentication (see the README file in the secure_rpc/ directory).
+ */
+/*#include <rpc/auth_des.h>	/* protocol for des style cred */
+
+/* Server side only remote procedure callee */
+#include <rpc/svc.h>		/* service manager and multiplexer */
+#include <rpc/svc_auth.h>	/* service side authenticator */
+
+/*
+ * COMMENT OUT THE NEXT INCLUDE IF RUNNING ON SUN OS OR ON A VERSION
+ * OF UNIX BASED ON NFSSRC.  These systems will already have the structures
+ * defined by <rpc/netdb.h> included in <netdb.h>.
+ */
+/* routines for parsing /etc/rpc */
+#include <rpc/netdb.h>		/* structures and routines to parse /etc/rpc */
+
+#endif /* ndef __RPC_HEADER__ */

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/rpc_msg.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/rpc_msg.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/rpc_msg.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,204 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)rpc_msg.h	2.1 88/07/29 4.0 RPCSRC */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+/*      @(#)rpc_msg.h 1.7 86/07/16 SMI      */
+
+/*
+ * rpc_msg.h
+ * rpc message definition
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ */
+
+#ifndef __RPC_MSG_HEADER__
+#define __RPC_MSG_HEADER__
+
+#define RPC_MSG_VERSION		((u_long) 2)
+#define RPC_SERVICE_PORT	((u_short) 2048)
+
+/*
+ * Bottom up definition of an rpc message.
+ * NOTE: call and reply use the same overall stuct but
+ * different parts of unions within it.
+ */
+
+enum msg_type {
+	CALL=0,
+	REPLY=1
+};
+
+enum reply_stat {
+	MSG_ACCEPTED=0,
+	MSG_DENIED=1
+};
+
+enum accept_stat {
+	SUCCESS=0,
+	PROG_UNAVAIL=1,
+	PROG_MISMATCH=2,
+	PROC_UNAVAIL=3,
+	GARBAGE_ARGS=4,
+	SYSTEM_ERR=5
+};
+
+enum reject_stat {
+	RPC_MISMATCH=0,
+	AUTH_ERROR=1
+};
+
+/*
+ * Reply part of an rpc exchange
+ */
+
+/*
+ * Reply to an rpc request that was accepted by the server.
+ * Note: there could be an error even though the request was
+ * accepted.
+ */
+struct accepted_reply {
+	struct opaque_auth	ar_verf;
+	enum accept_stat	ar_stat;
+	union {
+		struct {
+			u_long	low;
+			u_long	high;
+		} AR_versions;
+		struct {
+			caddr_t	where;
+			xdrproc_t proc;
+		} AR_results;
+		/* and many other null cases */
+	} ru;
+#define	ar_results	ru.AR_results
+#define	ar_vers		ru.AR_versions
+};
+
+/*
+ * Reply to an rpc request that was rejected by the server.
+ */
+struct rejected_reply {
+	enum reject_stat rj_stat;
+	union {
+		struct {
+			u_long low;
+			u_long high;
+		} RJ_versions;
+		enum auth_stat RJ_why;  /* why authentication did not work */
+	} ru;
+#define	rj_vers	ru.RJ_versions
+#define	rj_why	ru.RJ_why
+};
+
+/*
+ * Body of a reply to an rpc request.
+ */
+struct reply_body {
+	enum reply_stat rp_stat;
+	union {
+		struct accepted_reply RP_ar;
+		struct rejected_reply RP_dr;
+	} ru;
+#define	rp_acpt	ru.RP_ar
+#define	rp_rjct	ru.RP_dr
+};
+
+/*
+ * Body of an rpc request call.
+ */
+struct call_body {
+	u_long cb_rpcvers;	/* must be equal to two */
+	u_long cb_prog;
+	u_long cb_vers;
+	u_long cb_proc;
+	struct opaque_auth cb_cred;
+	struct opaque_auth cb_verf; /* protocol specific - provided by client */
+};
+
+/*
+ * The rpc message
+ */
+struct rpc_msg {
+	u_long			rm_xid;
+	enum msg_type		rm_direction;
+	union {
+		struct call_body RM_cmb;
+		struct reply_body RM_rmb;
+	} ru;
+#define	rm_call		ru.RM_cmb
+#define	rm_reply	ru.RM_rmb
+};
+#define	acpted_rply	ru.RM_rmb.ru.RP_ar
+#define	rjcted_rply	ru.RM_rmb.ru.RP_dr
+
+
+/*
+ * XDR routine to handle a rpc message.
+ * xdr_callmsg(xdrs, cmsg)
+ * 	XDR *xdrs;
+ * 	struct rpc_msg *cmsg;
+ */
+extern bool_t	xdr_callmsg();
+
+/*
+ * XDR routine to pre-serialize the static part of a rpc message.
+ * xdr_callhdr(xdrs, cmsg)
+ * 	XDR *xdrs;
+ * 	struct rpc_msg *cmsg;
+ */
+extern bool_t	xdr_callhdr();
+
+/*
+ * XDR routine to handle a rpc reply.
+ * xdr_replymsg(xdrs, rmsg)
+ * 	XDR *xdrs;
+ * 	struct rpc_msg *rmsg;
+ */
+extern bool_t	xdr_replymsg();
+
+/*
+ * Fills in the error part of a reply message.
+ * _seterr_reply(msg, error)
+ * 	struct rpc_msg *msg;
+ * 	struct rpc_err *error;
+ */
+extern void	_seterr_reply();
+
+#endif	/*  __RPC_MSG_HEADER__ */
+

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/svc.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/svc.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/svc.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,291 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)svc.h	2.2 88/07/29 4.0 RPCSRC; from 1.20 88/02/08 SMI */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+
+/*
+ * svc.h, Server-side remote procedure call interface.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ */
+
+#ifndef __SVC_HEADER__
+#define __SVC_HEADER__
+
+/*
+ * This interface must manage two items concerning remote procedure calling:
+ *
+ * 1) An arbitrary number of transport connections upon which rpc requests
+ * are received.  The two most notable transports are TCP and UDP;  they are
+ * created and registered by routines in svc_tcp.c and svc_udp.c, respectively;
+ * they in turn call xprt_register and xprt_unregister.
+ *
+ * 2) An arbitrary number of locally registered services.  Services are
+ * described by the following four data: program number, version number,
+ * "service dispatch" function, a transport handle, and a boolean that
+ * indicates whether or not the exported program should be registered with a
+ * local binder service;  if true the program's number and version and the
+ * port number from the transport handle are registered with the binder.
+ * These data are registered with the rpc svc system via svc_register.
+ *
+ * A service's dispatch function is called whenever an rpc request comes in
+ * on a transport.  The request's program and version numbers must match
+ * those of the registered service.  The dispatch function is passed two
+ * parameters, struct svc_req * and SVCXPRT *, defined below.
+ */
+
+enum xprt_stat {
+	XPRT_DIED,
+	XPRT_MOREREQS,
+	XPRT_IDLE
+};
+
+/*
+ * Server side transport handle
+ */
+typedef struct {
+	int		xp_sock;
+	u_short		xp_port;	 /* associated port number */
+	struct xp_ops {
+	    bool_t	(*xp_recv)();	 /* receive incomming requests */
+	    enum xprt_stat (*xp_stat)(); /* get transport status */
+	    bool_t	(*xp_getargs)(); /* get arguments */
+	    bool_t	(*xp_reply)();	 /* send reply */
+	    bool_t	(*xp_freeargs)();/* free mem allocated for args */
+	    void	(*xp_destroy)(); /* destroy this struct */
+	} *xp_ops;
+	int		xp_addrlen;	 /* length of remote address */
+	struct sockaddr_in xp_raddr;	 /* remote address */
+	struct opaque_auth xp_verf;	 /* raw response verifier */
+	caddr_t		xp_p1;		 /* private */
+	caddr_t		xp_p2;		 /* private */
+} SVCXPRT;
+
+/*
+ *  Approved way of getting address of caller
+ */
+#define svc_getcaller(x) (&(x)->xp_raddr)
+
+/*
+ * Operations defined on an SVCXPRT handle
+ *
+ * SVCXPRT		*xprt;
+ * struct rpc_msg	*msg;
+ * xdrproc_t		 xargs;
+ * caddr_t		 argsp;
+ */
+#define SVC_RECV(xprt, msg)				\
+	(*(xprt)->xp_ops->xp_recv)((xprt), (msg))
+#define svc_recv(xprt, msg)				\
+	(*(xprt)->xp_ops->xp_recv)((xprt), (msg))
+
+#define SVC_STAT(xprt)					\
+	(*(xprt)->xp_ops->xp_stat)(xprt)
+#define svc_stat(xprt)					\
+	(*(xprt)->xp_ops->xp_stat)(xprt)
+
+#define SVC_GETARGS(xprt, xargs, argsp)			\
+	(*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
+#define svc_getargs(xprt, xargs, argsp)			\
+	(*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
+
+#define SVC_REPLY(xprt, msg)				\
+	(*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
+#define svc_reply(xprt, msg)				\
+	(*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
+
+#define SVC_FREEARGS(xprt, xargs, argsp)		\
+	(*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
+#define svc_freeargs(xprt, xargs, argsp)		\
+	(*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
+
+#define SVC_DESTROY(xprt)				\
+	(*(xprt)->xp_ops->xp_destroy)(xprt)
+#define svc_destroy(xprt)				\
+	(*(xprt)->xp_ops->xp_destroy)(xprt)
+
+
+/*
+ * Service request
+ */
+struct svc_req {
+	u_long		rq_prog;	/* service program number */
+	u_long		rq_vers;	/* service protocol version */
+	u_long		rq_proc;	/* the desired procedure */
+	struct opaque_auth rq_cred;	/* raw creds from the wire */
+	caddr_t		rq_clntcred;	/* read only cooked cred */
+	SVCXPRT	*rq_xprt;		/* associated transport */
+};
+
+
+/*
+ * Service registration
+ *
+ * svc_register(xprt, prog, vers, dispatch, protocol)
+ *	SVCXPRT *xprt;
+ *	u_long prog;
+ *	u_long vers;
+ *	void (*dispatch)();
+ *	int protocol;  /* like TCP or UDP, zero means do not register 
+ */
+extern bool_t	svc_register();
+
+/*
+ * Service un-registration
+ *
+ * svc_unregister(prog, vers)
+ *	u_long prog;
+ *	u_long vers;
+ */
+extern void	svc_unregister();
+
+/*
+ * Transport registration.
+ *
+ * xprt_register(xprt)
+ *	SVCXPRT *xprt;
+ */
+extern void	xprt_register();
+
+/*
+ * Transport un-register
+ *
+ * xprt_unregister(xprt)
+ *	SVCXPRT *xprt;
+ */
+extern void	xprt_unregister();
+
+
+
+
+/*
+ * When the service routine is called, it must first check to see if it
+ * knows about the procedure;  if not, it should call svcerr_noproc
+ * and return.  If so, it should deserialize its arguments via 
+ * SVC_GETARGS (defined above).  If the deserialization does not work,
+ * svcerr_decode should be called followed by a return.  Successful
+ * decoding of the arguments should be followed the execution of the
+ * procedure's code and a call to svc_sendreply.
+ *
+ * Also, if the service refuses to execute the procedure due to too-
+ * weak authentication parameters, svcerr_weakauth should be called.
+ * Note: do not confuse access-control failure with weak authentication!
+ *
+ * NB: In pure implementations of rpc, the caller always waits for a reply
+ * msg.  This message is sent when svc_sendreply is called.  
+ * Therefore pure service implementations should always call
+ * svc_sendreply even if the function logically returns void;  use
+ * xdr.h - xdr_void for the xdr routine.  HOWEVER, tcp based rpc allows
+ * for the abuse of pure rpc via batched calling or pipelining.  In the
+ * case of a batched call, svc_sendreply should NOT be called since
+ * this would send a return message, which is what batching tries to avoid.
+ * It is the service/protocol writer's responsibility to know which calls are
+ * batched and which are not.  Warning: responding to batch calls may
+ * deadlock the caller and server processes!
+ */
+
+extern bool_t	svc_sendreply();
+extern void	svcerr_decode();
+extern void	svcerr_weakauth();
+extern void	svcerr_noproc();
+extern void	svcerr_progvers();
+extern void	svcerr_auth();
+extern void	svcerr_noprog();
+extern void	svcerr_systemerr();
+    
+/*
+ * Lowest level dispatching -OR- who owns this process anyway.
+ * Somebody has to wait for incoming requests and then call the correct
+ * service routine.  The routine svc_run does infinite waiting; i.e.,
+ * svc_run never returns.
+ * Since another (co-existant) package may wish to selectively wait for
+ * incoming calls or other events outside of the rpc architecture, the
+ * routine svc_getreq is provided.  It must be passed readfds, the
+ * "in-place" results of a select system call (see select, section 2).
+ */
+
+/*
+ * Global keeper of rpc service descriptors in use
+ * dynamic; must be inspected before each call to select 
+ */
+#ifdef FD_SETSIZE
+extern fd_set svc_fdset;
+#define svc_fds svc_fdset.fds_bits[0]	/* compatibility */
+#else
+extern int svc_fds;
+#endif /* def FD_SETSIZE */
+
+/*
+ * a small program implemented by the svc_rpc implementation itself;
+ * also see clnt.h for protocol numbers.
+ */
+extern void rpctest_service();
+
+extern void	svc_getreq();
+extern void	svc_getreqset();	/* takes fdset instead of int */
+extern void	svc_run(); 	 /* never returns */
+
+/*
+ * Socket to use on svcxxx_create call to get default socket
+ */
+#define	RPC_ANYSOCK	-1
+
+/*
+ * These are the existing service side transport implementations
+ */
+
+/*
+ * Memory based rpc for testing and timing.
+ */
+extern SVCXPRT *svcraw_create();
+
+/*
+ * Udp based rpc.
+ */
+extern SVCXPRT *svcudp_create();
+extern SVCXPRT *svcudp_bufcreate();
+
+/*
+ * Tcp based rpc.
+ */
+extern SVCXPRT *svctcp_create();
+
+
+
+#endif /* __SVC_HEADER__ */

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/svc_auth.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/svc_auth.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/svc_auth.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,53 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)svc_auth.h	2.1 88/07/29 4.0 RPCSRC */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+/*      @(#)svc_auth.h 1.6 86/07/16 SMI      */
+
+/*
+ * svc_auth.h, Service side of rpc authentication.
+ * 
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ */
+
+
+/*
+ * Server side authenticator
+ */
+extern enum auth_stat _authenticate();

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/types.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/types.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/types.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,87 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)types.h	2.3 88/08/15 4.0 RPCSRC */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+/*      @(#)types.h 1.18 87/07/24 SMI      */
+
+/*
+ * Rpc additions to <sys/types.h>
+ */
+#ifndef __TYPES_RPC_HEADER__
+#define __TYPES_RPC_HEADER__
+
+#define	bool_t	int
+#define	enum_t	int
+#ifndef FALSE
+#define	FALSE	(0)
+#endif
+#ifndef TRUE
+#define	TRUE	(1)
+#endif
+#define __dontcare__	-1
+#ifndef NULL
+#	define NULL 0
+#endif
+
+#ifndef WIN32
+extern char *malloc();
+#endif
+#define mem_alloc	malloc
+#define mem_free(ptr, bsize)	free(ptr)
+
+#ifndef makedev /* ie, we haven't already included it */
+#include <sys/types.h>
+#endif
+#ifndef WIN32
+#include <sys/time.h>
+#endif
+
+#ifndef INADDR_LOOPBACK
+#define       INADDR_LOOPBACK         (u_long)0x7F000001
+#endif
+#ifndef MAXHOSTNAMELEN
+#define        MAXHOSTNAMELEN  64
+#endif
+
+typedef char *caddr_t;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+typedef unsigned short u_short;
+
+#endif /* ndef __TYPES_RPC_HEADER__ */

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/xdr.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/xdr.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/rpc/xdr.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,281 @@
+/*********************************************************************
+ * RPC for the Windows NT Operating System
+ * 1993 by Martin F. Gergeleit
+ * Users may use, copy or modify Sun RPC for the Windows NT Operating 
+ * System according to the Sun copyright below.
+ *
+ * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
+ * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
+ * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
+ *********************************************************************/
+
+/* @(#)xdr.h	2.2 88/07/29 4.0 RPCSRC */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ * 
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ * 
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ * 
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ * 
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ * 
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+/*      @(#)xdr.h 1.19 87/04/22 SMI      */
+
+/*
+ * xdr.h, External Data Representation Serialization Routines.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ */
+
+#ifndef __XDR_HEADER__
+#define __XDR_HEADER__
+
+/*
+ * XDR provides a conventional way for converting between C data
+ * types and an external bit-string representation.  Library supplied
+ * routines provide for the conversion on built-in C data types.  These
+ * routines and utility routines defined here are used to help implement
+ * a type encode/decode routine for each user-defined type.
+ *
+ * Each data type provides a single procedure which takes two arguments:
+ *
+ *	bool_t
+ *	xdrproc(xdrs, argresp)
+ *		XDR *xdrs;
+ *		<type> *argresp;
+ *
+ * xdrs is an instance of a XDR handle, to which or from which the data
+ * type is to be converted.  argresp is a pointer to the structure to be
+ * converted.  The XDR handle contains an operation field which indicates
+ * which of the operations (ENCODE, DECODE * or FREE) is to be performed.
+ *
+ * XDR_DECODE may allocate space if the pointer argresp is null.  This
+ * data can be freed with the XDR_FREE operation.
+ *
+ * We write only one procedure per data type to make it easy
+ * to keep the encode and decode procedures for a data type consistent.
+ * In many cases the same code performs all operations on a user defined type,
+ * because all the hard work is done in the component type routines.
+ * decode as a series of calls on the nested data types.
+ */
+
+/*
+ * Xdr operations.  XDR_ENCODE causes the type to be encoded into the
+ * stream.  XDR_DECODE causes the type to be extracted from the stream.
+ * XDR_FREE can be used to release the space allocated by an XDR_DECODE
+ * request.
+ */
+enum xdr_op {
+	XDR_ENCODE=0,
+	XDR_DECODE=1,
+	XDR_FREE=2
+};
+
+/*
+ * This is the number of bytes per unit of external data.
+ */
+#define BYTES_PER_XDR_UNIT	(4)
+#define RNDUP(x)  ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \
+		    * BYTES_PER_XDR_UNIT)
+
+/*
+ * A xdrproc_t exists for each data type which is to be encoded or decoded.
+ *
+ * The second argument to the xdrproc_t is a pointer to an opaque pointer.
+ * The opaque pointer generally points to a structure of the data type
+ * to be decoded.  If this pointer is 0, then the type routines should
+ * allocate dynamic storage of the appropriate size and return it.
+ * bool_t	(*xdrproc_t)(XDR *, caddr_t *);
+ */
+typedef	bool_t (*xdrproc_t)();
+
+/*
+ * The XDR handle.
+ * Contains operation which is being applied to the stream,
+ * an operations vector for the paticular implementation (e.g. see xdr_mem.c),
+ * and two private fields for the use of the particular impelementation.
+ */
+typedef struct {
+	enum xdr_op	x_op;		/* operation; fast additional param */
+	struct xdr_ops {
+		bool_t	(*x_getlong)();	/* get a long from underlying stream */
+		bool_t	(*x_putlong)();	/* put a long to " */
+		bool_t	(*x_getbytes)();/* get some bytes from " */
+		bool_t	(*x_putbytes)();/* put some bytes to " */
+		u_int	(*x_getpostn)();/* returns bytes off from beginning */
+		bool_t  (*x_setpostn)();/* lets you reposition the stream */
+		long *	(*x_inline)();	/* buf quick ptr to buffered data */
+		void	(*x_destroy)();	/* free privates of this xdr_stream */
+	} *x_ops;
+	caddr_t 	x_public;	/* users' data */
+	caddr_t		x_private;	/* pointer to private data */
+	caddr_t 	x_base;		/* private used for position info */
+	int		x_handy;	/* extra private word */
+} XDR;
+
+/*
+ * Operations defined on a XDR handle
+ *
+ * XDR		*xdrs;
+ * long		*longp;
+ * caddr_t	 addr;
+ * u_int	 len;
+ * u_int	 pos;
+ */
+#define XDR_GETLONG(xdrs, longp)			\
+	(*(xdrs)->x_ops->x_getlong)(xdrs, longp)
+#define xdr_getlong(xdrs, longp)			\
+	(*(xdrs)->x_ops->x_getlong)(xdrs, longp)
+
+#define XDR_PUTLONG(xdrs, longp)			\
+	(*(xdrs)->x_ops->x_putlong)(xdrs, longp)
+#define xdr_putlong(xdrs, longp)			\
+	(*(xdrs)->x_ops->x_putlong)(xdrs, longp)
+
+#define XDR_GETBYTES(xdrs, addr, len)			\
+	(*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
+#define xdr_getbytes(xdrs, addr, len)			\
+	(*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
+
+#define XDR_PUTBYTES(xdrs, addr, len)			\
+	(*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
+#define xdr_putbytes(xdrs, addr, len)			\
+	(*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
+
+#define XDR_GETPOS(xdrs)				\
+	(*(xdrs)->x_ops->x_getpostn)(xdrs)
+#define xdr_getpos(xdrs)				\
+	(*(xdrs)->x_ops->x_getpostn)(xdrs)
+
+#define XDR_SETPOS(xdrs, pos)				\
+	(*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
+#define xdr_setpos(xdrs, pos)				\
+	(*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
+
+#define	XDR_INLINE(xdrs, len)				\
+	(*(xdrs)->x_ops->x_inline)(xdrs, len)
+#define	xdr_inline(xdrs, len)				\
+	(*(xdrs)->x_ops->x_inline)(xdrs, len)
+
+#define	XDR_DESTROY(xdrs)				\
+	if ((xdrs)->x_ops->x_destroy) 			\
+		(*(xdrs)->x_ops->x_destroy)(xdrs)
+#define	xdr_destroy(xdrs)				\
+	if ((xdrs)->x_ops->x_destroy) 			\
+		(*(xdrs)->x_ops->x_destroy)(xdrs)
+
+/*
+ * Support struct for discriminated unions.
+ * You create an array of xdrdiscrim structures, terminated with
+ * a entry with a null procedure pointer.  The xdr_union routine gets
+ * the discriminant value and then searches the array of structures
+ * for a matching value.  If a match is found the associated xdr routine
+ * is called to handle that part of the union.  If there is
+ * no match, then a default routine may be called.
+ * If there is no match and no default routine it is an error.
+ */
+#define NULL_xdrproc_t ((xdrproc_t)0)
+struct xdr_discrim {
+	int	value;
+	xdrproc_t proc;
+};
+
+/*
+ * In-line routines for fast encode/decode of primitve data types.
+ * Caveat emptor: these use single memory cycles to get the
+ * data from the underlying buffer, and will fail to operate
+ * properly if the data is not aligned.  The standard way to use these
+ * is to say:
+ *	if ((buf = XDR_INLINE(xdrs, count)) == NULL)
+ *		return (FALSE);
+ *	<<< macro calls >>>
+ * where ``count'' is the number of bytes of data occupied
+ * by the primitive data types.
+ *
+ * N.B. and frozen for all time: each data type here uses 4 bytes
+ * of external representation.
+ */
+#define IXDR_GET_LONG(buf)		((long)ntohl((u_long)*(buf)++))
+#define IXDR_PUT_LONG(buf, v)		(*(buf)++ = (long)htonl((u_long)v))
+
+#define IXDR_GET_BOOL(buf)		((bool_t)IXDR_GET_LONG(buf))
+#define IXDR_GET_ENUM(buf, t)		((t)IXDR_GET_LONG(buf))
+#define IXDR_GET_U_LONG(buf)		((u_long)IXDR_GET_LONG(buf))
+#define IXDR_GET_SHORT(buf)		((short)IXDR_GET_LONG(buf))
+#define IXDR_GET_U_SHORT(buf)		((u_short)IXDR_GET_LONG(buf))
+
+#define IXDR_PUT_BOOL(buf, v)		IXDR_PUT_LONG((buf), ((long)(v)))
+#define IXDR_PUT_ENUM(buf, v)		IXDR_PUT_LONG((buf), ((long)(v)))
+#define IXDR_PUT_U_LONG(buf, v)		IXDR_PUT_LONG((buf), ((long)(v)))
+#define IXDR_PUT_SHORT(buf, v)		IXDR_PUT_LONG((buf), ((long)(v)))
+#define IXDR_PUT_U_SHORT(buf, v)	IXDR_PUT_LONG((buf), ((long)(v)))
+
+/*
+ * These are the "generic" xdr routines.
+ */
+extern bool_t	xdr_void();
+extern bool_t	xdr_int();
+extern bool_t	xdr_u_int();
+extern bool_t	xdr_long();
+extern bool_t	xdr_u_long();
+extern bool_t	xdr_short();
+extern bool_t	xdr_u_short();
+extern bool_t	xdr_bool();
+extern bool_t	xdr_enum();
+extern bool_t	xdr_array();
+extern bool_t	xdr_bytes();
+extern bool_t	xdr_opaque();
+extern bool_t	xdr_string();
+extern bool_t	xdr_union();
+extern bool_t	xdr_char();
+extern bool_t	xdr_u_char();
+extern bool_t	xdr_vector();
+extern bool_t	xdr_float();
+extern bool_t	xdr_double();
+extern bool_t	xdr_reference();
+extern bool_t	xdr_pointer();
+extern bool_t	xdr_wrapstring();
+
+/*
+ * Common opaque bytes objects used by many rpc protocols;
+ * declared here due to commonality.
+ */
+#define MAX_NETOBJ_SZ 1024 
+struct netobj {
+	u_int	n_len;
+	char	*n_bytes;
+};
+typedef struct netobj netobj;
+extern bool_t   xdr_netobj();
+
+/*
+ * These are the public routines for the various implementations of
+ * xdr streams.
+ */
+extern void   xdrmem_create();		/* XDR using memory buffers */
+extern void   xdrstdio_create();	/* XDR using stdio library */
+extern void   xdrrec_create();		/* XDR pseudo records for tcp */
+extern bool_t xdrrec_endofrecord();	/* make end of xdr record */
+extern bool_t xdrrec_skiprecord();	/* move to beginning of next record */
+extern bool_t xdrrec_eof();		/* true if no more input */
+
+#endif /* __XDR_HEADER__ */

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/stropts.h
===================================================================

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/sys/resource.h
===================================================================

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/sys/socket.h
===================================================================

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/sys/ttycom.h
===================================================================

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/syslog.h
===================================================================

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/unistd.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/unistd.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/unistd.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,19 @@
+/*
+ * unistd.h
+ */
+/*
+ * Copyright (c) 1994 Software Research Associates, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Software Research Associates not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.  Software Research
+ * Associates makes no representations about the suitability of this software
+ * for any purpose.  It is provided "as is" without express or implied
+ * warranty.
+ */
+
+#include <io.h>
\ No newline at end of file

Added: packages/ogdi-dfsg/branches/upstream/current/include/win32/values.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/include/win32/values.h	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/include/win32/values.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1 @@
+

Modified: packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/client.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/client.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/client.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -18,6 +18,9 @@
  ******************************************************************************
  *
  * $Log: client.c,v $
+ * Revision 1.16  2008/05/28 01:34:30  cbalint
+ *    * Convert this file to UTF-8
+ *
  * Revision 1.15  2007/02/19 19:31:33  cbalint
  *    Reimplement Matrix algebra under an opensource compatible license.
  *  Modified Files:
@@ -62,7 +65,7 @@
 #include "matrix.h"
 #include <assert.h>
 
-ECS_CVSID("$Id: client.c,v 1.15 2007/02/19 19:31:33 cbalint Exp $");
+ECS_CVSID("$Id: client.c,v 1.16 2008/05/28 01:34:30 cbalint Exp $");
 
 /* 
    Definitions specific to c_interface 

Deleted: packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/gmath.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/gmath.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/gmath.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,943 +0,0 @@
-/******************************************************************************
- *
- * Component: OGDI Core C API
- * Purpose: Double precision matrix inverse, allocation, multiplication,
- *          and print routines.
- * 
- ******************************************************************************
- * Derived from Numerical methods in C.
- *
- * Copyright (C) 1995 Logiciels et Applications Scientifiques (L.A.S.) Inc
- * Permission to use, copy, modify and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies, that
- * both the copyright notice and this permission notice appear in
- * supporting documentation, and that the name of L.A.S. Inc not be used 
- * in advertising or publicity pertaining to distribution of the software 
- * without specific, written prior permission. L.A.S. Inc. makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- ******************************************************************************
- *
- * $Log: gmath.c,v $
- * Revision 1.2  2001/04/09 15:04:34  warmerda
- * applied new source headers
- *
- */
-
-/* ------------------------------------------------------------------ */
-
-#include "ecs.h"
-#include "gmath.h"   /* include this header in your code too */
-
-ECS_CVSID("$Id: gmath.c,v 1.2 2001/04/09 15:04:34 warmerda Exp $");
-
-/* set stack to a large value (turbo c only)*/
-
-#ifdef __TURBOC__
-extern unsigned _stklen = 20000;
-#endif
-
-/* ------------------------------------------------------------------ */
-/*
-   GMATUTIL.C
-
-   Double precision matrix inverse, allocation, multiplication,
-   and print routines.
-
-   These use double pointers, matricies sent to these
-   routines must be allocated with alloc_matrix
-
-   Derived from Numerical methods in C
-
-   When using these routines, you must allocate your matricies
-   with alloc_matrix (double pointers).
-
-   Example:
-
-      mat=alloc_matrix( rows, cols, sizeof(double));
-
-      (this routine will exit on error)
-
-      Using,
-      double mat[50][50];
-      is not the same because this method uses single pointers not
-      double pointers.
-
-      Individual elements can be access just like regular arrays
-      eg: mat[3][4] = 3.0;
-
-      Modifications by Christian Larouche: June 1994.
-*/
-
-/*******************************************************************
-   SUBROUTINE: COPY_MATRIX - Copies a matrix from a static double
-                             Dimension array to a double pointer
-                             array allocated with alloc_matrix().
-
-   Static arrarys are allocated as follows:
-       double matrix[20][20];
-   Double pointer arrays are allocated as follows;
-       double **matrix;
-
-       matrix = alloc_matrix( cols,rows,sizeof(double) );
-
-   warning: this routine will only work if rows and cols are the
-   same as the dimensioned values if src
-*/
-
-void copy_dmatrix( dest, src, rows, cols )
-     double **dest;
-     double *src; 
-     int rows; 
-     int cols;
-{
-  int i,j;
-  
-  for( i=0; i<rows; ++i )
-    for( j=0; j<cols; ++j )
-      dest[i][j] = *(src + i*cols + j );
-}
-
-
-
-/**************************************************************************
-    SUBROUTINE: CLEAR_MATRIX - fills a matrix with zeros
-
-			 INPUT: mat - matrix
-				   rows - rows
-				   cols - cols
-                       size - size of each element (use sizeof)
-
-**************************************************************************/
-
-void clear_matrix( mat, rows, cols, size )
-     void **mat;
-     int rows; 
-     int cols; 
-     int size;
-{
-  unsigned int i,len;
-  
-  len = cols * size;
-  
-  for( i=0; (int) i<rows; ++i )
-    memset( (void *) mat[i], 0, len );
-}
-
-
-
-/**************************************************************************
-    SUBROUTINE: CLEAR_DMATRIX - fills a double precision matrix with zeros
-
-			 INPUT: mat - matrix
-				   rows - rows
-				   cols - cols
-                       size - size of each element (use sizeof)
-
-**************************************************************************/
-
-void clear_dmatrix(mat, rows, cols) 
-     double **mat;
-     int rows; 
-     int cols;
-{
-  unsigned int i,len;
-  
-  len = cols * sizeof(double);
-  
-  for( i=0; (int) i<rows; ++i )
-    memset( (void *) mat[i], 0, len );
-}
-
-
-
-/**************************************************************************
-    SUBROUTINE: CLEAR_VECTOR - Fills a vector with zeros
-
-			 INPUT: vec - vector
-				   num - number of elements
-                       size - size of each element (use sizeof)
-
-**************************************************************************/
-
-void clear_vector( vec,num,size )
-     void *vec;
-     int num; 
-     int size;
-{
-  memset( vec, 0, size*num );
-}
-
-
-/**************************************************************************
-
-   PRINT_DMATRIX SUBROUTINE (DOUBLE ONLY) - OUTPUTS MATRIX TO A FILE
-	INPUT:    mat    - dimension n,m
-	          n      - number of rows
-			m      - number of columns
-			ffout  - file pointer (use stdout for screen)
-			form   - format (const char string)
-			         eg.  " %10.3lf"
-				    if you are not sure use DEF_FMT
-			title  - character string
-
-**************************************************************************/
-
-void print_dmatrix(mat,n,m,ffout,form,title)
-     double **mat;
-     int n;
-     int m;
-     FILE *ffout;
-     char *form;
-     char *title;
-{
-  int i,j;
-  
-  fprintf(ffout,"\n          %s\n\n",title);
-  
-  for( i=0; i<n; i++)
-    {
-      for( j=0; j<m; j++)
-	fprintf(ffout,form, mat[i][j] );
-      
-      fprintf(ffout,"\n");
-    }
-  
-  fprintf(ffout,"\n");
-}
-
-
-
-/**************************************************************************
-
-   PRINT_DVECTOR SUBROUTINE (DOUBLE ONLY) - OUTPUTS VECTOR TO A FILE
-	INPUT:    vec    - dimension n
-	          n      - number of rows
-			ffout  - file pointer (use stdout for screen)
-			form   - format (const char string)
-			         eg.  " %10.3lf"
-				    if you are not sure use DEF_FMT
-			title  - character string
-
-**************************************************************************/
-
-void print_dvector(vec,n,ffout,form,title)
-     double *vec;
-     int n;
-     FILE *ffout;
-     char *form;
-     char *title;
-{
-  int i;
-  
-  fprintf(ffout,"\n   %s\n\n",title);
-  
-  for( i=0; i<n; i++)
-    {
-      fprintf(ffout,form, vec[i] );
-      fprintf(ffout,"\n");
-    }
-  fprintf(ffout,"\n");
-}
-
-
-
-
-/********************************************************************
-
-  SUBROUTINE: MULT_DMATRIX - Multiplies two matrices together
-
-		    INPUT: a_mat - first matrix
-				 arows - number of rows in a
-				 acols - number of columns in a
-				 b_mat - seconds matrix
-				 brows - number of rows in b
-				 bcols - number of rows in b
-				 c_mat - result matrix (must be dimentioned properly)
-				 op - Operations
-					 AA - a_mat * b_mat
-					 ATA - a_matT * b_mat
-					 AAT - a_mat * b_matT
-
-********************************************************************/
-
-
-int mult_dmatrix( a_mat, arow, acol, b_mat, brow, bcol, c_mat, op)
-     double **a_mat; 
-     int arow; 
-     int acol;
-     double **b_mat; 
-     int brow; 
-     int bcol;
-     double **c_mat; 
-     int op;     
-{
-  int i,j,k;
-  
-  switch( op )
-    {
-    case AA:
-      if( acol != brow )
-	{
-	  return FALSE;
-	}
-      
-      clear_dmatrix( c_mat, arow, bcol );
-
-      for( i=0; i<arow; ++i )
-	{
-	  for( j=0; j<bcol; ++j )
-	    {
-	      for( k=0; k<acol; ++k )
-		c_mat[i][j] += a_mat[i][k] * b_mat[k][j];
-	    }
-	}
-      
-      break;
-      
-    case ATA:
-      if( arow != brow )
-	{
-	  return FALSE;
-	}
-      
-      clear_dmatrix( c_mat, acol, bcol );
-      
-      for( i=0; i<acol; ++i )
-	{
-	  for( j=0; j<bcol; ++j )
-	    {
-	      for( k=0; k<arow; ++k )
-		c_mat[i][j] += a_mat[k][i] * b_mat[k][j];
-	    }
-	}
-      
-      break;
-      
-    case AAT:
-      if( acol != bcol )
-	{
-	  return FALSE;
-	}
-      
-      clear_dmatrix( c_mat, arow, brow );
-      
-      for( i=0; i<arow; ++i )
-	{
-	  for( j=0; j<brow; ++j )
-	    {
-	      for( k=0; k<acol; ++k )
-		c_mat[i][j] += a_mat[i][k] * b_mat[j][k];
-	    }
-	}
-      
-      break;
-
-    default:
-      return FALSE;
-    }
-  
-  return TRUE;
-}
-
-
-/********************************************************************
-
-  SUBROUTINE: MULT_DMATVEC - Multiplies a matrix by a vector
-
-		    INPUT: a_mat - first matrix
-				 arows - number of rows in a
-				 acols - number of columns in a
-				 b_vect - second vector
-				 brows - number of rows in b (same as acols)
-				 c_vect - result vector (must be dimenstioned arows)
-
-********************************************************************/
-
-int mult_dmatvec(a_mat, arow, acol, b_vect, brow, c_vect) 
-     double **a_mat; 
-     int arow; 
-     int acol;
-     double *b_vect; 
-     int brow; 
-     double *c_vect;
-{
-  int i,j;
-
-  if( acol != brow )
-    {
-      return FALSE;
-    }
-  
-  memset( (void *)c_vect, 0, (unsigned int) sizeof(double) * arow );
-  
-  for( i=0; i<arow; ++i )
-    {
-      for( j=0; j<acol; ++j )
-	c_vect[i] += a_mat[i][j] * b_vect[j];
-    }
-  
-  return TRUE;
-}
-
-
-/*********************************************************************
-  SUBROUTINE: INVERT_ERROR - Prints the error message of the
-  following invert_dmatrix routine
-  
-  INPUT: error number
-  */
-
-int invert_error( num )
-     int num;
-{
-  switch( num )
-    {
-    case 0:
-      return TRUE;
-      
-    case 1:
-      return FALSE;
-      
-    case 2:
-      return FALSE;
-
-    case 3:
-      return FALSE;
-      
-    case 4:
-      return FALSE;
-      
-    default:
-      return FALSE;
-    }
-  
-  return TRUE;
-}
-
-
-/* *******************************************************************
-
-     SUBROUTINE: INVERT_DMATRIX
-
-	INVERT BY CHOLESKY DECOMP
-	RETURNS A DOUBLE POINTER TO INVERTED NORMALS
-	NORMALS ARE DESTROYED
-        BUT THE WHOLE DAMNED INVERSE IS RETURNED...
-
-	RETURNS DIAGONAL ON WHICH SIGULARITY OCCURRED OR ZERO
-	IF SUCCESSFULL
-
-	N IS THE SIZE OF THE SQUARE MATRIX IF THE OFFSET WERE 1
-	INSTEAD OF ZERO  I.E. THE SIZE YOU WOULD DIMENSION IF FORTRAN
-
-     this inversion requires less memory than the above one, but
-     it is slightly slower (~1.5 times as slow)
-
-     RETURN:   0 - success
-             else one of the follwing errors will be printed - then exit
-               1 - matrix not positive definite
-               2 - Singularity
-               3 - Can't sqrt a neg. number
-               4 - Can't divide by zero
-
-
-*********************************************************************** */
-
-int invert_dmatrix(mat,n) 
-     double **mat; 
-     int n;
-{
-  int i, j, k;
-  
-  if( !n )  return(0);
-  
-  /* Check for Positive definiteness */
-  for( i = 0; i < n; i++)
-    {
-      if( mat[i][i] < 0.0)               invert_error(1);
-      if( fabs(mat[i][i]) < 1.0e-12 )    invert_error(2);
-    }
-  
-  /* Perform Choleski decomposition */
-  for( j = 0; j < n; j++)
-    {
-      for( k = 0; k < j; k++)
-	mat[j][j] -= mat[j][k]*mat[j][k];
-      
-      if( mat[j][j] < 0.0 )         invert_error(3);
-      mat[j][j] = sqrt(mat[j][j]);
-      
-      for( i = j+1; i < n; i++)
-	{
-	  for( k = 0; k < j; k++)
-	    mat[i][j] -= mat[i][k]*mat[j][k];
-	  
-	  if( fabs( mat[j][j] ) < 1.0e-12 )  invert_error(4);
-	  mat[i][j] /= mat[j][j];
-	}
-    }
-  
-  /* Inversion of lower trianglar matrix */
-   for( j = 0; j < n; j++)
-     {
-       mat[j][j] = 1.0/mat[j][j];
-       
-       for( i = j + 1; i < n; i++)
-	 {
-	   mat[i][j] = -mat[i][j]*mat[j][j]/mat[i][i];
-	   for( k = j + 1; k < i; k++)
-	     mat[i][j] -= mat[i][k]*mat[k][j]/mat[i][i];
-	 }
-     }
-  
-   /* Construction of lower trianglar inverse matrix */
-  for( j = 0; j < n; j++)
-    {
-      for( i = j; i < n; i++)
-	{
-	  mat[i][j] = mat[i][i]*mat[i][j];
-	  for( k = i + 1; k < n; k++)
-	        mat[i][j] += mat[k][i]*mat[k][j];
-	}
-    }
-  
-  /* fill upper diagonal */
-  for( i = 1; i < n; i++ )
-    {
-      for( j = 0; j < i; j++ )
-	mat[j][i] = mat[i][j];
-    }
-  
-  return(0);
-}
-/* End Invert*/
-
-
-
-
-
-
-/***********************************************************
-
-  ALLOC_MATRIX : ALLOCATES A MATRIX
-
-	    range: rows & cols
-
-	    exits IF NOT ENOUGH MEMORY
-
-  From Numerical Recipes in C
-
-  alloc_matrix first allocates an array of pointers (one for
-  each row), then for each row pointer it allocates an array
-  of double values (cols).
-
-  size - size of each element (sizeof(double))
-
-
-************************************************************/
-
-
-double **alloc_dmatrix( rows, cols )
-     int rows; 
-     int cols;    
-{
-  unsigned i,j;
-  double **m;
-  
-  if( !rows || !cols ) {
-    return NULL;
-  }
-  
-  m = (double **) malloc((unsigned) rows*sizeof(double *));
-  if( m==NULL ) {
-    return NULL;
-  }
-
-  for ( i=0; (int) i<rows; i++ ) {
-    m[i] = (double *) malloc(sizeof(double)*cols);
-    
-    if( m[i]==NULL ) {
-      for(j=0;j<i;j++)
-	free(m[j]);
-      free(m);
-      return NULL;
-    }
-  }
-  
-  return m;
-}
-
-/***********************************************************
-
-  ALLOC_MATRIX_FLOAT : ALLOCATES A MATRIX OF FLOAT ELEMENTS
-
-	    range: rows & cols
-
-	    exits IF NOT ENOUGH MEMORY
-
-  From Numerical Recipes in C
-
-  alloc_matrix first allocates an array of pointers (one for
-  each row), then for each row pointer it allocates an array
-  of float values (cols).
-
-  size - size of each element (sizeof(float))
-
-************************************************************/
-
-
-float **alloc_matrix_float( rows, cols) 
-     int rows; 
-     int cols;
-{
-  unsigned i,j;
-  float **m;
-  
-  if( !rows || !cols )
-    {
-      return NULL;
-    }
-  
-  m = (float **) malloc((unsigned) rows*sizeof(float *));
-  if( m==NULL )
-    {
-      return NULL;
-    }
-  
-  for ( i=0; (int) i<rows; i++ )
-    {
-      m[i] = (float *) malloc(sizeof(float)*cols);
-      
-      if( m[i]==NULL )
-	{
-	  for(j=0;j<i;j++)
-	    free(m[j]);
-	  free(m);
-	  return NULL;
-	}
-    }
-  
-  return m;
-}
-
-
-
-/***********************************************************
-
-  ALLOC_DMATRIX : ALLOCATES A DOUBLE MATRIX
-
-	    range: rows & cols
-
-	    exits IF NOT ENOUGH MEMORY
-
-  From Numerical Recipes in C
-
-  alloc_matrix first allocates an array of pointers (one for
-  each row), then for each row pointer it allocates an array
-  of double values (cols).
-
-  size - size of each element (sizeof(double))
-
-************************************************************/
-
-
-void **alloc_matrix( rows, cols, size )
-     int rows; 
-     int cols; 
-     int size;
-{
-  unsigned i,j;
-  void **m;
-  
-  if( !rows || !cols || !size )
-    {
-      return NULL;
-    }
-  
-  m = (void **) malloc((unsigned) rows*sizeof(void *));
-  if( m==NULL )
-    {
-      return NULL;
-    }
-  
-  for ( i=0; (int) i<rows; i++ )
-    {
-      m[i] = (void *) malloc(size*cols);
-      
-      if( m[i]==NULL )
-	{
-	  for(j=0;j<i;j++)
-	    free(m[j]);
-	  free(m);
-	  return NULL;
-	}
-    }
-  
-  return m;
-}
-
-/************************************************************
-  ALLOC_MATRIX_CHAR : ALLOCATES A CHAR MATRIX
-
-	    range: rows & cols
-
-	    exits IF NOT ENOUGH MEMORY
-
-  From Numerical Recipes in C
-
-  alloc_matrix first allocates an array of pointers (one for
-  each row), then for each row pointer it allocates an array
-  of char values (cols).
-
-  size - size of each element (sizeof(double))
-
-************************************************************/
-
-
-unsigned char **alloc_matrix_char( rows, cols )
-     int rows;
-     int cols;
-{
-  unsigned i,j;
-  unsigned char **m;
-  
-  if( !rows || !cols )
-    {
-      return NULL;
-    }
-  
-  m = (unsigned char **) malloc((unsigned) rows*sizeof(unsigned char *));
-  if( m==NULL )
-    {
-      return NULL;
-    }
-  
-  for ( i=0; (int) i<rows; i++ )
-    {
-      m[i] = (unsigned char *) malloc(sizeof(unsigned char)*cols);
-      
-      if( m[i]==NULL )
-      {
-	for(j=0;j<i;j++)
-	  free(m[j]);
-	free(m);
-	return NULL;
-      }
-    }
-  
-  return m;
-}
-
-
-
-/******************************************************************
-
-    FREE_MATRIX :  FREES A MATRIX ALLOCATED WITH ALLOC_MATRIX
-
-    From: Numerical Recipes in C
-
-******************************************************************/
-
-void free_matrix(m, rows)
-     void **m; int rows;
-{
-  int i;
-  
-  for ( i=rows-1; i>=0; i-- )
-    free( m[i] );
-  
-  if( m )
-    free( m );
-}
-
-/******************************************************************
-
-    FREE_MATRIX_CHAR :  FREES A MATRIX ALLOCATED WITH ALLOC_MATRIX
-
-    From: Numerical Recipes in C
-
-******************************************************************/
-
-unsigned char free_matrix_char(m,rows)
-     unsigned char **m;
-     int rows;
-{
-   int i;
-
-   for ( i=rows-1; i>=0; i-- )
-	  free( m[i] );
-
-   if( m )    free( m );
-
-   return 0;
-}
-
-/******************************************************************
-
-    FREE_DMATRIX :  FREES A DOUBLE MATRIX ALLOCATED WITH ALLOC_MATRIX
-
-    From: Numerical Recipes in C
-
-******************************************************************/
-
-void free_dmatrix( m, rows) 
-     double **m; int rows;
-{
-  int i;
-  
-  for ( i=rows-1; i>=0; i-- )
-    free( m[i] );
-  
-  if( m )
-    free( m );
-}
-
-/******************************************************************
-
-    FREE_MATRIX_FLOAT :  FREES A FLOAT MATRIX ALLOCATED WITH
-			 ALLOC_MATRIX_FLOAT
-
-    From: Numerical Recipes in C
-
-******************************************************************/
-
-void free_matrix_float( m, rows)
-     float **m; 
-     int rows;
-{
-  int i;
-  
-  for ( i=rows-1; i>=0; i-- )
-    free( m[i] );
-  
-  if( m )    free( m );
-}
-
-
-
-/******************************************************************
-    SUBROUTINE: ALLOC_VECTOR - Allocates a vector
-
-    INPUT:  num - number of elements
-	    size - size of each element
-
-    OUTPUT: Pointer to vector
-*/
-
-void *alloc_vector(num, size)
-     int num;
-     int size;
-{
-  void *v;
-  
-  if( !num || !size )
-    {
-      return FALSE;
-    }
-  
-  if( (v=malloc(num*size)) == NULL )
-    {
-      return FALSE;
-    }
-  
-  return(v);
-}
-
-
-/******************************************************************
-    SUBROUTINE: ALLOC_VECTOR_CHAR - Allocates a vector
-
-    INPUT:  num - number of elements
-	    size - size of each element
-
-    OUTPUT: Pointer to vector
-*/
-
-unsigned char *alloc_vector_char( num, size)
-     int num; 
-     int size;
-{
-  unsigned char *v;
-  
-  if( !num || !size )
-    {
-      return FALSE;
-    }
-  
-  if( (v=(unsigned char *)malloc(num*size)) == NULL )
-    {
-      return FALSE;
-    }
-  
-  return(v);
-}
-
-
-/******************************************************************
-    SUBROUTINE: ALLOC_VECTOR_INT - Allocates a vector
-
-    INPUT:  num - number of elements
-	    size - size of each element
-
-    OUTPUT: Pointer to vector
-*/
-
-unsigned int *alloc_vector_int(num, size)
-     int num; 
-     int size;
-{
-  unsigned int *v;
-  
-  if( !num || !size )
-    {
-      return FALSE;
-    }
-  
-  if( (v=(unsigned int *)malloc(num*size)) == NULL )
-    {
-      return FALSE;
-    }
-  
-  return(v);
-}
-
-/******************************************************************
-    SUBROUTINE: FREE_VECTOR - Frees the memory of a vector
-
-    INPUT:  v - pointer to vector
-*/
-
-void free_vector(v)
-     void *v;
-{
-  free(v);
-}
-
-/******************************************************************
-    SUBROUTINE: FREE_VECTOR_CHAR - Frees the memory of a vector
-
-    INPUT:  v - pointer to vector
-*/
-
-unsigned char free_vector_char( v )
-     unsigned char *v;
-{
-  free(v);
-  return 0;
-}
-
-/******************************************************************
-    SUBROUTINE: FREE_VECTOR_INT - Frees the memory of a vector
-
-    INPUT:  v - pointer to vector
-*/
-
-unsigned int free_vector_int( v )
-     unsigned int *v;
-{
-  free(v);
-  return 0;
-}
-

Deleted: packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/gmath.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/gmath.h	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/gmath.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,74 +0,0 @@
-/******************************************************************************
- *
- * Component: OGDI Core C API
- * Purpose: Double precision matrix inverse, allocation, multiplication,
- *          and print routines.
- * 
- ******************************************************************************
- * Derived from Numerical methods in C.
- *
- * Copyright (C) 1995 Logiciels et Applications Scientifiques (L.A.S.) Inc
- * Permission to use, copy, modify and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies, that
- * both the copyright notice and this permission notice appear in
- * supporting documentation, and that the name of L.A.S. Inc not be used 
- * in advertising or publicity pertaining to distribution of the software 
- * without specific, written prior permission. L.A.S. Inc. makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- ******************************************************************************
- *
- * $Log: gmath.h,v $
- * Revision 1.2  2001/04/09 15:04:34  warmerda
- * applied new source headers
- *
- */
-
-/* GMATUTIL.H - Header file for GMATUTIL.C
-
-   Include this file when using matrix routines
-*/
-
-#include <stdio.h>     /* for FILE structure */
-
-/* Use these for sending to matrix multiplication routines */
-#define AA   0        /* A * A */
-#define ATA  1        /* AT * A    Where: AT = transpose(A) */
-#define AAT  2        /* A * AT */
-
-#define DEF_FMT " %9.2le"      /* Useful format for mat-print */
-
-
-
-/* function prototypes */
-void copy_dmatrix( double **dest, double *src, int rows, int cols );
-void clear_matrix( void **mat, int rows, int cols, int size );
-void clear_dmatrix( double **mat, int rows, int cols );
-void clear_vector( void *vec, int num, int size );
-void print_dmatrix(double **mat,int n,int m,FILE *ffout,char *form,char *title );
-void print_dvector(double *vec,int n,FILE *ffout,char *form,char *title );
-int mult_dmatrix( double **a_mat, int arow, int acol,
-			double **b_mat, int brow, int bcol,
-			double **c_mat, int op );
-int mult_dmatvec( double **a_mat, int arow, int acol,
-			    double *b_vect, int brow, double *c_vect );
-int invert_error( int num );
-int invert_dmatrix( double **mat, int n);
-void **alloc_matrix( int rows, int cols, int size );
-double **alloc_dmatrix( int rows, int cols );
-
-float **alloc_matrix_float( int rows, int cols );
-void free_matrix_float( float **m, int rows );
-
-void free_matrix( void **m, int rows );
-void free_dmatrix( double **m, int rows );
-void *alloc_vector( int num, int size );
-void free_vector( void *v );
-
-unsigned char **alloc_matrix_char( int rows, int cols );
-unsigned char free_matrix_char( unsigned char **m, int rows );
-unsigned char *alloc_vector_char( int num, int size );
-unsigned char free_vector_char( unsigned char *v );
-unsigned int *alloc_vector_int( int num, int size );
-unsigned int free_vector_int( unsigned int *v );

Modified: packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/matrix.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/matrix.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/c-api/matrix.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -42,6 +42,9 @@
 
  /* initialize loop iterators */
  int i=0, j=0, k=0;
+
+ /* initialise result matrix */
+ mat_init( matrix_result, width_a, width_b );
   
  /* compute multiply of each elements into destination matrix  */
  for ( i = 0 ; i< height_a; i++ )
@@ -65,14 +68,17 @@
     double **matrix_result; 
 {
  /* initialize loop iterators */
-  int i=0, j=0, k=0;
+ int i=0, j=0, k=0;
 
+ /* initialise result matrix */
+ mat_init( matrix_result, width_a, width_b );
+
  /* compute multiply of each elements into destination matrix */
- for ( i = 0 ; i< height_a; i++ )
-    for ( j = 0 ; j< width_b; j++ )
-      for ( k = 0 ; k< width_a; k++ )
-	matrix_result[i][j] += matrix_a[i][k]*matrix_b[j][k];
-  return;
+ for( i=0; i<width_a; ++i )
+   for( j=0; j<width_b; ++j )
+     for( k=0; k<height_a; ++k )
+   	  matrix_result[i][j] += matrix_a[k][i] * matrix_b[k][j];
+  return;    
 }
 
 /*
@@ -194,7 +200,7 @@
  */
 double **mat_malloc(int height,int width)
 {
-  unsigned i=0;
+  int i=0;
   double **matrix=NULL;
 
     matrix = (double **)malloc(height*sizeof(double *));
@@ -204,9 +210,9 @@
 		exit(1);
 		}
 
-    for (i=0;i < width;i++) {
-        matrix[i] = (double *)malloc(width * sizeof(double));
- 	  if(matrix == NULL) {
+    for (i=0;i < height;i++) {
+        matrix[i] = (double *)malloc(width*sizeof(double));
+	  if(matrix == NULL) {
 	        printf("Allocating memory for matrix data failed. \n");
 		free(matrix);
 		exit(1);

Modified: packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/feature.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/feature.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/feature.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -17,6 +17,48 @@
  ******************************************************************************
  *
  * $Log: feature.c,v $
+ * Revision 1.16  2007/05/09 20:46:28  cbalint
+ * From: Even Rouault <even.rouault at mines-paris.org>
+ * Date: Friday 21:14:18
+ *
+ *         * fix filename case sensitivy problems (for Unix-like systems).
+ *
+ *         * fix incorrect use of sprintf in vrf_GetMetadata.
+ *
+ *         * report wgs84 instead of nad83, not sure whether that is true
+ *         for all VPF products, but at least it's correct for VMAP products
+ *         that *must* be WGS84. A better fix would be to read the VPF table
+ *         that contains this information.
+ *
+ *         * fix a few minor memory leaks and memory usage issues.
+ *
+ *         * enable XMIN, YMIN, XMAX and YMAX columns to be of type double
+ *         in EBR and FBR files (for read the VMAP2i 'MIG2i000' product).
+ *
+ *         * add .pjt and .tjt as possible extensions for join tables
+ *         (VMAP2i 'MIG2i000' product).
+ *
+ *         * fix duplicated layers report (VMAP2i 'MIG2i000' product).
+ *
+ *         * handle 'L' (Latin1) type for text files (GEOCAPI 'MIGxxx' products).
+ *
+ *         * optionnaly, convert text to UTF-8 when environment variable
+ *         CONVERT_OGDI_TXT_TO_UTF8 is defined. This part is not portable
+ *         on Windows I guess (only tested on Linux) and maybe too specific.
+ *
+ *         * enable reading of VPF products without table indexes file
+ *         (GEOCAPI 'MIG013' and 'MIG016' products). VPF norm says that when
+ *         there is a variable length field in one table, an index should exist,
+ *         but some test products don't follow this. The approach here is to read
+ *         the whole table content and build the index in memory.
+ *
+ *  Modified Files:
+ *  	ChangeLog ogdi/driver/vrf/feature.c ogdi/driver/vrf/object.c
+ *  	ogdi/driver/vrf/utils.c ogdi/driver/vrf/vrf.c
+ *  	ogdi/driver/vrf/vrfswq.c vpflib/musedir.c vpflib/strfunc.c
+ *  	vpflib/vpfbrows.c vpflib/vpfprop.c vpflib/vpfquery.c
+ *  	vpflib/vpfread.c vpflib/vpftable.c
+ *
  * Revision 1.15  2007/02/12 15:52:57  cbalint
  *
  *    Preliminary cleanup.
@@ -64,7 +106,7 @@
 #include "vrf.h"
 #include <assert.h>
 
-ECS_CVSID("$Id: feature.c,v 1.15 2007/02/12 15:52:57 cbalint Exp $");
+ECS_CVSID("$Id: feature.c,v 1.16 2007/05/09 20:46:28 cbalint Exp $");
 
 vpf_projection_type NOPROJ = {DDS, 0.0, 0.0, 0.0, 0.0, 0, 0.0, 0.0,
                               NULL, NULL, "Decimal Degrees     "};
@@ -467,6 +509,51 @@
   return TRUE;
 }
 
+
+static int vrf_get_mbr (table, prim_id, xmin, ymin, xmax, ymax)
+     vpf_table_type table;
+     int32 prim_id;
+     double *xmin;
+     double *ymin;
+     double *xmax;
+     double *ymax;
+{
+  int32 count;
+  float temp;
+  row_type row;
+
+  if (table.fp == NULL) {
+    return FALSE;
+  }
+
+  row = read_row (prim_id, table);
+
+  /* The 'DBVMAP2I' VMAP2i product has FBR tables with columns of type double instead of float */
+  /* so we must check for the type */
+  if (table.header[table_pos("XMIN",table)].type == 'F')
+  {
+    get_table_element (table_pos("XMIN",table), row, table, &temp, &count);
+    *xmin = (double) temp;
+    get_table_element (table_pos("XMAX",table), row, table, &temp, &count);
+    *xmax = (double) temp;
+    get_table_element (table_pos("YMIN",table), row, table, &temp, &count);
+    *ymin = (double) temp;
+    get_table_element (table_pos("YMAX",table), row, table, &temp, &count);
+    *ymax = (double) temp;
+  }
+  else
+  {
+    get_table_element (table_pos("XMIN",table), row, table, xmin, &count);
+    get_table_element (table_pos("XMAX",table), row, table, xmax, &count);
+    get_table_element (table_pos("YMIN",table), row, table, ymin, &count);
+    get_table_element (table_pos("YMAX",table), row, table, ymax, &count);
+  }
+
+  free_row(row,table);
+
+  return TRUE;
+}
+
 /*********************************************************************
   vrf_get_line_mbr
 
@@ -492,29 +579,8 @@
      double *xmax;
      double *ymax;
 {
-  int32 count;
-  register LayerPrivateData *lpriv = (LayerPrivateData *) layer->priv;
-  float temp;
-  row_type row;
-
-  if (lpriv->l.line.mbrTable.fp == NULL) {
-    return FALSE;
-  }
-
-  row = read_row (prim_id, lpriv->l.line.mbrTable);
-
-  get_table_element (table_pos("XMIN",lpriv->l.line.mbrTable), row, lpriv->l.line.mbrTable, &temp, &count);
-  *xmin = (double) temp;
-  get_table_element (table_pos("XMAX",lpriv->l.line.mbrTable), row, lpriv->l.line.mbrTable, &temp, &count);
-  *xmax = (double) temp;
-  get_table_element (table_pos("YMIN",lpriv->l.line.mbrTable), row, lpriv->l.line.mbrTable, &temp, &count);
-  *ymin = (double) temp;
-  get_table_element (table_pos("YMAX",lpriv->l.line.mbrTable), row, lpriv->l.line.mbrTable, &temp, &count);
-  *ymax = (double) temp;
-
-  free_row(row,lpriv->l.line.mbrTable);
-
-  return TRUE;
+  LayerPrivateData *lpriv = (LayerPrivateData *) layer->priv;
+  return vrf_get_mbr(lpriv->l.line.mbrTable, prim_id, xmin, ymin, xmax, ymax);
 }
 
 /*********************************************************************
@@ -1144,29 +1210,8 @@
      double *xmax;
      double *ymax;
 {
-  int32 count;
-  register LayerPrivateData *lpriv = (LayerPrivateData *) layer->priv;
-  float temp;
-  row_type row;
-
-  if (lpriv->l.area.mbrTable.fp == NULL) {
-    return FALSE;
-  }
-
-  row = read_row (prim_id, lpriv->l.area.mbrTable);
-
-  get_table_element (table_pos("XMIN",lpriv->l.area.mbrTable), row, lpriv->l.area.mbrTable, &temp, &count);
-  *xmin = (double) temp;
-  get_table_element (table_pos("XMAX",lpriv->l.area.mbrTable), row, lpriv->l.area.mbrTable, &temp, &count);
-  *xmax = (double) temp;
-  get_table_element (table_pos("YMIN",lpriv->l.area.mbrTable), row, lpriv->l.area.mbrTable, &temp, &count);
-  *ymin = (double) temp;
-  get_table_element (table_pos("YMAX",lpriv->l.area.mbrTable), row, lpriv->l.area.mbrTable, &temp, &count);
-  *ymax = (double) temp;
-
-  free_row(row,lpriv->l.area.mbrTable);
-
-  return TRUE;
+  LayerPrivateData *lpriv = (LayerPrivateData *) layer->priv;
+  return vrf_get_mbr(lpriv->l.area.mbrTable, prim_id, xmin, ymin, xmax, ymax);
 }
 
 
@@ -1318,6 +1363,7 @@
   for(i = 0; i < table.nfields; ++i) {
     switch(table.header[i].type) {
     case 'T':
+    case 'L':
       ptr1 = get_table_element (i, row, table, &temp1, &count);
       if ((count == 1) && (ptr1 == (char *) NULL)) {
 	lenght += 6;

Modified: packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/object.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/object.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/object.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -17,6 +17,48 @@
  ******************************************************************************
  *
  * $Log: object.c,v $
+ * Revision 1.9  2007/05/09 20:46:28  cbalint
+ * From: Even Rouault <even.rouault at mines-paris.org>
+ * Date: Friday 21:14:18
+ *
+ *         * fix filename case sensitivy problems (for Unix-like systems).
+ *
+ *         * fix incorrect use of sprintf in vrf_GetMetadata.
+ *
+ *         * report wgs84 instead of nad83, not sure whether that is true
+ *         for all VPF products, but at least it's correct for VMAP products
+ *         that *must* be WGS84. A better fix would be to read the VPF table
+ *         that contains this information.
+ *
+ *         * fix a few minor memory leaks and memory usage issues.
+ *
+ *         * enable XMIN, YMIN, XMAX and YMAX columns to be of type double
+ *         in EBR and FBR files (for read the VMAP2i 'MIG2i000' product).
+ *
+ *         * add .pjt and .tjt as possible extensions for join tables
+ *         (VMAP2i 'MIG2i000' product).
+ *
+ *         * fix duplicated layers report (VMAP2i 'MIG2i000' product).
+ *
+ *         * handle 'L' (Latin1) type for text files (GEOCAPI 'MIGxxx' products).
+ *
+ *         * optionnaly, convert text to UTF-8 when environment variable
+ *         CONVERT_OGDI_TXT_TO_UTF8 is defined. This part is not portable
+ *         on Windows I guess (only tested on Linux) and maybe too specific.
+ *
+ *         * enable reading of VPF products without table indexes file
+ *         (GEOCAPI 'MIG013' and 'MIG016' products). VPF norm says that when
+ *         there is a variable length field in one table, an index should exist,
+ *         but some test products don't follow this. The approach here is to read
+ *         the whole table content and build the index in memory.
+ *
+ *  Modified Files:
+ *  	ChangeLog ogdi/driver/vrf/feature.c ogdi/driver/vrf/object.c
+ *  	ogdi/driver/vrf/utils.c ogdi/driver/vrf/vrf.c
+ *  	ogdi/driver/vrf/vrfswq.c vpflib/musedir.c vpflib/strfunc.c
+ *  	vpflib/vpfbrows.c vpflib/vpfprop.c vpflib/vpfquery.c
+ *  	vpflib/vpfread.c vpflib/vpftable.c
+ *
  * Revision 1.8  2004/10/19 14:17:03  warmerda
  * primList leak fixed in vrf driver
  *
@@ -34,7 +76,7 @@
 #include "ecs.h"
 #include "vrf.h"
 
-ECS_CVSID("$Id: object.c,v 1.8 2004/10/19 14:17:03 warmerda Exp $");
+ECS_CVSID("$Id: object.c,v 1.9 2007/05/09 20:46:28 cbalint Exp $");
 
 /* 
 ********************************************************************
@@ -219,18 +261,20 @@
       row = get_row(object_id+1, lpriv->featureTable);
       *feature_id = object_id+1;
       if (*tile_id != 1) {
-	pos = table_pos("TILE_ID",lpriv->featureTable);
-	if (pos != -1) {
-	  get_table_element(pos, row, lpriv->featureTable, tile_id, &count);
-	} else {
-	  return;
-	}
+        pos = table_pos("TILE_ID",lpriv->featureTable);
+        if (pos != -1) {
+          get_table_element(pos, row, lpriv->featureTable, tile_id, &count);
+        } else {
+          free_row(row, lpriv->featureTable);
+          return;
+        }
       }
       pos = table_pos(lpriv->featureTablePrimIdName,lpriv->featureTable);
       if (pos != -1) {
-	get_table_element(pos, row, lpriv->featureTable, prim_id, &count);
+        get_table_element(pos, row, lpriv->featureTable, prim_id, &count);
       } else {
-	return;
+        free_row(row, lpriv->featureTable);
+        return;
       }
       free_row(row, lpriv->featureTable);
     }

Modified: packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/utils.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/utils.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/utils.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -17,6 +17,51 @@
  ******************************************************************************
  *
  * $Log: utils.c,v $
+ * Revision 1.18  2008/05/28 00:18:21  cbalint
+ *    * fix minor printf format gcc warnings.
+ *
+ * Revision 1.17  2007/05/09 20:46:28  cbalint
+ * From: Even Rouault <even.rouault at mines-paris.org>
+ * Date: Friday 21:14:18
+ *
+ *         * fix filename case sensitivy problems (for Unix-like systems).
+ *
+ *         * fix incorrect use of sprintf in vrf_GetMetadata.
+ *
+ *         * report wgs84 instead of nad83, not sure whether that is true
+ *         for all VPF products, but at least it's correct for VMAP products
+ *         that *must* be WGS84. A better fix would be to read the VPF table
+ *         that contains this information.
+ *
+ *         * fix a few minor memory leaks and memory usage issues.
+ *
+ *         * enable XMIN, YMIN, XMAX and YMAX columns to be of type double
+ *         in EBR and FBR files (for read the VMAP2i 'MIG2i000' product).
+ *
+ *         * add .pjt and .tjt as possible extensions for join tables
+ *         (VMAP2i 'MIG2i000' product).
+ *
+ *         * fix duplicated layers report (VMAP2i 'MIG2i000' product).
+ *
+ *         * handle 'L' (Latin1) type for text files (GEOCAPI 'MIGxxx' products).
+ *
+ *         * optionnaly, convert text to UTF-8 when environment variable
+ *         CONVERT_OGDI_TXT_TO_UTF8 is defined. This part is not portable
+ *         on Windows I guess (only tested on Linux) and maybe too specific.
+ *
+ *         * enable reading of VPF products without table indexes file
+ *         (GEOCAPI 'MIG013' and 'MIG016' products). VPF norm says that when
+ *         there is a variable length field in one table, an index should exist,
+ *         but some test products don't follow this. The approach here is to read
+ *         the whole table content and build the index in memory.
+ *
+ *  Modified Files:
+ *  	ChangeLog ogdi/driver/vrf/feature.c ogdi/driver/vrf/object.c
+ *  	ogdi/driver/vrf/utils.c ogdi/driver/vrf/vrf.c
+ *  	ogdi/driver/vrf/vrfswq.c vpflib/musedir.c vpflib/strfunc.c
+ *  	vpflib/vpfbrows.c vpflib/vpfprop.c vpflib/vpfquery.c
+ *  	vpflib/vpfread.c vpflib/vpftable.c
+ *
  * Revision 1.16  2004/10/26 19:57:36  warmerda
  * Fixed problem where "reg" regular expression was freed, but the change
  * was not recognised since compiled was not being reset.  Got rid of
@@ -48,10 +93,12 @@
  *
  */
 
+#include <stdarg.h>
 #include "ecs.h"
 #include "vrf.h"
+#include "vpfprop.h"
 
-ECS_CVSID("$Id: utils.c,v 1.16 2004/10/26 19:57:36 warmerda Exp $");
+ECS_CVSID("$Id: utils.c,v 1.18 2008/05/28 00:18:21 cbalint Exp $");
 
 #ifdef _WINDOWS
 #define SEPARATOR '\\'
@@ -346,12 +393,13 @@
   int count;
   int i,j;
   int found  = 0;
-  row_type row;
+  row_type row, row2;
   char code;
   register ServerPrivateData *spriv = s->priv;
-  FILE *tempfile;
   char tempfilename[100];
   int isJointed;
+  int feature_class_pos, table1_pos, table1_key_pos, table2_pos, table2_key_pos;
+  static const char* extJointTables[] = { ".pjt", ".ajt", ".ljt", ".rjt", ".njt", ".tjt"};
 
   sprintf(buffer,"%s/%s/fcs",spriv->library,lpriv->coverage);
   if (muse_access(buffer,0) != 0) {
@@ -374,92 +422,73 @@
     return 0;
 
   }
+
+  feature_class_pos = table_pos("FEATURE_CLASS", lpriv->fcsTable);
+  table1_pos = table_pos("TABLE1", lpriv->fcsTable);
+  table1_key_pos = table_pos("TABLE1_KEY", lpriv->fcsTable);
+  table2_pos = table_pos("TABLE2", lpriv->fcsTable);
+  table2_key_pos = table_pos("TABLE2_KEY", lpriv->fcsTable);
   
   for (i = 1; i <= lpriv->fcsTable.nrows && !found; ++i) {
     row = get_row(i, lpriv->fcsTable);
-    buf1 = justify((char*)get_table_element(1, row, lpriv->fcsTable, NULL, &count));
+    buf1 = justify((char*)get_table_element(feature_class_pos, row, lpriv->fcsTable, NULL, &count));
     if (stricmp(buf1,lpriv->fclass) == 0) {
       found = 1;
       
       /* Check if a join table exist and get it's name */
       
-      isJointed = TRUE;
-      strcpy(tempfilename,lpriv->fclass);
-      strcat(tempfilename,".ajt");
-      sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,tempfilename);
-      if ((tempfile = fopen(buffer,"r")) == NULL) {
-	strcpy(tempfilename,lpriv->fclass);
-	strcat(tempfilename,".AJT");
-	sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,tempfilename);
-	if ((tempfile = fopen(buffer,"r")) == NULL) {
-	  strcpy(tempfilename,lpriv->fclass);
-	  strcat(tempfilename,".ljt");
-	  sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,tempfilename);
-	  if ((tempfile = fopen(buffer,"r")) == NULL) {
-	    strcpy(tempfilename,lpriv->fclass);
-	    strcat(tempfilename,".LJT");
-	    sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,tempfilename);
-	    if ((tempfile = fopen(buffer,"r")) == NULL) {
-	      strcpy(tempfilename,lpriv->fclass);
-	      strcat(tempfilename,".rjt");
-	      sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,tempfilename);
-	      if ((tempfile = fopen(buffer,"r")) == NULL) {
-		strcpy(tempfilename,lpriv->fclass);
-		strcat(tempfilename,".RJT");
-		sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,tempfilename);
-		if ((tempfile = fopen(buffer,"r")) == NULL) {
-		  strcpy(tempfilename,lpriv->fclass);
-		  strcat(tempfilename,".njt");
-		  sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,tempfilename);
-		  if ((tempfile = fopen(buffer,"r")) == NULL) {
-		    strcpy(tempfilename,lpriv->fclass);
-		    strcat(tempfilename,".NJT");
-		    sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,tempfilename);
-		    if ((tempfile = fopen(buffer,"r")) == NULL) {
-		      isJointed = FALSE;
-		    }
-		  }
-		}
-	      }
-	    }
-	  }
-	}
+      isJointed = FALSE;
+      for(j=0;j<sizeof(extJointTables) / sizeof(char*);j++)
+      {
+        strcpy(tempfilename,lpriv->fclass);
+        strcat(tempfilename,extJointTables[j]);
+        sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,tempfilename);
+        if (muse_access(buffer,0) == 0)
+        {
+          isJointed = TRUE;
+          break;
+        }
       }
-      if (tempfile != NULL)
-	fclose(tempfile);
-      
+
       /* Access information in fcs */
       
-      lpriv->featureTableName = justify((char *)get_table_element(2, row, 
+      lpriv->featureTableName = justify((char *)get_table_element(table1_pos, row,
 								  lpriv->fcsTable, NULL, &count));
-      lpriv->primitiveTableName = justify((char *)get_table_element(4, row, 
+      lpriv->primitiveTableName = justify((char *)get_table_element(table2_pos, row,
 								    lpriv->fcsTable, NULL, &count));
       code = lpriv->primitiveTableName[strlen(lpriv->primitiveTableName)-2];
       
       if (isJointed) {
 	if ( (code == 'j') || (code == 'J')) {
 	  free(lpriv->primitiveTableName);
-	  lpriv->joinTableName = justify((char *)get_table_element(4, row, 
+      lpriv->primitiveTableName = NULL;
+      lpriv->joinTableName = justify((char *)get_table_element(table2_pos, row,
 								   lpriv->fcsTable, NULL, &count));
-	  lpriv->joinTableForeignKeyName = justify((char *)get_table_element(3, row, 
+      lpriv->joinTableForeignKeyName = justify((char *)get_table_element(table1_key_pos, row,
 									     lpriv->fcsTable, NULL, &count));
-	  lpriv->joinTableFeatureIdName = justify((char *)get_table_element(5, row, 
+      lpriv->joinTableFeatureIdName = justify((char *)get_table_element(table2_key_pos, row,
 									    lpriv->fcsTable, NULL, &count));
-	  for (j = i+1; j <= lpriv->fcsTable.nrows; ++j) {
-	    row = get_row(j, lpriv->fcsTable);
+      for (j = i+1; j <= lpriv->fcsTable.nrows && lpriv->primitiveTableName == NULL; ++j) {
+	    row2 = get_row(j, lpriv->fcsTable);
 	    
-	    buf2 = justify((char*)get_table_element(2, row, lpriv->fcsTable, NULL, &count));
-	    buf3 = justify((char*)get_table_element(4, row, lpriv->fcsTable, NULL, &count));
+        buf2 = justify((char*)get_table_element(table1_pos, row2, lpriv->fcsTable, NULL, &count));
+        buf3 = justify((char*)get_table_element(table2_pos, row2, lpriv->fcsTable, NULL, &count));
 	    if ((stricmp(buf2,lpriv->joinTableName) == 0) && (stricmp(buf3,lpriv->featureTableName) != 0)) {
 	      
-	      lpriv->primitiveTableName = justify((char *)get_table_element(4, row, 
+          lpriv->primitiveTableName = justify((char *)get_table_element(table2_pos, row2,
 									    lpriv->fcsTable, NULL, &count));
-	      lpriv->featureTablePrimIdName = justify((char *)get_table_element(3, row, 
+          lpriv->featureTablePrimIdName = justify((char *)get_table_element(table1_key_pos, row2,
 										lpriv->fcsTable, NULL, &count));
 	    }
 	    free(buf2);
 	    free(buf3);
+        free_row(row2, lpriv->fcsTable);
 	  }
+      if (lpriv->primitiveTableName == NULL)
+      {
+        fprintf(stderr, "Invalid join table structure for feature %s\n", lpriv->featureTableName);
+        return 0;
+      }
 	} else {
 	  lpriv->joinTableName = malloc(strlen(tempfilename)+1);
 	  strcpy(lpriv->joinTableName,tempfilename);
@@ -474,9 +503,10 @@
 	lpriv->featureTablePrimIdName = justify((char *)get_table_element(3, row, 
 									  lpriv->fcsTable, NULL, &count));
       }
+
     }
     free(buf1);
-    free_row(row, lpriv->fcsTable); 		
+    free_row(row, lpriv->fcsTable);
   }
   
 #ifdef TESTOPENTABLE
@@ -541,6 +571,21 @@
  *  --------------------------------------------------------------------------
  */
 
+/* fix invalid 'sprintf(x, "%s", x)' usage, which works 'fine' with -O0 compilation flag but not with -O */
+static int rec_sprintf(char* str, const char* format, ...)
+{
+  char* temp = malloc(250000);
+  int ret;
+  va_list ap;
+  va_start(ap, format);
+  ret = vsprintf(temp, format, ap);
+  va_end(ap);
+  strcpy(str, temp);
+  free(temp);
+  return ret;
+}
+
+
 int
 vrf_GetMetadata(s)
      ecs_Server *s;
@@ -582,7 +627,7 @@
   buf1 = NULL;
 
   /* build the begining of metadatastring*/
-  sprintf (spriv->metadatastring,"{<Grassland>displaymetada { { CURRENT DATABASE:%s\n\nDATA HEADER TABLE(DHT):\n\n",spriv->database);
+  rec_sprintf (spriv->metadatastring,"{<Grassland>displaymetada { { CURRENT DATABASE:%s\n\nDATA HEADER TABLE(DHT):\n\n",spriv->database);
 
 
   /* code pour recuperer les valeurs de DHT */
@@ -602,35 +647,35 @@
       test=table_pos("DATABASE_NAME",spriv->dhtTable);
       if (test >= 0) {
 	buf1 = justify((char*)get_table_element(table_pos("DATABASE_NAME",spriv->dhtTable), row, spriv->dhtTable, NULL, &count));
-	sprintf(spriv->metadatastring,"%sDatabase_name: %s\n",spriv->metadatastring,buf1);
+	rec_sprintf(spriv->metadatastring,"%sDatabase_name: %s\n",spriv->metadatastring,buf1);
 	free(buf1); 
       }
 
       test=table_pos("DATABASE_DESC",spriv->dhtTable);
       if (test >= 0) {
 	buf1 = justify((char*)get_table_element(table_pos("DATABASE_DESC",spriv->dhtTable), row, spriv->dhtTable, NULL, &count));
-	sprintf(spriv->metadatastring,"%sDatabase_description: %s\n",spriv->metadatastring,buf1);
+	rec_sprintf(spriv->metadatastring,"%sDatabase_description: %s\n",spriv->metadatastring,buf1);
 	free(buf1);
       }
 
       test=table_pos("MEDIA_STANDARD",spriv->dhtTable);
       if (test >= 0) {
 	buf1 = justify((char*)get_table_element(table_pos("MEDIA_STANDARD",spriv->dhtTable), row, spriv->dhtTable, NULL, &count));
-	sprintf(spriv->metadatastring,"%sMedia_Standard: %s\n",spriv->metadatastring,buf1);
+	rec_sprintf(spriv->metadatastring,"%sMedia_Standard: %s\n",spriv->metadatastring,buf1);
 	free(buf1);	
       }
 
       test=table_pos("ORIGINATOR",spriv->dhtTable);
       if (test >= 0) {
 	buf1 = justify((char*)get_table_element(table_pos("ORIGINATOR",spriv->dhtTable), row, spriv->dhtTable, NULL, &count));
-	sprintf(spriv->metadatastring,"%sOriginator: %s\n",spriv->metadatastring,buf1);
+	rec_sprintf(spriv->metadatastring,"%sOriginator: %s\n",spriv->metadatastring,buf1);
 	free(buf1);
       }
 
       test=table_pos("ADDRESSEE",spriv->dhtTable);
       if (test >= 0) {
 	buf1 = justify((char*)get_table_element(table_pos("ADDRESSEE",spriv->dhtTable), row, spriv->dhtTable, NULL, &count));
-	sprintf(spriv->metadatastring,"%sAddressee: %s\n",spriv->metadatastring,buf1);
+	rec_sprintf(spriv->metadatastring,"%sAddressee: %s\n",spriv->metadatastring,buf1);
 	free(buf1);
       }
 
@@ -638,20 +683,20 @@
       test=table_pos("DOWNGRADE_DATE",spriv->dhtTable);
       if (test >= 0) {
 	get_table_element(table_pos("DOWNGRADE_DATE",spriv->dhtTable), row, spriv->dhtTable, (void *)&datee, &count);
-	sprintf(spriv->metadatastring,"%sDowngrade_date: %s\n",spriv->metadatastring,datee);
+	rec_sprintf(spriv->metadatastring,"%sDowngrade_date: %s\n",spriv->metadatastring,datee);
       }
 
       test=table_pos("RELEASABILITY",spriv->dhtTable);
       if (test >= 0) {
 	buf1 = justify((char*)get_table_element(table_pos("RELEASABILITY",spriv->dhtTable), row, spriv->dhtTable, NULL, &count));
-	sprintf(spriv->metadatastring,"%sReleasability: %s\n",spriv->metadatastring,buf1);
+	rec_sprintf(spriv->metadatastring,"%sReleasability: %s\n",spriv->metadatastring,buf1);
 	free(buf1);	
       }
 
       test = table_pos("OTHER_STD_NAME", spriv->dhtTable);
       if (test >= 0) {
 	buf1 = justify((char*)get_table_element(table_pos("OTHER_STD_NAME", spriv->dhtTable), row, spriv->dhtTable, NULL, &count));
-	sprintf(spriv->metadatastring,"%sOther_STD_name: %s\n",spriv->metadatastring,buf1);
+	rec_sprintf(spriv->metadatastring,"%sOther_STD_name: %s\n",spriv->metadatastring,buf1);
 	free(buf1);	
       }
 
@@ -659,27 +704,27 @@
       test = table_pos("OTHER_STD_DATE",spriv->dhtTable);
       if (test >= 0) {
 	get_table_element(table_pos("OTHER_STD_DATE",spriv->dhtTable), row, spriv->dhtTable, (void *)&datee, &count);
-	sprintf(spriv->metadatastring,"%sOther_std_date: %s\n",spriv->metadatastring,datee);
+	rec_sprintf(spriv->metadatastring,"%sOther_std_date: %s\n",spriv->metadatastring,datee);
       }
 
       test = table_pos("OTHER_STD_VER",spriv->dhtTable);
       if (test >= 0) {
 	buf1 = justify((char*)get_table_element(table_pos("OTHER_STD_VER",spriv->dhtTable), row, spriv->dhtTable, NULL, &count));
-	sprintf(spriv->metadatastring,"%sOther_STD_ver: %s\n",spriv->metadatastring,buf1);
+	rec_sprintf(spriv->metadatastring,"%sOther_STD_ver: %s\n",spriv->metadatastring,buf1);
 	free(buf1);
       }
 
       test = table_pos("OTHER_STD_VER",spriv->dhtTable); 
       if (test >= 0) {
 	buf1 = justify((char*)get_table_element(table_pos("OTHER_STD_VER",spriv->dhtTable), row, spriv->dhtTable, NULL, &count));
-	sprintf(spriv->metadatastring,"%sEdition_number: %s\n",spriv->metadatastring,buf1);
+	rec_sprintf(spriv->metadatastring,"%sEdition_number: %s\n",spriv->metadatastring,buf1);
 	free(buf1);	
       }
 
       test=table_pos("EDITION_DATE",spriv->dhtTable);
       if (test >= 0) {
 	get_table_element(table_pos("EDITION_DATE",spriv->dhtTable), row, spriv->dhtTable, (void *)&datee, &count);
-	sprintf(spriv->metadatastring,"%sEdition_date: %s\n",spriv->metadatastring,datee); 
+	rec_sprintf(spriv->metadatastring,"%sEdition_date: %s\n",spriv->metadatastring,datee); 
       }
 
       free_row(row, spriv->dhtTable); 		
@@ -691,34 +736,34 @@
      code pour recuperer les valeurs de LAT 
      */
 
-  sprintf (spriv->metadatastring,"%s\n\n\nLIBRARY ATTRIBUTE TABLE(LAT):\n\n",spriv->metadatastring);
+  rec_sprintf (spriv->metadatastring,"%s\n\n\nLIBRARY ATTRIBUTE TABLE(LAT):\n\n",spriv->metadatastring);
 
   for (i = 1; i <= spriv->latTable.nrows; ++i) {
     row = get_row(i, spriv->latTable);
     buf1 = justify((char*)get_table_element(1, row, spriv->latTable, NULL, &count));
-    sprintf(spriv->metadatastring,"%sCoverage name: %s\n",spriv->metadatastring,buf1);
+    rec_sprintf(spriv->metadatastring,"%sCoverage name: %s\n",spriv->metadatastring,buf1);
     free(buf1);
     get_table_element(2, row, spriv->latTable, &buffloat, &count);
-    sprintf(spriv->metadatastring,"%sXMIN: %f\n",spriv->metadatastring,buffloat);
+    rec_sprintf(spriv->metadatastring,"%sXMIN: %f\n",spriv->metadatastring,buffloat);
     get_table_element(3, row, spriv->latTable, &buffloat, &count);
-    sprintf(spriv->metadatastring,"%sYMIN: %f\n",spriv->metadatastring,buffloat);
+    rec_sprintf(spriv->metadatastring,"%sYMIN: %f\n",spriv->metadatastring,buffloat);
     get_table_element(4, row, spriv->latTable, &buffloat, &count);
-    sprintf(spriv->metadatastring,"%sXMAX: %f\n",spriv->metadatastring,buffloat);
+    rec_sprintf(spriv->metadatastring,"%sXMAX: %f\n",spriv->metadatastring,buffloat);
     get_table_element(5, row, spriv->latTable, &buffloat, &count);	
-    sprintf(spriv->metadatastring,"%sYMAX: %f\n",spriv->metadatastring,buffloat);	
+    rec_sprintf(spriv->metadatastring,"%sYMAX: %f\n",spriv->metadatastring,buffloat);	
     free_row(row, spriv->latTable); 		
   }
 
   /*ferme la liste de la ddb et ouvre la liste de la librairie*/
 
-  sprintf(spriv->metadatastring,"%s } { ",spriv->metadatastring);
+  rec_sprintf(spriv->metadatastring,"%s } { ",spriv->metadatastring);
 
   /* code pour recuperer les valeurs dans LHT */
   
   sprintf(buffer,"%s%slht",spriv->library,separator);
   if (muse_access(buffer,0) ==0)
     {
-      sprintf (spriv->metadatastring,"%sCURRENT DATABASE:%s\n\nLIBRARY LIBRARY HEADER TABLE(LHT):\n\n",spriv->metadatastring,spriv->database);
+      rec_sprintf(spriv->metadatastring,"%sCURRENT DATABASE:%s\n\nLIBRARY LIBRARY HEADER TABLE(LHT):\n\n",spriv->metadatastring,spriv->database);
 
 #ifdef TESTOPENTABLE
       printf("open spriv->lhtTable:%s\n",buffer);
@@ -731,21 +776,21 @@
 	test=table_pos("PRODUCT_TYPE",spriv->lhtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(table_pos("PRODUCT_TYPE",spriv->lhtTable), row, spriv->lhtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sProduct_type: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sProduct_type: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("LIBRARY_NAME",spriv->lhtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(table_pos("LIBRARY_NAME",spriv->lhtTable), row, spriv->lhtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sLibrary_name: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sLibrary_name: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("DESCRIPTION",spriv->lhtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(table_pos("DESCRIPTION",spriv->lhtTable), row, spriv->lhtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sDescription: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sDescription: %s\n",spriv->metadatastring,buf1);
 	  free(buf1); 
 	}
 
@@ -753,54 +798,54 @@
 	test=table_pos("SOURCE_SERIES",spriv->lhtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(table_pos("SOURCE_SERIES",spriv->lhtTable), row, spriv->lhtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sSource_series: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sSource_series: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("SOURCE_ID",spriv->lhtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(table_pos("SOURCE_ID",spriv->lhtTable), row, spriv->lhtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sSource_ID: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sSource_ID: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("SOURCE_EDITION",spriv->lhtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(table_pos("SOURCE_EDITION",spriv->lhtTable), row, spriv->lhtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sSource_edition: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sSource_edition: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("SOURCE_NAME",spriv->lhtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(table_pos("SOURCE_NAME",spriv->lhtTable), row, spriv->lhtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sSource_name: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sSource_name: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("SOURCE_DATE",spriv->lhtTable);
 	if (test >= 0) {
 	  get_table_element(table_pos("SOURCE_DATE",spriv->lhtTable), row, spriv->lhtTable, (void *)&datee, &count);
-	  sprintf(spriv->metadatastring,"%sSource_date: %s\n",spriv->metadatastring,datee);
+	  rec_sprintf(spriv->metadatastring,"%sSource_date: %s\n",spriv->metadatastring,datee);
 	}
 
 	test=table_pos("DOWNGRADING",spriv->lhtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(table_pos("DOWNGRADING",spriv->lhtTable), row, spriv->lhtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sDowngrading: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sDowngrading: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("DOWNGRADING_DATE",spriv->lhtTable);
 	if (test >= 0) {
-	  get_table_element(table_pos("DOWNGRADING_DATE_DATE",spriv->lhtTable), row, spriv->lhtTable, (void *)&datee, &count);
-	  sprintf(spriv->metadatastring,"%sDowngrading_date: %s\n",spriv->metadatastring,datee);
+	  get_table_element(table_pos("DOWNGRADING_DATE",spriv->lhtTable), row, spriv->lhtTable, (void *)&datee, &count);
+	  rec_sprintf(spriv->metadatastring,"%sDowngrading_date: %s\n",spriv->metadatastring,datee);
 	}
 	
 	test=table_pos("RELEASABILITY",spriv->lhtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(table_pos("RELEASABILITY",spriv->lhtTable), row, spriv->lhtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sReleasability: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sReleasability: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 	free_row(row, spriv->lhtTable); 		
@@ -810,18 +855,18 @@
 
 
   /* code pour recuperer les valeurs dans CAT */
-  sprintf (spriv->metadatastring,"%s\n\n\nCOVERAGE ATTRIBUTE TABLE(CAT):\n\n",spriv->metadatastring);	
+  rec_sprintf (spriv->metadatastring,"%s\n\n\nCOVERAGE ATTRIBUTE TABLE(CAT):\n\n",spriv->metadatastring);	
 
   for (i = 1; i <= spriv->catTable.nrows; ++i) {
     row = get_row(i, spriv->catTable);
     buf1 = justify( (char *) get_table_element(1, row, spriv->catTable, NULL, &count));
-    sprintf(spriv->metadatastring,"%sCoverage_name: %s\n",spriv->metadatastring,buf1);
+    rec_sprintf(spriv->metadatastring,"%sCoverage_name: %s\n",spriv->metadatastring,buf1);
     free(buf1);
     buf1 = justify( (char *) get_table_element(2, row, spriv->catTable, NULL, &count));
-    sprintf(spriv->metadatastring,"%sDescription: %s\n",spriv->metadatastring,buf1);
+    rec_sprintf(spriv->metadatastring,"%sDescription: %s\n",spriv->metadatastring,buf1);
     free(buf1);
     get_table_element(3, row, spriv->catTable, &buffint, &count);
-    sprintf(spriv->metadatastring,"%sLevel: %d\n",spriv->metadatastring,buffint);
+    rec_sprintf(spriv->metadatastring,"%sLevel: %d\n",spriv->metadatastring,buffint);
     free_row(row, spriv->catTable); 		
   }
 
@@ -833,7 +878,7 @@
 
   if (muse_access(buffer,0) ==0)
     {
-      sprintf (spriv->metadatastring,"%s\n\n\nGEOGRAPHIC REFERENCE TABLE(GRT):\n\n",spriv->metadatastring);
+      rec_sprintf (spriv->metadatastring,"%s\n\n\nGEOGRAPHIC REFERENCE TABLE(GRT):\n\n",spriv->metadatastring);
 #ifdef TESTOPENTABLE
       printf("open spriv->grtTable:%s\n",buffer);
 #endif
@@ -846,77 +891,77 @@
 	test=table_pos("DATA_TYPE",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sData_type: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sData_type: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("UNITS",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sUnits: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sUnits: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("ELLIPSOID",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sEllipsoid: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sEllipsoid: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("ELLIPSOID_DETAIL",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sEllipsoid_detail: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sEllipsoid_detail: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 	
 	test=table_pos("VERT_DATUM_REF",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sVert_datum_ref: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sVert_datum_ref: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("VERT_DATUM_CODE",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sVert_datum_code: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sVert_datum_code: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("SOUND_DATUM_NAME",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sSound_datum_name: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sSound_datum_name: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("SOUND_DATUM_CODE",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sSound_datum_code: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sSound_datum_code: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("GEO_DATUM_NAME",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sGeo_datum_name: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sGeo_datum_name: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("GEO_DATUM_CODE",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sGeo_datum_code: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sGeo_datum_code: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("PROJECTION NAME",spriv->grtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->grtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sProjection_name: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sProjection_name: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 	
@@ -931,7 +976,7 @@
   sprintf(buffer,"%s%sdqt",spriv->library,separator);
   if (muse_access(buffer,0) ==0)
     {
-      sprintf (spriv->metadatastring,"%s\n\n\nDATA QUALITY TABLE(DQT):\n\n",spriv->metadatastring);
+      rec_sprintf (spriv->metadatastring,"%s\n\n\nDATA QUALITY TABLE(DQT):\n\n",spriv->metadatastring);
 #ifdef TESTOPENTABLE
       printf("open spriv->dqtTable:%s\n",buffer);
 #endif
@@ -943,42 +988,42 @@
 	test=table_pos("VPF_LEVEL",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sVpf_level: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sVpf_level: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("VPF_LEVEL_NAME",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sVpf_level_name: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sVpf_level_name: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("FEATURE_COMPLETE",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sFeature_complete: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sFeature_complete: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("ATTRIB_COMPLETE",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sAttrib_complete: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sAttrib_complete: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
 	test=table_pos("LOGICAL_CONSIST",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sLogical_consist: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sLogical_consist: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("EDITION_NUM",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sEdition_num: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sEdition_num: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
@@ -986,20 +1031,20 @@
 	test=table_pos("CREATION_DATE",spriv->dqtTable);
 	if (test >= 0) {
 	  get_table_element(table_pos("CREATION_DATE",spriv->dqtTable), row, spriv->dqtTable, (void *)&datee, &count);
-	  sprintf(spriv->metadatastring,"%sCration date: %s\n",spriv->metadatastring,datee);
+	  rec_sprintf(spriv->metadatastring,"%sCration date: %s\n",spriv->metadatastring,datee);
 	}
 
 	test=table_pos("REVISION_DATE",spriv->dqtTable);
 	if (test >= 0) {
 	  get_table_element(table_pos("REVISION_DATE",spriv->dqtTable), row, spriv->dqtTable, (void *)&datee, &count);
-	  sprintf(spriv->metadatastring,"%sRevision date: %s\n",spriv->metadatastring,datee);
+	  rec_sprintf(spriv->metadatastring,"%sRevision date: %s\n",spriv->metadatastring,datee);
 	}
 	
 
 	test=table_pos("SPEC_NAME",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sSpec_name: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sSpec_name: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);	
 	}
 
@@ -1007,110 +1052,110 @@
 	test=table_pos("SPEC_DATE",spriv->dqtTable);
 	if (test >= 0) {
 	  get_table_element(table_pos("SPEC_DATE",spriv->dqtTable), row, spriv->dqtTable, (void *)&datee, &count);
-	  sprintf(spriv->metadatastring,"%sSpecification date: %s\n",spriv->metadatastring,datee);
+	  rec_sprintf(spriv->metadatastring,"%sSpecification date: %s\n",spriv->metadatastring,datee);
 	}
 
 	test=table_pos("EARLIEST_SOURCE",spriv->dqtTable);
 	if (test >= 0) {
 	  get_table_element(table_pos("EARLIEST_SOURCE",spriv->dqtTable), row, spriv->dqtTable, (void *)&datee, &count);
-	  sprintf(spriv->metadatastring,"%sEarliest source: %s\n",spriv->metadatastring,datee);
+	  rec_sprintf(spriv->metadatastring,"%sEarliest source: %s\n",spriv->metadatastring,datee);
 	}
 
 	test=table_pos("LATEST_SOURCE",spriv->dqtTable);
 	if (test >= 0) {
 	  get_table_element(table_pos("LATEST_SOURCE",spriv->dqtTable), row, spriv->dqtTable, (void *)&datee, &count);
-	  sprintf(spriv->metadatastring,"%sLatest source: %s\n",spriv->metadatastring,datee);
+	  rec_sprintf(spriv->metadatastring,"%sLatest source: %s\n",spriv->metadatastring,datee);
 	}
 
 
 	test=table_pos("QUANT_ATT_ACC",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count));
-	  sprintf(spriv->metadatastring,"%sQuant_att_acc: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sQuant_att_acc: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("QUAL_ATT_ACC",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%sQual_att_acc: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sQual_att_acc: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("COLLECTION_SPEC",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%sCollection_spec: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sCollection_spec: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("SOURCE_FILE_NAME",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%sSource_file_name: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sSource_file_name: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("ABS_HORIZ_ACC",spriv->dqtTable);
 	if (test >= 0) {
-	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%sAbs_horiz_acc: %s\n",spriv->metadatastring,buf1);
+	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count));
+	  rec_sprintf(spriv->metadatastring,"%sAbs_horiz_acc: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("ABS_HORIZ_UNITS",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%sAbs_horiz_units: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sAbs_horiz_units: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("ABS_VERT_ACC",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%sAbs_vert_acc: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sAbs_vert_acc: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("ABS_VERT_UNITS",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%sAbs_vert_units: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sAbs_vert_units: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("REL_HORIZ_ACC",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%s:Rel_horiz_acc: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%s:Rel_horiz_acc: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("REL_HORIZ_UNITS",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%s:Rel_horiz_units: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%s:Rel_horiz_units: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("REL_VERT_ACC",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%s:Rel_vert_acc %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%s:Rel_vert_acc %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("REL_VERT_UNITS",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%s:Rel_vert_units: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%s:Rel_vert_units: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 
 	test=table_pos("COMMENTS",spriv->dqtTable);
 	if (test >= 0) {
 	  buf1 = justify((char*)get_table_element(test, row, spriv->dqtTable, NULL, &count)); 
-	  sprintf(spriv->metadatastring,"%sComments: %s\n",spriv->metadatastring,buf1);
+	  rec_sprintf(spriv->metadatastring,"%sComments: %s\n",spriv->metadatastring,buf1);
 	  free(buf1);
 	}
 	
@@ -1122,7 +1167,7 @@
 
   /*ferme la premiere partie de la chaine*/
 
-  sprintf(spriv->metadatastring,"%s} } } { ",spriv->metadatastring);
+  rec_sprintf(spriv->metadatastring,"%s} } } { ",spriv->metadatastring);
 
 
   /* 
@@ -1137,16 +1182,16 @@
     rowcat = get_row(z, spriv->catTable); 
 
     /*ajoute debut chaine*/
-    sprintf(spriv->metadatastring,"%s {",spriv->metadatastring);
+    rec_sprintf(spriv->metadatastring,"%s {",spriv->metadatastring);
 
     /*ajoute class et nom coverage*/
     covname = justify( (char *) get_table_element(1, rowcat, spriv->catTable, NULL, &count));
-    sprintf(spriv->metadatastring,"%s family %s class",spriv->metadatastring,covname);
+    rec_sprintf(spriv->metadatastring,"%s family %s class",spriv->metadatastring,covname);
 
     /*ajoute description et debut du covinfo*/
     buf1 = justify( (char *) get_table_element(2, rowcat, spriv->catTable, NULL, &count));
 
-    sprintf(spriv->metadatastring,"%s {%s} {<Grassland>displaymetadata {",spriv->metadatastring, buf1);
+    rec_sprintf(spriv->metadatastring,"%s {%s} {<Grassland>displaymetadata {",spriv->metadatastring, buf1);
     free(buf1);
 
     /********/
@@ -1200,7 +1245,7 @@
                     {
 			if (strcmp(buf1,bufname)==0)
                         {
-			    sprintf(spriv->metadatastring,"%s { %s { %s } } ",spriv->metadatastring,bufname,bufdesc);
+			    rec_sprintf(spriv->metadatastring,"%s { %s { %s } } ",spriv->metadatastring,bufname,bufdesc);
 			    flag=1;
                         }
                     }
@@ -1218,7 +1263,7 @@
 	vpf_close_table(&(spriv->fcaTable));		
     }
     
-    sprintf(spriv->metadatastring,"%s } {",spriv->metadatastring);
+    rec_sprintf(spriv->metadatastring,"%s } {",spriv->metadatastring);
     vpf_close_table(&(spriv->fcsTable));
  
 
@@ -1233,7 +1278,7 @@
 	if (muse_access(buffer,0) ==0)
 	  {
 	    existtableflag=1;
-	    sprintf(spriv->metadatastring,"%s \nVALUE DESCRIPTION TABLE (%s.vdt)\n\n",spriv->metadatastring,tab[j]);
+	    rec_sprintf(spriv->metadatastring,"%s \nVALUE DESCRIPTION TABLE (%s.vdt)\n\n",spriv->metadatastring,tab[j]);
 	
 	
 #ifdef TESTOPENTABLE
@@ -1266,7 +1311,7 @@
 		if ((strnicmp ("char",tab[j],5)) ==0) {
 		  tval = (char *)get_table_element(val_pos,row,table,NULL,&n);
 		  sprintf(buffer,"    %s =  %s  \n",tval,des_buf);
-		  sprintf(spriv->metadatastring,"%s%s",spriv->metadatastring,buffer);
+		  rec_sprintf(spriv->metadatastring,"%s%s",spriv->metadatastring,buffer);
 		  free(tval);
 		}
 	      
@@ -1275,7 +1320,7 @@
                     get_table_element(val_pos,row,table,&intval,&n);   
                     sprintf(buffer,"    %12ld =  %s  \n",
                             (long)intval,des_buf);
-                    sprintf(spriv->metadatastring,"%s%s",
+                    rec_sprintf(spriv->metadatastring,"%s%s",
                             spriv->metadatastring,buffer);
 		}		 
 
@@ -1286,7 +1331,7 @@
                     get_table_element(val_pos,row,table,&short_val,&n);   
                     sprintf(buffer,"    %12ld =  %s  \n",
                             (long)short_val,des_buf);
-                    sprintf(spriv->metadatastring,"%s%s",
+                    rec_sprintf(spriv->metadatastring,"%s%s",
                             spriv->metadatastring,buffer);
 		}		 
 
@@ -1294,7 +1339,7 @@
 		if ((strnicmp ("float",tab[j],6) ==0)) {
 		  get_table_element(val_pos,row,table,&fval,&n);
 		  sprintf(buffer,"    %12f =  %s  \n",fval,des_buf);
-		  sprintf(spriv->metadatastring,"%s%s",spriv->metadatastring,buffer);
+		  rec_sprintf(spriv->metadatastring,"%s%s",spriv->metadatastring,buffer);
 		}
 	    
                 free(des_buf);	  
@@ -1314,14 +1359,14 @@
     free(covname);
     
     if (existtableflag==0)
-      sprintf(spriv->metadatastring,"%snodata",spriv->metadatastring);
+      rec_sprintf(spriv->metadatastring,"%snodata",spriv->metadatastring);
 
     /* ferme la chaine covinfo*/
-    sprintf(spriv->metadatastring,"%s} } } ",spriv->metadatastring);	  
+    rec_sprintf(spriv->metadatastring,"%s} } } ",spriv->metadatastring);	  
     free_row(rowcat, spriv->catTable);
   } /**(i = 1; i <= spriv->catTable.nrows**/
   /*ferme la chaine generale*/
-  sprintf(spriv->metadatastring,"%s }",spriv->metadatastring);
+  rec_sprintf(spriv->metadatastring,"%s }",spriv->metadatastring);
   /*printf ("%s",spriv->metadatastring);*/
   vpf_close_table(&(spriv->lhtTable));
 
@@ -1776,6 +1821,7 @@
 	      des_buf  = (char *)get_table_element(des_pos,row,table,NULL,&n);
 	      switch (ft.header[i].type) {
 	      case 'T':
+          case 'L':
 		tval = (char *)get_table_element(val_pos,row,table,NULL,&n);
 		sprintf(buffer,"    %s =  %s  \n",tval,des_buf);
 		if (!ecs_AddText(&(s->result),buffer)) {
@@ -1784,7 +1830,7 @@
 		free(tval);break;
 	      case 'I':
 		get_table_element(val_pos,row,table,&ival,&n);
-		sprintf(buffer,"    %12ld =  %s  \n",ival,des_buf);
+		sprintf(buffer,"    %12d =  %s  \n",ival,des_buf);
 		if (!ecs_AddText(&(s->result),buffer)) {
 		  free(fclass); free(coverage); free(expression); return FALSE;
 		}
@@ -1907,7 +1953,7 @@
     ecs_AddText(&(s->result), line);
     
     ecs_AddText(&(s->result),
-                "        <SRS>PROJ4:+proj=longlat +datum=nad83</SRS>\n" );
+                "        <SRS>PROJ4:+proj=longlat +datum=wgs84</SRS>\n" );
 
     sprintf( line, 
              "        <Family>%s</Family>\n", 
@@ -1985,16 +2031,21 @@
             }
             free( fclass );
 
-            /* Have we already processed this name? */
-            for( j = 0; j < count && strcmp(list[j],name) != 0; j++ ) {}
-
-            if( j == count )
+            if (!is_join(name))
             {
-                vrf_build_layer_capabilities( s, coverage, name );
-                list[count++] = name;
+              /* Have we already processed this name? */
+              for( j = 0; j < count && strcmp(list[j],name) != 0; j++ ) {}
+  
+              if( j == count )
+              {
+                  vrf_build_layer_capabilities( s, coverage, name );
+                  list[count++] = name;
+              }
+              else
+                  free( name );
             }
             else
-                free( name );
+              free(name);
 
             free_row (row, table);
         }

Modified: packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/vrf.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/vrf.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/vrf.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -17,6 +17,51 @@
  ******************************************************************************
  *
  * $Log: vrf.c,v $
+ * Revision 1.20  2007/05/09 21:29:50  cbalint
+ * fix is to increase of 1 the size of smallint (5 -> 6)
+ *
+ * Revision 1.19  2007/05/09 20:46:28  cbalint
+ * From: Even Rouault <even.rouault at mines-paris.org>
+ * Date: Friday 21:14:18
+ *
+ *         * fix filename case sensitivy problems (for Unix-like systems).
+ *
+ *         * fix incorrect use of sprintf in vrf_GetMetadata.
+ *
+ *         * report wgs84 instead of nad83, not sure whether that is true
+ *         for all VPF products, but at least it's correct for VMAP products
+ *         that *must* be WGS84. A better fix would be to read the VPF table
+ *         that contains this information.
+ *
+ *         * fix a few minor memory leaks and memory usage issues.
+ *
+ *         * enable XMIN, YMIN, XMAX and YMAX columns to be of type double
+ *         in EBR and FBR files (for read the VMAP2i 'MIG2i000' product).
+ *
+ *         * add .pjt and .tjt as possible extensions for join tables
+ *         (VMAP2i 'MIG2i000' product).
+ *
+ *         * fix duplicated layers report (VMAP2i 'MIG2i000' product).
+ *
+ *         * handle 'L' (Latin1) type for text files (GEOCAPI 'MIGxxx' products).
+ *
+ *         * optionnaly, convert text to UTF-8 when environment variable
+ *         CONVERT_OGDI_TXT_TO_UTF8 is defined. This part is not portable
+ *         on Windows I guess (only tested on Linux) and maybe too specific.
+ *
+ *         * enable reading of VPF products without table indexes file
+ *         (GEOCAPI 'MIG013' and 'MIG016' products). VPF norm says that when
+ *         there is a variable length field in one table, an index should exist,
+ *         but some test products don't follow this. The approach here is to read
+ *         the whole table content and build the index in memory.
+ *
+ *  Modified Files:
+ *  	ChangeLog ogdi/driver/vrf/feature.c ogdi/driver/vrf/object.c
+ *  	ogdi/driver/vrf/utils.c ogdi/driver/vrf/vrf.c
+ *  	ogdi/driver/vrf/vrfswq.c vpflib/musedir.c vpflib/strfunc.c
+ *  	vpflib/vpfbrows.c vpflib/vpfprop.c vpflib/vpfquery.c
+ *  	vpflib/vpfread.c vpflib/vpftable.c
+ *
  * Revision 1.18  2007/02/12 21:01:48  cbalint
  *      Fix win32 target. It build and works now. (tested with VC6)
  *
@@ -61,7 +106,7 @@
 #include "vrf.h"
 #include "datadict.h"
 
-ECS_CVSID("$Id: vrf.c,v 1.18 2007/02/12 21:01:48 cbalint Exp $");
+ECS_CVSID("$Id: vrf.c,v 1.20 2007/05/09 21:29:50 cbalint Exp $");
 
 /* layer oriented functions are keeped in data structure to simplify code */
 
@@ -196,7 +241,7 @@
  */
 
 ecs_Result *dyn_DestroyServer(s)
-     ecs_Server *s;
+    ecs_Server *s;
 {
   register ServerPrivateData *spriv = s->priv;
 
@@ -332,51 +377,51 @@
 
   if ((layer = ecs_GetLayer(s,sel)) != -1) {
 
-    if (s->currentLayer != -1)
-      _closeLayerTable(s,&(s->layer[s->currentLayer]));
+  if (s->currentLayer != -1)
+    _closeLayerTable(s,&(s->layer[s->currentLayer]));
+#if 0
+  /* Close the join table for the previous layer */
 
-    /* Close the join table for the previous layer */
+  lpriv = (LayerPrivateData *) s->layer[s->currentLayer].priv;
+  if (lpriv->joinTableName != NULL) {
 
-    lpriv = (LayerPrivateData *) s->layer[s->currentLayer].priv; 
-    if (lpriv->joinTableName != NULL) {
-
 #ifdef TESTOPENTABLE
       printf("close lpriv->joinTable\n");
 #endif
 
       if (lpriv->joinTable.fp == NULL) 
 	vpf_close_table(&(lpriv->joinTable));
-    }
-
+  }
+#endif
     
-    /* if it already exists than assign currentLayer and set index to 0 to force rewind */
+  /* if it already exists than assign currentLayer and set index to 0 to force rewind */
     
-    s->currentLayer = layer;
-    s->layer[layer].index = 0;
-    lpriv = (LayerPrivateData *) s->layer[layer].priv; 
+  s->currentLayer = layer;
+  s->layer[layer].index = 0;
+  lpriv = (LayerPrivateData *) s->layer[layer].priv;
+#if 0
+  /* Open the current join table */
 
-    /* Open the current join table */
-
-    if (lpriv->joinTableName != NULL) {
-      sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,lpriv->joinTableName);
-      if (muse_access(buffer,0) == 0 ) {
+  if (lpriv->joinTableName != NULL) {
+    sprintf(buffer,"%s/%s/%s",spriv->library,lpriv->coverage,lpriv->joinTableName);
+    if (muse_access(buffer,0) == 0 ) {
 #ifdef TESTOPENTABLE
 	printf("open lpriv->joinTable:%s\n",buffer);
 #endif
 	lpriv->joinTable = vpf_open_table(buffer,disk,"rb",NULL);
 	if (lpriv->joinTable.fp == NULL) {
-	  ecs_SetError(&(s->result),1,"Unable to open the join table");
-	  vpf_close_table(lpriv->featureTable);
-	  free(s->layer[layer].priv);
-	  ecs_FreeLayer(s,layer);   
-	  return &(s->result);
-	}
-      }
+      ecs_SetError(&(s->result),1,"Unable to open the join table");
+      vpf_close_table(lpriv->featureTable);
+      free(s->layer[layer].priv);
+      ecs_FreeLayer(s,layer);
+      return &(s->result);
     }
-
-    ecs_SetSuccess(&(s->result));
-    return &(s->result);
+    }
   }
+#endif
+  ecs_SetSuccess(&(s->result));
+  return &(s->result);
+  }
 
   if (s->currentLayer != -1)
     _closeLayerTable(s,&(s->layer[s->currentLayer]));
@@ -422,7 +467,6 @@
 
   /* obtain the feature and primitive table file name from the FCS file */
 
-
   if (!vrf_getFileNameFromFcs(s,lpriv)) {
     free( lpriv->coverage );
     free( lpriv->fclass );
@@ -473,12 +517,11 @@
         have TILE_ID, but do have feature joins so we assume in this case that
         it is a feature join.
 	*/
+      if (table_pos("TILE_ID",lpriv->joinTable) == -1
+          && lpriv->isTiled ) {
 #ifdef TESTOPENTABLE
-      printf("close lpriv->joinTable:%s\n");
+      printf("close lpriv->joinTable:%s\n", lpriv->joinTableName);
 #endif
-
-      if (table_pos("TILE_ID",lpriv->joinTable) == -1
-          && lpriv->isTiled ) {
 	vpf_close_table(&(lpriv->joinTable));
 	free(lpriv->joinTableName);
 	lpriv->joinTableName = NULL;
@@ -486,6 +529,12 @@
     }
 
   } else {
+    free( lpriv->coverage );
+    free( lpriv->fclass );
+    free( lpriv->expression );
+    free(lpriv->featureTableName);
+    free(lpriv->primitiveTableName);
+    free(lpriv->featureTablePrimIdName);
     free(s->layer[layer].priv);
     ecs_FreeLayer(s,layer);
     ecs_SetError(&(s->result),1,"Can't open this feature class");
@@ -570,7 +619,7 @@
 
   if (lpriv->joinTableName != NULL) {
 #ifdef TESTOPENTABLE
-    printf("close lpriv->joinTable:%s\n");
+    printf("close lpriv->joinTable:%s\n", lpriv->joinTableName);
 #endif
     vpf_close_table(&(lpriv->joinTable));
   }
@@ -720,6 +769,7 @@
     switch(lpriv->featureTable.header[i].type) {
 
     case 'T':
+    case 'L':
       length = lpriv->featureTable.header[i].count;
       if (length == -1) {
 	type = Varchar;
@@ -750,7 +800,7 @@
 
     case 'S':
       type = Smallint;
-      length = 5;
+      length = 6;
       precision = 0;
       break;
 
@@ -781,7 +831,6 @@
 ecs_Result *dyn_GetNextObject(s)
      ecs_Server *s;
 {
-
   (layerMethod[s->layer[s->currentLayer].sel.F].getNextObject)(s,&(s->layer[s->currentLayer]));
   return &(s->result);
 
@@ -904,7 +953,7 @@
 ecs_Result *dyn_GetServerProjection(s)
      ecs_Server *s;
 {
-  ecs_SetText(&(s->result), "+proj=longlat +datum=nad83");
+  ecs_SetText(&(s->result), "+proj=longlat +datum=wgs84");
   ecs_SetSuccess(&(s->result));
   return &(s->result);
 }

Modified: packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/vrfswq.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/vrfswq.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/driver/vrf/vrfswq.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -18,6 +18,48 @@
  ******************************************************************************
  *
  * $Log: vrfswq.c,v $
+ * Revision 1.7  2007/05/09 20:46:28  cbalint
+ * From: Even Rouault <even.rouault at mines-paris.org>
+ * Date: Friday 21:14:18
+ *
+ *         * fix filename case sensitivy problems (for Unix-like systems).
+ *
+ *         * fix incorrect use of sprintf in vrf_GetMetadata.
+ *
+ *         * report wgs84 instead of nad83, not sure whether that is true
+ *         for all VPF products, but at least it's correct for VMAP products
+ *         that *must* be WGS84. A better fix would be to read the VPF table
+ *         that contains this information.
+ *
+ *         * fix a few minor memory leaks and memory usage issues.
+ *
+ *         * enable XMIN, YMIN, XMAX and YMAX columns to be of type double
+ *         in EBR and FBR files (for read the VMAP2i 'MIG2i000' product).
+ *
+ *         * add .pjt and .tjt as possible extensions for join tables
+ *         (VMAP2i 'MIG2i000' product).
+ *
+ *         * fix duplicated layers report (VMAP2i 'MIG2i000' product).
+ *
+ *         * handle 'L' (Latin1) type for text files (GEOCAPI 'MIGxxx' products).
+ *
+ *         * optionnaly, convert text to UTF-8 when environment variable
+ *         CONVERT_OGDI_TXT_TO_UTF8 is defined. This part is not portable
+ *         on Windows I guess (only tested on Linux) and maybe too specific.
+ *
+ *         * enable reading of VPF products without table indexes file
+ *         (GEOCAPI 'MIG013' and 'MIG016' products). VPF norm says that when
+ *         there is a variable length field in one table, an index should exist,
+ *         but some test products don't follow this. The approach here is to read
+ *         the whole table content and build the index in memory.
+ *
+ *  Modified Files:
+ *  	ChangeLog ogdi/driver/vrf/feature.c ogdi/driver/vrf/object.c
+ *  	ogdi/driver/vrf/utils.c ogdi/driver/vrf/vrf.c
+ *  	ogdi/driver/vrf/vrfswq.c vpflib/musedir.c vpflib/strfunc.c
+ *  	vpflib/vpfbrows.c vpflib/vpfprop.c vpflib/vpfquery.c
+ *  	vpflib/vpfread.c vpflib/vpftable.c
+ *
  * Revision 1.6  2007/02/12 15:52:57  cbalint
  *
  *    Preliminary cleanup.
@@ -47,7 +89,7 @@
 #include "vrf.h"
 #include "swq.h"
 
-ECS_CVSID("$Id: vrfswq.c,v 1.6 2007/02/12 15:52:57 cbalint Exp $");
+ECS_CVSID("$Id: vrfswq.c,v 1.7 2007/05/09 20:46:28 cbalint Exp $");
 
 #ifndef __LINKLIST_H__
 #include "linklist.h"
@@ -96,7 +138,7 @@
 /* -------------------------------------------------------------------- */
 /*      String field comparison.                                        */
 /* -------------------------------------------------------------------- */
-    if( table.header[op->field_index].type == 'T' )
+    if( table.header[op->field_index].type == 'T' || table.header[op->field_index].type == 'L' )
     {
         int	ret_result, i;
 
@@ -231,7 +273,7 @@
    for (i=0; i < nfields; i++)
    {
        fieldname[i] = (char *) table.header[i].name;
-       if( table.header[i].type == 'T' )
+       if( table.header[i].type == 'T' || table.header[i].type == 'L' )
            fieldtype[i] = SWQ_STRING;
        else if( table.header[i].type == 'F' )
            fieldtype[i] = SWQ_FLOAT;

Added: packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.mak
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.mak	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.mak	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,186 @@
+# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+!IF "$(CFG)" == ""
+CFG=Win32 Debug
+!MESSAGE No configuration specified.  Defaulting to Win32 Debug.
+!ENDIF 
+
+!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE on this makefile
+!MESSAGE by defining the macro CFG on the command line.  For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "status_d.mak" CFG="Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE 
+!ERROR An invalid configuration is specified.
+!ENDIF 
+
+################################################################################
+# Begin Project
+MTL=MkTypLib.exe
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WinRel"
+# PROP BASE Intermediate_Dir "WinRel"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WinRel"
+# PROP Intermediate_Dir "WinRel"
+OUTDIR=.\WinRel
+INTDIR=.\WinRel
+
+ALL : $(OUTDIR)/status_d.exe $(OUTDIR)/status_d.bsc
+
+$(OUTDIR) : 
+    if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE MTL /nologo /D "NDEBUG" /win32
+# ADD MTL /nologo /D "NDEBUG" /win32
+MTL_PROJ=/nologo /D "NDEBUG" /win32 
+# ADD BASE CPP /nologo /ML /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /c
+# ADD CPP /nologo /ML /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /c
+CPP_PROJ=/nologo /ML /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
+ /FR$(INTDIR)/ /Fp$(OUTDIR)/"status_d.pch" /Fo$(INTDIR)/ /c 
+CPP_OBJS=.\WinRel/
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+RSC_PROJ=/l 0x409 /fo$(INTDIR)/"status_d.res" /d "NDEBUG" 
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"status_d.bsc" 
+BSC32_SBRS= \
+	$(INTDIR)/status_d.sbr
+
+$(OUTDIR)/status_d.bsc : $(OUTDIR)  $(BSC32_SBRS)
+    $(BSC32) @<<
+  $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:windows /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:windows /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:windows /INCREMENTAL:no /PDB:$(OUTDIR)/"status_d.pdb" /MACHINE:I386\
+ /OUT:$(OUTDIR)/"status_d.exe" 
+DEF_FILE=
+LINK32_OBJS= \
+	$(INTDIR)/status_d.obj \
+	$(INTDIR)/status_d.res
+
+$(OUTDIR)/status_d.exe : $(OUTDIR)  $(DEF_FILE) $(LINK32_OBJS)
+    $(LINK32) @<<
+  $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF  "$(CFG)" == "Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDebug"
+# PROP BASE Intermediate_Dir "WinDebug"
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WinDebug"
+# PROP Intermediate_Dir "WinDebug"
+OUTDIR=.\WinDebug
+INTDIR=.\WinDebug
+
+ALL : $(OUTDIR)/status_d.exe $(OUTDIR)/status_d.bsc
+
+$(OUTDIR) : 
+    if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
+
+# ADD BASE MTL /nologo /D "_DEBUG" /win32
+# ADD MTL /nologo /D "_DEBUG" /win32
+MTL_PROJ=/nologo /D "_DEBUG" /win32 
+# ADD BASE CPP /nologo /ML /W3 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /c
+# ADD CPP /nologo /ML /W3 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /c
+CPP_PROJ=/nologo /ML /W3 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\
+ /FR$(INTDIR)/ /Fp$(OUTDIR)/"status_d.pch" /Fo$(INTDIR)/\
+ /Fd$(OUTDIR)/"status_d.pdb" /c 
+CPP_OBJS=.\WinDebug/
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+RSC_PROJ=/l 0x409 /fo$(INTDIR)/"status_d.res" /d "_DEBUG" 
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+BSC32_FLAGS=/nologo /o$(OUTDIR)/"status_d.bsc" 
+BSC32_SBRS= \
+	$(INTDIR)/status_d.sbr
+
+$(OUTDIR)/status_d.bsc : $(OUTDIR)  $(BSC32_SBRS)
+    $(BSC32) @<<
+  $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:windows /DEBUG /MACHINE:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO /SUBSYSTEM:windows /DEBUG /MACHINE:I386
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
+ advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /NOLOGO\
+ /SUBSYSTEM:windows /INCREMENTAL:yes /PDB:$(OUTDIR)/"status_d.pdb" /DEBUG\
+ /MACHINE:I386 /OUT:$(OUTDIR)/"status_d.exe" 
+DEF_FILE=
+LINK32_OBJS= \
+	$(INTDIR)/status_d.obj \
+	$(INTDIR)/status_d.res
+
+$(OUTDIR)/status_d.exe : $(OUTDIR)  $(DEF_FILE) $(LINK32_OBJS)
+    $(LINK32) @<<
+  $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF 
+
+.c{$(CPP_OBJS)}.obj:
+   $(CPP) $(CPP_PROJ) $<  
+
+.cpp{$(CPP_OBJS)}.obj:
+   $(CPP) $(CPP_PROJ) $<  
+
+.cxx{$(CPP_OBJS)}.obj:
+   $(CPP) $(CPP_PROJ) $<  
+
+################################################################################
+# Begin Group "Source Files"
+
+################################################################################
+# Begin Source File
+
+SOURCE=.\status_d.c
+DEP_STATU=\
+	.\status_d.h
+
+$(INTDIR)/status_d.obj :  $(SOURCE)  $(DEP_STATU) $(INTDIR)
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\status_d.rc
+DEP_STATUS=\
+	.\status_d.h
+
+$(INTDIR)/status_d.res :  $(SOURCE)  $(DEP_STATUS) $(INTDIR)
+   $(RSC) $(RSC_PROJ)  $(SOURCE) 
+
+# End Source File
+# End Group
+# End Project
+################################################################################

Added: packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.rc
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.rc	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.rc	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,22 @@
+/****************************************************************************
+
+
+status_d.rc
+
+produced by Francois Levert from LAS inc.
+****************************************************************************/
+#define WIN32_LEAN_AND_MEAN
+
+#include <windows.h>
+#include "status_d.h"
+
+STATUS_D DIALOG 6, 15, 243, 119
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Status Update"
+FONT 8, "MS Sans Serif"
+{
+ PUSHBUTTON "Cancel", ID_CANCEL, 96, 96, 50, 14
+ LTEXT "Text", ID_TEXT1, 8, 11, 225, 16
+ LTEXT "Text", ID_TEXT2, 8, 34, 226, 16
+}
+

Added: packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.vcp
===================================================================
(Binary files differ)


Property changes on: packages/ogdi-dfsg/branches/upstream/current/ogdi/glutil/status_d.vcp
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: packages/ogdi-dfsg/branches/upstream/current/ogdi/include/ecs_util.h
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi/include/ecs_util.h	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi/include/ecs_util.h	2009-03-12 20:16:24 UTC (rev 2004)
@@ -19,6 +19,12 @@
  ******************************************************************************
  *
  * $Log: ecs_util.h,v $
+ * Revision 1.24  2008/05/28 01:47:03  cbalint
+ *    * prepare 3.2.0.beta2
+ *
+ * Revision 1.23  2007/05/09 21:41:24  cbalint
+ * 3.2.0beta2 release
+ *
  * Revision 1.22  2007/02/24 17:12:33  cbalint
  * 3.2.0beta1 pre-release
  *  Modified Files:
@@ -79,7 +85,7 @@
 #define ECS_UTIL 1
 
 #define OGDI_VERSION     320
-#define OGDI_RELEASEDATE 20070224
+#define OGDI_RELEASEDATE 20080528
 
 #include <stdio.h>
 #include <stdlib.h>

Deleted: packages/ogdi-dfsg/branches/upstream/current/ogdi-config
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi-config	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi-config	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,123 +0,0 @@
-#! /bin/sh
-
-# ogdi-config
-# provides configuration info for ogdi library.
-
-# Copyright (C) 2007 Balint Cristian <cbalint at redhat.com>
-# This file is released under the terms of GPL v2 license.
-#
-
-version="3.2.0beta1"
-prefix="/usr"
-exec_prefix="${prefix}"
-libdir="${exec_prefix}/lib"
-includedir="${prefix}/include/ogdi"
-libs="-logdi"
-all_libs="-logdi -lproj -lexpat -lz"
-I_opts="-I${includedir}"
-L_opts=""
-R_opts=""
-cppflags=""
-ccopts=""
-ldopts=""
-
-usage()
-{
-    cat <<EOF
-Usage: $0 [OPTION] ...
-
-Known values for OPTION are:
-
-  --prefix        print libogdi prefix
-  --libdir        print path to directory containing library
-  --libs          print library linking information
-  --ccopts        print compiler options
-  --cppflags      print pre-processor flags
-  --cflags        print preprocessor flags, I_opts, and compiler options
-  --I_opts        print "-I" include options
-  --L_opts        print linker "-L" flags for dynamic linking
-  --R_opts        print dynamic linker "-R" or "-rpath" flags
-  --ldopts        print linker options
-  --ldflags       print linker flags (ldopts, L_opts, R_opts, and libs)
-  --static        revise subsequent outputs for static linking
-  --help          print this help and exit
-  --version       print version information
-EOF
-
-    exit $1
-}
-
-if test $# -eq 0; then
-    usage 1
-fi
-
-while test $# -gt 0; do
-    case "$1" in
-
-    --prefix)
-        echo ${prefix}
-        ;;
-
-    --version)
-        echo ${version}
-        exit 0
-        ;;
-
-    --help)
-        usage 0
-        ;;
-
-    --ccopts)
-        echo ${ccopts}
-        ;;
-
-    --cppflags)
-        echo ${cppflags}
-        ;;
-
-    --cflags)
-        echo ${I_opts} ${cppflags} ${ccopts}
-        ;;
-
-    --libdir)
-        echo ${libdir}
-        ;;
-
-    --libs)
-        echo ${libs}
-        ;;
-
-    --I_opts)
-        echo ${I_opts}
-        ;;
-
-    --L_opts)
-        echo ${L_opts}
-        ;;
-
-    --R_opts)
-        echo ${R_opts}
-        ;;
-
-    --ldopts)
-    	echo ${ldopts}
-	;;
-
-    --ldflags)
-        echo ${ldopts} ${L_opts} ${R_opts} ${libs}
-        ;;
-
-    --static)
-        R_opts=""
-	libs=${all_libs}
-        ;;
-
-    *)
-        usage
-        exit 1
-        ;;
-    esac
-    shift
-done
-
-exit 0

Deleted: packages/ogdi-dfsg/branches/upstream/current/ogdi.pc
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/ogdi.pc	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/ogdi.pc	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1,12 +0,0 @@
-prefix=/usr
-exec_prefix=/usr
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-
-Name: ogdi
-Description: Open Geographic Datastore Interface
-Version: 3.2.0beta1
-Cflags: -I${includedir}/ogdi
-Libs: -L${libdir} -logdi
-Libs.private: -lproj -lexpat -lz
-

Added: packages/ogdi-dfsg/branches/upstream/current/patch
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/patch	                        (rev 0)
+++ packages/ogdi-dfsg/branches/upstream/current/patch	2009-03-12 20:16:24 UTC (rev 2004)
@@ -0,0 +1,52 @@
+--- ogdi-dfsg-3.2.0~beta1.orig/configure.in
++++ ogdi-dfsg-3.2.0~beta1/configure.in
+@@ -349,5 +349,9 @@
+ 		[chmod +x ogdi-config])
+ 
+ AC_OUTPUT(config/generic.mak)
+-mv config/generic.mak config/`uname`.mak
+ 
++target=`uname`
++if test "$target" = "GNU/kFreeBSD" ; then
++  target=Linux
++fi
++mv config/generic.mak config/$target.mak
+--- ogdi-dfsg-3.2.0~beta1.orig/configure
++++ ogdi-dfsg-3.2.0~beta1/configure
+@@ -5278,5 +5875,9 @@
+   $ac_cs_success || { (exit 1); exit 1; }
+ fi
+ 
+-mv config/generic.mak config/`uname`.mak
+ 
++target=`uname`
++if test "$target" = "GNU/kFreeBSD" ; then
++  target=Linux
++fi
++mv config/generic.mak config/$target.mak
+--- ogdi-dfsg-3.2.0~beta1.orig/config/common.mak.in
++++ ogdi-dfsg-3.2.0~beta1/config/common.mak.in
+@@ -52,6 +52,9 @@
+ 
+ ifndef TARGET
+ TARGET = $(shell uname)
++ifeq ($(TARGET), GNU/kFreeBSD)
++TARGET = Linux
++endif
+ endif
+ 
+ #
+--- ogdi-dfsg-3.2.0~beta1.orig/config/common.mak
++++ ogdi-dfsg-3.2.0~beta1/config/common.mak
+@@ -52,6 +52,9 @@
+ 
+ ifndef TARGET
+ TARGET = $(shell uname)
++ifeq ($(TARGET), GNU/kFreeBSD)
++TARGET = Linux
++endif
+ endif
+ 
+ #
+
+

Modified: packages/ogdi-dfsg/branches/upstream/current/vpflib/musedir.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/vpflib/musedir.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/vpflib/musedir.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -18,6 +18,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <dirent.h>
 #endif
 
 #include "machine.h"
@@ -43,8 +44,139 @@
 /* FILE_OPEN                                                              */
 /**************************************************************************/
 
+static int muse_exists_path(const char* path)
+{
+  int acc;
+/*  fprintf(stderr, "trying %s\n", path);*/
+#ifdef _WINDOWS
+  acc = _access(path, 0);
+#else
+  acc = access(path, 0); 
+#endif
+  return acc == 0;
+}
 
 
+static int muse_fix_path_case(const char* src_path, char dest_path[SZ_FNAME])
+{
+  char tmp_path[SZ_FNAME];
+  int lastSlashPos;
+  int i;
+  int len;
+  int curPartHasDot = 0;
+  int curPartIsLowerCase = 1;
+  int curPartIsUpperCase = 1;
+
+  strcpy(dest_path, src_path);
+  if (muse_exists_path(dest_path))
+  {
+    return 1;
+  }
+
+  lastSlashPos = -1;
+  len = strlen(dest_path);
+
+  /* Find the maximum part of the path that exists */
+  for(i=len-1;i>=0;i--)
+  {
+    if (dest_path[i] == FILE_SEP)
+    {
+      memcpy(tmp_path, dest_path, i);
+      tmp_path[i] = 0;
+      if (muse_exists_path(tmp_path))
+      {
+        lastSlashPos = i;
+        break;
+      }
+    }
+  }
+
+  i++;
+
+  for(;i<len;i++)
+  {
+    if (dest_path[i] == '.')
+    {
+      curPartHasDot = 1;
+    }
+    else if (dest_path[i] >= 'a' && dest_path[i] <= 'z')
+    {
+      curPartIsUpperCase = 0;
+    }
+    else if (dest_path[i] >= 'A' && dest_path[i] <= 'Z')
+    {
+      curPartIsLowerCase = 0;
+    }
+    if ((dest_path[i] == FILE_SEP || i == len-1) && i != 0)
+    {
+      int limit = (dest_path[i] == FILE_SEP) ? i-1 : i;
+      memcpy(tmp_path, dest_path, limit+1);
+      tmp_path[limit+1] = 0;
+      if (muse_exists_path(tmp_path) == 0)
+      {
+        int j;
+        for(j=lastSlashPos+1;j<=limit;j++)
+        {
+          tmp_path[j] = toupper(tmp_path[j]);
+        }
+        if (curPartIsUpperCase == 1 || muse_exists_path(tmp_path) == 0)
+        {
+          for(j=lastSlashPos+1;j<=limit;j++)
+          {
+            tmp_path[j] = tolower(tmp_path[j]);
+          }
+          if (curPartIsLowerCase == 1 || muse_exists_path(tmp_path) == 0)
+          {
+            if (i == len-1 && !(dest_path[i] == '.' || (i-1>=0 && dest_path[i-1] == ';' && dest_path[i] == '1')))
+            {
+               char tmp_dest_path[SZ_FNAME];
+               if (curPartHasDot == 0)
+               {
+                 strcpy(tmp_path, dest_path);
+                 strcat(tmp_path, ".");
+                 if (muse_fix_path_case(tmp_path, tmp_dest_path))
+                 {
+                   strcpy(dest_path, tmp_dest_path);
+                   return 1;
+                 }
+               }
+
+               strcpy(tmp_path, dest_path);
+               strcat(tmp_path, ";1");
+               if (muse_fix_path_case(tmp_path, tmp_dest_path))
+               {
+                 strcpy(dest_path, tmp_dest_path);
+                 return 1;
+               }
+
+               return 0;
+            }
+            else
+            {
+              return 0;
+            }
+          }
+          else
+          {
+            memcpy(dest_path, tmp_path, limit+1);
+          }
+        }
+        else
+        {
+          memcpy(dest_path, tmp_path, limit+1);
+        }
+      }
+      curPartIsLowerCase = 1;
+      curPartIsUpperCase = 1;
+      curPartHasDot = 0;
+      lastSlashPos = i;
+    }
+  }
+  return 1;
+}
+
+
+
 #if XVT_CC_PROTO
 FILE           *
 muse_file_open(char *path, char *mode)
@@ -56,100 +188,19 @@
 #endif
 
 {
-    FILE           *file;
     char            pathext[SZ_FNAME];
-    char            lobuf[SZ_FNAME];
-    char            upbuf[SZ_FNAME];
-    int             i, len;
-    BOOLEAN         DOT_FOUND = 0;
-    int32            lenup;
-    char            *s;
+    char            real_path[SZ_FNAME];
 
     strcpy(pathext, path);
     muse_check_path(pathext);
 
-#ifdef _WINDOWS
-    file = fopen(pathext, mode);
-    return (file);
-#endif				
-
-#ifdef unix
-    memset(lobuf, (char) NULL, SZ_FNAME);
-    memset(upbuf, (char) NULL, SZ_FNAME);
-    len = strlen(pathext);
-    strcpy(upbuf, pathext);
-    strcpy(lobuf, pathext);
-
-    for (i = len-1; i >= 0; i--)
+    if (muse_fix_path_case(pathext, real_path) == 0)
     {
-	if (pathext[i] == '.')
-	{
-	    DOT_FOUND = TRUE;
-	}
-        if (pathext[i] == (int) FILE_SEP) 
-            break;
+      return NULL;
     }
-#if 0
-    for (i = len - 1; (i >= 0 && pathext[i] != (int) FILE_SEP); i--)
-    {
-	upbuf[i] = toupper(pathext[i]);
-	lobuf[i] = tolower(pathext[i]);
-    }
-#endif
-    s = strchr(&pathext[1],'/');
-    if (s != (char *)NULL)
-      lenup = strlen(s);
-    else
-      lenup = len;
-    for (i = len - lenup; i < len; i++)
-    {
-	upbuf[i] = toupper(pathext[i]);
-	lobuf[i] = tolower(pathext[i]);
-    }
 
-    if ((file = fopen(pathext, mode)) == (FILE *) NULL)
-    {
+    return fopen(real_path, mode);
 
-	if (!DOT_FOUND)
-	    strcat(pathext, ".");
-	if ((file = fopen(pathext, mode)) == (FILE *) NULL)
-	{
-	    strcat(pathext, ";1");
-	    file = fopen(pathext, mode);
-	}
-    }
-    if (file == (FILE *) NULL)
-    {
-	if ((file = fopen(lobuf, mode)) == (FILE *) NULL)
-	{
-
-	    if (!DOT_FOUND)
-		strcat(lobuf, ".");
-	    if ((file = fopen(lobuf, mode)) == (FILE *) NULL)
-	    {
-		strcat(lobuf, ";1");
-		file = fopen(lobuf, mode);
-	    }
-	}
-    }
-    if (file == (FILE *) NULL)
-    {
-	if ((file = fopen(upbuf, mode)) == (FILE *) NULL)
-	{
-
-	    if (!DOT_FOUND)
-		strcat(upbuf, ".");
-	    if ((file = fopen(upbuf, mode)) == (FILE *) NULL)
-	    {
-		strcat(upbuf, ";1");
-		file = fopen(upbuf, mode);
-	    }
-	}
-    }
-
-    return (file);
-#endif
-
 /*
 #ifdef _MAC
     if ((file = fopen(pathext, mode)) == (FILE *) NULL)
@@ -194,6 +245,7 @@
     char            *s;
 
     strcpy(pathext, path);
+    muse_check_path(pathext);
 
 #ifdef _WINDOWS
     file = open(pathext, mode);
@@ -201,6 +253,9 @@
 #endif				
 
 #ifdef unix
+    acc = access(pathext, amode);
+    return (acc);
+#if 0
     memset(lobuf, (char) NULL, SZ_FNAME);
     memset(upbuf, (char) NULL, SZ_FNAME);
     len = strlen(pathext);
@@ -275,6 +330,7 @@
     }
     return (file);
 #endif				
+#endif				
 
 }
 
@@ -297,99 +353,24 @@
 #endif
 
 {
-
+    int             acc;
     char            pathext[SZ_FNAME];
-    int             acc;
-    char            lobuf[SZ_FNAME];
-    char            upbuf[SZ_FNAME];
-    int             i, len;
-    BOOLEAN         DOT_FOUND = 0;
-    int32            lenup;
-    char            *s;
+    char            real_path[SZ_FNAME];
 
     strcpy(pathext, path);
+    muse_check_path(pathext);
 
-#ifdef _WINDOWS
-    acc = _access(pathext, amode);
-    return (acc);
-#endif
-
-#ifdef unix
-    memset(lobuf, (char) NULL, SZ_FNAME);
-    memset(upbuf, (char) NULL, SZ_FNAME);
-    len = strlen(pathext);
-    strcpy(upbuf, pathext);
-    strcpy(lobuf, pathext);
-
-    for (i = len-1; i >= 0; i--)
+    if (muse_fix_path_case(pathext, real_path) == 0)
     {
-	if (pathext[i] == '.')
-	{
-	    DOT_FOUND = TRUE;
-	}
-        if (pathext[i] == (int) FILE_SEP) 
-            break;
+      return -1;
     }
-#if 0
-    for (i = len - 1; (i >= 0 && pathext[i] != (int) FILE_SEP); i--)
-    {
-	upbuf[i] = toupper(pathext[i]);
-	lobuf[i] = tolower(pathext[i]);
-    }
+
+#ifdef _WINDOWS
+    acc = _access(real_path, amode);
+#else
+    acc = access(real_path, amode);
 #endif
-    s = strchr(&pathext[1],'/');
-    if (s != (char *)NULL)
-      lenup = strlen(s);
-    else
-      lenup = len;
-    for (i = len - lenup; i < len; i++)
-    {
-	upbuf[i] = toupper(pathext[i]);
-	lobuf[i] = tolower(pathext[i]);
-    }
-
-    if ((acc = access(pathext, amode)) == -1)
-    {
-
-	if (!DOT_FOUND)
-	    strcat(pathext, ".");
-	if ((acc = access(pathext, amode)) == -1)
-	{
-	    strcat(pathext, ";1");
-	    acc = access(pathext, amode);
-	}
-    }
-    if (acc == -1)
-    {
-	if ((acc = access(lobuf, amode)) == -1)
-	{
-
-	    if (!DOT_FOUND)
-		strcat(lobuf, ".");
-	    if ((acc = access(lobuf, amode)) == -1)
-	    {
-		strcat(lobuf, ";1");
-		acc = access(lobuf, amode);
-	    }
-	}
-    }
-    if (acc == -1)
-    {
-	if ((acc = access(upbuf, amode)) == -1)
-	{
-
-	    if (!DOT_FOUND)
-		strcat(upbuf, ".");
-	    if ((acc = access(upbuf, amode)) == -1)
-	    {
-		strcat(upbuf, ";1");
-		acc = access(upbuf, amode);
-	    }
-	}
-    }
-    return (acc);
-#endif				
-
+    return acc;
 }
 
 
@@ -445,6 +426,65 @@
 muse_check_path(path)
     char *path;
 {
+#ifdef unix
+    char tpath[SZ_FNAME];
+    char *tp = tpath, *pp1 = path, *pp2;
+    DIR *dir;
+    struct dirent *de;
+
+    /*fprintf(stderr, "muse_check_path: \"%s\"\n", path);*/
+    while (*pp1) {
+        if (*pp1 == '/' || *pp1 == '\\') {
+            pp1++;
+            if (tp >= tpath + SZ_FNAME)
+                return;
+            *tp++ = FILE_SEP;
+            continue;
+        }
+        pp2 = pp1 + 1;
+        while (*pp2 && *pp2 != '/' && *pp2 != '\\')
+            pp2++;
+        if (tp >= tpath + SZ_FNAME)
+            return;
+        *tp = 0;
+	/*fprintf(stderr, "muse_check_path: directory \"%s\" \"%.*s\"\n", tpath, (int)(pp2 - pp1), pp1);*/
+        dir = opendir(tpath);
+        if (!dir) {
+	    /*fprintf(stderr, "muse_check_path: directory \"%s\" does not exist\n", tpath);*/
+            return;
+	}
+        while ((de = readdir(dir))) {
+	    /*fprintf(stderr, "muse_check_path: name \"%s\"\n", de->d_name);*/
+            if (strncasecmp(de->d_name, pp1, pp2 - pp1))
+                continue;
+            if (!de->d_name[pp2 - pp1])
+                break;
+            if (de->d_name[pp2 - pp1] == '.' && !de->d_name[pp2 - pp1 + 1])
+                break;
+            if (de->d_name[pp2 - pp1] == ';' && de->d_name[pp2 - pp1 + 1] == '1' && !de->d_name[pp2 - pp1 + 2])
+                break;
+            if (de->d_name[pp2 - pp1] == '.' && de->d_name[pp2 - pp1 + 1] == ';' && de->d_name[pp2 - pp1 + 2] == '1' &&
+		!de->d_name[pp2 - pp1 + 3])
+                break;
+        }
+        if (de) {
+            strncpy(tp, de->d_name, tpath + SZ_FNAME - tp);
+	    tp = memchr(tp, 0, tpath + SZ_FNAME - tp);
+	    if (!tp)
+		tp = tpath + SZ_FNAME;
+	    /*fprintf(stderr, "muse_check_path: new name \"%s\"\n", tpath);*/
+        }
+        closedir(dir);
+        if (!de)
+            return;
+	pp1 = pp2;
+    }
+    if (tp >= tpath + SZ_FNAME)
+	return;
+    *tp = 0;
+    strncpy(path, tpath, SZ_FNAME);
+    /*fprintf(stderr, "muse_check_path: returning \"%s\"\n", path);*/
+#else
     int32            i, length;
 
     length = strlen(path);
@@ -453,5 +493,6 @@
 	if (path[i] == '\\')
 	    path[i] = FILE_SEP;
     return;
+#endif
 }
 

Modified: packages/ogdi-dfsg/branches/upstream/current/vpflib/strfunc.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/vpflib/strfunc.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/vpflib/strfunc.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -204,6 +204,9 @@
    size_t len, i;
 
    len = strlen (str);
+   if (len == 0)
+     return str;
+
    i = len - 1;
    while ((i>0) && ((str[i]==0) || (str[i]==' '))) i--;
       if (i < (len-1))

Modified: packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfbrows.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfbrows.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfbrows.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -811,6 +811,7 @@
    /*  Read Index Directory Records */
    switch (data_type)
       {
+      case 'L': /* Character String */
       case 'T': /* Character String */
          t_elt = (char*) xvt_zmalloc ((size_t) nr_elts);
          for (i=0; i<nr_entries; i++)

Modified: packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfprop.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfprop.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfprop.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -2503,16 +2503,17 @@
       return FALSE;
       }
  
-   strcpy(locname,tablename);
-   rightjust(locname);
- 
    /* if '.' in string, delete through last . */
  
-   end = strrchr(locname,'.');
+   end = strrchr(tablename,'.');
 
    if (end != NULL) {
      strcpy(locname,end);
    }
+   else {
+     strcpy(locname,tablename);
+   }
+   rightjust(locname);
  
    strupr(locname);
  

Modified: packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfquery.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfquery.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfquery.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -1075,6 +1075,7 @@
                }
                break;
             case 'T':
+            case 'L':
                if (table.header[expr.field].count == 1) {
                   get_table_element( expr.field, row, table, &tval, &count );
                   tval2 = expr.value[0];
@@ -1219,6 +1220,7 @@
 	        }
 	     break;
 	  case 'T':
+      case 'L':
 	     if (table.header[expr.field].count == 1)
            {
 	        get_table_element( expr.field, row, table, &tval, &count );

Modified: packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfread.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfread.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/vpflib/vpfread.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -58,6 +58,8 @@
 #include <dos.h>
 #endif
 
+#include <iconv.h>
+
 #ifdef _UNIX
 #include <sys/stat.h>
 #define   SEEK_SET    0         /* Turbo C fseek value */
@@ -546,6 +548,7 @@
          case 'S':
             offset += sizeof(short int)*row[i].count;
             break;
+         case 'L':
          case 'T':
             offset += sizeof(char)*row[i].count;
             break;
@@ -790,6 +793,7 @@
       status = 0;
       switch (table.header[i].type) {
       case 'T':
+      case 'L':
 	if (count == 1) {
 	  row[i].ptr = (char *)xvt_zmalloc(sizeof(char));
 	  Read_Vpf_Char(row[i].ptr, table.fp, 1) ;
@@ -945,6 +949,7 @@
       count = origrow[i].count;
       row[i].count = count;
       switch (table.header[i].type) {
+         case 'L':
          case 'T':
             if (count==1) {
                row[i].ptr = (char *)xvt_zmalloc(1);
@@ -1369,7 +1374,18 @@
    int32   col;
    char     * tptr;
    void     * retvalue;
+   static int do_iconv = -1;
+   static iconv_t iconvd = (iconv_t)-1;
 
+   if (do_iconv == -1)
+   {
+     do_iconv = getenv("CONVERT_OGDI_TXT_TO_UTF8") != NULL;
+     if (do_iconv)
+     {
+       iconvd = iconv_open("UTF-8", "ISO-8859-1");
+     }
+   }
+
    retvalue = NULL;
    col = field_number;
    if ((col < 0) || (col >= table.nfields)) {
@@ -1384,18 +1400,54 @@
       case 'X':
          retvalue = NULL;
          break;
+      case 'L':
       case 'T':
          if (table.header[col].count == 1) {
             memcpy(value,row[col].ptr,sizeof(char));
          } else {
-            retvalue = (char*)xvt_zmalloc (((size_t)row[col].count + 1) *
+            int i, ascii = 1;
+            retvalue = (char*)xvt_zmalloc (((size_t)2 * row[col].count + 1) *
                                                                sizeof (char));
             tptr = (char*)xvt_zmalloc (((size_t)row[col].count + 1) *
                                                                sizeof (char));
             memcpy (tptr, row[col].ptr, (size_t)row[col].count *
                                                                sizeof (char));
             tptr[row[col].count] = '\0';
-            strcpy((char *)retvalue,tptr);
+            for(i=0;tptr[i]!=0;i++)
+            {
+              if ((unsigned char)tptr[i] >= 128)
+              {
+                ascii = 0;
+                if (table.header[col].type == 'T')
+                {
+                  //fprintf(stderr, "a T column contains non-ASCII text\n");
+                }
+                break;
+              }
+            }
+            if (ascii == 1 || iconvd == (iconv_t)-1)
+              strcpy((char *)retvalue,tptr);
+            else
+            {
+              size_t nin = row[col].count;
+              size_t nout = 2 * row[col].count;
+              void* saved_retvalue = retvalue;
+              char* saved_tptr = tptr;
+              char** outbuf = (char**)&retvalue;
+
+              size_t ret = iconv(iconvd, &tptr, &nin, outbuf, &nout);
+              tptr = saved_tptr;
+              retvalue = saved_retvalue;
+              row[col].count = strlen(retvalue);
+              if (ret == (size_t)-1)
+              {
+                fprintf(stderr, "Can't convert '%s' to UTF-8. Truncating to '%s'\n", tptr, (char*)retvalue);
+              }
+              else
+              {
+                //fprintf(stderr, "UTF-8 text : '%s'\n", (char*)retvalue);
+              }
+            }
             if(tptr != (char *)NULL)
               {xvt_free(tptr);tptr = (char *)NULL;}
          }

Modified: packages/ogdi-dfsg/branches/upstream/current/vpflib/vpftable.c
===================================================================
--- packages/ogdi-dfsg/branches/upstream/current/vpflib/vpftable.c	2009-03-12 19:02:30 UTC (rev 2003)
+++ packages/ogdi-dfsg/branches/upstream/current/vpflib/vpftable.c	2009-03-12 20:16:24 UTC (rev 2004)
@@ -535,6 +535,7 @@
 	    reclen += (sizeof (double) * table->header[i].count);
 	  table->header[i].nullval.Double = NULLDOUBLE;
 	  break;
+        case 'L':
         case 'T':
 	  if (reclen >= 0)
 	    {			/* if fixed length */
@@ -939,15 +940,40 @@
 	}	
       }
 
+
+      if (idxname != (char*)NULL)
+      {
+        xvt_free (idxname);
+        idxname = (char*)NULL;
+      }
+      
       /* If mode is READ and no variable length index exists then */
-      /* something has gone wrong so free up memory and return NULL */
       if ((!table.xfp) && (table.mode == Read))
 	{
-	  if (idxname != (char*)NULL)
-            {
-	      xvt_free (idxname);
-	      idxname = (char*)NULL;
-            }
+      /* build in-memory index by reading the whole table file */
+      int pos;
+      table.nrows = 0;
+      table.xstorage = RAM;
+      table.index = NULL;
+      pos = table.ddlen;
+      fseek (table.fp, pos,SEEK_SET);
+      /*fprintf(stderr, "%s\n", tablepath);*/
+      while(pos != tablesize)
+      {
+        int nextPos;
+        free_row(read_next_row(table), table);
+        table.nrows++;
+        table.index = realloc(table.index, table.nrows * sizeof (index_cell));
+        nextPos = ftell(table.fp);
+        table.index[table.nrows-1].pos = pos;
+        table.index[table.nrows-1].length = nextPos - pos;
+        /*fprintf(stderr, "%d : %d %d\n", table.nrows-1, pos,nextPos - pos);*/
+        pos = nextPos;
+      }
+      
+      table.idx_handle = table.index;
+#if 0
+      /* something has gone wrong so free up memory and return NULL */
 	  for (i=0; i<table.nfields; i++)
             if (table.header[i].name != (char*)NULL)
 	      {
@@ -967,16 +993,11 @@
 	  fclose (table.fp);
 	  table.fp = NULL;
 	  return table;
+#endif
 	}
 
-      if (idxname != (char*)NULL)
-	{
-	  xvt_free (idxname);
-	  idxname = (char*)NULL;
-	}
-
       /* Only read in index if file is read only */
-      if (table.xfp && (table.mode == Read))
+      else if (table.xfp && (table.mode == Read))
 	{
 	  Read_Vpf_Int (&(table.nrows), table.xfp, 1L);
 	  Read_Vpf_Int (&ulval, table.xfp, 1L);
@@ -1022,11 +1043,9 @@
       table.row = (ROW*)glock (table.row_handle);
 #endif
       for (i=0; i<table.nrows; i++)
-	{
-	  if (i == 13271)
-            i = 13271;
-	  table.row[i] = read_next_row (table);
-	}
+      {
+        table.row[i] = read_next_row (table);
+      }
       fclose (table.fp);
       table.storage = RAM;
     }
@@ -1109,7 +1128,7 @@
 	  table->header[i].name = (char*)NULL;
 	}
       /* free up null text string */
-      if (table->header[i].type == 'T')
+      if (table->header[i].type == 'T' || table->header[i].type == 'L')
 	if (table->header[i].nullval.Char != (char *)NULL)
 	  {
             xvt_free (table->header[i].nullval.Char);




More information about the Pkg-grass-devel mailing list