From: Matt Gushee <matt@gushee.net>
To: caml-list@pauillac.inria.fr
Subject: Re: [Caml-list] DBM in OCaml 3.07
Date: Tue, 14 Oct 2003 20:24:51 -0600 [thread overview]
Message-ID: <20031015022450.GF26799@swordfish> (raw)
In-Reply-To: <20031015103929E.garrigue@kurims.kyoto-u.ac.jp>
On Wed, Oct 15, 2003 at 10:39:29AM +0900, Jacques Garrigue wrote:
> From: Matt Gushee <matt@gushee.net>
>
> > > There seems to be another problem with gdbm-ndbm.h being ignored if
> > > there is no gdbm_compat library, which might have to be fixed, but I'm
> > > no gdbm exert. gdbm-ndbm.h was not checked on ocaml 3.06, but it has
> > > lower priority than ndbm.h anyway.
> >
> > Ah, but it effectively has a *higher* priority in the configure script:
> >
> The break is supposed to get out of the loop, so if ndbm.h is in the
> same directory, or a previous directory, it has priority.
> This is a bit confusing, as if ndbm.h is in /usr/include/db1 and
> gdbm-ndbm.h is in /usr/include, then gdbm-ndbm.h will be selected.
> Is it your case?
Yes, that's it exactly. Since it's very hard to anticipate exactly where
header files will be located, maybe it would be better to do two loops,
first searching for ndbm.h in all the directories, then searching for
gdbm-ndbm.h only if ndbm.h was not found. The following code works for
me:
for dir in /usr/include /usr/include/db1 /usr/include/gdbm; 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="-lndbm"
elif sh ./hasgot -ldb1 dbm_open; then
dbm_link="-ldb1"
elif sh ./hasgot -lgdbm dbm_open; then
dbm_link="-lgdbm"
elif sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
dbm_link="-lgdbm_compat -lgdbm"
fi
break
fi
done
if [ "$dbm_include" = "not found" ]; then
for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do
if test -f $dir/gdbm-ndbm.h; then
dbm_include=$dir
use_gdbm_ndbm=yes
if sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
dbm_link="-lgdbm_compat -lgdbm"
elif sh ./hasgot -lgdbm dbm_open; then
dbm_link="-lgdbm"
fi
break
fi
done
fi
--
Matt Gushee When a nation follows the Way,
Englewood, Colorado, USA Horses bear manure through
mgushee@havenrock.com its fields;
http://www.havenrock.com/ When a nation ignores the Way,
Horses bear soldiers through
its streets.
--Lao Tzu (Peter Merel, trans.)
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2003-10-15 2:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-15 0:13 Matt Gushee
2003-10-15 0:40 ` Jacques Garrigue
2003-10-15 1:24 ` Matt Gushee
2003-10-15 1:39 ` Jacques Garrigue
2003-10-15 2:24 ` Matt Gushee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031015022450.GF26799@swordfish \
--to=matt@gushee.net \
--cc=caml-list@pauillac.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox