diff options
Diffstat (limited to 'codecs')
-rw-r--r-- | codecs/Makefile | 12 | ||||
-rw-r--r-- | codecs/codec_gsm.c | 5 |
2 files changed, 16 insertions, 1 deletions
diff --git a/codecs/Makefile b/codecs/Makefile index d1feb8a54..c49994174 100644 --- a/codecs/Makefile +++ b/codecs/Makefile @@ -60,8 +60,18 @@ ifneq ($(wildcard ilbc/iLBC_decode.h),) endif +LIBGSM_PATH:=/usr/local/include /usr/include +LIBGSM_SYSTEM_HEADERS:=$(wildcard $(LIBGSM_PATH:%=$(CROSS_COMPILE_TARGET)%/gsm/gsm.h)) +ifneq (,$(LIBGSM_SYSTEM_HEADERS)) +LIBGSM=-lgsm +LIBGSMT= +CFLAGS+=-DUSE_EXTERNAL_GSM_LIB +else LIBGSM=gsm/lib/libgsm.a -LIBGSMT=gsm/lib/libgsm.a +LIBGSMT=$(LIBGSM) +CFLAGS+=-I. +endif + LIBLPC10=lpc10/liblpc10.a ifeq ($(findstring BSD,${OSARCH}),BSD) diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c index 65800476e..b8afd3bd7 100644 --- a/codecs/codec_gsm.c +++ b/codecs/codec_gsm.c @@ -45,7 +45,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/logger.h" #include "asterisk/channel.h" +#ifdef USE_EXTERNAL_GSM_LIB +#include <gsm/gsm.h> +#else #include "gsm/inc/gsm.h" +#endif + #include "../formats/msgsm.h" /* Sample frame data */ |