Source

gd-libgd / src / testac.c

Diff from to

File src/testac.c

 int
 main (int argc, char *argv[])
 {
+#ifdef HAVE_LIBPNG
   /* Input and output files */
   FILE *in;
   FILE *out;
   testDrawing (im_in, 2.0, 0, 1, "noblending-doublesize-palette.png");
   testDrawing (im_in, 2.0, 1, 1, "blending-doublesize-palette.png");
   gdImageDestroy (im_in);
+#else
+  fprintf(stderr, "No PNG library support.\n");
+#endif
+
   return 0;
 }
 
       gdImageTrueColorToPalette (im_out, 1, 256);
     }
 
+#ifdef HAVE_LIBPNG
   gdImagePng (im_out, out);
+#else
+  fprintf(stderr, "No PNG library support.\n");
+#endif
   fclose (out);
 
   gdImageDestroy (im_out);