File: config.m4

package info (click to toggle)
php8.4 8.4.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 208,108 kB
  • sloc: ansic: 1,060,628; php: 35,345; sh: 11,866; cpp: 7,201; pascal: 4,913; javascript: 3,091; asm: 2,810; yacc: 2,411; makefile: 689; xml: 446; python: 301; awk: 148
file content (36 lines) | stat: -rw-r--r-- 1,218 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PHP_ARG_ENABLE([sockets],
  [whether to enable sockets support],
  [AS_HELP_STRING([--enable-sockets],
    [Enable sockets support])])

if test "$PHP_SOCKETS" != "no"; then
  AC_CHECK_FUNCS([hstrerror if_nametoindex if_indextoname sockatmark])
  AC_CHECK_HEADERS([sys/sockio.h linux/filter.h])
  AC_DEFINE([HAVE_SOCKETS], [1],
    [Define to 1 if the PHP extension 'sockets' is available.])

  dnl Check for field ss_family in sockaddr_storage (missing in AIX until 5.3)
  AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],,,
    [#include <sys/socket.h>])

  dnl Check for struct ucred. Checking the header is not enough (DragonFlyBSD).
  AC_CHECK_TYPES([struct ucred],,, [
    #ifndef _GNU_SOURCE
    # define _GNU_SOURCE
    #endif
    #include <sys/socket.h>
  ])

  AC_CHECK_TYPES([struct cmsgcred],,, [#include <sys/socket.h>])

  PHP_SOCKETS_CFLAGS=-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1
  AS_CASE([$host_alias],
    [*darwin*],
      [PHP_SOCKETS_CFLAGS="$PHP_SOCKETS_CFLAGS -D__APPLE_USE_RFC_3542"])

  PHP_NEW_EXTENSION([sockets],
    [sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c],
    [$ext_shared],,
    [$PHP_SOCKETS_CFLAGS])
  PHP_INSTALL_HEADERS([ext/sockets], [php_sockets.h])
fi