Index: /main/trunk/greenstone2/build-src/configure.in
===================================================================
--- /main/trunk/greenstone2/build-src/configure.in	(revision 21445)
+++ /main/trunk/greenstone2/build-src/configure.in	(revision 21446)
@@ -34,6 +34,11 @@
 dnl Set use of corba
 dnl
-AC_ARG_ENABLE(corba, [  --enable-corba          Enable CORBA support], USE_CORBA=1, USE_CORBA=0)
-AC_DEFINE_UNQUOTED(USE_CORBA, $USE_CORBA)
+AC_ARG_ENABLE(corba, [  --enable-corba          Enable CORBA support], USE_CORBA=$enableval, USE_CORBA=no)
+if test $USE_CORBA = "yes" -o $USE_CORBA = "1" ; then
+  USE_CORBA=1
+  AC_DEFINE(USE_CORBA,[])
+else
+  USE_CORBA=0
+fi
 AC_SUBST(USE_CORBA)
 
@@ -45,24 +50,35 @@
 dnl Set use of z39.50
 dnl
-AC_ARG_ENABLE(z3950, [  --enable-z3950          Enable Z39.50 client support], USE_Z3950=1, USE_Z3950=0)
-if test USE_Z3950 = 1; then
-AC_DEFINE(USE_Z3950, $USE_Z3950)
+AC_ARG_ENABLE(z3950, [  --enable-z3950          Enable Z39.50 client support], USE_Z3950=$enableval, USE_Z3950=no)
+if test $USE_Z3950 = "yes" -o $USE_Z3950 = "1" ; then
+  USE_Z3950=1
+  AC_DEFINE(USE_Z3950,[])
+else
+  USE_Z3950=0
+fi
 AC_SUBST(USE_Z3950)
-fi
 
 dnl
 dnl Set use of yaz - now compiled by default even when z3950 support not required
 dnl
-AC_ARG_ENABLE(yaz, [  --disable-yaz           Disable YAZ compilation], USE_YAZ=0, USE_YAZ=1)
-dnl if test USE_YAZ = 1; then
-AC_DEFINE(USE_YAZ, $USE_YAZ)
+AC_ARG_ENABLE(yaz, [  --disable-yaz           Disable YAZ compilation], USE_YAZ=$enableval, USE_YAZ=yes)
+if test $USE_YAZ = "yes" -o $USE_YAZ = "1" ; then
+  USE_YAZ=1
+  AC_DEFINE(USE_YAZ,[])
+else
+  USE_YAZ=0
+fi
 AC_SUBST(USE_YAZ)
-dnl fi
 
 dnl 
 dnl disable compilation of accent folding stuff for mgpp (and one day mg)
 dnl
