Page 1 of 1

Magickwand-config picks up from default path

Posted: 2013-10-04T04:38:42-07:00
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