diff options
-rwxr-xr-x | configure | 9 | ||||
-rw-r--r-- | otherlibs/dbm/Makefile | 4 |
2 files changed, 11 insertions, 2 deletions
@@ -834,9 +834,17 @@ fi # See if we can compile the dbm library dbm_include="not found" +dbm_link="not found" for dir in /usr/include /usr/include/gdbm /usr/include/db1; do if test -f $dir/ndbm.h; then dbm_include=$dir + if sh ./hasgot dbm_open; then + dbm_link="" + elif sh ./hasgot -lndbm dbm_open; then + dbm_link="-cclib -lndbm" + else + dbm_include="not found" + fi break fi done @@ -850,6 +858,7 @@ else dbm_include="-I$dbm_include" fi echo "DBM_INCLUDES=$dbm_include" >> Makefile + echo "DBM_LINK=$dbm_link" >> Makefile otherlibraries="$otherlibraries dbm" fi diff --git a/otherlibs/dbm/Makefile b/otherlibs/dbm/Makefile index 4c5b675db..ed1166fb9 100644 --- a/otherlibs/dbm/Makefile +++ b/otherlibs/dbm/Makefile @@ -33,10 +33,10 @@ libmldbm.a: $(COBJS) $(RANLIB) libmldbm.a dbm.cma: dbm.cmo - $(CAMLC) -a -o dbm.cma -custom dbm.cmo -cclib -lmldbm -cclib -lndbm + $(CAMLC) -a -o dbm.cma -custom dbm.cmo -cclib -lmldbm $(DBM_LINK) dbm.cmxa: dbm.cmx - $(CAMLOPT) -a -o dbm.cmxa dbm.cmx -cclib -lmldbm -cclib -lndbm + $(CAMLOPT) -a -o dbm.cmxa dbm.cmx -cclib -lmldbm $(DBM_LINK) partialclean: rm -f *.cm* |