View | Details | Raw Unified | Return to bug 230234
Collapse All | Expand All

(-)graphics/php56-gd/files/patch-config.m4 (-2 / +10 lines)
Lines 1-5 Link Here
1
--- config.m4.orig	2016-09-15 23:02:50.000000000 +0200
1
--- config.m4.orig	2018-07-19 15:01:38 UTC
2
+++ config.m4	2016-09-28 10:10:26.335642000 +0200
2
+++ config.m4
3
@@ -228,7 +228,7 @@ AC_DEFUN([PHP_GD_T1LIB],[
3
@@ -228,7 +228,7 @@ AC_DEFUN([PHP_GD_T1LIB],[
4
     ],[
4
     ],[
5
       AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.])
5
       AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.])
Lines 9-11 Link Here
9
     ])
9
     ])
10
   fi
10
   fi
11
 ])
11
 ])
12
@@ -315,6 +315,7 @@ dnl enable the support in bundled GD library
13
 
14
   if test -n "$GD_XPM_DIR"; then
15
     AC_DEFINE(HAVE_GD_XPM, 1, [ ])
16
+    AC_DEFINE(HAVE_XPM, 1, [ ])
17
     GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_XPM"
18
   fi
19
 
(-)graphics/php56-gd/files/patch-gd.c (+83 lines)
Line 0 Link Here
1
--- gd.c.orig	2018-07-19 15:01:38 UTC
2
+++ gd.c
3
@@ -53,7 +53,7 @@
4
 # include <Wingdi.h>
5
 #endif
6
 
7
-#ifdef HAVE_GD_XPM
8
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
9
 # include <X11/xpm.h>
10
 #endif
11
 
12
@@ -85,7 +85,7 @@ static void php_free_ps_enc(zend_rsrc_list_entry *rsrc
13
 # endif
14
 #endif
15
 
16
-#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
17
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
18
 # include "X11/xpm.h"
19
 #endif
20
 
21
@@ -333,7 +333,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxbm, 0)
22
 	ZEND_ARG_INFO(0, filename)
23
 ZEND_END_ARG_INFO()
24
 
25
-#if defined(HAVE_GD_XPM)
26
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
27
 ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxpm, 0)
28
 	ZEND_ARG_INFO(0, filename)
29
 ZEND_END_ARG_INFO()
30
@@ -959,7 +959,7 @@ const zend_function_entry gd_functions[] = {
31
 #endif
32
 	PHP_FE(imagecreatefromwbmp,						arginfo_imagecreatefromwbmp)
33
 	PHP_FE(imagecreatefromxbm,						arginfo_imagecreatefromxbm)
34
-#if defined(HAVE_GD_XPM)
35
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
36
 	PHP_FE(imagecreatefromxpm,						arginfo_imagecreatefromxpm)
37
 #endif
38
 	PHP_FE(imagecreatefromgd,						arginfo_imagecreatefromgd)
39
@@ -1354,7 +1354,7 @@ PHP_MINFO_FUNCTION(gd)
40
 	php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString());
41
 #endif
42
 	php_info_print_table_row(2, "WBMP Support", "enabled");
43
-#if defined(HAVE_GD_XPM)
44
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
45
 	php_info_print_table_row(2, "XPM Support", "enabled");
46
 	{
47
 		char tmp[12];
48
@@ -1415,7 +1415,7 @@ PHP_FUNCTION(gd_info)
49
 	add_assoc_bool(return_value, "PNG Support", 0);
50
 #endif
51
 	add_assoc_bool(return_value, "WBMP Support", 1);
52
-#if defined(HAVE_GD_XPM)
53
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
54
 	add_assoc_bool(return_value, "XPM Support", 1);
55
 #else
56
 	add_assoc_bool(return_value, "XPM Support", 0);
57
@@ -2220,7 +2220,7 @@ PHP_FUNCTION(imagetypes)
58
 	ret |= 4;
59
 #endif
60
 	ret |= 8;
61
-#if defined(HAVE_GD_XPM)
62
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
63
 	ret |= 16;
64
 #endif
65
 #ifdef HAVE_GD_WEBP
66
@@ -2465,7 +2465,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_P
67
 			case PHP_GDIMG_TYPE_GD2PART:
68
 				im = (*func_p)(fp, srcx, srcy, width, height);
69
 				break;
70
-#if defined(HAVE_GD_XPM)
71
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
72
 			case PHP_GDIMG_TYPE_XPM:
73
 				im = gdImageCreateFromXpm(file);
74
 				break;
75
@@ -2547,7 +2547,7 @@ PHP_FUNCTION(imagecreatefromxbm)
76
 }
