]> git.pld-linux.org Git - packages/ocaml.git/blob - ocaml-db3.patch
- added as_needed.patch
[packages/ocaml.git] / ocaml-db3.patch
1 --- ocaml-3.09.2/configure.orig 2006-04-19 22:15:48.276544500 +0200
2 +++ ocaml-3.09.2/configure      2006-04-22 23:49:10.045620750 +0200
3 @@ -1238,51 +1238,12 @@
4  
5  # See if we can compile the dbm library
6  
7 -dbm_include="not found"
8 -dbm_link="not found"
9  use_gdbm_ndbm=no
10 -
11 -for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do
12 -  if test -f $dir/ndbm.h; then
13 -    dbm_include=$dir
14 -    if sh ./hasgot dbm_open; then
15 -      dbm_link=""
16 -    elif sh ./hasgot -lndbm dbm_open; then
17 -      dbm_link="-lndbm"
18 -    elif sh ./hasgot -ldb1 dbm_open; then
19 -      dbm_link="-ldb1"
20 -    elif sh ./hasgot -lgdbm dbm_open; then
21 -      dbm_link="-lgdbm"
22 -    elif sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
23 -      dbm_link="-lgdbm_compat -lgdbm"
24 -    fi
25 -    break
26 -  fi
27 -  if test -f $dir/gdbm-ndbm.h; then
28 -    dbm_include=$dir
29 -    use_gdbm_ndbm=yes
30 -    if sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
31 -      dbm_link="-lgdbm_compat -lgdbm"
32 -    fi
33 -    break
34 -  fi
35 -done
36 -if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
37 -  echo "NDBM not found, the \"dbm\" library will not be supported."
38 -else
39 -  echo "NDBM found (in $dbm_include)"
40 -  if test "$dbm_include" = "/usr/include"; then
41 -    dbm_include=""
42 -  else
43 -    dbm_include="-I$dbm_include"
44 -  fi
45 -  echo "DBM_INCLUDES=$dbm_include" >> Makefile
46 -  echo "DBM_LINK=$dbm_link" >> Makefile
47 -  if test "$use_gdbm_ndbm" = "yes"; then
48 -    echo "#define DBM_USES_GDBM_NDBM" >> s.h
49 -  fi
50 -  otherlibraries="$otherlibraries dbm"
51 -fi
52 +dbm_include=""
53 +dbm_link="-ldb"
54 +echo "DBM_INCLUDES=$dbm_include" >> Makefile
55 +echo "DBM_LINK=$dbm_link" >> Makefile
56 +otherlibraries="$otherlibraries dbm"
57  
58  # Look for tcl/tk
59  
60 diff -ur ocaml-3.07beta2/otherlibs/dbm/cldbm.c ocaml-3.07beta2-/otherlibs/dbm/cldbm.c
61 --- ocaml-3.07beta2/otherlibs/dbm/cldbm.c       2003-07-08 15:50:31.000000000 +0200
62 +++ ocaml-3.07beta2-/otherlibs/dbm/cldbm.c      2003-08-26 11:11:19.000000000 +0200
63 @@ -24,7 +24,8 @@
64  #ifdef DBM_USES_GDBM_NDBM
65  #include <gdbm-ndbm.h>
66  #else
67 -#include <ndbm.h>
68 +#define DB_DBM_HSEARCH 1
69 +#include <db.h>
70  #endif
71  
72  /* Quite close to sys_open_flags, but we need RDWR */
This page took 0.023861 seconds and 3 git commands to generate.