Index: configure
===================================================================
--- configure	(revision 45242)
+++ configure	(working copy)
@@ -8272,12 +8272,12 @@
 LDFLAGS="$GEOS_LIBS $LDFLAGS"
 
 
-echo $ac_n "checking for initGEOS in -lgeos_c""... $ac_c" 1>&6
-echo "configure:8277: checking for initGEOS in -lgeos_c" >&5
+echo $ac_n "checking for initGEOS in $GEOS_LIBS""... $ac_c" 1>&6
+echo "configure:8277: checking for initGEOS in $GEOS_LIBS" >&5
 ac_lib_var=`echo geos_c'_'initGEOS | sed 'y%./+-%__p_%'`
 
 ac_save_LIBS="$LIBS"
-LIBS="-lgeos_c  $LIBS"
+LIBS="$GEOS_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 8283 "configure"
 #include "confdefs.h"
@@ -8304,7 +8304,7 @@
 
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  GEOS_LIBS="$GEOS_LIBS -lgeos_c "
+  GEOS_LIBS="$GEOS_LIBS"
 else
   echo "$ac_t""no" 1>&6
 

Property changes on: mswindows/osgeo4w
___________________________________________________________________
Modified: svn:ignore
   - configure-stamp
vc
package.log

   + package.log*
configure-stamp
package
vc
.cvsignore


Index: mswindows/osgeo4w/postinstall.bat
===================================================================
--- mswindows/osgeo4w/postinstall.bat	(revision 45242)
+++ mswindows/osgeo4w/postinstall.bat	(working copy)
@@ -1,15 +1,16 @@
-set ICON=%OSGEO4W_ROOT%\apps\grass\grass-6.4.0svn\etc\gui\icons\grass.ico
-set BATCH=%OSGEO4W_ROOT%\bin\grass64.bat
+set ICON=%OSGEO4W_ROOT%\apps\grass\grass-@VERSION@\etc\gui\icons\grass.ico
+set BATCH=%OSGEO4W_ROOT%\bin\grass@POSTFIX@.bat
 
-textreplace -std -t "%OSGEO4W_ROOT%"\bin\grass64.bat
-textreplace -std -t "%OSGEO4W_ROOT%"\apps\grass\grass-6.4.0svn\etc\fontcap
-textreplace -std -t "%OSGEO4W_ROOT%"\apps\grass\bin\grass64
+textreplace -std -t "%OSGEO4W_ROOT%"\bin\grass@POSTFIX@-env.bat
+textreplace -std -t "%OSGEO4W_ROOT%"\bin\grass@POSTFIX@.bat
+textreplace -std -t "%OSGEO4W_ROOT%"\bin\grass@POSTFIX@
+textreplace -std -t "%OSGEO4W_ROOT%"\apps\grass\grass-@VERSION@\etc\fontcap
 
-mkdir "%OSGEO4W_STARTMENU%\GRASS GIS"
-xxmklink "%OSGEO4W_STARTMENU%\GRASS GIS\wxPython.lnk"   "%BATCH%" "-wxpython" \ "wxPython interface" 1 "%ICON%"
-xxmklink "%OSGEO4W_STARTMENU%\GRASS GIS\TclTk.lnk"      "%BATCH%" "-tcltk" \ "Tcl/Tk interface" 1 "%ICON%"
-xxmklink "%OSGEO4W_STARTMENU%\GRASS GIS\Text.lnk"       "%BATCH%" "-text" \ "Text interface" 1 "%ICON%"
+mkdir "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@"
+xxmklink "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@\wxPython @VERSION@.lnk"   "%BATCH%" "-wxpython" \ "wxPython interface" 1 "%ICON%"
+xxmklink "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@\TclTkx @VERSION@.lnk"     "%BATCH%" "-tcltk" \ "Tcl/Tk interface" 1 "%ICON%"
+xxmklink "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@\Text @VERSION@.lnk"       "%BATCH%" "-text" \ "Text interface" 1 "%ICON%"
 
-xxmklink "%ALLUSERSPROFILE%\Desktop\GRASS GIS (wxpython).lnk" "%BATCH%" "-wxpython" \ "wxPython" 1 "%ICON%"
-xxmklink "%ALLUSERSPROFILE%\Desktop\GRASS GIS (TclTk).lnk" "%BATCH%" "-tcltk" \ "Tcl/Tk" 1 "%ICON%"
-xxmklink "%ALLUSERSPROFILE%\Desktop\GRASS GIS (Text).lnk" "%BATCH%" "-text" \ "Text interface" 1 "%ICON%"
+xxmklink "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION@ (wxpython).lnk" "%BATCH%" "-wxpython" \ "wxPython" 1 "%ICON%"
+xxmklink "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION@ (TclTk).lnk" "%BATCH%" "-tcltk" \ "Tcl/Tk" 1 "%ICON%"
+xxmklink "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION@ (Text).lnk" "%BATCH%" "-text" \ "Text interface" 1 "%ICON%"
Index: mswindows/osgeo4w/grass.tmpl
===================================================================
--- mswindows/osgeo4w/grass.tmpl	(revision 44121)
+++ mswindows/osgeo4w/grass.tmpl	(working copy)
@@ -19,7 +19,7 @@
 trap "echo 'User break!' ; exit" 2 3 9 15
 
 # Set the GISBASE variable
-GISBASE=@osgeo4w_msys@
+GISBASE=@osgeo4w_msys@/apps/grass/grass-@VERSION@
 export GISBASE
 
 exec "$GISBASE/etc/Init.sh" "$@"
Index: mswindows/osgeo4w/grass.bat.tmpl
===================================================================
--- mswindows/osgeo4w/grass.bat.tmpl	(revision 44121)
+++ mswindows/osgeo4w/grass.bat.tmpl	(working copy)
@@ -1,3 +1,4 @@
 @echo off
 call @osgeo4w@\bin\o4w_env.bat
+call @osgeo4w@\bin\grass@POSTFIX@-env.bat
 "%WINGISBASE%"\etc\init.bat %*
