Hi all,

I tried to figure out what caused these two problems, here's what I found.

I think that the problem is with apxs, it only gets the CFLAGS 
configured at Apache's compile time. And they are not right for every 
module that one will want to add to Apache.

Take for example ndbm.h which is needed by mod_ssl. When compiling 
mod_ssl statically into Apache, there's no problem since Apache takes 
care of finding where it is located. But when we're building mod_ssl 
with apxs, if Apache's configure has not figured out where ndbm.h is, 
compilation will fail.

Here's an example:

$ tar zxf apache_1.3.26.tar.gz
$ cd apache_1.3.26

$ ./configure --enable-module=so
$ make
$ make install
$ /usr/local/apache/bin/apxs -q CFLAGS
-DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite

apxs does not provide the location of ndbm.h since configure didn't needed it.

$ cd ..
$ rm -rf apache_1.3.26
$ tar zxf apache_1.3.26.tar.gz
$ cd apache_1.3.26

If, for example, I enable mod_rewrite which requires DBM support, 
apxs will "know" where to look for DBM.

$ ./configure --enable-module=so --enable-module=rewrite
[...]
  + adding selected modules
     o rewrite_module uses ConfigStart/End
  + using -ldb1 for DBM support
       enabling DBM support for mod_rewrite
[...]
$ make
$ make install
$ /usr/local/apache/bin/apxs -q CFLAGS
-DLINUX=22 -I/usr/include/db1 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite

This is wrong since not enabling a module that requires DBM doesn't 
mean that I'll never want to add one that does in the future.

I don't see any trivial solution to this problem. The easier one, 
IMHO, is to do every check when mod_so is enabled.


It's a similar problem for the DBM library, src/Makefile stores it into:
LIBS1=  -lm -lcrypt -ldb1 -ldl
[...]
LIBS=$(EXTRA_LIBS) $(LIBS1)
but this is not exported to apxs. I'm not sure if it should.

Am I making some sense here? What do people think about this? Should 
I file a bug report to Apache about this? I searched bugs.apache.org 
about this but I couldn't find a single bug about apxs...

I think I need a drink! 8)
GFK's
-- 
Guillaume Filion
Logidac Tech., Beaumont, Qu�bec, Canada - http://logidac.com/
PGP Key and more: http://guillaume.filion.org/      (this will redirect)
PGP Fingerprint: 14A6 720A F7BA 6C87 2331 33FD 467E 9198 3DED D5CA
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to