Skip to content

Commit df6d85a

Browse files
authored
Fix CS for fnmatch check (#14659)
This wraps the check when cross-compiling into AS_* macros and uses the default description template provided the AC_FUNC_FNMATCH. In such case the 3rd argument can be omitted. Also, newer Autoconf versions have replaced backticks with single quotes in AC_DEFINE* macros descriptions.
1 parent 5c55306 commit df6d85a

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

ext/standard/config.m4

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -275,17 +275,9 @@ else
275275
PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c)
276276
fi
277277

278-
if test "$cross_compiling" = yes ; then
279-
case $host_alias in
280-
*linux*)
281-
AC_DEFINE([HAVE_FNMATCH], 1,
282-
[Define to 1 if your system has a working POSIX `fnmatch'
283-
function.])
284-
;;
285-
esac
286-
else
287-
AC_FUNC_FNMATCH
288-
fi
278+
AS_VAR_IF([cross_compiling], [no], [AC_FUNC_FNMATCH],
279+
[AS_CASE([$host_alias], [*linux*],
280+
[AC_DEFINE([HAVE_FNMATCH], [1])])])
289281

290282
dnl
291283
dnl Check if there is a support means of creating a new process and defining

0 commit comments

Comments
 (0)