httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: checking for main in -ldb ...
Date Mon, 20 Aug 2001 08:09:26 GMT
On Mon, Aug 20, 2001 at 09:09:39AM +0200, Martin Kraemer wrote:
> What is the main() { main(); } supposed to do? Simply check for the
> existence of a lib? IMHO that is not a "clean" way to do it, as its
> output (for "human consumption") is totally misleading regarding
> what is currently checked for.
> 
> Doesn't autoconf provide a better way to check for libs?
> I committed a (temporary?) fix which
> a) checks for dbopen() instead of main()
> b) checks for dbopen in libc first, and only checks for dbopen in libdb
>    if the first test fails.
> 
> I did not do it m4-like, though. I am not good enough at using AC_*
> macros yet. Probably there was a ifelse() construct which I could have
> used...

Thanks for the catch/commit.  To make it a bit cleaner, I will switch 
it to:

AC_SEARCH_LIBS(dbopen,[c db],,enable_auth_db=no)

This will do what you intended in one line.  However, the libc check is
superfluous with this macro because it will first check for the dbopen
function without any additional libraries (libc should be present
already).  However, I will leave the libc check there just to make it
a bit more explicit.  If someone wants to, they can remove it...

I just checked this on Solaris (no DB whatsoever), FreeBSD (libc has
it), and Linux (libdb has it).  Please double check that it still
works for you.

I'll also be fixing the mod_auth_digest breakage while I'm at it.  
-- justin


Mime
View raw message