]>
Commit | Line | Data |
---|---|---|
4cfe9969 AM |
1 | diff -urN ocaml-3.10.0.org/configure ocaml-3.10.0/configure |
2 | --- ocaml-3.10.0.org/configure 2007-05-03 14:49:56.000000000 +0200 | |
3 | +++ ocaml-3.10.0/configure 2007-07-15 20:20:19.325848428 +0200 | |
4 | @@ -1252,51 +1252,13 @@ | |
b9a9b48b MM |
5 | |
6 | # See if we can compile the dbm library | |
7 | ||
8 | -dbm_include="not found" | |
9 | -dbm_link="not found" | |
e15a2426 | 10 | use_gdbm_ndbm=no |
4cfe9969 | 11 | |
b9a9b48b MM |
12 | -for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do |
13 | - if test -f $dir/ndbm.h; then | |
14 | - dbm_include=$dir | |
15 | - if sh ./hasgot dbm_open; then | |
16 | - dbm_link="" | |
17 | - elif sh ./hasgot -lndbm dbm_open; then | |
18 | - dbm_link="-lndbm" | |
19 | - elif sh ./hasgot -ldb1 dbm_open; then | |
20 | - dbm_link="-ldb1" | |
21 | - elif sh ./hasgot -lgdbm dbm_open; then | |
22 | - dbm_link="-lgdbm" | |
6c6c92a8 | 23 | - elif sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then |
0be8cd9b | 24 | - dbm_link="-lgdbm_compat -lgdbm" |
b9a9b48b MM |
25 | - fi |
26 | - break | |
27 | - fi | |
e15a2426 MM |
28 | - if test -f $dir/gdbm-ndbm.h; then |
29 | - dbm_include=$dir | |
30 | - use_gdbm_ndbm=yes | |
31 | - if sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then | |
32 | - dbm_link="-lgdbm_compat -lgdbm" | |
33 | - fi | |
0be8cd9b | 34 | - break |
e15a2426 | 35 | - fi |
b9a9b48b | 36 | -done |
e15a2426 | 37 | -if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then |
b9a9b48b MM |
38 | - echo "NDBM not found, the \"dbm\" library will not be supported." |
39 | -else | |
40 | - echo "NDBM found (in $dbm_include)" | |
41 | - if test "$dbm_include" = "/usr/include"; then | |
42 | - dbm_include="" | |
43 | - else | |
44 | - dbm_include="-I$dbm_include" | |
45 | - fi | |
e15a2426 MM |
46 | - if test "$use_gdbm_ndbm" = "yes"; then |
47 | - echo "#define DBM_USES_GDBM_NDBM" >> s.h | |
48 | - fi | |
b9a9b48b MM |
49 | - otherlibraries="$otherlibraries dbm" |
50 | -fi | |
51 | +dbm_include="" | |
52 | +dbm_link="-ldb" | |
4cfe9969 AM |
53 | echo "DBM_INCLUDES=$dbm_include" >> Makefile |
54 | echo "DBM_LINK=$dbm_link" >> Makefile | |
b9a9b48b MM |
55 | +otherlibraries="$otherlibraries dbm" |
56 | ||
57 | # Look for tcl/tk | |
58 | ||
e15a2426 MM |
59 | diff -ur ocaml-3.07beta2/otherlibs/dbm/cldbm.c ocaml-3.07beta2-/otherlibs/dbm/cldbm.c |
60 | --- ocaml-3.07beta2/otherlibs/dbm/cldbm.c 2003-07-08 15:50:31.000000000 +0200 | |
61 | +++ ocaml-3.07beta2-/otherlibs/dbm/cldbm.c 2003-08-26 11:11:19.000000000 +0200 | |
62 | @@ -24,7 +24,8 @@ | |
63 | #ifdef DBM_USES_GDBM_NDBM | |
64 | #include <gdbm-ndbm.h> | |
65 | #else | |
66 | -#include <ndbm.h> | |
67 | +#define DB_DBM_HSEARCH 1 | |
68 | +#include <db.h> | |
69 | #endif | |
70 | ||
71 | /* Quite close to sys_open_flags, but we need RDWR */ |