Magickwand-config picks up from default path

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Magickwand-config picks up from default path

Post by mkoppanen »

Hello,

I am not sure whether this is a bug or expected behaviour but I tripped on this today. I have multiple versions of ImageMagick installed for debugging and Magickwand-config picks up the one from default PKG_CONFIG_PATH not matter which version is run (/tmp/im/bin/Magickwand-config returns one installed in /usr).

For some reason I expected the Magickwand-config to return cflags and libs for the exec_prefix where it's run from. The following patch changes this, but again I am not sure if this was the expected behaviour:

Code: Select all

Index: wand/MagickWand-config.in
===================================================================
--- wand/MagickWand-config.in	(revision 13346)
+++ wand/MagickWand-config.in	(working copy)
@@ -38,19 +38,19 @@
       echo '@PACKAGE_VERSION@ Q@QUANTUM_DEPTH@ @MAGICK_HDRI@'
       ;;
     --cflags)
-      pkg-config --cflags MagickWand
+      PKG_CONFIG_PATH="@libdir@/pkgconfig" pkg-config --cflags MagickWand
       ;;
     --cxxflags)
-      pkg-config --cflags MagickWand
+      PKG_CONFIG_PATH="@libdir@/pkgconfig" pkg-config --cflags MagickWand
       ;;
     --cppflags)
-      pkg-config --cflags MagickWand
+      PKG_CONFIG_PATH="@libdir@/pkgconfig" pkg-config --cflags MagickWand
       ;;
     --ldflags)
-      pkg-config --libs MagickWand
+      PKG_CONFIG_PATH="@libdir@/pkgconfig" pkg-config --libs MagickWand
       ;;
     --libs)
-      pkg-config --libs MagickWand
+      PKG_CONFIG_PATH="@libdir@/pkgconfig" pkg-config --libs MagickWand
       ;;
     *)
       echo "${usage}" 1>&2
Mikko Koppanen
My blog: http://valokuva.org
Post Reply