aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-10-15 13:11:49 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-10-15 13:11:49 +0000
commit02b51e4a9ac19c690ee5a9e7fc733608fb2965e8 (patch)
tree166d91956c22177efef69f722cc9e8d5c627e8a1 /Makefile
parent3938c390cfb257dff78074f9ad21841b6b2036d9 (diff)
downloadioquake3-aero-02b51e4a9ac19c690ee5a9e7fc733608fb2965e8.tar.gz
ioquake3-aero-02b51e4a9ac19c690ee5a9e7fc733608fb2965e8.zip
* Quieten pkg-config and sdl-config tests down, portably
git-svn-id: svn://svn.icculus.org/quake3/trunk@1669 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e946009..ba3e4fb 100644
--- a/Makefile
+++ b/Makefile
@@ -177,11 +177,13 @@ SDLHDIR=$(MOUNT_DIR)/SDL12
LIBSDIR=$(MOUNT_DIR)/libs
TEMPDIR=/tmp
+bin_path=$(shell which $(1) 2> /dev/null)
+
# We won't need this if we only build the server
ifneq ($(BUILD_CLIENT),0)
# set PKG_CONFIG_PATH to influence this, e.g.
# PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig
- ifeq ($(shell which pkg-config > /dev/null; echo $$?),0)
+ ifneq ($(call bin_path, pkg-config),)
CURL_CFLAGS=$(shell pkg-config --silence-errors --cflags libcurl)
CURL_LIBS=$(shell pkg-config --silence-errors --libs libcurl)
OPENAL_CFLAGS=$(shell pkg-config --silence-errors --cflags openal)
@@ -192,7 +194,7 @@ ifneq ($(BUILD_CLIENT),0)
endif
# Use sdl-config if all else fails
ifeq ($(SDL_CFLAGS),)
- ifeq ($(shell which sdl-config > /dev/null; echo $$?),0)
+ ifneq ($(call bin_path, sdl-config),)
SDL_CFLAGS=$(shell sdl-config --cflags)
SDL_LIBS=$(shell sdl-config --libs)
endif
@@ -441,7 +443,7 @@ ifeq ($(PLATFORM),mingw32)
# Some MinGW installations define CC to cc, but don't actually provide cc,
# so explicitly use gcc instead (which is the only option anyway)
- ifeq ($(shell which $(CC) > /dev/null; echo $$?),1)
+ ifeq ($(call bin_path, $(CC)),)
CC=gcc
endif