From 4c94a6bea47048a707ea86d17d36ac1161a99c76 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 19 Feb 2016 12:34:07 +0100 Subject: [PATCH] MAKE: always use $(PKGCONFIG) instead of pkg-config This fixes build failures on distributions that use special binary prefixes and PATHs. --- crawl-ref/source/Makefile | 2 +- crawl-ref/source/rltiles/Makefile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile index 88ad7f8..266c3da 100644 --- a/crawl-ref/source/Makefile +++ b/crawl-ref/source/Makefile @@ -605,7 +605,7 @@ endif # ifndef NO_PKGCONFIG -ifeq ($(shell which pkg-config 2> /dev/null),) +ifeq ($(shell which $(PKGCONFIG) 2> /dev/null),) NO_PKGCONFIG = YesPlease endif endif diff --git a/crawl-ref/source/rltiles/Makefile b/crawl-ref/source/rltiles/Makefile index 98e01ec..3d97d7a 100644 --- a/crawl-ref/source/rltiles/Makefile +++ b/crawl-ref/source/rltiles/Makefile @@ -10,6 +10,7 @@ endif # Also, cross-compilation with no system libraries for host rather than target # is not supported. If host=target, contribs are enough. +PKGCONFIG = pkg-config CFLAGS := -O2 $(STDFLAG) -g -Wall -Wextra -Wno-parentheses -Wno-unused-parameter ifdef ANDROID @@ -20,8 +21,8 @@ endif ifdef TILES ifndef NO_PKGCONFIG - PNG_INCLUDE := $(shell pkg-config libpng --cflags 2> /dev/null || echo "-I../contrib/install/$(ARCH)/include") - PNG_LIB := $(shell pkg-config libpng --libs 2> /dev/null || echo "../contrib/install/$(ARCH)/lib/libpng.a ../contrib/install/$(ARCH)/lib/libz.a") + PNG_INCLUDE := $(shell $(PKGCONFIG) libpng --cflags 2> /dev/null || echo "-I../contrib/install/$(ARCH)/include") + PNG_LIB := $(shell $(PKGCONFIG) libpng --libs 2> /dev/null || echo "../contrib/install/$(ARCH)/lib/libpng.a ../contrib/install/$(ARCH)/lib/libz.a") else PNG_INCLUDE := -I../contrib/install/$(ARCH)/include PNG_LIB := ../contrib/install/$(ARCH)/lib/libpng.a ../contrib/install/$(ARCH)/lib/libz.a