Index: mswindows/osgeo4w/ini.bat.tmpl
===================================================================
--- mswindows/osgeo4w/ini.bat.tmpl	(revision 45242)
+++ mswindows/osgeo4w/ini.bat.tmpl	(working copy)
@@ -1,7 +1,8 @@
-set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass-6.4.0svn
-set WINGISBASE=%OSGEO4W_ROOT%\apps\grass\grass-6.4.0svn
+set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass-@VERSION@
+set WINGISBASE=%OSGEO4W_ROOT%\apps\grass\grass-@VERSION@
 set GRASS_SH=%OSGEO4W_ROOT%\apps\msys\bin\sh.exe
 set GRASS_WISH=%OSGEO4W_ROOT%\bin\wish.exe
 set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python.exe
 set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj
 set GRASS_HTML_BROWSER=%PROGRAMFILES%\Internet Explorer\iexplore.exe
+set PATH=%OSGEO4W_ROOT%\apps\grass\grass-@VERSION@\bin;%PATH%
Index: mswindows/osgeo4w/geos-config
===================================================================
--- mswindows/osgeo4w/geos-config	(revision 0)
+++ mswindows/osgeo4w/geos-config	(revision 0)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+usage()
+{
+    cat <<EOF
+Usage: geos-config [OPTIONS]
+Options:
+     [--prefix]
+     [--version]
+     [--libs]
+     [--cflags]
+     [--ldflags]
+     [--includes]
+     [--jtsport]
+EOF
+    exit $1
+}
+if test $# -eq 0; then
+  usage 1 1>&2
+fi
+while test $# -gt 0; do
+case "$1" in
+    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+    *) optarg= ;;
+esac
+case $1 in
+    --prefix)
+    echo $OSGEO4W_ROOT_MSYS
+     ;;
+    --version)
+    echo 3.2.2
+     ;;
+    --cflags)
+    echo -I$OSGEO4W_ROOT_MSYS/include
+      ;;
+    --libs)
+      echo $OSGEO4W_ROOT_MSYS/lib/geos_c_i.lib
+      ;;
+    --ldflags)
+      echo 
+      ;;
+    --includes)
+      echo $OSGEO4W_ROOT_MSYS/include
+      ;;
+    --jtsport)
+    echo 1.10.0 
+      ;;
+    *)
+      usage 1 1>&2
+      ;;
+  esac
+  shift
+done
+
+

Property changes on: mswindows/osgeo4w/geos-config
___________________________________________________________________
Added: svn:executable
   + *

Index: mswindows/osgeo4w/config.h.vc
===================================================================
--- mswindows/osgeo4w/config.h.vc	(revision 45242)
+++ mswindows/osgeo4w/config.h.vc	(working copy)
@@ -162,7 +162,7 @@
 #define HAVE_PQCMDTUPLES 1
 
 /* define if ODBC exists */
-/* #undef HAVE_SQL_H */
+#define HAVE_SQL_H 1
 
 /* define if tiffio.h exists */
 #define HAVE_TIFFIO_H 1
Index: mswindows/osgeo4w/grass64.tmpl
===================================================================
--- mswindows/osgeo4w/grass64.tmpl	(revision 45242)
+++ mswindows/osgeo4w/grass64.tmpl	(working copy)
@@ -1,25 +0,0 @@
-#! /bin/sh
-#############################################################################
-#
-# MODULE:   	GRASS Initialization
-# AUTHOR(S):	Justin Hickey - Thailand - jhickey@hpcc.nectec.or.th
-# PURPOSE:  	The source file for this shell script is in
-#   	    	lib/init/grass.src and is the grass startup script. It
-#   	    	requires a source file because the definition of GISBASE
-#   	    	is not known until compile time and is substituted from the
-#   	    	Makefile. Any command line options are passed to Init.sh.
-# COPYRIGHT:    (C) 2000-2005 by the GRASS Development Team
-#
-#               This program is free software under the GNU General Public
-#   	    	License (>=v2). Read the file COPYING that comes with GRASS
-#   	    	for details.
-#
-#############################################################################
-
-trap "echo 'User break!' ; exit" 2 3 9 15
-
-# Set the GISBASE variable
-GISBASE=@osgeo4w_msys@
-export GISBASE
-
-exec "$GISBASE/etc/Init.sh" "$@"
Index: mswindows/osgeo4w/package.sh
===================================================================
--- mswindows/osgeo4w/package.sh	(revision 45242)
+++ mswindows/osgeo4w/package.sh	(working copy)
@@ -1,4 +1,4 @@
-#!/c/OSGeo4W/apps/msys/bin/sh
+#!/c/Programme/OSGeo4W/apps/msys/bin/sh
 
 set -e
 
@@ -7,38 +7,95 @@
 	exit 1
 fi
 
-export OSGEO4W_ROOT_MSYS=/c/OSGeo4W
+if ! [ -d /tmp ]; then
+	mkdir /tmp
+	if ! [ -d /tmp ]; then
+		echo /tmp does not exists
+		exit 1
+	fi
+fi
+
+export PACKAGE=${1:-1}
+export POSTFIX=$2
+
+export OSGEO4W_ROOT_MSYS=/c/Programme/OSGeo4W
 export PATH=.:/c/mingw/bin:/usr/local/bin:/bin:$OSGEO4W_ROOT_MSYS/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem
 
