Change library and header searching logic for libgd, libpng, and libz to depend on enable_png and enable_jpeg and vice versa.
Change library and header searching logic for libgd, libpng, and libz to
depend on enable_png and enable_jpeg and vice versa.

svn path=/trunk/; revision=2771

FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot