[asterisk-commits] trunk - r7539 in /trunk/codecs: Makefile codec_gsm.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Dec 20 02:16:54 CST 2005


Author: russell
Date: Tue Dec 20 02:16:53 2005
New Revision: 7539

URL: http://svn.digium.com/view/asterisk?rev=7539&view=rev
Log:
use the system libgsm if available (issue #5434, modified to still work with builtin libgsm)

Modified:
    trunk/codecs/Makefile
    trunk/codecs/codec_gsm.c

Modified: trunk/codecs/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/codecs/Makefile?rev=7539&r1=7538&r2=7539&view=diff
==============================================================================
--- trunk/codecs/Makefile (original)
+++ trunk/codecs/Makefile Tue Dec 20 02:16:53 2005
@@ -60,8 +60,18 @@
 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)

Modified: trunk/codecs/codec_gsm.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_gsm.c?rev=7539&r1=7538&r2=7539&view=diff
==============================================================================
--- trunk/codecs/codec_gsm.c (original)
+++ trunk/codecs/codec_gsm.c Tue Dec 20 02:16:53 2005
@@ -45,7 +45,12 @@
 #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 */



More information about the asterisk-commits mailing list