Skip to content

Commit 1ee4bf1

Browse files
authored
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.
1 parent fb5d64c commit 1ee4bf1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/mbstring/config.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ AC_DEFUN([PHP_MBSTRING_SETUP_MBREGEX], [
5757
5858
AC_CACHE_CHECK([if oniguruma has an invalid entry for KOI8 encoding],
5959
[php_cv_lib_onig_invalid_koi8],
60-
[save_old_LDFLAGS=$LDFLAGS
60+
[save_old_LIBS=$LIBS
61+
LIBS="$LIBS $MBSTRING_SHARED_LIBADD"
6162
save_old_CFLAGS=$CFLAGS
6263
CFLAGS="$CFLAGS $ONIG_CFLAGS"
63-
PHP_EVAL_LIBLINE([$MBSTRING_SHARED_LIBADD], [LDFLAGS])
6464
AC_LINK_IFELSE([AC_LANG_PROGRAM([
6565
#include <stdint.h>
6666
#include <oniguruma.h>
6767
],
6868
[return (intptr_t)(ONIG_ENCODING_KOI8 + 1);])],
6969
[php_cv_lib_onig_invalid_koi8=no],
7070
[php_cv_lib_onig_invalid_koi8=yes])
71-
LDFLAGS=$save_old_LDFLAGS
71+
LIBS=$save_old_LIBS
7272
CFLAGS=$save_old_CFLAGS])
7373
AS_VAR_IF([php_cv_lib_onig_invalid_koi8], [yes],
7474
[AC_DEFINE([PHP_ONIG_BAD_KOI8_ENTRY], [1],

0 commit comments

Comments
 (0)