about summary refs log tree commit diff
path: root/converter/other/Makefile
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 /converter/other/Makefile
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
Diffstat (limited to 'converter/other/Makefile')
-rw-r--r--converter/other/Makefile18
1 files changed, 13 insertions, 5 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