Index: main/trunk/greenstone2/common-src/indexers/mg/configure
===================================================================
--- main/trunk/greenstone2/common-src/indexers/mg/configure	(revision 26655)
+++ main/trunk/greenstone2/common-src/indexers/mg/configure	(revision 26656)
@@ -601,6 +601,8 @@
 
 ac_subst_vars='LTLIBOBJS
-JNIFLAGS
+JNILDFLAGS
+JNICFLAGS
 JNISUFFIX
+JNIPREFIX
 JNIINC
 LIBOBJS
@@ -3934,5 +3936,5 @@
         ac_cv_prog_uudecode_base64=yes
 else
-        echo "configure: 3936: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
+        echo "configure: 3938: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
         echo "configure: failed file was:" >&5
         cat Test.uue >&5
@@ -4057,5 +4059,5 @@
 CLASS_TEST=Test.class
 cat << \EOF > $JAVA_TEST
-/* #line 4059 "configure" */
+/* #line 4061 "configure" */
 public class Test {
 }
@@ -4096,5 +4098,5 @@
 TEST=Test
 cat << \EOF > $JAVA_TEST
-/* [#]line 4098 "configure" */
+/* [#]line 4100 "configure" */
 public class Test {
 public static void main (String args[]) {
@@ -4241,5 +4243,5 @@
 CLASS_TEST=Test.class
 cat << \EOF > $JAVA_TEST
-/* #line 4243 "configure" */
+/* #line 4245 "configure" */
 public class Test {
 }
@@ -5780,6 +5782,8 @@
 # set defaults
 JNIINC=""
+JNIPREFIX="lib"
 JNISUFFIX="so"
-JNIFLAGS="-shared"
+JNICFLAGS=""
+JNILDFLAGS="-shared"
 
 if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then
@@ -5788,5 +5792,5 @@
   JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ "
   JNISUFFIX="jnilib"
-  JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
+  JNILDFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
 fi
 if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then
@@ -5798,6 +5802,17 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5
 $as_echo "Linux" >&6; }
-  JNIINC="-I\$(JAVA_HOME)/include/linux -I\$(JAVA_HOME)/include "
-fi
+  JNIINC="-I\$(JAVA_HOME)/include/linux -I\$(JAVA_HOME)/in5Aclude "
+fi
+
+if test "x$crossOS" != "x" ; then
+  if test "$crossOS" = "windows" ; then
+    JNIINC="-I../../java-windows-include/win32 -I../../java-windows-include "
+    JNICFLAGS="-Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at"
+    JNIPREFIX=""
+    JNISUFFIX="dll"
+  fi
+fi
+
+
 
 
Index: main/trunk/greenstone2/common-src/indexers/mg/configure.in
===================================================================
--- main/trunk/greenstone2/common-src/indexers/mg/configure.in	(revision 26655)
+++ main/trunk/greenstone2/common-src/indexers/mg/configure.in	(revision 26656)
@@ -125,6 +125,8 @@
 # set defaults
 JNIINC=""
+JNIPREFIX="lib"
 JNISUFFIX="so"
-JNIFLAGS="-shared"
+JNICFLAGS=""
+JNILDFLAGS="-shared"
 
 if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then
@@ -132,5 +134,5 @@
   JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ "
   JNISUFFIX="jnilib"
-  JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
+  JNILDFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
 fi
 if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then
@@ -140,10 +142,21 @@
 if test "`(uname -s) 2> /dev/null`" = 'Linux'; then
   AC_MSG_RESULT(Linux)
-  JNIINC="-I\$(JAVA_HOME)/include/linux -I\$(JAVA_HOME)/include "
+  JNIINC="-I\$(JAVA_HOME)/include/linux -I\$(JAVA_HOME)/in5Aclude "
+fi
+
+if test "x$crossOS" != "x" ; then
+  if test "$crossOS" = "windows" ; then
+    JNIINC="-I../../java-windows-include/win32 -I../../java-windows-include "
+    JNICFLAGS="-Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at"
+    JNIPREFIX=""
+    JNISUFFIX="dll"
+  fi
 fi
 
 AC_SUBST(JNIINC)
+AC_SUBST(JNIPREFIX)
 AC_SUBST(JNISUFFIX)
-AC_SUBST(JNIFLAGS)
+AC_SUBST(JNICFLAGS)
+AC_SUBST(JNILDFLAGS)
 
 fp_WITH_DMALLOC
Index: main/trunk/greenstone2/common-src/indexers/mgpp/configure
===================================================================
--- main/trunk/greenstone2/common-src/indexers/mgpp/configure	(revision 26655)
+++ main/trunk/greenstone2/common-src/indexers/mgpp/configure	(revision 26656)
@@ -601,6 +601,8 @@
 
 ac_subst_vars='LTLIBOBJS
-JNIFLAGS
+JNILDFLAGS
+JNICFLAGS
 JNISUFFIX
+JNIPREFIX
 JNIINC
 LIBOBJS
@@ -4138,5 +4140,5 @@
         ac_cv_prog_uudecode_base64=yes
 else
-        echo "configure: 4140: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
+        echo "configure: 4142: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
         echo "configure: failed file was:" >&5
         cat Test.uue >&5
@@ -4261,5 +4263,5 @@
 CLASS_TEST=Test.class
 cat << \EOF > $JAVA_TEST
-/* #line 4263 "configure" */
+/* #line 4265 "configure" */
 public class Test {
 }
@@ -4300,5 +4302,5 @@
 TEST=Test
 cat << \EOF > $JAVA_TEST
-/* [#]line 4302 "configure" */
+/* [#]line 4304 "configure" */
 public class Test {
 public static void main (String args[]) {
@@ -4445,5 +4447,5 @@
 CLASS_TEST=Test.class
 cat << \EOF > $JAVA_TEST
-/* #line 4447 "configure" */
+/* #line 4449 "configure" */
 public class Test {
 }
@@ -5346,43 +5348,4 @@
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lstdc++" >&5
-$as_echo_n "checking for main in -lstdc++... " >&6; }
-if ${ac_cv_lib_stdcpp_main+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lstdc++  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_stdcpp_main=yes
-else
-  ac_cv_lib_stdcpp_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdcpp_main" >&5
-$as_echo "$ac_cv_lib_stdcpp_main" >&6; }
-if test "x$ac_cv_lib_stdcpp_main" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSTDC__ 1
-_ACEOF
-
-  LIBS="-lstdc++ $LIBS"
-
-fi
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcrypt" >&5
 $as_echo_n "checking for main in -lcrypt... " >&6; }
@@ -6100,6 +6063,8 @@
 # set defaults
 JNIINC=""
+JNIPREFIX="lib"
 JNISUFFIX="so"
-JNIFLAGS="-shared"
+JNICFLAGS=""
+JNILDFLAGS="-shared"
 
 if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then
@@ -6108,5 +6073,5 @@
   JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ "
   JNISUFFIX="jnilib"
-  JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
+  JNILDFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
 fi
 if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then
@@ -6120,4 +6085,15 @@
   JNIINC="-I\$(JAVA_HOME)/include/linux -I\$(JAVA_HOME)/include "
 fi
+
+if test "x$crossOS" != "x" ; then
+  if test "$crossOS" = "windows" ; then
+    JNIINC="-I../../java-windows-include/win32 -I../../java-windows-include "
+    JNICFLAGS="-shared -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at"
+    JNIPREFIX=""
+    JNISUFFIX="dll"
+  fi
+fi
+
+
 
 
Index: main/trunk/greenstone2/common-src/indexers/mgpp/configure.in
===================================================================
--- main/trunk/greenstone2/common-src/indexers/mgpp/configure.in	(revision 26655)
+++ main/trunk/greenstone2/common-src/indexers/mgpp/configure.in	(revision 26656)
@@ -119,5 +119,5 @@
 AC_CHECK_LIB(m, main)
 dnl Replace `main' with a function in -lstdc++:
-AC_CHECK_LIB(stdc++, main)
+dnl AC_CHECK_LIB(stdc++, main)
 dnl Replace `main' with a function in -lcrypt:
 AC_CHECK_LIB(crypt, main)
@@ -153,6 +153,8 @@
 # set defaults
 JNIINC=""
+JNIPREFIX="lib"
 JNISUFFIX="so"
-JNIFLAGS="-shared"
+JNICFLAGS=""
+JNILDFLAGS="-shared"
 
 if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then
@@ -160,5 +162,5 @@
   JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ "
   JNISUFFIX="jnilib"
-  JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
+  JNILDFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
 fi
 if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then
@@ -171,7 +173,18 @@
 fi
 
+if test "x$crossOS" != "x" ; then
+  if test "$crossOS" = "windows" ; then
+    JNIINC="-I../../java-windows-include/win32 -I../../java-windows-include "
+    JNICFLAGS="-shared -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at"
+    JNIPREFIX=""
+    JNISUFFIX="dll"
+  fi
+fi
+
 AC_SUBST(JNIINC)
+AC_SUBST(JNIPREFIX)
 AC_SUBST(JNISUFFIX)
-AC_SUBST(JNIFLAGS)
+AC_SUBST(JNICFLAGS)
+AC_SUBST(JNILDFLAGS)
 
 # *** Custom checking (based on GNU tar configure.in) ***
