Index: /trunk/gsdl/src/mgpp/text/Makefile.in
===================================================================
--- /trunk/gsdl/src/mgpp/text/Makefile.in	(revision 12914)
+++ /trunk/gsdl/src/mgpp/text/Makefile.in	(revision 12915)
@@ -24,4 +24,15 @@
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
+
+ENABLE_ACCENTFOLD = 1
+ifeq ($(ENABLE_ACCENTFOLD), 1)
+AFLIBS = ../../../packages/unac/libunac.a 
+AFINCLUDES = -I../../../packages/unac
+AFFLAGS = -DENABLE_ACCENTFOLD
+else
+AFLIBS = 
+AFINCLUDES =
+AFFLAGS = 
+endif
 
 SHELL = /bin/sh
@@ -37,6 +48,6 @@
 CC = @CC@
 CXX = @CXX@
-CFLAGS = @CFLAGS@ -ansi -DSILENT -DSHORT_SUFFIX
-CXXFLAGS = @CXXFLAGS@ -DSILENT -DSHORT_SUFFIX
+CFLAGS = @CFLAGS@ -ansi -DSILENT -DSHORT_SUFFIX $(AFFLAGS)
+CXXFLAGS = @CXXFLAGS@ -DSILENT -DSHORT_SUFFIX $(AFFLAGS)
 DEFS = @DEFS@
 RANLIB = @RANLIB@
@@ -45,5 +56,5 @@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 LDFLAGS = @LDFLAGS@
-LIBS = ../lib/libmg.a ../../../packages/unac/libunac.a -lstdc++ @LIBS@
+LIBS = ../lib/libmg.a  $(AFLIBS) -lstdc++ @LIBS@
 TOUCH = echo timestamp >
 AWK = @AWK@
@@ -95,5 +106,5 @@
 
 # want toplevel config.h, not local mg one
-INCLUDES = -I../../.. -I../lib -I. -I../../../packages/unac
+INCLUDES = -I../../.. -I../lib -I. $(AFINCLUDES)
 
 #############################################################################
Index: /trunk/gsdl/src/mgpp/text/Queryer.cpp
===================================================================
--- /trunk/gsdl/src/mgpp/text/Queryer.cpp	(revision 12914)
+++ /trunk/gsdl/src/mgpp/text/Queryer.cpp	(revision 12915)
@@ -50,5 +50,7 @@
        << "\t.c0/.c1\t\tcasefolding off/on\n"
        << "\t.s0/.s1\t\tstemming off/on\n"
+#ifdef ENABLE_ACCENTFOLD
        << "\t.a0/.a1\t\taccentfolding off/on\n"
+#endif
        << "\t.o0/.o1\t\tshort output off/on\n"
        << "\t.m\t\tset maxnumeric (enter the number at the prompt)\n\n"
@@ -221,4 +223,5 @@
 	}
       }      
+#ifdef ENABLE_ACCENTFOLD
       else if (queryArray[1] == 'a') { // accentfolding - on/off
 	if (queryArray[2] == '1') defaultStemMethod |= STEM_AccentFolding;
@@ -228,4 +231,5 @@
 	}
       }
+#endif
       else if (queryArray[1] == 'o') { // output - short/long
 	if (queryArray[2] == '1') shortOutput = true;
Index: /trunk/gsdl/src/mgpp/text/mgpp_stem_idx.cpp
===================================================================
--- /trunk/gsdl/src/mgpp/text/mgpp_stem_idx.cpp	(revision 12914)
+++ /trunk/gsdl/src/mgpp/text/mgpp_stem_idx.cpp	(revision 12915)
@@ -216,6 +216,9 @@
     case '?':
       fprintf (stderr, "usage: %s [-d directory] "
-	       "[-b entries-per-block] [-h] -s 1|2|3 "
-	       "[-a stemmer-method] -f name\n", argv[0]);
+	       "[-b entries-per-block] [-h] -s 1|2|3", argv[0]);
+#ifdef ENABLE_ACCENTFOLD
+      fprintf (stderr, "|4|5|6|7");
+#endif
+      fprintf (stderr, " [-a stemmer-method] -f name\n");
       exit (1);
     }
@@ -225,5 +228,10 @@
   if (stemMethod < STEM_MIN || stemMethod > STEM_MAX) 
     FatalError (1, "Stem method must be between %d and %d", STEM_MIN, STEM_MAX);
-
+#ifndef ENABLE_ACCENTFOLD
+  if (stemMethod & STEM_AccentFolding) {
+    // accent folding not enabled
+    return -1;
+  }
+#endif
   // read in the dictionary and create the in memory dictionary
   StemMapDict stemDict;
Index: /trunk/gsdl/src/mgpp/text/stemmer.cpp
===================================================================
--- /trunk/gsdl/src/mgpp/text/stemmer.cpp	(revision 12914)
+++ /trunk/gsdl/src/mgpp/text/stemmer.cpp	(revision 12915)
@@ -27,6 +27,8 @@
 #include "unitool.h"
 
+#ifdef ENABLE_ACCENTFOLD
 /* [JFG - Mar 06: Accent folding patch] */
 #include "unac.h"
+#endif
 
 #define LOVINSTEMMER        0
@@ -55,4 +57,5 @@
 }
 
+#ifdef ENABLE_ACCENTFOLD
 /* [JFG - Mar 06: Accent folding patch] */
 /* =========================================================================
@@ -75,5 +78,5 @@
   return;
 }
-
+#endif
       
 int mgpp_stemmernumber (u_char *stemmerdescription) {
@@ -123,7 +126,9 @@
   }
 
+#ifdef ENABLE_ACCENTFOLD
   if (method & STEM_AccentFolding) {
     mgpp_unicode_accentfold (word);
   }
+#endif
 
   if (method & STEM_Stemming) {
