Hi,
I wonder what is the right way to make a dependency on
another extension.
Particularly, in my ext. I use PHPAPI php_sockets_le_socket() function
and php_socket structure both declared in ext/sockets/php_sockets.h.
The function should be resolved at run-time, and I might even declare
some extern prototype. But I also need the php_socket struct. Obviously,
I have to include ext/sockets/php_sockets.h:
#if PHP_VERSION_ID >= 50301 && (HAVE_SOCKETS || defined(COMPILE_DL_SOCKETS))
# include <ext/sockets/php_sockets.h>
# define PHP_EVENT_SOCKETS_SUPPORT
#endif
Sockets extension is optional, so I do the following in config.m4:
PHP_ADD_EXTENSION_DEP(event, sockets, true)
and the following in C:
static const zend_module_dep event_deps[] = {
ZEND_MOD_OPTIONAL("sockets")
{NULL, NULL, NULL}
};
However, it won't work if the sockets extension is built separately,
for instance. Please, give me advice, what should I reply to this bug:
https://bugs.php.net/bug.php?id=65597 . Would it be fixed, if I make
"sockets" required?
Regards.
--
Ruslan Osmanov
--
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php