]> granicus.if.org Git - graphviz/commitdiff
Remove HAVE_LIBGD check from plugin/gd
authorErwin Janssen <erwinjanssen@outlook.com>
Fri, 31 Mar 2017 11:06:41 +0000 (13:06 +0200)
committerErwin Janssen <erwinjanssen@outlook.com>
Wed, 5 Apr 2017 20:38:19 +0000 (22:38 +0200)
This check should exist only in the build configuration, if plugin/gd gets
build, then libgd should _always_ be available. Otherwise, mistakenly
building plugin/gd without defining HAVE_LIBGD, will lead to believe that
the build is succesfull, while in truth nothing gets build.

plugin/gd/gvdevice_gd.c
plugin/gd/gvloadimage_gd.c
plugin/gd/gvrender_gd.c
plugin/gd/gvrender_gd_vrml.c
plugin/gd/gvtextlayout_gd.c

index 9d1a542aa271c41a2d72d1a7e646202a48bba0cd..5f67f1a58617ab15ccb45fcfcf28fceb26771c45 100644 (file)
@@ -16,7 +16,6 @@
 #include "gvplugin_device.h"
 #include "gvio.h"
 
-#ifdef HAVE_LIBGD
 #include "gd.h"
 
 int gvdevice_gd_putBuf (gdIOCtx *context, const void *buffer, int len)
@@ -182,10 +181,8 @@ static gvdevice_features_t device_features_gd_no_writer = {
     {96.,96.},                  /* dpi */
 };
 #endif
-#endif
 
 gvplugin_installed_t gvdevice_gd_types[] = {
-#ifdef HAVE_LIBGD
 #ifdef HAVE_PANGOCAIRO
 
 #ifdef HAVE_GD_GIF
@@ -213,7 +210,6 @@ gvplugin_installed_t gvdevice_gd_types[] = {
 #endif
 #endif
 
-#endif
 #endif
     {0, NULL, 0, NULL, NULL}
 };
index b60883257503cfb80913ecf173bf288f0c664f0b..8953aec96c9b814176c1710ef5b59c05b93a0169 100644 (file)
@@ -23,8 +23,6 @@
 
 #include "gvplugin_loadimage.h"
 #include "gvio.h"
-
-#ifdef HAVE_LIBGD
 #include "gd.h"
 
 typedef enum {
@@ -267,11 +265,7 @@ static gvloadimage_engine_t engine_cairo = {
 };
 #endif
 
-#endif
-
 gvplugin_installed_t gvloadimage_gd_types[] = {
-#ifdef HAVE_LIBGD
-
     {FORMAT_GD_GD, "gd:gd", 1, &engine, NULL},
     {FORMAT_GD2_GD, "gd2:gd", 1, &engine, NULL},
 #ifdef HAVE_GD_GIF
@@ -342,7 +336,5 @@ gvplugin_installed_t gvloadimage_gd_types[] = {
     {FORMAT_XBM_CAIRO, "xbm:cairo", 1, &engine_cairo, NULL},
 #endif
 #endif /* HAVE_PANGOCAIRO */
-
-#endif /* HAVE_LIBGD */
     {0, NULL, 0, NULL, NULL}
 };
index 5008754f038c6ac85174de639a3ad09d70161c9a..4c500a332eed8f6702a363e6da00e6adbf4e80d6 100644 (file)
@@ -25,8 +25,6 @@
 #include "gvplugin_render.h"
 #include "gvplugin_device.h"
 #include "gvcint.h"    /* for gvc->g for agget */
-
-#ifdef HAVE_LIBGD
 #include "gd.h"
 
 #ifndef INT32_MAX
@@ -666,17 +664,12 @@ static gvdevice_features_t device_features_gd_tc_no_writer = {
     {96.,96.},                 /* default dpi */
 };
 
-#endif
-
 gvplugin_installed_t gvrender_gd_types[] = {
-#ifdef HAVE_LIBGD
     {FORMAT_GD, "gd", 1, &gdgen_engine, &render_features_gd},
-#endif
     {0, NULL, 0, NULL, NULL}
 };
 
 gvplugin_installed_t gvdevice_gd_types2[] = {
-#ifdef HAVE_LIBGD
 #ifdef HAVE_GD_GIF
     {FORMAT_GIF, "gif:gd", 1, NULL, &device_features_gd_tc},  /* pretend gif is truecolor because it supports transparency */
     {FORMAT_WBMP, "wbmp:gd", 1, NULL, &device_features_gd},
@@ -703,8 +696,6 @@ gvplugin_installed_t gvdevice_gd_types2[] = {
 #ifdef HAVE_GD_XPM
     {FORMAT_XBM, "xbm:gd", 1, NULL, &device_features_gd},
 #endif
-#endif
-
 #endif
     {0, NULL, 0, NULL, NULL}
 };
index ac97d4785b954a0973307c53d1c6e6035a6746e7..d350b64ff1c442d33f4fa968fdcaa935b223525f 100644 (file)
@@ -21,8 +21,6 @@
 
 #include "gvplugin_render.h"
 #include "gvio.h"
-
-#ifdef HAVE_LIBGD
 #include "gd.h"
 
 #ifdef HAVE_GD_PNG
@@ -838,22 +836,17 @@ static gvdevice_features_t device_features_vrml = {
     {72.,72.},                  /* default dpi */
 };
 #endif                         /* HAVE_GD_PNG */
-#endif                         /* HAVE_LIBGD */
 
 gvplugin_installed_t gvrender_vrml_types[] = {
-#ifdef HAVE_LIBGD
 #ifdef HAVE_GD_PNG
     {FORMAT_VRML, "vrml", 1, &vrml_engine, &render_features_vrml},
-#endif
 #endif
     {0, NULL, 0, NULL, NULL}
 };
 
 gvplugin_installed_t gvdevice_vrml_types[] = {
-#ifdef HAVE_LIBGD
 #ifdef HAVE_GD_PNG
     {FORMAT_VRML, "vrml:vrml", 1, NULL, &device_features_vrml},
-#endif
 #endif
     {0, NULL, 0, NULL, NULL}
 };
index 93d4fe4800cc102e9f6899d3a62c47d3ce5614c0..867c511779d05c0cb395f65bed989eaefbffcd17 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include "gvplugin_textlayout.h"
-
-#ifdef HAVE_LIBGD
 #include "gd.h"
 
-#if defined(HAVE_LIBGD) && defined(HAVE_GD_FREETYPE)
+#ifdef HAVE_GD_FREETYPE
 
 /* fontsize at which text is omitted entirely */
 #define FONTSIZE_MUCH_TOO_SMALL 0.15
@@ -197,10 +195,9 @@ static gvtextlayout_engine_t gd_textlayout_engine = {
     gd_textlayout,
 };
 #endif
-#endif
 
 gvplugin_installed_t gvtextlayout_gd_types[] = {
-#if defined(HAVE_LIBGD) && defined(HAVE_GD_FREETYPE)
+#ifdef HAVE_GD_FREETYPE
     {0, "textlayout", 2, &gd_textlayout_engine, NULL},
 #endif
     {0, NULL, 0, NULL, NULL}