-version() {
-	(
-		read MAJOR
-		read MINOR
-		read PATCH
-		echo $MAJOR.$MINOR.$PATCH
-	) <include/VERSION
+T0=$(date +%s)
+LT=$T0
+CS=""
+
+log() {
+	local D T
+	NOW=$(date)
+	T=$(date +%s)
+
+	if [ -n "$CS" ]; then
+		local D H M S
+		(( S=T-$LT ))
+		(( M=S/60 )); (( S=S%60 ))
+		(( H=M/60 )); (( M=M%60 ))
+		(( D=H/24 )); (( H=H%24 ))
+
+		echo -n "$NOW: FINISHED $CS AFTER "
+		(( D>0 )) && echo -n "${D}d"
+		(( H>0 )) && echo -n "${H}h"
+		(( M>0 )) && echo -n "${M}m"
+		echo "${S}s"
+	fi
+
+	CS="$@"
+	LT=$T
+	if [ -n "$CS" ]; then
+		echo $NOW: STARTING $CS
+	elif [ -n "$T0" ]; then
+		CS="COMPLETE RUN"
+		LT=$T0
+		T0=""
+		log
+	fi
 }
 
-export VERSION=$(version)
-export PACKAGE=3
+exec 3<include/VERSION
+read MAJOR <&3
+read MINOR <&3
+read PATCH <&3
 
+export VERSION=$MAJOR.$MINOR.$PATCH
 
-(
+if [ -f mswindows/osgeo4w/package.log ]; then
+	i=0
+	while [ -f mswindows/osgeo4w/package.log.$i ]; do
+		(( i++ ))
+	done
+	mv mswindows/osgeo4w/package.log mswindows/osgeo4w/package.log.$i
+fi
+
+exec 3>&1 >>mswindows/osgeo4w/package.log 2>&1
+
 echo
 echo
 echo
 
+[ -d mswindows/osgeo4w/lib ] || mkdir mswindows/osgeo4w/lib
+cp -uv $OSGEO4W_ROOT_MSYS/lib/sqlite3_i.lib mswindows/osgeo4w/lib/libsqlite3.a
+cp -uv $OSGEO4W_ROOT_MSYS/lib/proj.lib mswindows/osgeo4w/lib/libproj.a
+cp -uv $OSGEO4W_ROOT_MSYS/lib/libtiff_i.lib mswindows/osgeo4w/lib/libtiff.a
+cp -uv $OSGEO4W_ROOT_MSYS/lib/libpq.lib mswindows/osgeo4w/lib/libpq.a
+cp -uv $OSGEO4W_ROOT_MSYS/lib/jpeg_i.lib mswindows/osgeo4w/lib/libjpeg.a
+cp -uv $OSGEO4W_ROOT_MSYS/lib/zlib.lib mswindows/osgeo4w/lib/libz.a
+
 if ! [ -f mswindows/osgeo4w/configure-stamp ]; then
 
 	if [ -e include/Make/Grass.make ] ; then
-	    echo $(date): STARTING make distclean
+	    log make distclean
 	    make distclean
 	fi
 
-	echo $(date): STARTING configure
+	log configure
 	./configure \
-		--with-libs="$OSGEO4W_ROOT_MSYS/apps/gdal-16/lib $OSGEO4W_ROOT_MSYS/lib" \
-		--with-includes="$OSGEO4W_ROOT_MSYS/apps/gdal-16/include $OSGEO4W_ROOT_MSYS/include" \
+		--with-libs="$OSGEO4W_ROOT_MSYS/lib $PWD/mswindows/osgeo4w/lib" \
+		--with-includes="$OSGEO4W_ROOT_MSYS/include" \
 		--exec-prefix=$OSGEO4W_ROOT_MSYS/bin \
 		--libexecdir=$OSGEO4W_ROOT_MSYS/bin \
 		--prefix=$OSGEO4W_ROOT_MSYS/apps/grass \
@@ -51,7 +108,8 @@
 		--with-fftw \
 		--with-freetype \
 		--with-proj-share=$OSGEO4W_ROOT_MSYS/share/proj \
-		--with-gdal=$OSGEO4W_ROOT_MSYS/bin/gdal-config \
+		--with-gdal=$PWD/mswindows/osgeo4w/gdal-config \
+		--with-geos=$PWD/mswindows/osgeo4w/geos-config \
 		--with-tcltk \
 		--with-sqlite \
 		--with-postgres \
@@ -64,78 +122,66 @@
 	touch mswindows/osgeo4w/configure-stamp
 fi
 
-echo $(date): STARTING make
-make || make
+log make
+make -k || make || ( cat error.log >&3 && false )
 
-echo $(date): STARTING make install
+log make install
 make install
 
-echo $(date): STARTING cleanup
-mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib/*.$VERSION.dll $OSGEO4W_ROOT_MSYS/bin
-rm $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib/*.dll
+log cleanup
 
+mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib/*.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
+
 mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h.mingw
 cp mswindows/osgeo4w/config.h.switch $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h
 cp mswindows/osgeo4w/config.h.vc $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass
-cp mswindows/osgeo4w/grass64.bat.tmpl $OSGEO4W_ROOT_MSYS/bin/grass64.bat.tmpl
-cp mswindows/osgeo4w/ini.bat.tmpl $OSGEO4W_ROOT_MSYS/etc/ini/grass.bat.tmpl
-cp mswindows/osgeo4w/postinstall.bat $OSGEO4W_ROOT_MSYS/etc/postinstall/grass.bat
-cp mswindows/osgeo4w/preremove.bat $OSGEO4W_ROOT_MSYS/etc/preremove/grass.bat
-#cp /c/mingw/bin/libgnurx-0.dll $OSGEO_ROOT_MSYS/bin
-#cp /c/mingw/bin/libiconv-2.dll $OSGEO_ROOT_MSYS/bin
-#cp /c/mingw/bin/libintl-8.dll $OSGEO_ROOT_MSYS/bin
 
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.bat.tmpl
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/grass.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.tmpl
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/ini.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX-env.bat.tmpl
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/postinstall.bat >$OSGEO4W_ROOT_MSYS/etc/postinstall/grass$POSTFIX.bat
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/preremove.bat >$OSGEO4W_ROOT_MSYS/etc/preremove/grass$POSTFIX.bat
+
+cp /c/mingw/bin/libgnurx-0.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
+cp /c/mingw/bin/libiconv-2.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
+cp /c/mingw/bin/libintl-8.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
+
 P=$(pwd -W)
 P=${P//\//\\\\}\\\\dist.i686-pc-mingw32
 
-sed -e "s#$P#@osgeo4w@#" $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap.tmpl
-sed -e "s#$P#@osgeo4w_msys@#" $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass64 >$OSGEO4W_ROOT_MSYS/apps/grass/bin/grass64.tmpl
+sed -e "s#$P#@osgeo4w@#g" $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap.tmpl
 rm $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap 
+if [ -f $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass$MAJOR$MINOR ]; then
+	sed -e "s#$P#@osgeo4w_msys@#g" $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass$MAJOR$MINOR >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.tmpl
+	rm $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass$MAJOR$MINOR
+elif [ -f dist.i686-pc-mingw32/grass$MAJOR$MINOR ]; then
+	sed -e "s#$P#@osgeo4w_msys@/apps/grass/grass-$VERSION#g" dist.i686-pc-mingw32/grass$MAJOR$MINOR.tmp >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.tmpl
+fi
 
-#echo $(date): STARTING building vc libraries
-#sh mswindows/osgeo4w/mklibs.sh $OSGEO4W_ROOT_MSYS/bin/*.$VERSION.dll
-#mv mswindows/osgeo4w/vc/grass*.lib $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib
-#
+log building vc libraries
+sh mswindows/osgeo4w/mklibs.sh $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin/*.$VERSION.dll
+mv mswindows/osgeo4w/vc/grass*.lib $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib
+
 #set -x
-#echo $(date): BUILDING GDAL GRASS plugins
-#cmd /c 'mswindows\\osgeo4w\\gdalplugins.cmd $VERSION'
-#
-#echo $(date): CREATING packages in $(PDIR)
-#mkdir -p package/grass-devel package/grass-devel-mingw package/grass-devel-vc package/grass
-#
-#PDIR=$PWD/package
-#cd $OSGEO4W_ROOT_MSYS
-#tar -cjf $PDIR/grass-devel/grass-devel-$VERSION-$PACKAGE.tar.bz2 \
-#	apps/grass/grass-$VERSION/include
-#
-#tar -cjf $PDIR/grass-devel-mingw/grass-devel-mingw-$VERSION-$PACKAGE.tar.bz2 \
-#	apps/grass/grass-$VERSION/lib/libgrass*.a
-#
-#tar -cjf $PDIR/grass-devel-vc/grass-devel-vc-$VERSION-$PACKAGE.tar.bz2 \
-#	apps/grass/grass-$VERSION/lib/*.lib
-#
-#tar -cjf $PDIR/grass/grass-$VERSION-$PACKAGE.tar.bz2 \
-#	apps/grass/bin/grass64.tmpl \
-#	apps/grass/grass-$VERSION/authors \
-#	apps/grass/grass-$VERSION/bin/ \
-#	apps/grass/grass-$VERSION/bwidget/ \
-#	apps/grass/grass-$VERSION/changes \
-#	apps/grass/grass-$VERSION/copying \
-#	apps/grass/grass-$VERSION/docs \
-#	apps/grass/grass-$VERSION/driver \
-#	apps/grass/grass-$VERSION/etc \
-#	apps/grass/grass-$VERSION/gpl.txt \
-#	apps/grass/grass-$VERSION/requirements.html \
-#	apps/grass/grass-$VERSION/scripts \
-#	bin/libgnurx-0.dll \
-#	bin/libiconv-2.dll \
-#	bin/libintl-8.dll \
-#	bin/grass64.bat.tmpl \
-#	bin/libgrass_*.$VERSION.dll \
-#	etc/ini/grass.bat \
-#	etc/postinstall/grass.bat \
-#	etc/preremove/grass.bat
+#log BUILDING GDAL GRASS plugins
+#$COMSPEC /c "mswindows\\osgeo4w\\gdalplugins.cmd $VERSION"
 
-echo $(date): END
+log CREATING PACKAGES
+mkdir -p package/grass$POSTFIX
 
-) | tee -a mswindows/osgeo4w/package.log
+PDIR=$PWD/package
+cd $OSGEO4W_ROOT_MSYS
+
+tar -cjf $PDIR/grass$POSTFIX/grass$POSTFIX-$VERSION-$PACKAGE.tar.bz2 \
+	apps/grass/grass-$VERSION \
+	bin/grass$POSTFIX.bat.tmpl \
+	bin/grass$POSTFIX.tmpl \
+        bin/grass$POSTFIX-env.bat.tmpl \
+	etc/postinstall/grass$POSTFIX.bat \
+	etc/preremove/grass$POSTFIX.bat
+
+cd $PDIR/..
+/c/cygwin/bin/svn diff >/tmp/grass$POSTFIX-$VERSION.diff
+tar -C /tmp -cjf $PDIR/grass$POSTFIX/grass$POSTFIX-$VERSION-$PACKAGE-src.tar.bz2 grass$POSTFIX-$VERSION.diff
+
+log
Index: mswindows/osgeo4w/grass64.bat.tmpl
===================================================================
--- mswindows/osgeo4w/grass64.bat.tmpl	(revision 45242)
+++ mswindows/osgeo4w/grass64.bat.tmpl	(working copy)
@@ -1,3 +0,0 @@
-@echo off
-call @osgeo4w@\bin\o4w_env.bat
-"%WINGISBASE%"\etc\init.bat %*
Index: mswindows/osgeo4w/preremove.bat
===================================================================
--- mswindows/osgeo4w/preremove.bat	(revision 45242)
+++ mswindows/osgeo4w/preremove.bat	(working copy)
@@ -1,15 +1,13 @@
-del "%OSGEO4W_STARTMENU%\GRASS.lnk"
-del "%ALLUSERSPROFILE%\Desktop\grass.lnk"
+del "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@\wxpython.lnk"
+del "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@\tcltk.lnk"
+del "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@\text.lnk"
+rmdir "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@"
 
-del "%OSGEO4W_STARTMENU%\GRASS GIS\wxpython.lnk"
-del "%OSGEO4W_STARTMENU%\GRASS GIS\tcltk.lnk"
-del "%OSGEO4W_STARTMENU%\GRASS GIS\text.lnk"
-rmdir "%OSGEO4W_STARTMENU%\GRASS GIS"
+del "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION@ (wxPython).lnk"
+del "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION@ (TclTk).lnk"
+del "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION@ (Text).lnk"
 
-del "%ALLUSERSPROFILE%\Desktop\GRASS GIS (wxPython).lnk"
-del "%ALLUSERSPROFILE%\Desktop\GRASS GIS (TclTk).lnk"
-del "%ALLUSERSPROFILE%\Desktop\GRASS GIS (Text).lnk"
-
-del "%OSGEO4W_ROOT%"\apps\grass\grass-6.4.0svn\etc\fontcap
-del "%OSGEO4W_ROOT%"\apps\grass\bin\grass64
-del "%OSGEO4W_ROOT%"\bin\grass64.bat
+del "%OSGEO4W_ROOT%"\apps\grass\grass-@VERSION@\etc\fontcap
+del "%OSGEO4W_ROOT%"\apps\grass\bin\grass@POSTFIX@
+del "%OSGEO4W_ROOT%"\bin\grass@POSTFIX@-env.bat
+del "%OSGEO4W_ROOT%"\bin\grass@POSTFIX@.bat
Index: mswindows/osgeo4w/gdal-config
===================================================================
--- mswindows/osgeo4w/gdal-config	(revision 0)
+++ mswindows/osgeo4w/gdal-config	(revision 0)
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+
+CONFIG_LIBS="$OSGEO4W_ROOT_MSYS/lib/gdal_i.lib"
+CONFIG_DEP_LIBS="$OSGEO4W_ROOT_MSYS/lib/libpng13.lib $OSGEO4W_ROOT_MSYS/lib/zlib.lib"
+CONFIG_PREFIX="$OSGEO4W_ROOT_MSYS"
+CONFIG_CFLAGS="-I$OSGEO4W_ROOT_MSYS/include"
+CONFIG_VERSION="1.8.0"
+CONFIG_OGR_ENABLED=yes
+CONFIG_FORMATS="gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b nitf bmp pcidsk airsar rs2 ilwis rmf rik leveller sgi idrisi bsb gif jpeg png pcraster "
+usage()
+{
+	cat <<EOF
+Usage: gdal-config [OPTIONS]
+Options:
+	[--prefix[=DIR]]
+	[--libs]
+	[--dep-libs]
+	[--cflags]
+	[--version]
+	[--ogr-enabled]
+	[--formats]
+EOF
+	exit $1
+}
+
+if test $# -eq 0; then
+	usage 1 1>&2
+fi
+
+case $1 in 
+  --libs)
+    echo $CONFIG_LIBS
+    ;;
+
+  --dep-libs)
+    echo $CONFIG_DEP_LIBS
+    ;;
+
+  --cflags)
+    echo $CONFIG_CFLAGS
+    ;;
+
+  --prefix)
+    echo $CONFIG_PREFIX
+    ;;
+
+  --version)
+    echo $CONFIG_VERSION
+    ;;
+
+  --ogr-enabled)
+    echo $CONFIG_OGR_ENABLED
+    ;;
+
+  --formats)
+    echo $CONFIG_FORMATS
+    ;;
+
+  *)
+    usage 1 1>&2
+    ;;
+
+esac

Property changes on: mswindows/osgeo4w/gdal-config
___________________________________________________________________
Added: svn:executable
   + *

Index: mswindows/osgeo4w/gdalplugins.cmd
===================================================================
--- mswindows/osgeo4w/gdalplugins.cmd	(revision 45242)
+++ mswindows/osgeo4w/gdalplugins.cmd	(working copy)
@@ -1,33 +0,0 @@
-path %SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem
-
-set VS90COMNTOOLS=%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\Tools\
-call "%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
-set OSGEO4W_ROOT=%PROGRAMFILES%\OSGeo4W
-set P=%PATH%
-call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
-path %P%;%OSGEO4W_ROOT%\bin
-
-set VERSION=1.6.0
-set PACKAGE=1
-
-set P=%CD%
-
-echo OGR: %DATE% %TIME%
-cd ..\gdal-1.6\ogr\ogrsf_frmts\grass
-nmake /f makefile.vc clean
-nmake /f makefile.vc GRASS_VERSION=%1 plugin
-
-echo GDAL: %DATE% %TIME%
-cd ..\..\..\frmts\grass
-nmake /f makefile.vc clean
-nmake /f makefile.vc GRASS_VERSION=%1 plugin
-
-cd %P%
-
-mkdir package\gdal16-grass
-tar -C %OSGEO4W_ROOT% -cjf package/gdal16-grass-%VERSION%-%PACKAGE%.tar.bz2 ^
-	apps/gdal-16/bin/gdalplugins/ogr_GRASS.dll ^
-	apps/gdal-16/bin/gdalplugins/gdal_GRASS.dll
-
-:end
-echo END: %DATE% %TIME%
Index: locale/Makefile
===================================================================
--- locale/Makefile	(revision 45242)
+++ locale/Makefile	(working copy)
@@ -75,14 +75,21 @@
 		done
 	@echo "Be careful with SVN commits as .po file updates must be syncronized with the individual translators."
 
-define dom_rule
-$(1)_FILES := $$(patsubst po/grass$(1)_%.po,$$(MO_DIR)/%/LC_MESSAGES/grass$(1).mo,$$(wildcard po/grass$(1)_*.po))
-$$(MO_DIR)/%/LC_MESSAGES/grass$(1).mo: po/grass$(1)_%.po
-	@ [ -d $$(MO_DIR)/$$*/LC_MESSAGES ] || $(MKDIR) $$(MO_DIR)/$$*/LC_MESSAGES
-	msgfmt --statistics -o $$@ $$<
-endef
-$(foreach domain,libs mods wxpy,$(eval $(call dom_rule,$(domain))))
+libs_FILES := $(patsubst po/grasslibs_%.po,$(MO_DIR)/%/LC_MESSAGES/grasslibs.mo,$(wildcard po/grasslibs_*.po))
+$(MO_DIR)/%/LC_MESSAGES/grasslibs.mo: po/grasslibs_%.po
+	@ [ -d $(MO_DIR)/$*/LC_MESSAGES ] || $(MKDIR) $(MO_DIR)/$*/LC_MESSAGES
+	msgfmt --statistics -o $@ $<
 
+mods_FILES := $(patsubst po/grassmods_%.po,$(MO_DIR)/%/LC_MESSAGES/grassmods.mo,$(wildcard po/grassmods_*.po))
+$(MO_DIR)/%/LC_MESSAGES/grassmods.mo: po/grassmods_%.po
+	@ [ -d $(MO_DIR)/$*/LC_MESSAGES ] || $(MKDIR) $(MO_DIR)/$*/LC_MESSAGES
+	msgfmt --statistics -o $@ $<
+
+wxpy_FILES := $(patsubst po/grasswxpy_%.po,$(MO_DIR)/%/LC_MESSAGES/grasswxpy.mo,$(wildcard po/grasswxpy_*.po))
+$(MO_DIR)/%/LC_MESSAGES/grasswxpy.mo: po/grasswxpy_%.po
+	@ [ -d $(MO_DIR)/$*/LC_MESSAGES ] || $(MKDIR) $(MO_DIR)/$*/LC_MESSAGES
+	msgfmt --statistics -o $@ $<
+
 $(MSG_DIR)/%.msg: po/grasstcl_%.po
 	@ [ -d $(MSG_DIR) ] || $(MKDIR) $(MSG_DIR)
 	msgfmt --statistics --tcl -l $* -d $(MSG_DIR)/ $<
Index: lib/db/dbmi_base/string.c
===================================================================
--- lib/db/dbmi_base/string.c	(revision 45242)
+++ lib/db/dbmi_base/string.c	(working copy)
@@ -142,7 +142,7 @@
 void db_free_string(dbString * x)
 {
     if (x->nalloc > 0)
-	free(x->string);
+	db_free(x->string);
     db_init_string(x);
 }
 
@@ -159,7 +159,7 @@
     if (a) {
 	for (i = 0; i < n; i++)
 	    db_free_string(&a[i]);
-	free(a);
+	db_free(a);
     }
 }
 
