about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-02-11 23:53:46 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-02-11 23:53:46 +0000
commit75427b7f2f167567bd8a3429c4623b879aad8f96 (patch)
tree53192ab738abbf23d2ab48183e51742ff93af30f
parentfc187c9cadaa462f306ed211ca90573411d78247 (diff)
downloadnetpbm-mirror-75427b7f2f167567bd8a3429c4623b879aad8f96.tar.gz
netpbm-mirror-75427b7f2f167567bd8a3429c4623b879aad8f96.tar.xz
netpbm-mirror-75427b7f2f167567bd8a3429c4623b879aad8f96.zip
Use Pkgconfig for libxml2 if available
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1639 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/Makefile18
-rw-r--r--doc/HISTORY5
2 files changed, 17 insertions, 6 deletions
diff --git a/converter/other/Makefile b/converter/other/Makefile
index 8d931433..bdacee0f 100644
--- a/converter/other/Makefile
+++ b/converter/other/Makefile
@@ -7,12 +7,20 @@ VPATH=.:$(SRCDIR)/$(SUBDIR)
 
 include $(BUILDDIR)/config.mk
 
-ifeq ($(shell xml2-config --version),)
-  XML2_LIBS=NONE
-  XML2_CFLAGS=NONE
+TEST_PKGCONFIG_LIBXML2 = if pkg-config libxml-2.0; then echo exists; fi
+
+ifneq ($(shell $(TEST_PKGCONFIG_LIBXML2)),)
+  # pkg-config libxml2 works on this system
+  XML2_LIBS = $(shell pkg-config libxml-2.0 --libs)
+  XML2_CFLAGS = $(shell pkg-config libxml-2.0 --cflags)
 else
-  XML2_LIBS=$(shell xml2-config --libs)
-  XML2_CFLAGS=$(shell xml2-config --cflags)
+  ifeq ($(shell xml2-config --version),)
+    XML2_LIBS=NONE
+    XML2_CFLAGS=NONE
+  else
+    XML2_LIBS=$(shell xml2-config --libs)
+    XML2_CFLAGS=$(shell xml2-config --cflags)
+  endif
 endif
 
 SUBDIRS = jbig pnmtopalm jpeg2000 cameratopam pamtosvg
diff --git a/doc/HISTORY b/doc/HISTORY
index cdba5fed..2864732e 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -12,6 +12,8 @@ not yet  BJH  Release 10.58.00
               pgmtexture: fix array bounds violations in various calculations.
               Always broken.
 
+              xpmtoppm: Make it work on XPM with zero characters per pixel.
+
               Windows/Mingw: fix bug: temporary file creation fails
               consistently.  Broken in 10.34.
 
@@ -19,7 +21,8 @@ not yet  BJH  Release 10.58.00
 
               Windows: compute program name correctly.
 
-              xpmtoppm: Make it work on XPM with zero characters per pixel.
+              Build: use Pkgconfig to find libxml2 if it works (fall back
+              to xml2-config).
 
 11.12.30 BJH  Release 10.57.00