From 69999280c6645998a497dd80c87e9c3c0f0f83a4 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 19 May 2013 21:19:36 +0100 Subject: [PATCH] Find Speex via user override, pkg-config or default search path --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 086048dc..6173dc74 100644 --- a/Makefile +++ b/Makefile @@ -1027,10 +1027,13 @@ ifeq ($(USE_VOIP),1) CLIENT_CFLAGS += -DUSE_VOIP SERVER_CFLAGS += -DUSE_VOIP ifeq ($(USE_INTERNAL_SPEEX),1) - CLIENT_CFLAGS += -DFLOATING_POINT -DUSE_ALLOCA -I$(SPEEXDIR)/include + SPEEX_CFLAGS += -DFLOATING_POINT -DUSE_ALLOCA -I$(SPEEXDIR)/include else - CLIENT_LIBS += -lspeex -lspeexdsp + SPEEX_CFLAGS ?= $(shell pkg-config --silence-errors --cflags speex speexdsp || true) + SPEEX_LIBS ?= $(shell pkg-config --silence-errors --libs speex speexdsp || echo -lspeex -lspeexdsp) endif + CLIENT_CFLAGS += $(SPEEX_CFLAGS) + CLIENT_LIBS += $(SPEEX_LIBS) endif ifeq ($(USE_INTERNAL_ZLIB),1)