bogofilter on Mac OSX?

Matthias Andree matthias.andree at gmx.de
Tue Dec 28 22:31:13 CET 2004


John <xd890cc2b41c31d74 at f4n.org> writes:

> This is because /usr/include/db.h doesn't refer to Sleepycat's
> version, which is also true for OpenBSD, FreeBSD and probably NetBSD
> too. The following works for me with 0.93.3.1:
>
> OpenBSD 3.5 (db4 from packages):
> env CPPFLAGS=-I/usr/local/include/db4 LDFLAGS=-L/usr/local/lib ./configure
>
> FreeBSD 4.10 (db4 from ports):
> env CPPFLAGS=-I/usr/local/include/db4 LIBS=-ldb4
> LDFLAGS=-L/usr/local/lib ./configure

FreeBSD has a stable bogofilter port (which uses BDB 4.2, by the way).

> There's no point (?) in using --with-libdb-prefix in this case.

Right.

> What's needed is probably a "--with"-flag for libdb's include dir
> (bogofilter looks for <db.h> and not <db[34]/db.h>) to prevent loading
> the system /usr/include/db.h. Notice that FreeBSD names the library
> libdb[34], whereas OpenBSD and OS X uses libdb.

The question is why it tries /usr/include before your prefix.

> The "how to link with libdb" result is misleading using the above for
> FreeBSD: it reports "checking how to link with libdb... -ldb", but
> there's no libdb, it's libdb[34]. Would it have found -ldb[34]
> automatically if no environment tampering had taken place?

It checks -ldb in addition to what is in LIBS. The BSDs' renaming of the
bogofilter libraries is a pain in the neck and - this is conjecture - a
reminiscence of the time before ELF.

> Btw, if things should be kept simple in README.osx: Apple's Developer
> tools uses gcc, I think xlc users can figure out CC=xlc. Also, "HP
> Gnome Desktop" (HP?) is probably far less common than fink.

The configure script checks for xlc if gcc is not found...

-- 
Matthias Andree



More information about the Bogofilter mailing list