Autotools: Use LIBS for appending -lonig (#14936)

LDFLAGS is by convention used more for linker options like -s and -L.
The -l option should go to LIBS instead. This does the same check but
is more understandable in the logs and M4 code.
This commit is contained in:
Peter Kokot 2024-07-13 06:37:58 +02:00 committed by GitHub
parent fb5d64c300
commit 1ee4bf1c5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,10 +57,10 @@ AC_DEFUN([PHP_MBSTRING_SETUP_MBREGEX], [
AC_CACHE_CHECK([if oniguruma has an invalid entry for KOI8 encoding],
[php_cv_lib_onig_invalid_koi8],
[save_old_LDFLAGS=$LDFLAGS
[save_old_LIBS=$LIBS
LIBS="$LIBS $MBSTRING_SHARED_LIBADD"
save_old_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $ONIG_CFLAGS"
PHP_EVAL_LIBLINE([$MBSTRING_SHARED_LIBADD], [LDFLAGS])
AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <stdint.h>
#include <oniguruma.h>
@ -68,7 +68,7 @@ AC_DEFUN([PHP_MBSTRING_SETUP_MBREGEX], [
[return (intptr_t)(ONIG_ENCODING_KOI8 + 1);])],
[php_cv_lib_onig_invalid_koi8=no],
[php_cv_lib_onig_invalid_koi8=yes])
LDFLAGS=$save_old_LDFLAGS
LIBS=$save_old_LIBS
CFLAGS=$save_old_CFLAGS])
AS_VAR_IF([php_cv_lib_onig_invalid_koi8], [yes],
[AC_DEFINE([PHP_ONIG_BAD_KOI8_ENTRY], [1],