httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ras...@bellglobal.com
Subject Re: Ouch! New stuff in unix/os.h
Date Wed, 04 Mar 1998 14:04:51 GMT
> > I don't think this is the solution.  This would force me to run
> > Apache's Configure script before including the module header files.
> > I think stuff that depends on Configure having been run needs to be
> > isolated in conf.h and any header file needed by a module has to be
> > generic such that it can be included without any tricks.
> 
> Eh? You've got to run Configure before a module can do anything, so
> what's the problem?

Not in my case.  My mod_php3.c file is just a tiny entry-point into the
meat of the module which is contained in libphp3.a or libphp3.so.

Currently to build a PHP enabled httpd you do the following:

1. untar Apache sources somewhere
2. In PHP's distribution directory run ./configure and tell it
   where your Apache source directory is.  PHP's configure script
   figures out which version of Apache we are dealing with here
   and builds appropriate makefiles and a .module file.
3. A 'make install' copies mod_php3.[ch], the .module file and
   libphp3.a to Apache's modules/extra directory.
4. Apache's ./Configure is run and it automatically picks up
   settings from the PHP .module file which determines which extra
   libraries are needed, whether HSREGEX should be on or off and
   sets the SERVER_SUBVERSION

Now, I don't see how the heck I can run Apache's ./Configure before I
generate the mod_php3.module file which in itself can't exist before I
run PHP's configure script.

Up until the change in unix/os.h this procedure worked flawlessly.

I suppose your response would be that I should put the entire module into
Apache's module directory and rely on Apache Configure script to figure
everything out.  This just isn't feasible.  In terms of number of lines of
code PHP is far bigger than Apache and it is not limited to being just an
Apache module.  It is also an ISAPI module, an NSAPI, soon a WSAPI and a
CGI parser.  Having a single common way to build PHP for all targets is
crucial.

I still looks to me like this DLFCN check in os.h belongs in conf.h.  There
are several OS-specific checks in conf.h which depending on which OS
Apache's Configure script detects includes header files or #defines stuff.
Why not confine similar constructs to a single file?

-Rasmus

Mime
View raw message