Skip to content

Commit 2041c13

Browse files
authored
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.
1 parent bcdba83 commit 2041c13

File tree

7 files changed

+95
-69
lines changed

7 files changed

+95
-69
lines changed

build/php.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,10 +1828,10 @@ AC_DEFUN([PHP_SETUP_ICONV], [
18281828
dnl Reset LIBS temporarily as it may have already been included -liconv in.
18291829
LIBS_save="$LIBS"
18301830
LIBS=
1831-
AC_CHECK_FUNC(iconv, [
1831+
AC_CHECK_FUNC([iconv], [
18321832
found_iconv=yes
18331833
],[
1834-
AC_CHECK_FUNC(libiconv,[
1834+
AC_CHECK_FUNC([libiconv], [
18351835
AC_DEFINE(HAVE_LIBICONV, 1, [ ])
18361836
found_iconv=yes
18371837
])

configure.ac

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -582,67 +582,67 @@ AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
582582
dnl Checks for library functions.
583583
dnl ----------------------------------------------------------------------------
584584

585-
AC_CHECK_FUNCS(
586-
alphasort \
587-
asctime_r \
588-
chroot \
589-
ctime_r \
590-
explicit_memset \
591-
fdatasync \
592-
flock \
593-
ftok \
594-
funopen \
595-
gai_strerror \
596-
getcwd \
597-
gethostname \
598-
getloadavg \
599-
getlogin \
600-
getprotobyname \
601-
getprotobynumber \
602-
getservbyname \
603-
getservbyport \
604-
getrusage \
605-
gettimeofday \
606-
gmtime_r \
607-
getpwnam_r \
608-
getgrnam_r \
609-
getpwuid_r \
610-
getwd \
611-
glob \
612-
localtime_r \
613-
lchown \
614-
memcntl \
615-
memfd_create \
616-
mkstemp \
617-
mmap \
618-
nice \
619-
nl_langinfo \
620-
poll \
621-
pthread_jit_write_protect_np \
622-
putenv \
623-
scandir \
624-
setitimer \
625-
setenv \
626-
shutdown \
627-
sigprocmask \
628-
statfs \
629-
statvfs \
630-
std_syslog \
631-
strcasecmp \
632-
strnlen \
633-
strptime \
634-
strtok_r \
635-
symlink \
636-
tzset \
637-
unsetenv \
638-
usleep \
639-
utime \
640-
vasprintf \
641-
asprintf \
642-
memmem \
643-
memrchr \
644-
mempcpy \
645-
)
585+
AC_CHECK_FUNCS(m4_normalize([
586+
alphasort
587+
asctime_r
588+
asprintf
589+
chroot
590+
ctime_r
591+
explicit_memset
592+
fdatasync
593+
flock
594+
ftok
595+
funopen
596+
gai_strerror
597+
getcwd
598+
getgrnam_r
599+
gethostname
600+
getloadavg
601+
getlogin
602+
getprotobyname
603+
getprotobynumber
604+
getpwnam_r
605+
getpwuid_r
606+
getrusage
607+
getservbyname
608+
getservbyport
609+
gettimeofday
610+
getwd
611+
glob
612+
gmtime_r
613+
lchown
614+
localtime_r
615+
memcntl
616+
memfd_create
617+
memmem
618+
mempcpy
619+
memrchr
620+
mkstemp
621+
mmap
622+
nice
623+
nl_langinfo
624+
poll
625+
pthread_jit_write_protect_np
626+
putenv
627+
scandir
628+
setenv
629+
setitimer
630+
shutdown
631+
sigprocmask
632+
statfs
633+
statvfs
634+
std_syslog
635+
strcasecmp
636+
strnlen
637+
strptime
638+
strtok_r
639+
symlink
640+
tzset
641+
unsetenv
642+
usleep
643+
utime
644+
vasprintf
645+
]))
646646

647647
AC_CHECK_FUNC([inet_ntop],,[AC_MSG_ERROR([Required inet_ntop not found.])])
648648
AC_CHECK_FUNC([inet_pton],,[AC_MSG_ERROR([Required inet_pton not found.])])

ext/date/config0.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl Check for headers needed by timelib
22
AC_CHECK_HEADERS([io.h])
33

44
dnl Check for strtoll, atoll
5-
AC_CHECK_FUNCS(strtoll atoll)
5+
AC_CHECK_FUNCS([strtoll atoll])
66

77
PHP_DATE_CFLAGS="-Wno-implicit-fallthrough -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
88
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c

ext/ldap/config.m4

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,18 @@ if test "$PHP_LDAP" != "no"; then
111111

112112
dnl Solaris 2.8 claims to be 2004 API, but doesn't have ldap_parse_reference()
113113
dnl nor ldap_start_tls_s()
114-
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])
114+
AC_CHECK_FUNCS(m4_normalize([
115+
ldap_control_find
116+
ldap_extended_operation
117+
ldap_extended_operation_s
118+
ldap_parse_extended_result
119+
ldap_parse_reference
120+
ldap_parse_result
121+
ldap_passwd
122+
ldap_refresh_s
123+
ldap_start_tls_s
124+
ldap_whoami_s
125+
]))
115126

116127
dnl SASL check
117128
if test "$PHP_LDAP_SASL" != "no"; then

ext/posix/config.m4

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,22 @@ if test "$PHP_POSIX" = "yes"; then
88
AC_DEFINE(HAVE_POSIX, 1, [whether to include POSIX-like functions])
99
PHP_NEW_EXTENSION(posix, posix.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
1010

11-
AC_CHECK_FUNCS(seteuid setegid setsid getsid getpgid ctermid mkfifo mknod setrlimit getrlimit getgroups initgroups getgrgid_r eaccess)
11+
AC_CHECK_FUNCS(m4_normalize([
12+
ctermid
13+
eaccess
14+
getgrgid_r
15+
getgroups
16+
getpgid
17+
getrlimit
18+
getsid
19+
initgroups
20+
mkfifo
21+
mknod
22+
setegid
23+
seteuid
24+
setrlimit
25+
setsid
26+
]))
1227

1328
dnl Check for makedev. If it's defined as a macro, AC_CHECK_FUNCS won't work.
1429
dnl Required headers are included by the AC_HEADER_MAJOR logic.
@@ -25,7 +40,7 @@ if test "$PHP_POSIX" = "yes"; then
2540
dnl Skip pathconf and fpathconf check on musl libc due to limited implementation
2641
dnl (first argument is not validated and has different error).
2742
AS_IF([command -v ldd >/dev/null && ldd --version 2>&1 | grep -q "^musl"],[],
28-
[AC_CHECK_FUNCS(pathconf fpathconf)])
43+
[AC_CHECK_FUNCS([pathconf fpathconf])])
2944

3045
AC_CACHE_CHECK([for working ttyname_r() implementation],
3146
[php_cv_func_ttyname_r],

ext/standard/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ dnl
283283
dnl Check if there is a support means of creating a new process and defining
284284
dnl which handles it receives
285285
dnl
286-
AC_CHECK_FUNCS(fork CreateProcess, [
286+
AC_CHECK_FUNCS([fork CreateProcess], [
287287
php_can_support_proc_open=yes
288288
break
289289
],[

sapi/cli/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PHP_ARG_ENABLE([cli],,
44
[yes],
55
[no])
66

7-
AC_CHECK_FUNCS(setproctitle)
7+
AC_CHECK_FUNCS([setproctitle])
88

99
AC_CHECK_HEADERS([sys/pstat.h])
1010

0 commit comments

Comments
 (0)