hi,

On Sun, Oct 11, 2009 at 10:44 PM, shire <sh...@tekrat.com> wrote:

> 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.

If the flag for the bundled PCRE is set, the include path should be
set to php's include directory, or to the system pcre if not.

The problem is when the system PCRE is installed in the default prefix
just like any other libs and php was built with the bundled PCRE. In
this case you can just hope that php's include is first in the list,
but this configuration is a call for troubles and should not be
supported (we bogus'ed some bugs about that afair).

>  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?

A PHP_SETUP_PCRE could do all the jobs for you. Then you would only
have to use something like:

  PHP_SETUP_PCRE(APC_SHARED_LIBADD,
  [
    AC_DEFINE(HAVE_PCRE_EXT,1,[ ])
  ], [
    AC_MSG_ERROR([OpenSSL check failed. Please check config.log for
more information.])
  ])

By the way, given that PCRE is enabled by default in 5.3+ (maybe in
5.2 too, I don't rememer :), I don't see it as a dependency. Maybe APC
could add an extension depency and use ext/pcre's exposed API (which
implements the cache as well).

Cheers,
--
Pierre

http://blog.thepimp.net | http://www.libgd.org

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to