Re: How do I make a dependency on the sockets extension?
| From: | Ruslan Osmanov | Date: | Sun, 08 Sep 2013 09:06:32 +0000 |
| Subject: | Re: How do I make a dependency on the sockets extension? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-11030@lists.php.net to get a copy of this message | ||
On 09/08/2013 12:41 PM, Ruslan Osmanov wrote:
Even though I made sockets required by default, this guy still has issues with building: https://bugs.php.net/bug.php?id=65597 I suspect he has different versions of phpize and php or so. Have no clue.I've found a strange thing. The PHP_ADD_EXTENSION_DEP macro implementation contains the following check: is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__) ... if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then In case if "sockets" disabled, it is written to configure as follows is_it_enabled=$PHP_SOCKETS .. if test "x$is_it_enabled" = "xno" && test "x" != "xtrue"; then as_fn_error $? " You've configured extension event, which depends on extension sockets, but you've either not enabled sockets, or have disabled it. " "$LINENO" 5 fi We can see that $PHP_SOCKETS is actually empty when PHP is built with --disable-sockets, and the check will not be satisfied! However, it works with a little hack in my config.m4: if test "x$PHP_SOCKETS" = "x"; then
PHP_SOCKETS="no"fi With this hack, it outputs the desired error. Please help me to understand whether it is a bug in acinclude.m4, or I'm just getting it wrong. Thanks. -- Ruslan Osmanov