You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Daniel Rall <dl...@finemaltcoding.com> on 2007/08/25 00:32:35 UTC
[PATCH] APR-Util configure fails to use Berkeley DB 4.4 from MacPorts
On Mac OS X (10.4), I'm seeing APR-Util's configure fail to use
Berkeley DB 4.4 from MacPorts. The reason for this is two-fold:
1) exit() is undefined in the C test code used to validate db.h.
This can be fixed by #including stdlib.h in C code generated from the
autoconf macro which performs the test (in build/dbm.m4). I've
attached a patch against apr-util trunk which fixes this problem.
[[[
* build/dbm.m4
(APU_TRY_BERKELEY_DB): #include stdlib.h to allow header file test
code
to compile under Mac OS X.
]]]
2) libdb can't be found, because MacPorts installs its Berkeley DB
libraries under PREFIX/lib/db44/ (where PREFIX is /opt/local), a
location which is not looked in by apr-util's autoconf macros. The
MacPorts folks tell me that this is their strategy for allowing
multiple versions of Berkeley DB to happily co-exist. This looked a
bit messier to fix.
Thanks, Dan
p.s. Please CC me on any replies, as I'm not sub'd to this mailing list.
Re: [PATCH] APR-Util configure fails to use Berkeley DB 4.4 from MacPorts
Posted by "Roy T. Fielding" <fi...@gbiv.com>.
On Aug 24, 2007, at 3:32 PM, Daniel Rall wrote:
> On Mac OS X (10.4), I'm seeing APR-Util's configure fail to use
> Berkeley DB 4.4 from MacPorts. The reason for this is two-fold:
>
> 1) exit() is undefined in the C test code used to validate db.h.
> This can be fixed by #including stdlib.h in C code generated from
> the autoconf macro which performs the test (in build/dbm.m4). I've
> attached a patch against apr-util trunk which fixes this problem.
>
> [[[
> * build/dbm.m4
> (APU_TRY_BERKELEY_DB): #include stdlib.h to allow header file
> test code
> to compile under Mac OS X.
> ]]]
I don't see any difference with that change, but I committed it based
on the man page.
> 2) libdb can't be found, because MacPorts installs its Berkeley DB
> libraries under PREFIX/lib/db44/ (where PREFIX is /opt/local), a
> location which is not looked in by apr-util's autoconf macros. The
> MacPorts folks tell me that this is their strategy for allowing
> multiple versions of Berkeley DB to happily co-exist. This looked
> a bit messier to fix.
Did you try using --with-berkeley-db=/opt/local/lib ?
....Roy