On unix, Image Magick is not correctly detected
if the CPPFLAGS and LDFLAGS are not correctly set.
I'm proposing to duplicate the
AC_CHECK_HEADER([magick/api.h],[passed=`expr $passed + 1`],[failed=`expr
$failed + 1`])
line. The first instance, verbatim, for windows. The second,
for unix, after adding the result of `Magick-config --cflags`
to CPPFLAGS (that is restored to the previous value afterward).
I'm not completely happy with this part of the patch
- AC_CHECK_LIB( Magick,GetImageInfo, passed=`expr $passed + 1`,
failed=`expr $failed + 1`, [ $LIB_MAGICK ])
+ AC_CHECK_LIB( c,GetImageInfo, passed=`expr $passed + 1`,
failed=`expr $failed + 1`, [ $LIB_MAGICK ])
The reason of this change is that on some systems
the Magick library is not called libMagick.
For example, on my system I have
libMagickWand and libMagickCore
This is already taken in account by `Magick-config --libs` in
LIB_MAGICK="`Magick-config --ldflags` `Magick-config --libs`"
so we simply have to check that a program using GetImageInfo can be
built with LIB_MAGICK flags. Unfortunately, AC_CHECK_LIB requires a
library name. So, I'm trying to fool the macro using, as library name,
the c standard library. I dont' know there is any macro better suited
for the check we want to perform here.
Marco
Index: configure.ac
===================================================================
RCS file: /cvsroot/opendx2/dx/configure.ac,v
retrieving revision 1.21
diff -u -r1.21 configure.ac
--- configure.ac 24 Sep 2006 23:54:37 -0000 1.21
+++ configure.ac 27 Jun 2008 07:08:16 -0000
@@ -801,8 +801,8 @@
failed=0;
passed=0;
- AC_CHECK_HEADER([magick/api.h],[passed=`expr $passed + 1`],[failed=`expr
$failed + 1`])
if test "$ARCH" = "intelnt" ; then
+ AC_CHECK_HEADER([magick/api.h],[passed=`expr $passed + 1`],[failed=`expr
$failed + 1`])
AC_CHECK_LIB(CORE_RL_magick_,AcquireMagickMemory,passed=`expr $passed +
1`,failed=`expr $failed + 1`,)
AC_MSG_CHECKING(if ImageMagick package is complete)
if test $passed -gt 0
@@ -835,8 +835,13 @@
dnl format configuration libraries.
if test "$HAVE_MC" = "yes" ; then
+ INC_MAGICK="`Magick-config --cflags`"
+ SAVECPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="`Magick-config --cppflags` $CPPFLAGS"
+ AC_CHECK_HEADER([magick/api.h],[passed=`expr $passed + 1`],[failed=`expr
$failed + 1`])
+ CPPFLAGS="$SAVECPPFLAGS"
LIB_MAGICK="`Magick-config --ldflags` `Magick-config --libs`"
- AC_CHECK_LIB( Magick,GetImageInfo, passed=`expr $passed + 1`, failed=`expr
$failed + 1`, [ $LIB_MAGICK ])
+ AC_CHECK_LIB( c,GetImageInfo, passed=`expr $passed + 1`, failed=`expr
$failed + 1`, [ $LIB_MAGICK ])
AC_MSG_CHECKING(if ImageMagick package is complete)
if test $passed -gt 0
then
_______________________________________________
OpenDX2-dev mailing list
OpenDX2-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opendx2-dev