933ad0
--- apr-util-1.3.7/build/dso.m4.nodbmdso
933ad0
+++ apr-util-1.3.7/build/dso.m4
933ad0
@@ -44,6 +44,16 @@ AC_DEFUN([APU_CHECK_UTIL_DSO], [
933ad0
      fi
933ad0
   fi
933ad0
 
933ad0
+
933ad0
+  ### Hack: force static linking of DBM code.
933ad0
+  objs=
933ad0
+  test $apu_have_db = 1 && objs="$objs dbm/apr_dbm_berkeleydb.lo"
933ad0
+  test $apu_have_gdbm = 1 && objs="$objs dbm/apr_dbm_gdbm.lo"
933ad0
+  test $apu_have_ndbm = 1 && objs="$objs dbm/apr_dbm_ndbm.lo"
933ad0
+  EXTRA_OBJECTS="$EXTRA_OBJECTS $objs"
933ad0
+  APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
933ad0
+  APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
933ad0
+
933ad0
   if test "$apu_dso_build" = "0"; then
933ad0
 
933ad0
      # Statically link the drivers:
933ad0
@@ -42,9 +65,6 @@ AC_DEFUN([APU_CHECK_UTIL_DSO], [
933ad0
      test $apu_have_sqlite3 = 1 && objs="$objs dbd/apr_dbd_sqlite3.lo"
933ad0
      test $apu_have_freetds = 1 && objs="$objs dbd/apr_dbd_freetds.lo"
933ad0
      test $apu_have_odbc = 1 && objs="$objs dbd/apr_dbd_odbc.lo"
933ad0
-     test $apu_have_db = 1 && objs="$objs dbm/apr_dbm_berkeleydb.lo"
933ad0
-     test $apu_have_gdbm = 1 && objs="$objs dbm/apr_dbm_gdbm.lo"
933ad0
-     test $apu_have_ndbm = 1 && objs="$objs dbm/apr_dbm_ndbm.lo"
933ad0
      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_init.lo"
933ad0
      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_option.lo"
933ad0
      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_rebind.lo"
933ad0
@@ -81,11 +81,9 @@
933ad0
 
933ad0
      APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss"
933ad0
      APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc"
933ad0
-     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
933ad0
      APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_ldap"
933ad0
      APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss"
933ad0
      APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc"
933ad0
-     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
933ad0
      APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_ldap"
933ad0
 
933ad0
   else
933ad0
@@ -82,9 +100,6 @@ AC_DEFUN([APU_CHECK_UTIL_DSO], [
933ad0
      test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la"
933ad0
      test $apu_have_freetds = 1 && dsos="$dsos dbd/apr_dbd_freetds.la"
933ad0
      test $apu_have_odbc = 1 && dsos="$dsos dbd/apr_dbd_odbc.la"
933ad0
-     test $apu_have_db = 1 && dsos="$dsos dbm/apr_dbm_db.la"
933ad0
-     test $apu_have_gdbm = 1 && dsos="$dsos dbm/apr_dbm_gdbm.la"
933ad0
-     test $apu_have_ndbm = 1 && dsos="$dsos dbm/apr_dbm_ndbm.la"
933ad0
      test $apu_has_ldap = 1 && dsos="$dsos ldap/apr_ldap.la"
933ad0
 
933ad0
      if test -n "$dsos"; then
933ad0
--- apr-util-1.3.7/dbm/apr_dbm.c.nodbmdso
933ad0
+++ apr-util-1.3.7/dbm/apr_dbm.c
933ad0
@@ -56,6 +56,9 @@
933ad0
 #error a DBM implementation was not specified
933ad0
 #endif
933ad0
 
933ad0
+#undef APU_DSO_BUILD
933ad0
+#define APU_DSO_BUILD 0
933ad0
+
933ad0
 #if APU_DSO_BUILD
933ad0
 
933ad0
 static apr_hash_t *drivers = NULL;