httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: Trying to grok .module files
Date Thu, 23 Oct 1997 00:59:14 GMT


On Wed, 22 Oct 1997, Rasmus Lerdorf wrote:

> Ok, since  there is only 1 example of a .module configuation file, I
> figured I would try to grok that.  Grabbing a completely fresh CVS tree as
> of right now and commenting out mod_auth and commenting in mod_auth_db
> gives me:

There are two examples.  The ConfigStart/ConfigEnd code in mod_auth_dbm is
similar.

> It obviously shouldn't be doing a -ldb on Solaris.  So, we need to clear
> that default on that platform (and many others, I bet), so I suggest this
> patch:

Uh, without -ldb it won't even link... you have to install db on solaris
boxes anyhow, since it's not there by default.  And when you do, -ldb
will work.

> diff -c -r1.161 Configure
> *** Configure   1997/10/21 06:41:07     1.161
> --- Configure   1997/10/22 23:13:33
> ***************
> *** 367,372 ****
> --- 367,373 ----
>         SOLVER=`echo $PLAT | sed 's/^.*solaris2.//'`
>         OS="Solaris $SOLVER"
>         CFLAGS="$CFLAGS -DSOLARIS2=$SOLVER"
> +       DB_LIB=""
>         LIBS="$LIBS -lsocket -lnsl"
>         case "$SOLVER" in
>             2[56789]*)

IMHO, this is the wrong way to do it.  All code regarding DB_LIB should
be moved to mod_auth_db.module.  I was hoping other folks would take care
of their own architectures after I did the Linux example.  I suspect
there's only three cases:  dbopen() is in libc, dbopen() is in libdb,
or dbopen() doesn't exist anywhere.  i.e. I don't even think there's a
need to do an architecture test.  It should be something like this:

    if ./helpers/TestCompile func dbopen; then
        :
    else
	if ./helpers/TestCompile lib db; then
	    LIBS="$LIBS -ldb"
	    if ./helpers/TestCompile func dbopen; then
		echo " + using -ldb for mod_auth_db"
	    else
		cat 1>&2 <<EOF
Unable to find dbopen()!  If you don't have db installed, then you'll have
to install it.  If it is installed, then it isn't in its default location,
and you'll have to specify the library directly via the EXTRA_LDFLAGS and
EXTRA_LIBS variables.
EOF
		exit 1
	    fi
	fi
    fi

And similarly for mod_auth_dbm.

> I am also having some problems with the fact that the sanity check which
> runs ./helpers/TestCompile is running out of the helpers/ directory and
> not from the src directory.  That means that when I set up my LIBS line in
> mod_php3.module I have to add something like:
> 
>   -L../modules/extra -Lmodules/extra -lphp3
>
> The first one ensures the sanity check fails, and the second is for the
> actual link.  I think the sanity check and the actual link should run out
> of the same dir or else relative paths to stuff installed in the modules
> directories are all bogus.
> 
> To that end, I propose the following patch:

+1

> Ok, I am not done yet.  For my own particular needs, I need to be able to
> override the setting of WANTHSREGEX.  Due to the order of things in the
> Configure script, this is not currently possible to do in a .module file.
> The fix is simple.  Put the WANTHSREGEX rule check after the .module files
> have been read to give the .module files a chance to alter the setting.
> I propose the following patch for this:

+1

Dean


Mime
View raw message