Skip to content

Commit

Permalink
* Quieten pkg-config and sdl-config tests down, portably
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Oct 15, 2009
1 parent 8e04904 commit ab4bf14
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit ab4bf14

Please sign in to comment.