Index: /main/trunk/greenstone2/Makefile.in
===================================================================
--- /main/trunk/greenstone2/Makefile.in	(revision 21376)
+++ /main/trunk/greenstone2/Makefile.in	(revision 21377)
@@ -105,8 +105,4 @@
 	fi
 
-# For GS2: include the Greenstone Server Interface Makefile here
-# http://www.makelinux.net/make3/make3-CHP-3-SECT-7.html
-sinclude GSI-Makefile
-
 distclean: clean
 	rm -f Makefile config.cache config.h config.log stamp-h config.status
Index: /main/trunk/greenstone2/common-src/config.h.in
===================================================================
--- /main/trunk/greenstone2/common-src/config.h.in	(revision 21376)
+++ /main/trunk/greenstone2/common-src/config.h.in	(revision 21377)
@@ -115,4 +115,7 @@
 #undef ENABLE_LUCENE
 
+/* Define ENABLE_JNI */
+#undef ENABLE_JNI
+
 /* Define MICO_DIR if needsbe */
 #undef MICO_DIR
Index: /main/trunk/greenstone2/config.h.in
===================================================================
--- /main/trunk/greenstone2/config.h.in	(revision 21376)
+++ /main/trunk/greenstone2/config.h.in	(revision 21377)
@@ -115,4 +115,7 @@
 #undef ENABLE_LUCENE
 
+/* Define ENABLE_JNI */
+#undef ENABLE_JNI
+
 /* Define MICO_DIR if needsbe */
 #undef MICO_DIR
Index: /main/trunk/greenstone2/configure
===================================================================
--- /main/trunk/greenstone2/configure	(revision 21376)
+++ /main/trunk/greenstone2/configure	(revision 21377)
@@ -309,5 +309,7 @@
 #endif"
 
-ac_subdirs_all="$ac_subdirs_all common-src build-src runtime-src"
+ac_subdirs_all="$ac_subdirs_all common-src"
+ac_subdirs_all="$ac_subdirs_all build-src"
+ac_subdirs_all="$ac_subdirs_all runtime-src"
 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 PACKAGE VERSION USE_FASTCGI USE_LANGACTION USE_CORBA MICO_DIR USE_Z3950 USE_YAZ ENABLE_ACCENTFOLD USE_SQLITE USE_APACHE_HTTPD ENABLE_JNI ENABLE_MG ENABLE_MGPP ENABLE_LUCENE LDFLAGS CFLAGS CC CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX AWK YACC build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB COMPAT32BITFLAGS MICO_VER CPP EGREP U ANSI2KNR ALLOCA LIBOBJS STATIC gsdlos MODULEDIRS subdirs LTLIBOBJS'
 ac_subst_files=''
@@ -1437,5 +1439,6 @@
 
 
-# Check whether --enable-apache-httpd or --disable-apache-httpd was given.
+if test -d runtime-src; then
+   # Check whether --enable-apache-httpd or --disable-apache-httpd was given.
 if test "${enable_apache_httpd+set}" = set; then
   enableval="$enable_apache_httpd"
@@ -1444,9 +1447,10 @@
   USE_APACHE_HTTPD=0
 fi;
-cat >>confdefs.h <<\_ACEOF
+   cat >>confdefs.h <<\_ACEOF
 #define USE_APACHE_HTTPD $USE_APACHE_HTTPD
 _ACEOF
 
 
+fi
 
 # Check whether --enable-jni or --disable-jni was given.
@@ -7305,11 +7309,23 @@
 
 
-subdirs="$subdirs common-src build-src runtime-src"
+subdirs="$subdirs common-src"
+
+
+
+subdirs="$subdirs build-src"
 
 
 # the list of folders in the src folder
 srclist="common-src/Makefile \
-         build-src/Makefile \
+         build-src/Makefile"
+
+if test -d runtime-src; then
+
+
+subdirs="$subdirs runtime-src"
+
+   srclist="$srclist \
          runtime-src/Makefile"
+fi
 
                               ac_config_files="$ac_config_files Makefile $srclist $moduleDirs"
Index: /main/trunk/greenstone2/configure.in
===================================================================
--- /main/trunk/greenstone2/configure.in	(revision 21376)
+++ /main/trunk/greenstone2/configure.in	(revision 21377)
@@ -77,7 +77,9 @@
 dnl Set use of Apache httpd (disabled by default)
 dnl
-AC_ARG_ENABLE(apache-httpd, [  --enable-apache-httpd  Enable Apache httpd support], USE_APACHE_HTTPD=1, USE_APACHE_HTTPD=0)
-AC_DEFINE(USE_APACHE_HTTPD, $USE_APACHE_HTTPD)
-AC_SUBST(USE_APACHE_HTTPD)
+if test -d runtime-src; then
+   AC_ARG_ENABLE(apache-httpd, [  --enable-apache-httpd  Enable Apache httpd support], USE_APACHE_HTTPD=1, USE_APACHE_HTTPD=0)
+   AC_DEFINE(USE_APACHE_HTTPD, $USE_APACHE_HTTPD)
+   AC_SUBST(USE_APACHE_HTTPD)
+fi
 
 dnl
@@ -434,10 +436,16 @@
 gsdlprefix=`pwd`
 ac_configure_args="$ac_configure_args --bindir=$gsdlprefix/bin/$gsdlos --libdir=$gsdlprefix/lib/$gsdlos"
-AC_CONFIG_SUBDIRS(common-src build-src runtime-src)
+AC_CONFIG_SUBDIRS(common-src)
+AC_CONFIG_SUBDIRS(build-src)
 
 # the list of folders in the src folder
 srclist="common-src/Makefile \
-         build-src/Makefile \
+         build-src/Makefile"
+
+if test -d runtime-src; then
+   AC_CONFIG_SUBDIRS(runtime-src)
+   srclist="$srclist \
          runtime-src/Makefile"
+fi
 
 AC_OUTPUT(Makefile $srclist $moduleDirs)
