summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Heimpold <mhei@heimpold.de>2017-04-13 22:43:26 +0200
committerJoe Watkins <krakjoe@php.net>2017-04-17 08:11:40 +0100
commit32c5b8efd68dd21dd025285e7207dcab7c6319cd (patch)
tree851003d958fae5002799db52ae9070eb6edbe83d
parent618d97962a8ac59d981c8307cc704790f46090c8 (diff)
downloadphp-git-32c5b8efd68dd21dd025285e7207dcab7c6319cd.tar.gz
ext/gettext: respect passed in library directory for all checks
A directory given to configure by --with-gettext=dir is only used within the very first AC_CHECK_LIB. This is because the temporary modified LDFLAGS variable is reset too early. This results in functions not detected properly. The original issue and patch was reported for OpenWrt/LEDE distribution by @Dimazhan at: https://github.com/openwrt/packages/issues/4250 Signed-off-by: Michael Heimpold <mhei@heimpold.de>
-rw-r--r--ext/gettext/config.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/gettext/config.m4 b/ext/gettext/config.m4
index 24dddd3a43..c82be9cc05 100644
--- a/ext/gettext/config.m4
+++ b/ext/gettext/config.m4
@@ -30,7 +30,6 @@ if test "$PHP_GETTEXT" != "no"; then
AC_MSG_ERROR(Unable to find required gettext library)
])
)
- LDFLAGS=$O_LDFLAGS
AC_DEFINE(HAVE_LIBINTL,1,[ ])
PHP_NEW_EXTENSION(gettext, gettext.c, $ext_shared)
@@ -46,5 +45,6 @@ if test "$PHP_GETTEXT" != "no"; then
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dngettext, [AC_DEFINE(HAVE_DNGETTEXT, 1, [ ])])
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dcngettext, [AC_DEFINE(HAVE_DCNGETTEXT, 1, [ ])])
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, bind_textdomain_codeset, [AC_DEFINE(HAVE_BIND_TEXTDOMAIN_CODESET, 1, [ ])])
+ LDFLAGS=$O_LDFLAGS
fi