]> granicus.if.org Git - php/commitdiff
Fix bug #47695 - xmlrpc --with-iconv-dir mangles --with-iconv if they use different...
authorScott MacVicar <scottmac@php.net>
Mon, 27 Apr 2009 17:49:18 +0000 (17:49 +0000)
committerScott MacVicar <scottmac@php.net>
Mon, 27 Apr 2009 17:49:18 +0000 (17:49 +0000)
ext/xmlrpc/config.m4

index 7f7277d4df99506ffc205e82c17a817ffc822b0c..389d4adaf0106917e29f6ac3329d9b8ac7a344d0 100644 (file)
@@ -61,17 +61,21 @@ if test "$PHP_XMLRPC" != "no"; then
     fi
   fi
 
-  if test "$PHP_ICONV_DIR" != "no"; then
-    PHP_ICONV=$PHP_ICONV_DIR
-  fi
+  dnl if iconv is shared or missing then we should build iconv ourselves
+  if test "$PHP_ICONV_SHARED" = "yes" || test "$PHP_ICONV" = "no"; then
+
+    if test "$PHP_ICONV_DIR" != "no"; then
+      PHP_ICONV=$PHP_ICONV_DIR
+    fi
   
-  if test -z "$PHP_ICONV" || test "$PHP_ICONV" = "no"; then
-    PHP_ICONV=yes
-  fi
+    if test -z "$PHP_ICONV" || test "$PHP_ICONV" = "no"; then
+      PHP_ICONV=yes
+    fi
   
-  PHP_SETUP_ICONV(XMLRPC_SHARED_LIBADD, [], [
-    AC_MSG_ERROR([iconv not found, in order to build xmlrpc you need the iconv library])
-  ])
+    PHP_SETUP_ICONV(XMLRPC_SHARED_LIBADD, [], [
+      AC_MSG_ERROR([iconv not found, in order to build xmlrpc you need the iconv library])
+    ])
+  fi
 fi
 
 if test "$PHP_XMLRPC" = "yes"; then