Re: Bug in building standalone DSO modules

From: Date: Sun, 20 May 2001 08:52:08 +0000
Subject: Re: Bug in building standalone DSO modules
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-55958@lists.php.net to get a copy of this message
[Alexander Bokovoy <ab@avilink.net>] > On Sun, May 20, 2001 at 01:34:49AM -0400, Stig Sæther Bakken wrote: > > [Petr Cech <cech@atrey.karlin.mff.cuni.cz>] > > > Hi, > > > I've been strugling for some time with the possibility of building some > > > extension not inside of ext/ dir, but using phpize to just add some module > > > later. Strangely, it didn't work - mostly. configure was created, Makefiles, > > > config.h ... Just great, but the resulting .so did not. But only in some > > > modules. And I fond also why: > > > > > > Modules don't #include config.h generated by the ./configure - including > > > this right at the top fixes the problems. > > > > > > So, putting in every module and having phpize generate -DHAVE_CONFIG_H would > > > make it really painless for everyone to build his favorite extension > > > > > > #ifdef HAVE_CONFIG_H > > > #include "config.h" > > > #endif > > > > "phpize" will add HAVE_CONFIG_H as of 4.0.6. > I've tested PHP 4.0.6 RC1 and found that: > 1. configure defines DEFS=-DHAVE_CONFIG_H > 2. After running ./configure this definition goes into config.status > 3. config_vars.mk still has empty DEFS line (DEFS - ) > As result, HAVE_CONFIG_H is underfined. It's not part of 4.0.6RC1, but on the head of the PHP_4_0_6 branch. I added it to CPPFLAGS instead of DEFS. - Stig -- Stig Sæther Bakken <ssb@fast.no> Fast Search & Transfer ASA, Trondheim, Norway

« previous php.dev (#55958) next »