Index: lib/db/dbmi_base/index.c
===================================================================
--- lib/db/dbmi_base/index.c	(revision 45242)
+++ lib/db/dbmi_base/index.c	(working copy)
@@ -80,7 +80,7 @@
     if (list) {
 	for (i = 0; i < count; i++)
 	    db_free_index(&list[i]);
-	free(list);
+	db_free(list);
     }
 }
 
Index: lib/db/dbmi_base/dirent.c
===================================================================
--- lib/db/dbmi_base/dirent.c	(revision 45242)
+++ lib/db/dbmi_base/dirent.c	(working copy)
@@ -84,7 +84,7 @@
 	dirent[i].isdir = (db_isdir(path) == DB_OK);
     }
     closedir(dp);
-    free(path);
+    db_free(path);
 
     sort_dirent(dirent, *n);
 
@@ -104,7 +104,7 @@
     if (dirent) {
 	for (i = 0; i < count; i++)
 	    db_free_string(&dirent[i].name);
-	free(dirent);
+	db_free(dirent);
     }
 }
 
Index: lib/db/dbmi_base/error.c
===================================================================
--- lib/db/dbmi_base/error.c	(revision 45242)
+++ lib/db/dbmi_base/error.c	(working copy)
@@ -33,7 +33,7 @@
 void db_set_error_who(const char *me)
 {
     if (who)
-	free(who);
+	db_free_string(who);
     who = db_store(me);
 }
 
