- don't try to build when jpeg support is not available

master
pajoye 2008-01-15 11:28:43 +00:00
parent 1cde5eda0d
commit dd3f202e71
1 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,7 @@ void save_png(gdImagePtr im, const char *filename)
int main()
{
#ifdef HAVE_JPEG
gdImagePtr im, im2;
FILE *fp;
char path[2048];
@ -56,5 +57,9 @@ int main()
save_png(im, "a_jquant_dither.png");
gdImageDestroy(im);
#else
printf("JPEG support is required for this example. Please recompile GD with JPEG or change this example to use another format as input.");
return 1;
#endif
return 0;
}