checks for both instead of assuming that PNG support means that there is no
GIF support anymore.
#undef FREETYPE_4BIT_ANTIALIAS_HACK
#undef HAVE_LIBFREETYPE
#undef HAVE_LIBTTF
+
+/* Some versions of GD support both PNG and GIF. Set defines for both. */
#undef HAVE_GD_PNG
+#undef HAVE_GD_GIF
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
LIBS="$LIBS -lpng -lz"
AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE,1)])
+dnl Some versions of GD support both PNG and GIF. Check for both.
AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1)])
+ AC_CHECK_LIB(gd, gdImageCreateFromGif, [AC_DEFINE(HAVE_GD_GIF, 1)])
LIBS=$old_LIBS
LDFLAGS=$old_LDFLAGS
#ifdef HAVE_GD_PNG
PHP_FE(imagecreatefrompng, NULL)
PHP_FE(imagepng, NULL)
-#else
+#endif
+#ifdef HAVE_GD_GIF
PHP_FE(imagecreatefromgif, NULL)
PHP_FE(imagegif, NULL)
#endif
}
/* }}} */
-#else
+#endif /* HAVE_GD_PNG */
+
+#ifdef HAVE_GD_GIF
/* {{{ proto int imagecreatefromgif(string filename)
Create a new image from file or URL */
}
/* }}} */
-#endif /* HAVE_IMAGECREATEFROMPNG */
+#endif /* HAVE_GD_GIF */
/* {{{ proto int imagedestroy(int im)
Destroy an image */