]> granicus.if.org Git - php/commitdiff
Reset LIBS temporarily to make sure PHP_CHECK_FUNC will look into libc.
authorMoriyoshi Koizumi <mozo@mozo.jp>
Mon, 2 Apr 2012 16:32:42 +0000 (01:32 +0900)
committerMoriyoshi Koizumi <mozo@mozo.jp>
Mon, 2 Apr 2012 16:51:23 +0000 (01:51 +0900)
See Gentoo bug #364139. https://bugs.gentoo.org/show_bug.cgi?id=364139
Reported by Naohiro Aota.

NEWS
acinclude.m4

diff --git a/NEWS b/NEWS
index c7cd2c7c40f35abc61869bbac2995714d99940da..736ffe813a4ddff649d16fe33e0cd987990e9daf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,11 @@ PHP                                                                        NEWS
 ?? ??? 2012, PHP 5.3.12
 
 ?? ??? 2012, PHP 5.3.11
+- Iconv extension:
+  . Fixed a bug that iconv extension fails to link to the correct library
+    when another extension makes use of a library that links to the iconv
+    library. See https://bugs.gentoo.org/show_bug.cgi?id=364139 for detail.
+    (Moriyoshi)
 
 (merge after 5.3.11 release)
 
index 5515b3f03d5302ab9ace12eddf6c92f19188944e..ddf72857839ec8ab0c29da1b832d7a3e040fb093 100644 (file)
@@ -2438,7 +2438,12 @@ AC_DEFUN([PHP_SETUP_ICONV], [
   dnl
   dnl Check libc first if no path is provided in --with-iconv
   dnl
+
   if test "$PHP_ICONV" = "yes"; then
+    dnl Reset LIBS temporarily as it may have already been included
+    dnl -liconv in.
+    LIBS_save="$LIBS"
+    LIBS=
     AC_CHECK_FUNC(iconv, [
       found_iconv=yes
     ],[
@@ -2448,6 +2453,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
         found_iconv=yes
       ])
     ])
+    LIBS="$LIBS_save"
   fi
 
   dnl