Page 1 of 1

Getting revision number in preprocessor statement - figured

Posted: 2007-09-10T06:14:00-07:00
by mkoppanen
I would like add MagickClutImage support to Imagick. It seems like it is implemented in 6.3.5-7. How do I check for the revision in preprocessor statement?

The only place I found the revision is MagickLibVersionNumber and I see no way to use that in a preprocessor statement.

#if REVISION > 6

#endif

is my goal.

Re: Getting revision number in preprocessor statement - figured

Posted: 2007-09-10T06:26:08-07:00
by mkoppanen
This is maybe like the tenth time I edit this post. Finally after banging my head to the wall I got it right (had some help along the way):

#define IMAGICK_RETRIEVE_REVISION(a,b,c,d) d
#define IMAGICK_CHECK_MAGICKLIB_REVISION(a) IMAGICK_RETRIEVE_REVISION(a)

IMAGICK_CHECK_MAGICKLIB_REVISION(MagickLibVersionNumber) > 6

Seems to be working just fine.