From 0210a0dd8650332c810069ae7eadddf95a145203 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Tue, 27 Mar 2012 04:23:31 +0000 Subject: Fix detection of X libraries for merge build git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1665 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- GNUmakefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index d6745eaf..d6e59c20 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -272,9 +272,6 @@ endif ifneq ($(LINUXSVGALIB),NONE) MERGELIBS += $(LINUXSVGALIB) endif -ifneq ($(X11LIB),NONE) - MERGELIBS += $(X11LIB) -endif ifeq ($(shell libpng$(PNGVER)-config --version),) PNGLD = $(shell $(LIBOPT) $(LIBOPTR) $(PNGLIB) $(ZLIB)) @@ -288,6 +285,13 @@ else XML2LD=$(shell xml2-config --libs) endif +ifeq ($(shell pkg-config x11 --libs),) + X11LD = $(shell $(LIBOPT) $(LIBOPTR) $(X11LIB)) +else + X11LD = $(shell pkg-config x11 --libs) +endif + + # If URTLIB is BUNDLED_URTLIB, then we're responsible for building it, which # means it needs to be a dependency: @@ -330,7 +334,7 @@ netpbm:%:%.o $(OBJECT_DEP) $(NETPBMLIB) $(URTLIBDEP) $(LIBOPT) # Note that LDFLAGS might contain -L options, so order is important. $(LD) -o $@ $< $(OBJECT_LIST) \ $(LDFLAGS) $(shell $(LIBOPT) $(NETPBMLIB) $(MERGELIBS)) \ - $(PNGLD) $(XML2LD) $(MATHLIB) $(NETWORKLD) $(LADD) + $(PNGLD) $(XML2LD) $(X11LD) $(MATHLIB) $(NETWORKLD) $(LADD) netpbm.o: mergetrylist -- cgit 1.4.1