[Xastir-Dev] 1.2.0: reference to ImageMagick 5.5.1 feature?

Alan Crosswell alan at columbia.edu
Mon Jun 16 18:02:39 EDT 2003


Instead of checking MagickLibVersion, have configure check for the existence of 
the function and use that.  For example:

dnl Checks for libraries.
AC_CHECKING(for N2YGK's -lax25 extensions:)
AC_CHECK_LIB(ax25, parse_raw_ax25, AC_DEFINE(HAVE_LIBAX25_EXTENSIONS))
AC_CHECK_LIB(ax25, ax25_config_load_ports)

...

#ifdef HAVE_LIBAX25_EXTENSIONS
...
#endif


Curt Mills, WE7U wrote:
> On Mon, 16 Jun 2003, Alan Crosswell wrote:
> 
> 
>>Configure didn't catch that I had ImageMagick-5.4.7 installed (the default with
>>Red Hat 9  -- I try to build against a vanilla system to see what happens):
>>
>>maps.o(.text+0xc59e): In function `draw_geo_image_map':
>>/usr/src/redhat/BUILD/xastir-1.2.0/src/maps.c:7226: undefined reference to
>>`CompressImageColormap'
>>maps.o(.text+0xe292): In function `draw_tiger_map':
>>/usr/src/redhat/BUILD/xastir-1.2.0/src/maps.c:7904: undefined reference to
>>`CompressImageColormap'
>>collect2: ld returned 1 exit status
>>
>>Perhaps it could be made to check for CompressImageColormap and either omit that
>>use if it's not available or refuse to configure with ImageMagick....
> 
> 
> Another example of the "fun" we have with ImageMagick.  We have this
> exact code in two places:
> 
> 
> #if (MagickLibVersion < 0x0549)
>             CompressColormap(image); // Remove duplicate colors
> #else // MagickLib >= 0x0549
>             CompressImageColormap(image); // Remove duplicate colors
> #endif  // MagickLibVersion < 0x0549
> 
> 
> The MagickLibVersion as reported by the library doesn't always match
> the release of ImageMagick you're running, so this is an imperfect
> test at best.  Add to that, we don't always know the exact version
> at which ImageMagick changes their API.  It's not always listed in
> their ChangeLog when they make API changes.  Sometimes multiple
> versions of IM will report the same number, and API changes will
> have occured during that time.  That makes it impossible for us to
> support.
> 
> With 5.4.7, the library _should_ report 0x0547 back, and you should
> be using "CompressColormap" instead of "CompressImageColormap".  Are
> you _sure_ that 5.4.7 is the library that's installed?
> 
> Starting to see why we'd like to dump IM at our earliest
> opportunity?
> 



More information about the Xastir-dev mailing list