about summary refs log tree commit diff
diff options
context:
space:
mode:
-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