--- config_office/configure.in.old	2006-10-09 20:39:18.000000000 +0200
+++ config_office/configure.in	2006-10-10 18:14:31.000000000 +0200
@@ -3317,10 +3317,25 @@
           AC_CHECK_FILE($XALAN_JAR, [],
                [AC_MSG_ERROR(xalan.jar replacement not found.)], [])
         fi
-        if test -n "$SERIALIZER_JAR"; then
+        if test -z "$SERIALIZER_JAR"; then
+          # FIXME: add check for xalan version to know when serializer.jar
+          #        is required 
+          AC_CHECK_FILE(/usr/share/java/xalan-j2-serializer.jar, 
+            [ SERIALIZER_JAR=/usr/share/java/xalan-j2-serializer.jar ],
+            [
+              AC_CHECK_FILE(/usr/share/java/xalan2-serializer.jar, 
+                [ SERIALIZER_JAR=/usr/share/java/xalan2-serializer.jar ],
+                [ AC_CHECK_FILE(/usr/share/java/serializer.jar,
+                    [ SERIALIZER_JAR=/usr/share/java/serializer.jar ],
+                    [], []
+                  )
+                ]
+              )
+            ]
+          )
+	else
           AC_CHECK_FILE($SERIALIZER_JAR, [],
                [AC_MSG_ERROR(serializer.jar not found.)], [])
-          AC_SUBST(SERIALIZER_JAR)
         fi
 else
     AC_MSG_RESULT([internal])
@@ -3329,6 +3344,7 @@
 fi
 AC_SUBST(SYSTEM_XALAN)
 AC_SUBST(XALAN_JAR)
+AC_SUBST(SERIALIZER_JAR)
 
 if test -n "$NEED_XALAN"; then
    BUILD_TYPE="$BUILD_TYPE XALAN"
--- filter.orig/source/config/fragments/makefile.mk	2006-09-27 17:09:06.000000000 +0200
+++ filter/source/config/fragments/makefile.mk		2006-09-27 17:09:12.000000000 +0200
@@ -159,8 +159,15 @@
 .ENDIF
 
 .IF "$(XSLTPROC)"=="NO_XSLTPROC"
-XALAN_JAR*=$(SOLARBINDIR)$/xalan.jar
-PACKLANG := $(JAVAI) $(JAVACPS) $(XALAN_JAR) org.apache.xalan.xslt.Process -XSL langfilter.xsl
+.IF "$(SYSTEM_XALAN)" == "YES"
+XCLASSPATH!:=$(XALAN_JAR)
+.IF "$(SERIALIZER_JAR)" != ""
+XCLASSPATH!:=$(XCLASSPATH)$(PATH_SEPERATOR)$(SERIALIZER_JAR)
+.ENDIF
+.ELSE
+XCLASSPATH!:=$(SOLARBINDIR)$/xalan.jar
+.ENDIF
+PACKLANG := $(JAVAI) $(JAVACPS) $(XCLASSPATH) org.apache.xalan.xslt.Process -XSL langfilter.xsl
 PACKLANG_IN := -IN
 PACKLANG_PARAM := -PARAM
 PACKLANG_XSL := -XSL
