about summary refs log tree commit diff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-03-27 04:23:31 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-03-27 04:23:31 +0000
commit0210a0dd8650332c810069ae7eadddf95a145203 (patch)
tree9724cd8a9544cc3b954bdbf2f23e297026dc5498 /GNUmakefile
parent4b65cd1fba1d7fa59dae612bfe70eb7750736050 (diff)
downloadnetpbm-mirror-0210a0dd8650332c810069ae7eadddf95a145203.tar.gz
netpbm-mirror-0210a0dd8650332c810069ae7eadddf95a145203.tar.xz
netpbm-mirror-0210a0dd8650332c810069ae7eadddf95a145203.zip
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
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile12
1 files changed, 8 insertions, 4 deletions
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