77
 /* }}} */
78
 
79
-#if defined(HAVE_GD_XPM)
80
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
81
 /* {{{ proto resource imagecreatefromxpm(string filename)
82
    Create a new image from XPM file or URL */
83
 PHP_FUNCTION(imagecreatefromxpm)
(-)graphics/php70-gd/files/patch-config.m4 (-3 / +11 lines)
Lines 1-7 Link Here
1
--- config.m4.orig	2018-07-11 13:18:02 UTC
1
--- config.m4.orig	2018-07-17 11:06:34 UTC
2
+++ config.m4
2
+++ config.m4
3
@@ -358,7 +358,7 @@ if test "$PHP_GD" != "no"; then
3
@@ -295,6 +295,7 @@ dnl enable the support in bundled GD library
4
 
4
 
5
   if test -n "$GD_XPM_DIR"; then
6
     AC_DEFINE(HAVE_GD_XPM, 1, [ ])
7
+    AC_DEFINE(HAVE_XPM, 1, [ ])
8
     GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_XPM"
9
   fi
10
 
11
@@ -358,7 +359,7 @@ if test "$PHP_GD" != "no"; then
12
 
5
   if test "$GD_MODULE_TYPE" = "builtin"; then 
13
   if test "$GD_MODULE_TYPE" = "builtin"; then 
6
     PHP_ADD_BUILD_DIR($ext_builddir/libgd)
14
     PHP_ADD_BUILD_DIR($ext_builddir/libgd)
7
-    GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
15
-    GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
Lines 9-15 Link Here
9
     GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
17
     GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
10
 
18
 
