The current CVS tree for httpd-2.0 breaks on FreeBSD during configure:

> checking whether to enable mod_auth_db... checking dependencies
> checking for db.h... yes
> checking for main in -ldb... no
> checking whether to enable mod_auth_db... configure: error: mod_auth_db has been 
>requested but can not be built due to prerequisite failures

Of course, the check for -ldb is not really necessary if the db*
functions are (as in FreeBSD) part of libc.

Also, I wondered why -ldb should contain a "main()" and had a look
at the config.log:

> configure:3178: checking for main in -ldb
> configure:3193: gcc -o conftest -g -O2 -Wall -D_REENTRANT -D_THREAD_SAFE 
>-L/usr/local/ssl/lib conftest.c -ldb  -lm -lcrypt  1>&5
> /usr/libexec/elf/ld: cannot find -ldb
> configure: failed program was:
> #line 3186 "configure"
> #include "confdefs.h"
>
> int main() {
> main()
> ; return 0; }
> configure:3223: checking whether to enable mod_auth_db

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...

   Martin
-- 
<[EMAIL PROTECTED]>    |       Fujitsu Siemens
       <[EMAIL PROTECTED]>              |   81730  Munich,  Germany

Reply via email to