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 (71 lines) | stat: -rw-r--r-- 2,054 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
PHP_ARG_ENABLE([posix],
  [whether to enable POSIX-like functions],
  [AS_HELP_STRING([--disable-posix],
    [Disable POSIX-like functions])],
  [yes])

if test "$PHP_POSIX" = "yes"; then
  AC_DEFINE([HAVE_POSIX], [1],
    [Define to 1 if the PHP extension 'posix' is available.])
  PHP_NEW_EXTENSION([posix],
    [posix.c],
    [$ext_shared],,
    [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])

  AC_CHECK_FUNCS(m4_normalize([
    ctermid
    eaccess
    getgrgid_r
    getgroups
    getpgid
    getrlimit
    getsid
    initgroups
    mkfifo
    mknod
    setegid
    seteuid
    setrlimit
    setsid
  ]))

  dnl Check for makedev. If it's defined as a macro, AC_CHECK_FUNCS won't work.
  dnl Required headers are included by the AC_HEADER_MAJOR logic.
  AC_CHECK_FUNCS([makedev],,
    [AC_CHECK_DECL([makedev], [AC_DEFINE([HAVE_MAKEDEV], [1])],, [
      #include <sys/types.h>
      #ifdef MAJOR_IN_MKDEV
      # include <sys/mkdev.h>
      #elif defined(MAJOR_IN_SYSMACROS)
      # include <sys/sysmacros.h>
      #endif
    ])])

dnl Skip pathconf and fpathconf check on musl libc due to limited implementation
dnl (first argument is not validated and has different error).
  AS_IF([command -v ldd >/dev/null && ldd --version 2>&1 | grep ^musl >/dev/null 2>&1],
    [],
    [AC_CHECK_FUNCS([pathconf fpathconf])])

  AC_CACHE_CHECK([for working ttyname_r() implementation],
    [php_cv_func_ttyname_r],
    [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [[
      char buf[64];
      return !ttyname_r(0, buf, 64);
    ]])],
    [php_cv_func_ttyname_r=yes],
    [php_cv_func_ttyname_r=no],
    [AC_CHECK_FUNC([ttyname_r],
      [php_cv_func_ttyname_r=yes], [php_cv_func_ttyname_r=no])])])
  AS_VAR_IF([php_cv_func_ttyname_r], [yes],
    [AC_DEFINE([HAVE_TTYNAME_R], [1],
      [Define to 1 if you have a working 'ttyname_r' function.])],
    [AC_MSG_NOTICE([posix_ttyname() will be thread-unsafe])])

  AC_CHECK_MEMBERS([struct utsname.domainname],,,[
    #ifndef _GNU_SOURCE
    #define _GNU_SOURCE
    #endif
    #include <sys/utsname.h>
  ])
fi