11
     PHP_TEST_BUILD(foobar, [], [
19
     PHP_TEST_BUILD(foobar, [], [
12
@@ -366,7 +366,7 @@ if test "$PHP_GD" != "no"; then
20
@@ -366,7 +367,7 @@ if test "$PHP_GD" != "no"; then
13
     ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
21
     ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
14
   else
22
   else
15
     GD_HEADER_DIRS="ext/gd/"
23
     GD_HEADER_DIRS="ext/gd/"
(-)graphics/php70-gd/files/patch-gd.c (+83 lines)
Line 0 Link Here
1
--- gd.c.orig	2018-07-17 11:06:34 UTC
2
+++ gd.c
3
@@ -53,7 +53,7 @@
4
 # include <Wingdi.h>
5
 #endif
6
 
7
-#ifdef HAVE_GD_XPM
8
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
9
 # include <X11/xpm.h>
10
 #endif
11
 
12
@@ -79,7 +79,7 @@ static int le_gd, le_gd_font;
13
 # endif
14
 #endif
15
 
16
-#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
17
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
18
 # include "X11/xpm.h"
19
 #endif
20
 
21
@@ -327,7 +327,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxbm, 0)
22
 	ZEND_ARG_INFO(0, filename)
23
 ZEND_END_ARG_INFO()
24
 
25
-#if defined(HAVE_GD_XPM)
26
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
27
 ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxpm, 0)
28
 	ZEND_ARG_INFO(0, filename)
29
 ZEND_END_ARG_INFO()
30
@@ -901,7 +901,7 @@ const zend_function_entry gd_functions[] = {
31
 #endif
32
 	PHP_FE(imagecreatefromwbmp,						arginfo_imagecreatefromwbmp)
33
 	PHP_FE(imagecreatefromxbm,						arginfo_imagecreatefromxbm)
34
-#if defined(HAVE_GD_XPM)
35
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
36
 	PHP_FE(imagecreatefromxpm,						arginfo_imagecreatefromxpm)
37
 #endif
38
 	PHP_FE(imagecreatefromgd,						arginfo_imagecreatefromgd)
39
@@ -1252,7 +1252,7 @@ PHP_MINFO_FUNCTION(gd)
40
 	php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString());
41
 #endif
42
 	php_info_print_table_row(2, "WBMP Support", "enabled");
43
-#if defined(HAVE_GD_XPM)
44
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
45
 	php_info_print_table_row(2, "XPM Support", "enabled");
46
 	{
47
 		char tmp[12];
48
@@ -1307,7 +1307,7 @@ PHP_FUNCTION(gd_info)
49
 	add_assoc_bool(return_value, "PNG Support", 0);
50
 #endif
51
 	add_assoc_bool(return_value, "WBMP Support", 1);
52
-#if defined(HAVE_GD_XPM)
53
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
54
 	add_assoc_bool(return_value, "XPM Support", 1);
55
 #else
56
 	add_assoc_bool(return_value, "XPM Support", 0);
57
@@ -2147,7 +2147,7 @@ PHP_FUNCTION(imagetypes)
58
 	ret |= 4;
59
 #endif
60
 	ret |= 8;
61
-#if defined(HAVE_GD_XPM)
62
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
63
 	ret |= 16;
64
 #endif
65
 #ifdef HAVE_GD_WEBP
66
@@ -2397,7 +2397,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_P
67
 			case PHP_GDIMG_TYPE_GD2PART:
68
 				im = (*func_p)(fp, srcx, srcy, width, height);
69
 				break;
70
-#if defined(HAVE_GD_XPM)
71
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
72
 			case PHP_GDIMG_TYPE_XPM:
73
 				im = gdImageCreateFromXpm(file);
74
 				break;
75
@@ -2479,7 +2479,7 @@ PHP_FUNCTION(imagecreatefromxbm)
76
 }
77
 /* }}} */
78
 
79
-#if defined(HAVE_GD_XPM)
80
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
81
 /* {{{ proto resource imagecreatefromxpm(string filename)
82
    Create a new image from XPM file or URL */
83
 PHP_FUNCTION(imagecreatefromxpm)
(-)graphics/php71-gd/files/patch-config.m4 (-3 / +11 lines)
Lines 1-7 Link Here
1
--- config.m4.orig	2018-07-11 13:18:02 UTC
1
--- config.m4.orig	2018-07-19 06:17:29 UTC
2
+++ config.m4
2
+++ config.m4
3
@@ -358,7 +358,7 @@ if test "$PHP_GD" != "no"; then
3
@@ -295,6 +295,7 @@ dnl enable the support in bundled GD library
4
 
4
 
5
   if test -n "$GD_XPM_DIR"; then
6
     AC_DEFINE(HAVE_GD_XPM, 1, [ ])
7
+    AC_DEFINE(HAVE_XPM, 1, [ ])
8
     GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_XPM"
9
   fi
10
 
11
@@ -358,7 +359,7 @@ if test "$PHP_GD" != "no"; then
12
 
5
   if test "$GD_MODULE_TYPE" = "builtin"; then 
13
   if test "$GD_MODULE_TYPE" = "builtin"; then 
6
     PHP_ADD_BUILD_DIR($ext_builddir/libgd)
14
     PHP_ADD_BUILD_DIR($ext_builddir/libgd)
7
-    GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
15
-    GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
Lines 9-15 Link Here
9
     GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
17
     GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
10
 
18
 
11
     PHP_TEST_BUILD(foobar, [], [
19
     PHP_TEST_BUILD(foobar, [], [
12
@@ -366,7 +366,7 @@ if test "$PHP_GD" != "no"; then
20
@@ -366,7 +367,7 @@ if test "$PHP_GD" != "no"; then
13
     ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
21
     ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
14
   else
22
   else
15
     GD_HEADER_DIRS="ext/gd/"
23
     GD_HEADER_DIRS="ext/gd/"
(-)graphics/php71-gd/files/patch-gd.c (+83 lines)
Line 0 Link Here
1
--- gd.c.orig	2018-07-19 06:17:30 UTC
2
+++ gd.c
3
@@ -53,7 +53,7 @@
4
 # include <Wingdi.h>
5
 #endif
6
 
7
-#ifdef HAVE_GD_XPM
8
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
9
 # include <X11/xpm.h>
10
 #endif
11
 
12
@@ -79,7 +79,7 @@ static int le_gd, le_gd_font;
13
 # endif
14
 #endif
15
 
16
-#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
17
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
18
 # include "X11/xpm.h"
19
 #endif
20
 
21
@@ -327,7 +327,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxbm, 0)
22
 	ZEND_ARG_INFO(0, filename)
23
 ZEND_END_ARG_INFO()
24
 
25
-#if defined(HAVE_GD_XPM)
26
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
27
 ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxpm, 0)
28
 	ZEND_ARG_INFO(0, filename)
29
 ZEND_END_ARG_INFO()
30
@@ -901,7 +901,7 @@ const zend_function_entry gd_functions[] = {
31
 #endif
32
 	PHP_FE(imagecreatefromwbmp,						arginfo_imagecreatefromwbmp)
33
 	PHP_FE(imagecreatefromxbm,						arginfo_imagecreatefromxbm)
34
-#if defined(HAVE_GD_XPM)
35
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
36
 	PHP_FE(imagecreatefromxpm,						arginfo_imagecreatefromxpm)
37
 #endif
38
 	PHP_FE(imagecreatefromgd,						arginfo_imagecreatefromgd)
39
@@ -1252,7 +1252,7 @@ PHP_MINFO_FUNCTION(gd)
40
 	php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString());
41
 #endif
42
 	php_info_print_table_row(2, "WBMP Support", "enabled");
43
-#if defined(HAVE_GD_XPM)
44
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
45
 	php_info_print_table_row(2, "XPM Support", "enabled");
46
 	{
47
 		char tmp[12];
48
@@ -1307,7 +1307,7 @@ PHP_FUNCTION(gd_info)
49
 	add_assoc_bool(return_value, "PNG Support", 0);
50
 #endif
51
 	add_assoc_bool(return_value, "WBMP Support", 1);
52
-#if defined(HAVE_GD_XPM)
53
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
54
 	add_assoc_bool(return_value, "XPM Support", 1);
55
 #else
56
 	add_assoc_bool(return_value, "XPM Support", 0);
57
@@ -2147,7 +2147,7 @@ PHP_FUNCTION(imagetypes)
58
 	ret |= 4;
59
 #endif
60
 	ret |= 8;
61
-#if defined(HAVE_GD_XPM)
62
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
63
 	ret |= 16;
64
 #endif
65
 #ifdef HAVE_GD_WEBP
66
@@ -2397,7 +2397,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_P
67
 			case PHP_GDIMG_TYPE_GD2PART:
68
 				im = (*func_p)(fp, srcx, srcy, width, height);
69
 				break;
70
-#if defined(HAVE_GD_XPM)
71
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
72
 			case PHP_GDIMG_TYPE_XPM:
73
 				im = gdImageCreateFromXpm(file);
74
 				break;
75
@@ -2479,7 +2479,7 @@ PHP_FUNCTION(imagecreatefromxbm)
76
 }
77
 /* }}} */
78
 
79
-#if defined(HAVE_GD_XPM)
80
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
81
 /* {{{ proto resource imagecreatefromxpm(string filename)
82
    Create a new image from XPM file or URL */
83
 PHP_FUNCTION(imagecreatefromxpm)
(-)graphics/php72-gd/files/patch-config.m4 (-3 / +11 lines)
Lines 1-7 Link Here
1
--- config.m4.orig	2018-07-11 13:18:02 UTC
1
--- config.m4.orig	2018-07-17 05:35:52 UTC
2
+++ config.m4
2
+++ config.m4
3
@@ -358,7 +358,7 @@ if test "$PHP_GD" != "no"; then
3
@@ -287,6 +287,7 @@ dnl enable the support in bundled GD library
4
 
4
 
5
   if test -n "$GD_XPM_DIR"; then
6
     AC_DEFINE(HAVE_GD_XPM, 1, [ ])
7
+    AC_DEFINE(HAVE_XPM, 1, [ ])
8
     GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_XPM"
9
   fi
10
 
11
@@ -349,7 +350,7 @@ if test "$PHP_GD" != "no"; then
12
 
5
   if test "$GD_MODULE_TYPE" = "builtin"; then 
13
   if test "$GD_MODULE_TYPE" = "builtin"; then 
6
     PHP_ADD_BUILD_DIR($ext_builddir/libgd)
14
     PHP_ADD_BUILD_DIR($ext_builddir/libgd)
7
-    GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
15
-    GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
Lines 9-15 Link Here
9
     GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
17
     GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
10
 
18
 
11
     PHP_TEST_BUILD(foobar, [], [
19
     PHP_TEST_BUILD(foobar, [], [
12
@@ -366,7 +366,7 @@ if test "$PHP_GD" != "no"; then
20
@@ -357,7 +358,7 @@ if test "$PHP_GD" != "no"; then
13
     ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
21
     ], [ $GD_SHARED_LIBADD ], [char foobar () {}])
14
   else
22
   else
15
     GD_HEADER_DIRS="ext/gd/"
23
     GD_HEADER_DIRS="ext/gd/"
(-)graphics/php72-gd/files/patch-gd.c (+83 lines)
Line 0 Link Here
1
--- gd.c.orig	2018-07-17 05:35:52 UTC
2
+++ gd.c
3
@@ -53,7 +53,7 @@
4
 # include <Wingdi.h>
5
 #endif
6
 
7
-#ifdef HAVE_GD_XPM
8
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
9
 # include <X11/xpm.h>
10
 #endif
11
 
12
@@ -77,7 +77,7 @@ static int le_gd, le_gd_font;
13
 # endif
14
 #endif
15
 
16
-#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
17
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
18
 # include "X11/xpm.h"
19
 #endif
20
 
21
@@ -325,7 +325,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxbm, 0)
22
 	ZEND_ARG_INFO(0, filename)
23
 ZEND_END_ARG_INFO()
24
 
25
-#if defined(HAVE_GD_XPM)
26
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
27
 ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxpm, 0)
28
 	ZEND_ARG_INFO(0, filename)
29
 ZEND_END_ARG_INFO()
30
@@ -934,7 +934,7 @@ const zend_function_entry gd_functions[] = {
31
 #endif
32
 	PHP_FE(imagecreatefromwbmp,						arginfo_imagecreatefromwbmp)
33
 	PHP_FE(imagecreatefromxbm,						arginfo_imagecreatefromxbm)
34
-#if defined(HAVE_GD_XPM)
35
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
36
 	PHP_FE(imagecreatefromxpm,						arginfo_imagecreatefromxpm)
37
 #endif
38
 	PHP_FE(imagecreatefromgd,						arginfo_imagecreatefromgd)
39
@@ -1299,7 +1299,7 @@ PHP_MINFO_FUNCTION(gd)
40
 	php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString());
41
 #endif
42
 	php_info_print_table_row(2, "WBMP Support", "enabled");
43
-#if defined(HAVE_GD_XPM)
44
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
45
 	php_info_print_table_row(2, "XPM Support", "enabled");
46
 	{
47
 		char tmp[12];
48
@@ -1354,7 +1354,7 @@ PHP_FUNCTION(gd_info)
49
 	add_assoc_bool(return_value, "PNG Support", 0);
50
 #endif
51
 	add_assoc_bool(return_value, "WBMP Support", 1);
52
-#if defined(HAVE_GD_XPM)
53
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
54
 	add_assoc_bool(return_value, "XPM Support", 1);
55
 #else
56
 	add_assoc_bool(return_value, "XPM Support", 0);
57
@@ -2184,7 +2184,7 @@ PHP_FUNCTION(imagetypes)
58
 	ret |= 4;
59
 #endif
60
 	ret |= 8;
61
-#if defined(HAVE_GD_XPM)
62
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
63
 	ret |= 16;
64
 #endif
65
 #ifdef HAVE_GD_WEBP
66
@@ -2443,7 +2443,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_P
67
 			case PHP_GDIMG_TYPE_GD2PART:
68
 				im = (*func_p)(fp, srcx, srcy, width, height);
69
 				break;
70
-#if defined(HAVE_GD_XPM)
71
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
72
 			case PHP_GDIMG_TYPE_XPM:
73
 				im = gdImageCreateFromXpm(file);
74
 				break;
75
@@ -2525,7 +2525,7 @@ PHP_FUNCTION(imagecreatefromxbm)
76
 }
77
 /* }}} */
78
 
79
-#if defined(HAVE_GD_XPM)
80
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM)
81
 /* {{{ proto resource imagecreatefromxpm(string filename)
82
    Create a new image from XPM file or URL */
83
 PHP_FUNCTION(imagecreatefromxpm)

Return to bug 230234