@@ -59,7 +59,7 @@
     if (s == NULL)
 	s = "<NULL error message>";
     if (err_msg)
-	free(err_msg);
+	db_free_string(err_msg);
     err_msg = db_store(s);
     err_flag = 1;
     if (auto_print_errors)
Index: lib/db/dbmi_base/dbmscap.c
===================================================================
--- lib/db/dbmi_base/dbmscap.c	(revision 45242)
+++ lib/db/dbmi_base/dbmscap.c	(working copy)
@@ -232,6 +232,6 @@
 
     for (cur = list; cur; cur = next) {
 	next = cur->next;
-	free(cur);
+	db_free(cur);
     }
 }
Index: lib/db/dbmi_base/value.c
===================================================================
--- lib/db/dbmi_base/value.c	(revision 45242)
+++ lib/db/dbmi_base/value.c	(working copy)
@@ -353,15 +353,15 @@
 	for (i = 0; i < arr->n_values; i++) {
 	    if (arr->ctype == DB_C_TYPE_STRING && arr->value[i].val.s) {
 		db_free_string(arr->value[i].val.s);
-		free(arr->value[i].val.s);
+		db_free(arr->value[i].val.s);
 	    }
 	    if (arr->ctype == DB_C_TYPE_DATETIME && arr->value[i].val.t) {
-		free(arr->value[i].val.t);
+		db_free(arr->value[i].val.t);
 	    }
 	}
     }
 
