Skip to content

Autotools: Fix iconv shared build with external library #15686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ PHP NEWS
. Fixed bug GH-15330 (Do not scan generator frames more than once). (Arnaud)
. Fixed bug GH-15644 (Asymmetric visibility doesn't work with hooks). (ilutov)
. Implemented lazy objects RFC. (Arnaud)
. Fixed bug GH-15686 (Building shared iconv with external iconv library).
(Peter Kokot, zeriyoshi)

- DOM:
. Fixed bug GH-13988 (Storing DOMElement consume 4 times more memory in
Expand Down
6 changes: 3 additions & 3 deletions ext/iconv/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ if test "$PHP_ICONV" != "no"; then
PHP_SETUP_ICONV([ICONV_SHARED_LIBADD],,
[AC_MSG_FAILURE([The iconv not found.])])

save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
save_CFLAGS=$CFLAGS
LDFLAGS="$ICONV_SHARED_LIBADD $LDFLAGS"
LIBS="$LIBS $ICONV_SHARED_LIBADD"
CFLAGS="$INCLUDES $CFLAGS"

AC_CACHE_CHECK([for iconv implementation], [php_cv_iconv_implementation], [
Expand Down Expand Up @@ -111,7 +111,7 @@ int main(void) {
[AC_DEFINE([ICONV_BROKEN_IGNORE], [1],
[Define to 1 if iconv has broken IGNORE.])])

LDFLAGS=$save_LDFLAGS
LIBS=$save_LIBS
CFLAGS=$save_CFLAGS

AC_DEFINE([HAVE_ICONV], [1],
Expand Down