Heya,
Pierre Joye wrote:
hi!
On Sun, Oct 11, 2009 at 10:05 AM, shire<sh...@tekrat.com> wrote:
Currently we have an open bug #16809
(http://pecl.php.net/bugs/bug.php?id=16809&edit=1) in APC where we're unable
to find the pcre.h header file as it's not in our include path when a user
compiles PHP with the --enable-pcre=<some include path>. This is because
the include path the user provides isn't made available in INCLUDES in the
extension (APC) when compiled as a shared library using phpize.
I've come up with the following solution, but want feedback/other options
before I commit. Essentially I've made use of the EXTRA_INCLUDES that's
included in INCLUDES, but not really used much of anywhere AFAIK. I've also
added the autoconf macro PHP_ADD_EXTRA_INCLUDE that mirrors the
PHP_ADD_INCLUDE behavior, as well as the --extra_includes option to
php-config. This way extensions can provide additional include paths that
they depend on for extensions that may in-turn be dependent on their header
files.
http://tekrat.com/downloads/bits/extra_includes.php5.3.patch
Would it be not more correct to test if the bundled pcre is used or
not. And detect the pcre header if the system pcre is used?
We can definitely check to see if PCRE is bundled or not, but how do we detect
the exact path of the pcre.h file that was used? (we could also have multiple
pcre.h files on the same system), so it seems we need to store this somewhere
in the PHP configuration that the shared extension can pull from. My thinking
here was that just making it part of the existing INCLUDE path was easiest, we
could probably make this some sort of macro that the extension has to
explicitly call to get this path included as well. Perhaps that's more ideal
so we don't get a bunch of extra include paths we don't actually need for other
extensions?
I'm not sure I follow the openssl/libxml examples entirely, as this case would
be us depending on having a way for an extension like APC to get the location
of openssl includes/lib paths. Do we have that scenario somewhere?
Thanks!
-shire
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php