Skip to content

Commit

Permalink
Fix CS for fnmatch check (#14659)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
petk authored Jun 24, 2024
1 parent 5c55306 commit df6d85a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions ext/standard/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,9 @@ else
PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c)
fi

if test "$cross_compiling" = yes ; then
case $host_alias in
*linux*)
AC_DEFINE([HAVE_FNMATCH], 1,
[Define to 1 if your system has a working POSIX `fnmatch'
function.])
;;
esac
else
AC_FUNC_FNMATCH
fi
AS_VAR_IF([cross_compiling], [no], [AC_FUNC_FNMATCH],
[AS_CASE([$host_alias], [*linux*],
[AC_DEFINE([HAVE_FNMATCH], [1])])])

dnl
dnl Check if there is a support means of creating a new process and defining
Expand Down

0 comments on commit df6d85a

Please sign in to comment.