--- config_office/configure.in.orig	2006-08-16 16:26:34.000000000 +0200
+++ config_office/configure.in	2006-08-16 16:57:40.000000000 +0200
@@ -280,6 +280,12 @@
 [  --with-db-jar=JARFILE   Specify path to jarfile manually ],
 [ DB_JAR="$withval"
 ])
+AC_ARG_WITH(db-jar-so,
+[  --with-db-jar-so=SOFILE   Specify path to aot compiled library
+                             of jarfile manually. Only used if
+                             --enable-gcjaot is set! ],
+[ DB_JAR_SO="$withval"
+])
 AC_ARG_WITH(system-hsqldb,
 [  --with-system-hsqldb    Use hsqldb already on system
 ],,)
@@ -301,6 +307,12 @@
 [  --with-xml-apis-jar=JARFILE   Specify path to jarfile manually ],
 [ XML_APIS_JAR="$withval"
 ])
+AC_ARG_WITH(xml-apis-jar-so,
+[  --with-xml-apis-jar-so=SOFILE   Specify path to aot compiled library
+                             of jarfile manually. Only used if
+                             --enable-gcjaot is set! ],
+[ XML_APIS_JAR_SO="$withval"
+])
 AC_ARG_WITH(system-xerces,
 [  --with-system-xerces    Use xerces already on system
 ],,)
@@ -308,6 +320,12 @@
 [  --with-xerces-jar=JARFILE   Specify path to jarfile manually ],
 [ XERCES_JAR="$withval"
 ])
+AC_ARG_WITH(xerces-jar-so,
+[  --with-xerces-jar-so=SOFILE   Specify path to aot compiled library
+                             of jarfile manually. Only used if
+                             --enable-gcjaot is set! ],
+[ XERCES_JAR_SO="$withval"
+])
 AC_ARG_WITH(system-xalan,
 [  --with-system-xalan     Use xalan already on system
 ],,)
@@ -322,6 +340,12 @@
 [  --with-xt-jar=JARFILE   Specify path to jarfile manually ],
 [ XT_JAR="$withval"
 ])
