php-src/ext/sockets/config.w32
Christoph M. Becker 95cf7a0358 Fix Windows build for shared ext/sockets
We can't use `PHPAPI` for extensions which may be built shared.  Thus,
we introduce `PHP_SOCKETS_API`.
2020-09-08 22:54:21 +02:00

17 lines
664 B
JavaScript

// vim:ft=javascript
ARG_ENABLE("sockets", "SOCKETS support", "no");
if (PHP_SOCKETS != "no") {
if (CHECK_LIB("ws2_32.lib", "sockets", PHP_SOCKETS)
&& CHECK_LIB("Iphlpapi.lib", "sockets", PHP_SOCKETS)
&& CHECK_HEADER_ADD_INCLUDE("winsock.h", "CFLAGS_SOCKETS")) {
EXTENSION('sockets', 'sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c', PHP_SOCKETS_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE('HAVE_SOCKETS', 1);
PHP_INSTALL_HEADERS("ext/sockets", "php_sockets.h windows_common.h");
ADD_FLAG("CFLAGS_SOCKETS", "/D PHP_SOCKETS_EXPORTS=1");
} else {
WARNING("sockets not enabled; libraries and headers not found");
}
}