-    free(arr->value);
+    G_free(arr->value);
 }
 
 /*!
Index: lib/db/dbmi_base/cursor.c
===================================================================
--- lib/db/dbmi_base/cursor.c	(revision 45242)
+++ lib/db/dbmi_base/cursor.c	(working copy)
@@ -274,7 +274,7 @@
 void db_free_cursor_column_flags(dbCursor * cursor)
 {
     if (cursor->column_flags)
-	free(cursor->column_flags);
+	db_free(cursor->column_flags);
     cursor->column_flags = NULL;
 }
 
Index: lib/db/dbmi_base/table.c
===================================================================
--- lib/db/dbmi_base/table.c	(revision 45242)
+++ lib/db/dbmi_base/table.c	(working copy)
@@ -21,7 +21,7 @@
 
     table->columns = (dbColumn *) db_calloc(sizeof(dbColumn), ncols);
     if (table->columns == NULL) {
-	free(table);
+	db_free(table);
 	return (table = NULL);
     }
     table->numColumns = ncols;
@@ -58,8 +58,8 @@
     for (i = 0; i < table->numColumns; i++)
 	db_free_column(&table->columns[i]);
     if (table->columns)
-	free(table->columns);
-    free(table);
+	db_free(table->columns);
+    db_free(table);
 }
 
 /*!
Index: lib/db/dbmi_base/alloc.c
===================================================================
--- lib/db/dbmi_base/alloc.c	(revision 45242)
+++ lib/db/dbmi_base/alloc.c	(working copy)
@@ -74,3 +74,14 @@
 	db_memory_error();
     return s;
 }
+
+/*!
+   \fn void *db_free (void *s)
+   \brief 
+   \return 
+   \param 
+ */
+void *db_free(void *s)
+{
+    free(s);
+}
Index: lib/db/dbmi_base/handle.c
===================================================================
--- lib/db/dbmi_base/handle.c	(revision 45242)
+++ lib/db/dbmi_base/handle.c	(working copy)
@@ -77,7 +77,7 @@
     if (handle) {
 	for (i = 0; i < count; i++)
 	    db_free_handle(&handle[i]);
-	free(handle);
+	db_free(handle);
     }
 }
 
