Normalize AC_CHECK_FUNC* first argument (#14700)

The m4_normalize is for Autoconf < 2.70 (on 2.70 and later versions a
blank-or-newline separated items can be expanded without using
backslash-newline).

This also syncs the 1st argument quotes.
This commit is contained in:
Peter Kokot 2024-06-28 22:40:24 +02:00 committed by GitHub
parent bcdba83cbb
commit 2041c133ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 95 additions and 69 deletions

View File

@ -1828,10 +1828,10 @@ AC_DEFUN([PHP_SETUP_ICONV], [
dnl Reset LIBS temporarily as it may have already been included -liconv in.
LIBS_save="$LIBS"
LIBS=
AC_CHECK_FUNC(iconv, [
AC_CHECK_FUNC([iconv], [
found_iconv=yes
],[
AC_CHECK_FUNC(libiconv,[
AC_CHECK_FUNC([libiconv], [
AC_DEFINE(HAVE_LIBICONV, 1, [ ])
found_iconv=yes
])

View File

@ -582,67 +582,67 @@ AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
dnl Checks for library functions.
dnl ----------------------------------------------------------------------------
AC_CHECK_FUNCS(
alphasort \
asctime_r \
chroot \
ctime_r \
explicit_memset \
fdatasync \
flock \
ftok \
funopen \
gai_strerror \
getcwd \
gethostname \
getloadavg \
getlogin \
getprotobyname \
getprotobynumber \
getservbyname \
getservbyport \
getrusage \
gettimeofday \
gmtime_r \
getpwnam_r \
getgrnam_r \
getpwuid_r \
getwd \
glob \
localtime_r \
lchown \
memcntl \
memfd_create \
mkstemp \
mmap \
nice \
nl_langinfo \
poll \
pthread_jit_write_protect_np \
putenv \
scandir \
setitimer \
setenv \
shutdown \
sigprocmask \
statfs \
statvfs \
std_syslog \
strcasecmp \
strnlen \
strptime \
strtok_r \
symlink \
tzset \
unsetenv \
usleep \
utime \
vasprintf \
asprintf \
memmem \
memrchr \
mempcpy \
)
AC_CHECK_FUNCS(m4_normalize([
alphasort
asctime_r
asprintf
chroot
ctime_r
explicit_memset
fdatasync
flock
ftok
funopen
gai_strerror
getcwd
getgrnam_r
gethostname
getloadavg
getlogin
getprotobyname
getprotobynumber
getpwnam_r
getpwuid_r
getrusage
getservbyname
getservbyport
gettimeofday
getwd
glob
gmtime_r
lchown
localtime_r
memcntl
memfd_create
memmem
mempcpy
memrchr
mkstemp
mmap
nice
nl_langinfo
poll
pthread_jit_write_protect_np
putenv
scandir
setenv
setitimer
shutdown
sigprocmask
statfs
statvfs
std_syslog
strcasecmp
strnlen
strptime
strtok_r
symlink
tzset
unsetenv
usleep
utime
vasprintf
]))
AC_CHECK_FUNC([inet_ntop],,[AC_MSG_ERROR([Required inet_ntop not found.])])
AC_CHECK_FUNC([inet_pton],,[AC_MSG_ERROR([Required inet_pton not found.])])

View File

@ -2,7 +2,7 @@ dnl Check for headers needed by timelib
AC_CHECK_HEADERS([io.h])
dnl Check for strtoll, atoll
AC_CHECK_FUNCS(strtoll atoll)
AC_CHECK_FUNCS([strtoll atoll])
PHP_DATE_CFLAGS="-Wno-implicit-fallthrough -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c

View File

@ -111,7 +111,18 @@ if test "$PHP_LDAP" != "no"; then
dnl Solaris 2.8 claims to be 2004 API, but doesn't have ldap_parse_reference()
dnl nor ldap_start_tls_s()
AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s ldap_control_find ldap_parse_extended_result ldap_extended_operation ldap_extended_operation_s ldap_passwd ldap_whoami_s ldap_refresh_s])
AC_CHECK_FUNCS(m4_normalize([
ldap_control_find
ldap_extended_operation
ldap_extended_operation_s
ldap_parse_extended_result
ldap_parse_reference
ldap_parse_result
ldap_passwd
ldap_refresh_s
ldap_start_tls_s
ldap_whoami_s
]))
dnl SASL check
if test "$PHP_LDAP_SASL" != "no"; then

View File

@ -8,7 +8,22 @@ if test "$PHP_POSIX" = "yes"; then
AC_DEFINE(HAVE_POSIX, 1, [whether to include POSIX-like functions])
PHP_NEW_EXTENSION(posix, posix.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
AC_CHECK_FUNCS(seteuid setegid setsid getsid getpgid ctermid mkfifo mknod setrlimit getrlimit getgroups initgroups getgrgid_r eaccess)
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.
@ -25,7 +40,7 @@ if test "$PHP_POSIX" = "yes"; then
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 -q "^musl"],[],
[AC_CHECK_FUNCS(pathconf fpathconf)])
[AC_CHECK_FUNCS([pathconf fpathconf])])
AC_CACHE_CHECK([for working ttyname_r() implementation],
[php_cv_func_ttyname_r],

View File

@ -283,7 +283,7 @@ dnl
dnl Check if there is a support means of creating a new process and defining
dnl which handles it receives
dnl
AC_CHECK_FUNCS(fork CreateProcess, [
AC_CHECK_FUNCS([fork CreateProcess], [
php_can_support_proc_open=yes
break
],[

View File

@ -4,7 +4,7 @@ PHP_ARG_ENABLE([cli],,
[yes],
[no])
AC_CHECK_FUNCS(setproctitle)
AC_CHECK_FUNCS([setproctitle])
AC_CHECK_HEADERS([sys/pstat.h])