Commits

Mike Frysinger committed 0cde625

skip certain programs when png/zlib are not available

We can build gd w/out png/zlib support, but some of the helper
programs require that functionality. Disable the programs based
on what libs are available.

Comments (0)

Files changed (2)

     [AC_MSG_WARN([zlib is required - see http://www.gzip.org/zlib/])
      with_zlib=no])
 fi
+AM_CONDITIONAL([HAVE_LIBZ], test "$with_zlib" = yes)
 
 dnl libpng is required
 AC_ARG_WITH(png,dnl
   FEATURES="GD_PNG $FEATURES"
   AC_DEFINE(HAVE_LIBPNG, 1, [Define if you have the png library.])
 fi
+AM_CONDITIONAL([HAVE_LIBPNG], test "$with_png" = yes)
 
 dnl FreeType configure tests snarfed from libwmf ..
 AC_ARG_WITH(freetype,dnl
 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
-bin_PROGRAMS = annotate gdparttopng gdtopng gd2copypal gd2topng pngtogd pngtogd2 webpng gd2togif gdcmpgif giftogd2
+bin_PROGRAMS = annotate gdcmpgif
+
+if HAVE_LIBPNG
+bin_PROGRAMS += gdtopng pngtogd webpng
+if HAVE_LIBZ
+bin_PROGRAMS += gdparttopng gd2topng pngtogd2
+endif
+endif
+
+if HAVE_LIBZ
+bin_PROGRAMS += gd2copypal gd2togif giftogd2
+endif
 
 bin_SCRIPTS = bdftogd