summaryrefslogtreecommitdiffstats
path: root/src/graphicsmagick-1-fix-xml2-config.patch
blob: ab6d2d062cfb43716ce77cd98acb39fa1a245df6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
This file is part of MXE.
See index.html for further information.

This patch has been taken from:
http://sourceforge.net/tracker/?func=detail&aid=3130497&group_id=73485&atid=537937

diff --git a/configure.ac b/configure.ac
index 979d2c4..12d4555 100755
--- a/configure.ac
+++ b/configure.ac
@@ -2388,12 +2388,13 @@ then
         # Debian installs libxml headers under /usr/include/libxml2/libxml with
         # the shared library installed under /usr/lib, whereas the package
         # installs itself under $prefix/libxml and $prefix/lib.
-        xml2_prefix=`xml2-config --prefix`
+        xml2_prefix=`"$xml2_config" --prefix`
         if test -d "${xml2_prefix}/include/libxml2"
         then
           CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
         fi
         LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
+        LIBS="$LIBS `"$xml2_config" --libs`"
      fi
     failed=0
     passed=0
@@ -2416,8 +2417,9 @@ then
         LDFLAGS="$OLD_LDFLAGS"
         CPPFLAGS="$OLD_CPPFLAGS"
     else
-	LIB_XML='-lxml2'
+	LIB_XML=`"$xml2_config" --libs`
 	LIBS="$LIB_XML $LIBS"
+	CPPFLAGS="$CPPFLAGS `"$xml2_config" --cflags`"
 	AC_DEFINE(HasXML,1,Define if you have XML library)
 	AC_MSG_RESULT(yes)
         have_xml='yes'
diff --git a/magick/GraphicsMagick.pc.in b/magick/GraphicsMagick.pc.in
index 5757b37..87e3fd4 100644
--- a/magick/GraphicsMagick.pc.in
+++ b/magick/GraphicsMagick.pc.in
@@ -8,4 +8,5 @@ Name: GraphicsMagick
 Version: @PACKAGE_VERSION@
 Description: GraphicsMagick image processing library
 Libs: -L${libdir} -lGraphicsMagick
+Libs.private: @MAGICK_API_LDFLAGS@ @MAGICK_API_LIBS@
 Cflags: -I${includedir} @MAGICK_API_PC_CPPFLAGS@