summaryrefslogtreecommitdiffstats
path: root/apr-util-1.3.7-nodbmdso.patch
blob: f5f95d6d48a834f8de4c1aebf6e8bd2e5fff4724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--- apr-util-1.3.7/build/dso.m4.nodbmdso
+++ apr-util-1.3.7/build/dso.m4
@@ -44,6 +44,16 @@ AC_DEFUN([APU_CHECK_UTIL_DSO], [
      fi
   fi
 
+
+  ### Hack: force static linking of DBM code.
+  objs=
+  test $apu_have_db = 1 && objs="$objs dbm/apr_dbm_berkeleydb.lo"
+  test $apu_have_gdbm = 1 && objs="$objs dbm/apr_dbm_gdbm.lo"
+  test $apu_have_ndbm = 1 && objs="$objs dbm/apr_dbm_ndbm.lo"
+  EXTRA_OBJECTS="$EXTRA_OBJECTS $objs"
+  APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
+  APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
+
   if test "$apu_dso_build" = "0"; then
 
      # Statically link the drivers:
@@ -42,9 +65,6 @@ AC_DEFUN([APU_CHECK_UTIL_DSO], [
      test $apu_have_sqlite3 = 1 && objs="$objs dbd/apr_dbd_sqlite3.lo"
      test $apu_have_freetds = 1 && objs="$objs dbd/apr_dbd_freetds.lo"
      test $apu_have_odbc = 1 && objs="$objs dbd/apr_dbd_odbc.lo"
-     test $apu_have_db = 1 && objs="$objs dbm/apr_dbm_berkeleydb.lo"
-     test $apu_have_gdbm = 1 && objs="$objs dbm/apr_dbm_gdbm.lo"
-     test $apu_have_ndbm = 1 && objs="$objs dbm/apr_dbm_ndbm.lo"
      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_init.lo"
      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_option.lo"
      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_rebind.lo"
@@ -65,10 +85,8 @@ AC_DEFUN([APU_CHECK_UTIL_DSO], [
      fi
 
      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"
-     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
      APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_ldap"
      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"
-     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
      APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_ldap"
 
   else
@@ -82,9 +100,6 @@ AC_DEFUN([APU_CHECK_UTIL_DSO], [
      test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la"
      test $apu_have_freetds = 1 && dsos="$dsos dbd/apr_dbd_freetds.la"
      test $apu_have_odbc = 1 && dsos="$dsos dbd/apr_dbd_odbc.la"
-     test $apu_have_db = 1 && dsos="$dsos dbm/apr_dbm_db.la"
-     test $apu_have_gdbm = 1 && dsos="$dsos dbm/apr_dbm_gdbm.la"
-     test $apu_have_ndbm = 1 && dsos="$dsos dbm/apr_dbm_ndbm.la"
      test $apu_has_ldap = 1 && dsos="$dsos ldap/apr_ldap.la"
 
      if test -n "$dsos"; then
--- apr-util-1.3.7/dbm/apr_dbm.c.nodbmdso
+++ apr-util-1.3.7/dbm/apr_dbm.c
@@ -56,6 +56,9 @@
 #error a DBM implementation was not specified
 #endif
 
+#undef APU_DSO_BUILD
+#define APU_DSO_BUILD 0
+
 #if APU_DSO_BUILD
 
 static apr_hash_t *drivers = NULL;