-AC_ARG_ENABLE(accentfold, [  --disable-accentfold    Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1)
-AC_DEFINE(ENABLE_ACCENTFOLD, $ENABLE_ACCENTFOLD)
+AC_ARG_ENABLE(accentfold, [  --disable-accentfold    Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
+if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
+  ENABLE_ACCENTFOLD=1
+  AC_DEFINE(ENABLE_ACCENTFOLD,[])
+else
+  ENABLE_ACCENTFOLD=0
+fi
 AC_SUBST(ENABLE_ACCENTFOLD)
 
@@ -70,6 +86,11 @@
 dnl Set use of SQLite (enabled by default)
 dnl
-AC_ARG_ENABLE(sqlite, [  --disable-sqlite        Disable SQLite support], USE_SQLITE=0, USE_SQLITE=1)
-AC_DEFINE(USE_SQLITE, $USE_SQLITE)
+AC_ARG_ENABLE(sqlite, [  --disable-sqlite        Disable SQLite support], USE_SQLITE=$enableval, USE_SQLITE=yes)
+if test $USE_SQLITE = "yes" -o $USE_SQLITE = "1" ; then
+  USE_SQLITE=1
+  AC_DEFINE(USE_SQLITE,[])
+else
+  USE_SQLITE=0
+fi
 AC_SUBST(USE_SQLITE)
 
Index: /main/trunk/greenstone2/common-src/configure.in
===================================================================
--- /main/trunk/greenstone2/common-src/configure.in	(revision 21445)
+++ /main/trunk/greenstone2/common-src/configure.in	(revision 21446)
@@ -36,6 +36,11 @@
 dnl Set use of corba
 dnl
-AC_ARG_ENABLE(corba, [  --enable-corba          Enable CORBA support], USE_CORBA=1, USE_CORBA=0)
-AC_DEFINE_UNQUOTED(USE_CORBA, $USE_CORBA)
+AC_ARG_ENABLE(corba, [  --enable-corba          Enable CORBA support], USE_CORBA=$enableval, USE_CORBA=no)
+if test $USE_CORBA = "yes" -o $USE_CORBA = "1" ; then
+  USE_CORBA=1
+  AC_DEFINE(USE_CORBA,[])
+else
+  USE_CORBA=0
+fi
 AC_SUBST(USE_CORBA)
 
@@ -47,24 +52,35 @@
 dnl Set use of z39.50
 dnl
-AC_ARG_ENABLE(z3950, [  --enable-z3950          Enable Z39.50 client support], USE_Z3950=1, USE_Z3950=0)
-if test USE_Z3950 = 1; then
-AC_DEFINE(USE_Z3950, $USE_Z3950)
+AC_ARG_ENABLE(z3950, [  --enable-z3950          Enable Z39.50 client support], USE_Z3950=$enableval, USE_Z3950=no)
+if test $USE_Z3950 = "yes" -o $USE_Z3950 = "1" ; then
+  USE_Z3950=1
+  AC_DEFINE(USE_Z3950,[])
+else
+  USE_Z3950=0
+fi
 AC_SUBST(USE_Z3950)
-fi
 
 dnl
 dnl Set use of yaz - now compiled by default even when z3950 support not required
 dnl
-AC_ARG_ENABLE(yaz, [  --disable-yaz           Disable YAZ compilation], USE_YAZ=0, USE_YAZ=1)
-dnl if test USE_YAZ = 1; then
-AC_DEFINE(USE_YAZ, $USE_YAZ)
+AC_ARG_ENABLE(yaz, [  --disable-yaz           Disable YAZ compilation], USE_YAZ=$enableval, USE_YAZ=yes)
+if test $USE_YAZ = "yes" -o $USE_YAZ = "1" ; then
+  USE_YAZ=1
+  AC_DEFINE(USE_YAZ,[])
+else
+  USE_YAZ=0
+fi
 AC_SUBST(USE_YAZ)
-dnl fi
 
 dnl 
 dnl disable compilation of accent folding stuff for mgpp (and one day mg)
 dnl
-AC_ARG_ENABLE(accentfold, [  --disable-accentfold    Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1)
-AC_DEFINE(ENABLE_ACCENTFOLD, $ENABLE_ACCENTFOLD)
+AC_ARG_ENABLE(accentfold, [  --disable-accentfold    Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
+if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
+  ENABLE_ACCENTFOLD=1
+  AC_DEFINE(ENABLE_ACCENTFOLD,[])
+else
+  ENABLE_ACCENTFOLD=0
+fi
 AC_SUBST(ENABLE_ACCENTFOLD)
 
@@ -84,6 +100,11 @@
 dnl Set use of SQLite (enabled by default)
 dnl
-AC_ARG_ENABLE(sqlite, [  --disable-sqlite        Disable SQLite support], USE_SQLITE=0, USE_SQLITE=1)
-AC_DEFINE(USE_SQLITE, $USE_SQLITE)
+AC_ARG_ENABLE(sqlite, [  --disable-sqlite        Disable SQLite support], USE_SQLITE=$enableval, USE_SQLITE=yes)
+if test $USE_SQLITE = "yes" -o $USE_SQLITE = "1" ; then
+  USE_SQLITE=1
+  AC_DEFINE(USE_SQLITE,[])
+else
+  USE_SQLITE=0
+fi
 AC_SUBST(USE_SQLITE)
 
Index: /main/trunk/greenstone2/common-src/indexers/configure.ac
===================================================================
--- /main/trunk/greenstone2/common-src/indexers/configure.ac	(revision 21445)
+++ /main/trunk/greenstone2/common-src/indexers/configure.ac	(revision 21446)
@@ -6,6 +6,11 @@
 dnl http://www.gnu.org/software/hello/manual/autoconf/Initializing-configure.html
 AC_INIT()
-AC_ARG_ENABLE(accentfolding, [  --disable-accentfolding    Disable Accent Folding support], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1)
-AC_DEFINE_UNQUOTED(ENABLE_ACCENTFOLD, $ENABLE_ACCENTFOLD)
+AC_ARG_ENABLE(accentfold, [  --disable-accentfold    Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
+if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
+  ENABLE_ACCENTFOLD=1
+  AC_DEFINE(ENABLE_ACCENTFOLD,[])
+else
+  ENABLE_ACCENTFOLD=0
+fi
 AC_SUBST(ENABLE_ACCENTFOLD)
 
Index: /main/trunk/greenstone2/common-src/indexers/mgpp/configure.in
===================================================================
--- /main/trunk/greenstone2/common-src/indexers/mgpp/configure.in	(revision 21445)
+++ /main/trunk/greenstone2/common-src/indexers/mgpp/configure.in	(revision 21446)
@@ -40,6 +40,11 @@
 dnl disable compilation of accent folding stuff for mgpp (and one day mg)
 dnl
-AC_ARG_ENABLE(accentfold, [  --disable-accentfold          Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1)
-AC_DEFINE(ENABLE_ACCENTFOLD, $ENABLE_ACCENTFOLD)
+AC_ARG_ENABLE(accentfold, [  --disable-accentfold    Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
+if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
+  ENABLE_ACCENTFOLD=1
+  AC_DEFINE(ENABLE_ACCENTFOLD,[])
+else
+  ENABLE_ACCENTFOLD=0
+fi
 AC_SUBST(ENABLE_ACCENTFOLD)
 
Index: /main/trunk/greenstone2/configure.in
===================================================================
--- /main/trunk/greenstone2/configure.in	(revision 21445)
+++ /main/trunk/greenstone2/configure.in	(revision 21446)
@@ -34,6 +34,11 @@
 dnl Set use of corba
 dnl
-AC_ARG_ENABLE(corba, [  --enable-corba          Enable CORBA support], USE_CORBA=1, USE_CORBA=0)
-AC_DEFINE_UNQUOTED(USE_CORBA, $USE_CORBA)
+AC_ARG_ENABLE(corba, [  --enable-corba          Enable CORBA support], USE_CORBA=$enableval, USE_CORBA=no)
+if test $USE_CORBA = "yes" -o $USE_CORBA = "1" ; then
+  USE_CORBA=1
+  AC_DEFINE(USE_CORBA,[])
+else
+  USE_CORBA=0
+fi
 AC_SUBST(USE_CORBA)
 
@@ -45,29 +50,37 @@
 dnl Set use of z39.50
 dnl
-AC_ARG_ENABLE(z3950, [  --enable-z3950          Enable Z39.50 client support], USE_Z3950=1, USE_Z3950=0)
-if test USE_Z3950 = 1; then
-AC_DEFINE(USE_Z3950, $USE_Z3950)
+AC_ARG_ENABLE(z3950, [  --enable-z3950          Enable Z39.50 client support], USE_Z3950=$enableval, USE_Z3950=no)
+if test $USE_Z3950 = "yes" -o $USE_Z3950 = "1" ; then
+  USE_Z3950=1
+  AC_DEFINE(USE_Z3950,[])
+else
+  USE_Z3950=0
+fi
 AC_SUBST(USE_Z3950)
-fi
 
 dnl
 dnl Set use of yaz - now compiled by default even when z3950 support not required
 dnl
-AC_ARG_ENABLE(yaz, [  --disable-yaz           Disable YAZ compilation], USE_YAZ=0, USE_YAZ=1)
-dnl if test USE_YAZ = 1; then
-AC_DEFINE(USE_YAZ, $USE_YAZ)
+AC_ARG_ENABLE(yaz, [  --disable-yaz           Disable YAZ compilation], USE_YAZ=$enableval, USE_YAZ=yes)
+if test $USE_YAZ = "yes" -o $USE_YAZ = "1" ; then
+  USE_YAZ=1
+  AC_DEFINE(USE_YAZ,[])
+else
+  USE_YAZ=0
+fi
 AC_SUBST(USE_YAZ)
-dnl fi
 
 dnl 
 dnl disable compilation of accent folding stuff for mgpp (and one day mg)
 dnl
-AC_ARG_ENABLE(accentfold, [  --disable-accentfold    Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1)
-AC_DEFINE(ENABLE_ACCENTFOLD, $ENABLE_ACCENTFOLD)
+AC_ARG_ENABLE(accentfold, [  --disable-accentfold    Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
+if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
+  ENABLE_ACCENTFOLD=1
+  AC_DEFINE(ENABLE_ACCENTFOLD,[])
+else
+  ENABLE_ACCENTFOLD=0
+fi
 AC_SUBST(ENABLE_ACCENTFOLD)
 
-dnl
-dnl Set use of JDBM (enabled by default)
-dnl
 dnl
 dnl Set use of JDBM (enabled by default)
@@ -85,6 +98,11 @@
 dnl Set use of SQLite (enabled by default)
 dnl
-AC_ARG_ENABLE(sqlite, [  --disable-sqlite        Disable SQLite support], USE_SQLITE=0, USE_SQLITE=1)
-AC_DEFINE(USE_SQLITE, $USE_SQLITE)
+AC_ARG_ENABLE(sqlite, [  --disable-sqlite        Disable SQLite support], USE_SQLITE=$enableval, USE_SQLITE=yes)
+if test $USE_SQLITE = "yes" -o $USE_SQLITE = "1" ; then
+  USE_SQLITE=1
+  AC_DEFINE(USE_SQLITE,[])
+else
+  USE_SQLITE=0
+fi
 AC_SUBST(USE_SQLITE)
 
@@ -93,6 +111,11 @@
 dnl
 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_ARG_ENABLE(apache-httpd, [  --enable-apache-httpd  Enable Apache httpd support], USE_APACHE_HTTPD=$enableval, USE_APACHE_HTTPD=no)
+   if test $USE_APACHE_HTTPD = "yes" -o $USE_APACHE_HTTPD = "1" ; then
+     USE_APACHE_HTTPD=1
+     AC_DEFINE(USE_APACHE_HTTPD,[])
+   else
+     USE_APACHE_HTTPD=0
+   fi
    AC_SUBST(USE_APACHE_HTTPD)
 fi
@@ -141,5 +164,5 @@
 if test $ENABLE_LUCENE = "yes" -o $ENABLE_LUCENE = "1" ; then
   ENABLE_LUCENE=1
-  AC_DEFINE(ENABLE_LUCENE, [])
+  AC_DEFINE(ENABLE_LUCENE,[])
 else
   ENABLE_LUCENE=0
Index: /main/trunk/greenstone2/runtime-src/configure.in
===================================================================
--- /main/trunk/greenstone2/runtime-src/configure.in	(revision 21445)
+++ /main/trunk/greenstone2/runtime-src/configure.in	(revision 21446)
@@ -35,6 +35,11 @@
 dnl Set use of corba
 dnl
-AC_ARG_ENABLE(corba, [  --enable-corba          Enable CORBA support], USE_CORBA=1, USE_CORBA=0)
-AC_DEFINE_UNQUOTED(USE_CORBA, $USE_CORBA)
+AC_ARG_ENABLE(corba, [  --enable-corba          Enable CORBA support], USE_CORBA=$enableval, USE_CORBA=no)
+if test $USE_CORBA = "yes" -o $USE_CORBA = "1" ; then
+  USE_CORBA=1
+  AC_DEFINE(USE_CORBA,[])
+else
+  USE_CORBA=0
+fi
 AC_SUBST(USE_CORBA)
 
@@ -46,24 +51,35 @@
 dnl Set use of z39.50
 dnl
-AC_ARG_ENABLE(z3950, [  --enable-z3950          Enable Z39.50 client support], USE_Z3950=1, USE_Z3950=0)
-if test USE_Z3950 = 1; then
-AC_DEFINE(USE_Z3950, $USE_Z3950)
+AC_ARG_ENABLE(z3950, [  --enable-z3950          Enable Z39.50 client support], USE_Z3950=$enableval, USE_Z3950=no)
+if test $USE_Z3950 = "yes" -o $USE_Z3950 = "1" ; then
+  USE_Z3950=1
+  AC_DEFINE(USE_Z3950,[])
+else
+  USE_Z3950=0
+fi
 AC_SUBST(USE_Z3950)
-fi
 
 dnl
 dnl Set use of yaz - now compiled by default even when z3950 support not required
 dnl
-AC_ARG_ENABLE(yaz, [  --disable-yaz           Disable YAZ compilation], USE_YAZ=0, USE_YAZ=1)
-dnl if test USE_YAZ = 1; then
-AC_DEFINE(USE_YAZ, $USE_YAZ)
+AC_ARG_ENABLE(yaz, [  --disable-yaz           Disable YAZ compilation], USE_YAZ=$enableval, USE_YAZ=yes)
+if test $USE_YAZ = "yes" -o $USE_YAZ = "1" ; then
+  USE_YAZ=1
+  AC_DEFINE(USE_YAZ,[])
+else
+  USE_YAZ=0
+fi
 AC_SUBST(USE_YAZ)
-dnl fi
 
 dnl 
 dnl disable compilation of accent folding stuff for mgpp (and one day mg)
 dnl
-AC_ARG_ENABLE(accentfold, [  --disable-accentfold    Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1)
-AC_DEFINE(ENABLE_ACCENTFOLD, $ENABLE_ACCENTFOLD)
+AC_ARG_ENABLE(accentfold, [  --disable-accentfold    Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=$enableval, ENABLE_ACCENTFOLD=yes)
+if test $ENABLE_ACCENTFOLD = "yes" -o $ENABLE_ACCENTFOLD = "1" ; then
+  ENABLE_ACCENTFOLD=1
+  AC_DEFINE(ENABLE_ACCENTFOLD,[])
+else
+  ENABLE_ACCENTFOLD=0
+fi
 AC_SUBST(ENABLE_ACCENTFOLD)
 
@@ -71,6 +87,11 @@
 dnl Set use of SQLite (enabled by default)
 dnl
-AC_ARG_ENABLE(sqlite, [  --disable-sqlite        Disable SQLite support], USE_SQLITE=0, USE_SQLITE=1)
-AC_DEFINE(USE_SQLITE, $USE_SQLITE)
+AC_ARG_ENABLE(sqlite, [  --disable-sqlite        Disable SQLite support], USE_SQLITE=$enableval, USE_SQLITE=yes)
+if test $USE_SQLITE = "yes" -o $USE_SQLITE = "1" ; then
+  USE_SQLITE=1
+  AC_DEFINE(USE_SQLITE,[])
+else
+  USE_SQLITE=0
+fi
 AC_SUBST(USE_SQLITE)
 
@@ -78,7 +99,14 @@
 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=$enableval, USE_APACHE_HTTPD=no)
+   if test $USE_APACHE_HTTPD = "yes" -o $USE_APACHE_HTTPD = "1" ; then
+     USE_APACHE_HTTPD=1
+     AC_DEFINE(USE_APACHE_HTTPD,[])
+   else
+     USE_APACHE_HTTPD=0
+   fi
+   AC_SUBST(USE_APACHE_HTTPD)
+fi
 
 dnl
