about summary refs log tree commit diff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-06-24 02:25:47 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-06-24 02:25:47 +0000
commitea41495cab211a7d67acea6a2dd72270755ab82c (patch)
tree259ea532e300ebe59a78d3f517395e0fa0568dda /GNUmakefile
parenta81b6cf3dadef3d43d4a1dc7f985153d52c46c40 (diff)
downloadnetpbm-mirror-ea41495cab211a7d67acea6a2dd72270755ab82c.tar.gz
netpbm-mirror-ea41495cab211a7d67acea6a2dd72270755ab82c.tar.xz
netpbm-mirror-ea41495cab211a7d67acea6a2dd72270755ab82c.zip
Use pkg-config instead of xxx-config for merge link if available
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2565 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile26
1 files changed, 17 insertions, 9 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 1647bd57..caf8e37d 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -302,22 +302,30 @@ ifneq ($(LINUXSVGALIB),NONE)
   MERGELIBS += $(LINUXSVGALIB)
 endif
 
-ifeq ($(shell libpng$(PNGVER)-config --version),)
-  PNGLD = $(shell $(LIBOPT) $(LIBOPTR) $(PNGLIB) $(ZLIB))
+ifneq ($(shell pkg-config --modversion libpng$(PNGVER)),)
+  PNGLD = $(shell pkg-config --libs libpng$(PNGVER))
 else
-  PNGLD = $(shell libpng$(PNGVER)-config --ldflags)
+  ifneq ($(shell libpng$(PNGVER)-config --version),)
+    PNGLD = $(shell libpng$(PNGVER)-config --ldflags)
+  else
+    PNGLD = $(shell $(LIBOPT) $(LIBOPTR) $(PNGLIB) $(ZLIB))
+  endif
 endif
 
-ifeq ($(shell xml2-config --version),)
-  XML2LD=
+ifneq ($(shell pkg-config --modversion libxml-2.0),)
+  XML2LD=$(shell pkg-config --libs libxml-2.0)
 else
-  XML2LD=$(shell xml2-config --libs)
+  ifneq ($(shell xml2-config --version),)
+    XML2LD=$(shell xml2-config --libs)
+  else
+    XML2LD=
+  endif
 endif
 
-ifeq ($(shell pkg-config x11 --libs),)
-  X11LD = $(shell $(LIBOPT) $(LIBOPTR) $(X11LIB))
-else
+ifneq ($(shell pkg-config x11 --libs),)
   X11LD = $(shell pkg-config x11 --libs)
+else
+  X11LD = $(shell $(LIBOPT) $(LIBOPTR) $(X11LIB))
 endif