diff -urN ooo_SRC680_m207_src/berkeleydb.orig/db-4.2.52.patch ooo_SRC680_m207_src/berkeleydb/db-4.2.52.patch
--- ooo_SRC680_m207_src/berkeleydb.orig/db-4.2.52.patch	2007-03-30 21:06:57.000000000 +0200
+++ ooo_SRC680_m207_src/berkeleydb/db-4.2.52.patch	2007-03-30 21:09:40.000000000 +0200
@@ -1,5 +1,5 @@
-*** misc/db-4.2.52.NC/btree/makefile.mk	2007-02-19 16:12:17.000000000 +0100
---- misc/build/db-4.2.52.NC/btree/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/btree/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/btree/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -35,8 +35,8 @@
 ! 			$(SLO)$/btree_auto.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/clib/makefile.mk	2007-02-19 16:12:17.000000000 +0100
---- misc/build/db-4.2.52.NC/clib/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/clib/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/clib/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -54,8 +54,8 @@
 ! SLOFILES= $(SLO)$/strcasecmp.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/common/makefile.mk	2007-02-19 16:12:17.000000000 +0100
---- misc/build/db-4.2.52.NC/common/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/common/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/common/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -83,8 +83,8 @@
 ! 			$(SLO)$/util_sig.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/cxx/makefile.mk	2007-02-19 16:12:17.000000000 +0100
---- misc/build/db-4.2.52.NC/cxx/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/cxx/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/cxx/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -114,8 +114,8 @@
 ! 			$(SLO)$/cxx_txn.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/db/makefile.mk	2007-02-19 16:12:17.000000000 +0100
---- misc/build/db-4.2.52.NC/db/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/db/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/db/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -160,8 +160,8 @@
 ! 			$(SLO)$/db_vrfyutil.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/dbm/makefile.mk	2007-02-19 16:12:17.000000000 +0100
---- misc/build/db-4.2.52.NC/dbm/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/db_printlog/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/db_printlog/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -169,18 +169,18 @@
 ! PRJ=..$/..$/..$/..$/..
 ! 
 ! PRJNAME=berkeleydb
-! TARGET=dbm
+! TARGET=db_printlog
 ! 
 ! EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
 ! 
 ! .INCLUDE :  settings.mk
 ! 
 ! INCPRE+=..$/build_win32 ..$/
-! SLOFILES= $(SLO)$/dbm.obj
+! SLOFILES= $(SLO)$/db_printlog.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/db_printlog/makefile.mk	2007-02-19 16:12:17.000000000 +0100
---- misc/build/db-4.2.52.NC/db_printlog/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/dbm/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/dbm/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -188,18 +188,18 @@
 ! PRJ=..$/..$/..$/..$/..
 ! 
 ! PRJNAME=berkeleydb
-! TARGET=db_printlog
+! TARGET=dbm
 ! 
 ! EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
 ! 
 ! .INCLUDE :  settings.mk
 ! 
 ! INCPRE+=..$/build_win32 ..$/
-! SLOFILES= $(SLO)$/db_printlog.obj
+! SLOFILES= $(SLO)$/dbm.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/dbreg/makefile.mk	2007-02-19 16:12:17.000000000 +0100
---- misc/build/db-4.2.52.NC/dbreg/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/dbreg/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/dbreg/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -221,8 +221,27 @@
 !         $(SLO)$/dbreg_util.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/dist/configure	2003-12-03 22:10:02.000000000 +0100
---- misc/build/db-4.2.52.NC/dist/configure	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/dist/Makefile.in	Fri Nov 28 19:50:06 2003
+--- misc/build/db-4.2.52.NC/dist/Makefile.in	Fri Mar 30 21:07:34 2007
+***************
+*** 13,19 ****
+  libdir=	@libdir@
+  docdir=	$(prefix)/docs
+  
+! dmode=	755
+  emode=	555
+  fmode=	444
+  
+--- 13,19 ----
+  libdir=	@libdir@
+  docdir=	$(prefix)/docs
+  
+! dmode=	775
+  emode=	555
+  fmode=	444
+  
+*** misc/db-4.2.52.NC/dist/configure	Wed Dec  3 22:10:02 2003
+--- misc/build/db-4.2.52.NC/dist/configure	Fri Mar 30 21:09:20 2007
 ***************
 *** 3518,3525 ****
   # Set CFLAGS/CXXFLAGS.  We MUST set the flags before we call autoconf
@@ -262,6 +281,23 @@
   	test "$with_gnu_ld" != no && break
   	;;
 ***************
+*** 10390,10396 ****
+        allow_undefined_flag='-undefined suppress'
+        ;;
+      *) # Darwin 1.3 on
+!       test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag='-flat_namespace -undefined suppress'
+        ;;
+      esac
+      # FIXME: Relying on posixy $() will cause problems for
+--- 10392,10398 ----
+        allow_undefined_flag='-undefined suppress'
+        ;;
+      *) # Darwin 1.3 on
+!       test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag='-flat_namespace -arch i386 -arch ppc -undefined suppress'
+        ;;
+      esac
+      # FIXME: Relying on posixy $() will cause problems for
+***************
 *** 10398,10404 ****
       #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
       #	       `"' quotes if we put them in here... so don't!
@@ -327,8 +363,8 @@
   	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
   	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
   	whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-*** misc/db-4.2.52.NC/dist/ltmain.sh	2003-04-26 19:45:37.000000000 +0200
---- misc/build/db-4.2.52.NC/dist/ltmain.sh	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/dist/ltmain.sh	Sat Apr 26 19:45:37 2003
+--- misc/build/db-4.2.52.NC/dist/ltmain.sh	Fri Mar 30 21:07:34 2007
 ***************
 *** 1371,1376 ****
 --- 1371,1378 ----