+AC_ARG_WITH(xt-jar-so,
+[  --with-xt-jar-so=SOFILE   Specify path to aot compiled library
+                             of jarfile manually. Only used if
+                             --enable-gcjaot is set! ],
+[ XT_JAR_SO="$withval"
+])
 AC_ARG_WITH(serializer-jar,
 [  --with-serializer-jar=JARFILE   Specify path to jarfile manually ],
 [ SERIALIZER_JAR="$withval"
@@ -3089,6 +3113,12 @@
 	  fi
        fi
     fi
+  if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
+    if test -n "$DB_JAR_SO"; then
+      AC_CHECK_FILE($DB_JAR_SO, [],
+        [AC_MSG_ERROR([not found.])])
+    fi
+  fi
     SCPDEFS="$SCPDEFS -DSYSTEM_DB"
 else
     AC_MSG_RESULT([internal])
@@ -3101,6 +3131,7 @@
 AC_SUBST(DB_CPPLIB)
 AC_SUBST(DB_INCLUDES)
 AC_SUBST(DB_JAR)
+AC_SUBST(DB_JAR_SO)
 
 dnl ===================================================================
 dnl Check for system hsqldb
@@ -3188,6 +3219,12 @@
           AC_CHECK_FILE($XML_APIS_JAR, [],
                [AC_MSG_ERROR(xml-apis.jar replacement not found.)], [])
         fi
+  if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
+    if test -n "$XML_APIS_JAR_SO"; then
+      AC_CHECK_FILE($XML_APIS_JAR_SO, [],
+        [AC_MSG_ERROR([not found.])])
+    fi
+  fi
 else
     AC_MSG_RESULT([internal])
     SYSTEM_XML_APIS=NO
@@ -3195,6 +3232,7 @@
 fi
 AC_SUBST(SYSTEM_XML_APIS)
 AC_SUBST(XML_APIS_JAR)
+AC_SUBST(XML_APIS_JAR_SO)
 
 dnl ===================================================================
 dnl Check for system xerces
@@ -3218,6 +3256,12 @@
           AC_CHECK_FILE($XERCES_JAR, [],
                [AC_MSG_ERROR(xercesImpl.jar replacement not found.)], [])
         fi
+  if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
+    if test -n "$XERCES_JAR_SO"; then
+      AC_CHECK_FILE($XERCES_JAR_SO, [],
+        [AC_MSG_ERROR([not found.])])
+    fi
+  fi
 else
     AC_MSG_RESULT([internal])
     SYSTEM_XERCES=NO
@@ -3225,6 +3269,7 @@
 fi
 AC_SUBST(SYSTEM_XERCES)
 AC_SUBST(XERCES_JAR)
+AC_SUBST(XERCES_JAR_SO)
 
 dnl ===================================================================
 dnl Check for system xalan
@@ -3330,12 +3375,19 @@
           AC_CHECK_FILE($XT_JAR, [],
                [ AC_MSG_ERROR(xt.jar replacement not found.)], [])
         fi
+  if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
+    if test -n "$XT_JAR_SO"; then
+      AC_CHECK_FILE($XT_JAR_SO, [],
+        [AC_MSG_ERROR([not found.])])
+    fi
+  fi
 else
     AC_MSG_RESULT([internal])
     SYSTEM_XT=NO
 fi
 AC_SUBST(SYSTEM_XT)
 AC_SUBST(XT_JAR)
+AC_SUBST(XT_JAR_SO)
 
 dnl ===================================================================
 dnl Check for system libxslt
--- config_office/set_soenv.in.orig	2006-08-16 16:58:20.000000000 +0200
+++ config_office/set_soenv.in	2006-08-16 16:59:43.000000000 +0200
@@ -1796,19 +1796,23 @@
 ToFile( "DB_CPPLIB",         "@DB_CPPLIB@",        "e" );
 ToFile( "DB_INCLUDES",       "@DB_INCLUDES@",      "e" );
 ToFile( "DB_JAR",            "@DB_JAR@",           "e" );
+ToFile( "DB_JAR_SO",         "@DB_JAR_SO@",        "e" );
 ToFile( "SYSTEM_HSQLDB",     "@SYSTEM_HSQLDB@",    "e" );
 ToFile( "HSQLDB_JAR",        "@HSQLDB_JAR@",       "e" );
 ToFile( "SYSTEM_BSH",        "@SYSTEM_BSH@",       "e" );
 ToFile( "BSH_JAR",           "@BSH_JAR@",          "e" );
 ToFile( "SYSTEM_XML_APIS",   "@SYSTEM_XML_APIS@",  "e" );
 ToFile( "XML_APIS_JAR",      "@XML_APIS_JAR@",     "e" );
+ToFile( "XML_APIS_JAR_SO",   "@XML_APIS_JAR_SO@",  "e" );
 ToFile( "SYSTEM_XERCES",     "@SYSTEM_XERCES@",    "e" );
 ToFile( "XERCES_JAR",        "@XERCES_JAR@",       "e" );
+ToFile( "XERCES_JAR_SO",     "@XERCES_JAR_SO@",    "e" );
 ToFile( "SYSTEM_XALAN",      "@SYSTEM_XALAN@",     "e" );
 ToFile( "XALAN_JAR",         "@XALAN_JAR@",        "e" );
 ToFile( "SERIALIZER_JAR",    "@SERIALIZER_JAR@",   "e" );
 ToFile( "SYSTEM_XT",         "@SYSTEM_XT@",        "e" );
 ToFile( "XT_JAR",            "@XT_JAR@",           "e" );
+ToFile( "XT_JAR_SO",         "@XT_JAR_SO@",        "e" );
 ToFile( "SYSTEM_SABLOT",     "@SYSTEM_SABLOT@",    "e" );
 ToFile( "SABLOT_LIBS",       "@SABLOT_LIBS@",      "e" );
 ToFile( "SYSTEM_ODBC_HEADERS","@SYSTEM_ODBC_HEADERS@","e" );
--- xmlhelp/source/com/sun/star/help/aottarget.mk	19 Jul 2006 09:52:58 -0000	1.3
+++ xmlhelp/source/com/sun/star/help/aottarget.mk	27 Jul 2006 11:23:24 -0000
@@ -40,21 +40,63 @@
 AOTTARGETN=$(BIN)$/$(AOTTARGET)
 
 AOTFILES = $(foreach,i,$(NEWCLASS) $(LB)$/lib$(i:b).jar.so)
+AOTLINKFLAGS=$(subst,.so, $(subst,$(LB)$/lib,-l $(AOTFILES)))
 
 .IF "$(SYSTEM_DB)" == "YES"
+.IF "$(DB_JAR_SO)" != ""
+AOTLINKFLAGS+= $(DB_JAR_SO)
+.ELSE
 AOTFILES+= $(LB)$/libdb.jar.so
-$(AOTTARGETN) : $(LB)$/libdb.jar.so
+AOTLINKFLAGS+= -ldb.jar
+.ENDIF
 .ENDIF
 
-AOTLINKFLAGS=$(subst,.so, $(subst,$(LB)$/lib,-l $(AOTFILES)))
+.IF "$(SYSTEM_XT)" == "YES"
+.IF "$(XT_JAR_SO)" != ""
+AOTLINKFLAGS+= $(XT_JAR_SO)
+.ELSE
+AOTFILES+= $(LB)$/libxt.jar.so
+AOTLINKFLAGS+= -lxt.jar
+.ENDIF
+.ENDIF
+
+.IF "$(SYSTEM_XML_APIS)" == "YES"
+.IF "$(XML_APIS_JAR_SO)" != ""
+AOTLINKFLAGS+= $(XML_APIS_JAR_SO)
+.ELSE
+AOTFILES+= $(LB)$/libxml-apis.jar.so
+AOTLINKFLAGS+= -lxml-apis.jar
+.ENDIF
+.ENDIF
+
+.IF "$(SYSTEM_XERCES)" == "YES"
+.IF "$(XERCES_JAR_SO)" != ""
+AOTLINKFLAGS+= $(XERCES_JAR_SO)
+.ELSE
+AOTFILES+= $(LB)$/libxercesImpl.jar.so
+AOTLINKFLAGS+= -lxercesImpl.jar
+.ENDIF
+.ENDIF
 
 $(LB)$/lib%.jar.so : $(SOLARBINDIR)$/%.jar
 	$(JAVAAOTCOMPILER) --classpath=. -shared -fPIC -Wl,-Bsymbolic -O2 \
 	-fno-bounds-check -fno-store-check -findirect-dispatch -fjni -o $@ $<
 
-$(LB)$/libdb.jar.so:
+$(LB)$/libdb.jar.so : $(DB_JAR)
 	$(JAVAAOTCOMPILER) --classpath=. -shared -fPIC -Wl,-Bsymbolic -O2 \
-	-fno-bounds-check -fno-store-check -findirect-dispatch -fjni -o $(LB)$/libdb.jar.so $(DB_JAR)
+	-fno-bounds-check -fno-store-check -findirect-dispatch -fjni -o $@ $<
+
+$(LB)$/libxt.jar.so : $(XT_JAR)
+	$(JAVAAOTCOMPILER) --classpath=. -shared -fPIC -Wl,-Bsymbolic -O2 \
+	-fno-bounds-check -fno-store-check -findirect-dispatch -fjni -o $@ $<
+
+$(LB)$/libxml-apis.jar.so : $(XML_APIS_JAR)
+	$(JAVAAOTCOMPILER) --classpath=. -shared -fPIC -Wl,-Bsymbolic -O2 \
+	-fno-bounds-check -fno-store-check -findirect-dispatch -fjni -o $@ $<
+
+$(LB)$/libxercesImpl.jar.so : $(XERCES_JAR)
+	$(JAVAAOTCOMPILER) --classpath=. -shared -fPIC -Wl,-Bsymbolic -O2 \
+	-fno-bounds-check -fno-store-check -findirect-dispatch -fjni -o $@ $<
 
 $(AOTTARGETN) : $(JARTARGETN) $(AOTFILES)
 	$(JAVAAOTCOMPILER) --main=$(AOTTARGET) -o $(BIN)$/$(AOTTARGET) \