Index: lib/db/dbmi_driver/d_close_cur.c
===================================================================
--- lib/db/dbmi_driver/d_close_cur.c	(revision 45242)
+++ lib/db/dbmi_driver/d_close_cur.c	(working copy)
@@ -44,7 +44,7 @@
     db_drop_token(token);
     db_free_cursor(cursor);
     db__drop_cursor_from_driver_state(cursor);
-    free(cursor);
+    db_free(cursor);
 
     /* send the return code */
     if (stat != DB_OK) {
Index: lib/db/dbmi_driver/driver_state.c
===================================================================
--- lib/db/dbmi_driver/driver_state.c	(revision 45242)
+++ lib/db/dbmi_driver/driver_state.c	(working copy)
@@ -66,8 +66,8 @@
 */
 void db__mark_database_closed(void)
 {
-    free(state.dbname);
-    free(state.dbschema);
+    db_free_string(state.dbname);
+    db_free_string(state.dbschema);
     state.open = 0;
 }
 
@@ -128,7 +128,7 @@
 	    db_driver_close_cursor(state.cursor_list[i]);
 
     if (state.cursor_list)
-	free(state.cursor_list);
+	db_free(state.cursor_list);
 
     state.ncursors = 0;
     state.cursor_list = NULL;
Index: lib/db/dbmi_client/copy_tab.c
===================================================================
--- lib/db/dbmi_client/copy_tab.c	(revision 45242)
+++ lib/db/dbmi_client/copy_tab.c	(working copy)
@@ -374,7 +374,7 @@
 	}
     }
     if (selcol)
-	free(ivalues);
+	G_free(ivalues);
     G_debug(3, "Table copy OK");
 
     db_close_cursor(&cursor);
Index: lib/db/dbmi_client/shutdown.c
===================================================================
--- lib/db/dbmi_client/shutdown.c	(revision 45242)
+++ lib/db/dbmi_client/shutdown.c	(working copy)
@@ -70,7 +70,7 @@
     driver->pid = 0;
 
     /* free the driver structure. THIS IS GOOFY */
-    free(driver);
+    db_free(driver);
 
     return status;
 }
Index: lib/db/dbmilib.dox
===================================================================
--- lib/db/dbmilib.dox	(revision 45242)
+++ lib/db/dbmilib.dox	(working copy)
@@ -269,9 +269,11 @@
 
 void #db_malloc (int n)
 
-void #db_realloc (void s, int n)
+void #db_realloc (void *s, int n)
 
+void #db_free (void *s, int n)
 
+
 \subsection DB_case_routines DB case routines
 
 int #db_nocase_compare (char *a, char *b)
Index: lib/proj/Makefile
===================================================================
--- lib/proj/Makefile	(revision 45242)
+++ lib/proj/Makefile	(working copy)
@@ -11,6 +11,10 @@
 
 LIB_OBJS = get_proj.o do_proj.o convert.o datum.o ellipse.o
 
+ifeq ($(MSYSTEM),MINGW32)
+LIB_OBJS += ftol.o
+endif
+
 NAD_TABLES = FL.lla MD.lla TN.lla WI.lla WO.lla alaska.lla conus.lla \
              hawaii.lla prvi.lla stgeorge.lla stlrnc.lla stpaul.lla
 
Index: lib/proj/ftol.c
===================================================================
--- lib/proj/ftol.c	(revision 0)
+++ lib/proj/ftol.c	(revision 0)
@@ -0,0 +1,2 @@
+long _ftol(double);
+long _ftol2(double x) { return _ftol(x); }
Index: lib/g3d/g3dcache.c
===================================================================
--- lib/g3d/g3dcache.c	(revision 45242)
+++ lib/g3d/g3dcache.c	(working copy)
@@ -121,7 +121,7 @@
 	return 0;
     }
 
-    index = *((int *)(xdr + nBytes));
+    index = *((int *)((unsigned char *)xdr + nBytes));
     map->index[index] = -pos - 2;
 
     map->cachePosLast--;
Index: lib/g3d/g3dmask.c
===================================================================
--- lib/g3d/g3dmask.c	(revision 45242)
+++ lib/g3d/g3dmask.c	(working copy)
@@ -309,12 +309,12 @@
 	for (dy = y; dy < rows; dy++) {
 	    for (dx = x; dx < cols; dx++) {
 		G3D_MASKNUM(map, dx, dy, dz, tile, type);
-		tile += length;
+		(unsigned char *)tile += length;
 	    }
 
-	    tile += xLength;
+	    (unsigned char *)tile += xLength;
 	}
-	tile += yLength;
+	(unsigned char *)tile += yLength;
     }
 }
 
Index: lib/gis/gisinit.c
===================================================================
--- lib/gis/gisinit.c	(revision 45242)
+++ lib/gis/gisinit.c	(working copy)
@@ -86,9 +86,11 @@
     if (initialized)
 	return 0;
 
