Skip to content

Commit 1251901

Browse files
authored
Autotools: Check for cross_compiling=yes (#15238)
The cross_compiling variable can initially be "yes", "no", or "maybe" (when only --host option is added). Autoconf otherwise after AC_PROG_CC resets it to "no" in such case but to be sure, this checks for value "yes" instead. The HAVE_FNMATCH template can be also set after the AC_DEFINE as autoheader scans the templates overall the source code.
1 parent 95447e0 commit 1251901

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/standard/config.m4

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,10 @@ int main(void) {
285285
AC_DEFINE([PHP_USE_PHP_CRYPT_R], [0])
286286
])
287287

288-
AS_VAR_IF([cross_compiling], [no], [AC_FUNC_FNMATCH],
288+
AS_VAR_IF([cross_compiling], [yes],
289289
[AS_CASE([$host_alias], [*linux*],
290-
[AC_DEFINE([HAVE_FNMATCH], [1])])])
290+
[AC_DEFINE([HAVE_FNMATCH], [1])])],
291+
[AC_FUNC_FNMATCH])
291292

292293
dnl
293294
dnl Check if there is a support means of creating a new process and defining

0 commit comments

Comments
 (0)