aboutsummaryrefslogtreecommitdiffstats
path: root/community/php5/gd-iconv.patch
blob: 7f7bd0e1964e23c94cd90eacb63890f9ea474d6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
index e643e52..fc41ab9 100644
--- a/ext/gd/config.m4
+++ b/ext/gd/config.m4
@@ -6,6 +6,9 @@ dnl
 dnl Configure options
 dnl
 
+PHP_ARG_WITH(iconv-dir, iconv dir for GD and XMLRPC-EPI,
+[  --with-iconv-dir=DIR      GD/XMLRPC-EPI: iconv dir for GD/XMLRPC-EPI],no,no)
+
 PHP_ARG_WITH(gd, for GD support,
 [  --with-gd[=DIR]           Include GD support.  DIR is the GD library base
                           install directory [BUNDLED]])
@@ -329,6 +332,18 @@ dnl enable the support in bundled GD library
     GDLIB_CFLAGS="$GDLIB_CFLAGS -DJISX0208"
   fi
 
+  dnl link to iconv if needed
+  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
+
+  PHP_SETUP_ICONV(GD_SHARED_LIBADD, [], [
+    AC_MSG_ERROR([iconv not found, in order to build gd you need the iconv library])
+  ])
 else
 
  if test "$PHP_GD" != "no"; then
--- a/ext/xmlrpc/config.m4
+++ b/ext/xmlrpc/config.m4
@@ -18,9 +18,6 @@
 PHP_ARG_WITH(libexpat-dir, libexpat dir for XMLRPC-EPI,
 [  --with-libexpat-dir=DIR XMLRPC-EPI: libexpat dir for XMLRPC-EPI (deprecated)],no,no)
 
-PHP_ARG_WITH(iconv-dir, iconv dir for XMLRPC-EPI,
-[  --with-iconv-dir=DIR    XMLRPC-EPI: iconv dir for XMLRPC-EPI],no,no)
-
 if test "$PHP_XMLRPC" != "no"; then
 
   PHP_ADD_EXTENSION_DEP(xmlrpc, libxml)