From: handa Date: Thu, 27 May 2004 11:08:56 +0000 (+0000) Subject: Include config.h. If not HAVE_FREETYPE nor HAVE_GD, define a pseudo X-Git-Tag: withdl~156 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6cee0e72173c2c4fe8e1bb6bcb91bc63bf458cdf;p=m17n%2Fm17n-lib.git Include config.h. If not HAVE_FREETYPE nor HAVE_GD, define a pseudo function main that just print an error message. --- diff --git a/example/mdump.c b/example/mdump.c index 67a2b12..ee66362 100644 --- a/example/mdump.c +++ b/example/mdump.c @@ -187,6 +187,9 @@ #include #include +#include "config.h" + +#if defined (HAVE_FREETYPE) && defined (HAVE_GD) #include #include @@ -618,4 +621,15 @@ main (int argc, char **argv) gdImageDestroy (image); exit (0); } + +#else /* not HAVE_FREETYPE nor HAVE_GD */ + +int +main (int argc, char **argv) +{ + fprintf (stderr, "Can't run without Freetype and GD library!\n"); + exit (1); +} + +#endif /* not HAVE_FREETYPE nor HAVE_GD */ #endif /* not FOR_DOXYGEN */