@@ -357,27 +393,8 @@
   	      esac
   	      ;;
   	    esac
-*** misc/db-4.2.52.NC/dist/Makefile.in	2003-11-28 19:50:06.000000000 +0100
---- misc/build/db-4.2.52.NC/dist/Makefile.in	2007-02-19 16:12:12.000000000 +0100
-***************
-*** 13,19 ****
-  libdir=	@libdir@
-  docdir=	$(prefix)/docs
-  
-! dmode=	755
-  emode=	555
-  fmode=	444
-  
---- 13,19 ----
-  libdir=	@libdir@
-  docdir=	$(prefix)/docs
-  
-! dmode=	775
-  emode=	555
-  fmode=	444
-  
-*** misc/db-4.2.52.NC/env/makefile.mk	2007-02-19 16:12:17.000000000 +0100
---- misc/build/db-4.2.52.NC/env/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/env/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/env/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -402,8 +419,8 @@
 !             $(SLO)$/env_region.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/fileops/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/fileops/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/fileops/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/fileops/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -425,8 +442,8 @@
 !           $(SLO)$/fop_util.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/hash/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/hash/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/hash/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/hash/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -458,8 +475,8 @@
 ! 			$(SLO)$/hash_verify.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/hmac/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/hmac/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/hmac/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/hmac/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -479,8 +496,8 @@
 ! 			$(SLO)$/sha1.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/hsearch/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/hsearch/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/hsearch/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/hsearch/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -498,8 +515,8 @@
 ! SLOFILES= $(SLO)$/hsearch.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/libdb_java/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/libdb_java/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/libdb_java/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/libdb_java/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -533,8 +550,8 @@
 !     cd ..$/..$/..$/..$/class && jar cvf db.jar com$/sleepycat$/db com$/sleepycat$/bdb
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/libdb_java42.dxp	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/libdb_java42.dxp	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/libdb_java42.dxp	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/libdb_java42.dxp	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -725,8 +742,8 @@
 ! _Java_com_sleepycat_db_db_1javaJNI_new_1Db@20
 ! _Java_com_sleepycat_db_db_1javaJNI_new_1DbEnv@12
 ! _Java_com_sleepycat_db_db_1javaJNI_new_1DbLsn@16
-*** misc/db-4.2.52.NC/lock/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/lock/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/lock/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/lock/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -750,8 +767,8 @@
 ! 			$(SLO)$/lock_util.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/log/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/log/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/log/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/log/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -775,8 +792,8 @@
 !             $(SLO)$/log_put.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/makefile.mk	2007-02-19 16:12:17.000000000 +0100
---- misc/build/db-4.2.52.NC/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -861,8 +878,8 @@
 ! 	$(COPY) $< $@
 ! 	$(DUMPBIN) -DIRECTIVES $(SLB)$/$(TARGET).lib | $(GREP) EXPORT: | $(GREP) -v ",DATA" | $(SED) "s/.*EXPORT://" >> $@
 ! 
-*** misc/db-4.2.52.NC/mp/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/mp/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/mp/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/mp/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -892,8 +909,8 @@
 ! 			$(SLO)$/mp_trickle.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/mutex/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/mutex/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/mutex/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/mutex/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -915,8 +932,8 @@
 !             $(SLO)$/mutex.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/os/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/os/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/os/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/os/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -943,8 +960,8 @@
 ! 			$(SLO)$/os_unlink.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/os_win32/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/os_win32/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/os_win32/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/os_win32/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -978,8 +995,8 @@
 !             $(SLO)$/os_stat.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/qam/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/qam/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/qam/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/qam/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -1007,8 +1024,8 @@
 ! 			$(SLO)$/qam_verify.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/rep/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/rep/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/rep/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/rep/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -1031,8 +1048,8 @@
 ! 
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/txn/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/txn/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/txn/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/txn/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
@@ -1058,8 +1075,8 @@
 !             $(SLO)$/txn_util.obj
 ! 
 ! .INCLUDE :  target.mk
-*** misc/db-4.2.52.NC/xa/makefile.mk	2007-02-19 16:12:18.000000000 +0100
---- misc/build/db-4.2.52.NC/xa/makefile.mk	2007-02-19 16:12:12.000000000 +0100
+*** misc/db-4.2.52.NC/xa/makefile.mk	Fri Mar 30 21:09:39 2007
+--- misc/build/db-4.2.52.NC/xa/makefile.mk	Fri Mar 30 21:07:34 2007
 ***************
 *** 1 ****
 ! dummy
diff -urN ooo_SRC680_m207_src/berkeleydb.orig/makefile.mk ooo_SRC680_m207_src/berkeleydb/makefile.mk
--- ooo_SRC680_m207_src/berkeleydb.orig/makefile.mk	2007-03-30 21:06:57.000000000 +0200
+++ ooo_SRC680_m207_src/berkeleydb/makefile.mk	2007-03-30 21:07:22.000000000 +0200
@@ -83,9 +83,10 @@
 .EXPORT: LDFLAGS
 .ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
 # just pass ARCH_FLAGS to native build
-CFLAGS:=$(ARCH_FLAGS)
-CXXFLAGS:=$(ARCH_FLAGS)
-.EXPORT : CFLAGS CXXFLAGS
+CFLAGS:=$(ARCH_FLAGS) $(UNIVERSAL_CFLAGS)
+CXXFLAGS:=$(ARCH_FLAGS) $(UNIVERSAL_CFLAGS)
+LDFLASG:=$(UNIVERSAL_LDFLAGS)
+.EXPORT : CFLAGS CXXFLAGS LDFLAGS
 CONFIGURE_DIR=out
 #relative to CONFIGURE_DIR
 CONFIGURE_ACTION= \