+#if 0
     if (strcmp(version, GIS_H_VERSION) != 0)
 	G_fatal_error(_("Incompatible library version for module. "
 			"You need to rebuild GRASS or untangle multiple installations."));
+#endif
 
     gisinit();
 
Index: lib/gis/Makefile
===================================================================
--- lib/gis/Makefile	(revision 45242)
+++ lib/gis/Makefile	(working copy)
@@ -45,7 +45,11 @@
 
 endif
 
+ifneq ($(MSYSTEM),MINGW32)
 default: lib $(FMODE_OBJ) $(DATAFILES) $(COLORFILES) $(ETC)/colors.desc $(ETC)/element_list
+else
+default: lib $(DATAFILES) $(COLORFILES) $(ETC)/colors.desc $(ETC)/element_list
+endif
 
 $(ETC)/colors:
 	$(MKDIR) $@
Index: gem/Makefile
===================================================================
--- gem/Makefile	(revision 45242)
+++ gem/Makefile	(working copy)
@@ -31,6 +31,7 @@
 	actions.o \
 	main.o
 
+ifneq ($(MSYSTEM),MINGW32)
 default: gem
 
 gem: $(SRCS) $(HDRS) $(OBJS)
@@ -61,4 +62,9 @@
 
 clean:
 	-rm -f *.o *.bak core *~ gem$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR)
+else
+default:
+install:
+clean:
+endif
 
Index: include/Make/Rules.make
===================================================================
--- include/Make/Rules.make	(revision 45242)
+++ include/Make/Rules.make	(working copy)
@@ -71,11 +71,9 @@
 clean:
 	-rm -rf $(OBJDIR) $(EXTRA_CLEAN_DIRS)
 	-rm -f $(EXTRA_CLEAN_FILES) *.tmp.html
-	-if [ "$(CLEAN_SUBDIRS)" != "" ] ; then \
-		for dir in $(CLEAN_SUBDIRS) ; do \
-			$(MAKE) -C $$dir clean ; \
-		done ; \
-	fi
+	for dir in "" $(CLEAN_SUBDIRS); do \
+		[ -n "$$dir" ] && $(MAKE) -C "$$dir" clean; \
+	done
 
 # HTML page rules:
 include $(MODULE_TOPDIR)/include/Make/Html.make
Index: gui/wxpython/scripts/Makefile
===================================================================
--- gui/wxpython/scripts/Makefile	(revision 45242)
+++ gui/wxpython/scripts/Makefile	(working copy)
@@ -5,7 +5,7 @@
 
 SCRIPTDIR = $(ETC)/wxpython/scripts
 
-ifdef MINGW
+ifeq ($(MSYSTEM),MINGW32)
 PYFILES := $(patsubst %.py, $(SCRIPTDIR)/%.py, $(filter %.py, $(PY_SOURCES)))
 else
 PYFILES := $(patsubst %.py, $(SCRIPTDIR)/%, $(filter %.py, $(PY_SOURCES)))
@@ -14,12 +14,12 @@
 default: install_scripts
 
 install_scripts:
-	$(MAKE) $(PYFILES)
+	$(MAKE) $(SCRIPTDIR) $(PYFILES)
 
-$(SCRIPTDIR)/%: %.py | $(SCRIPTDIR)
+$(SCRIPTDIR)/%: %.py
 	$(INSTALL) $< $@
 
-$(SCRIPTDIR)/%.py: %.py | $(SCRIPTDIR)
+$(SCRIPTDIR)/%.py: %.py
 	$(INSTALL) $< $@
 
 $(SCRIPTDIR):
Index: configure.in
===================================================================
--- configure.in	(revision 45242)
+++ configure.in	(working copy)
@@ -874,7 +874,7 @@
   fi
   
   LOC_CHECK_INCLUDES(geos_c.h,GEOS,$GEOS_CFLAGS)
-  LOC_CHECK_LIBS(geos_c,initGEOS,GEOS,$GEOS_LIBS,GEOS_LIBS)
+  #LOC_CHECK_LIBS(geos_c,initGEOS,GEOS,$GEOS_LIBS,GEOS_LIBS)
   AC_DEFINE(HAVE_GEOS)
 fi
 
Index: general/g.parser/Makefile
===================================================================
--- general/g.parser/Makefile	(revision 45242)
+++ general/g.parser/Makefile	(working copy)
@@ -10,5 +10,7 @@
 default: cmd
 
 #hardcoded here, this is an exeption due to the g.parser specialities:
+ifneq ($(MSYSTEM),MINGW32)
 htmlcmd:
 	$(MAKE) $(HTMLDIR)/$(PGM).html HTMLSRC=
+endif
Index: general/g.region/printwindow.c
===================================================================
--- general/g.region/printwindow.c	(revision 45242)
+++ general/g.region/printwindow.c	(working copy)
@@ -1,11 +1,35 @@
 #include <string.h>
 #include <stdlib.h>
-#include <projects.h>
 #include <grass/gis.h>
 #include <grass/gprojects.h>
 #include <grass/glocale.h>
 #include "local_proto.h"
 
+/* PROJ.4's private datastructures copied from projects.h,
+   which is not considered to be part of the API */
+
+typedef struct { double u, v; } LP;
+
+struct DERIVS {
+    double x_l, x_p; /* derivatives of x for lambda-phi */
+    double y_l, y_p; /* derivatives of y for lambda-phi */
+};
+
+struct FACTORS {
+	struct DERIVS der;
+	double h, k;		/* meridinal, parallel scales */
+	double omega, thetap;   /* angular distortion, theta prime */
+	double conv;		/* convergence */
+	double s;               /* areal scale factor */
+	double a, b;		/* max-min scale error */
+	int code;               /* info as to analytics, see following */
+};
+
+int pj_factors(LP, void *, double, struct FACTORS *);
+
+/* end of copy */
+
+
 #define DEG2RAD(a) ((a) * M_PI / 180.0)
 #define RAD2DEG(a) ((a) * 180.0 / M_PI)
 
