head 1.2; access; symbols; locks; strict; comment @# @; 1.2 date 2008.03.22.10.17.13; author rse; state Exp; branches; next 1.1; commitid BT6yFZSZDpkRG6Ws; 1.1 date 2008.03.21.14.15.36; author rse; state Exp; branches; next ; commitid ezmvkYKT46oD20Ws; desc @@ 1.2 log @fix building by using correct library link order and add missing stdc++ library @ text @Index: Makefile --- Makefile.orig 2008-01-23 10:13:34 +0100 +++ Makefile 2008-03-22 11:15:36 +0100 @@@@ -45,7 +45,7 @@@@ OPTIMIZE=-O6 #Include debug symbols in the executables (-g) -DEBUG=-g +DEBUG= CFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE CFLAGS+=$(OPTIMIZE) @@@@ -60,7 +60,7 @@@@ CFLAGS+=-DASTERISK_VERSION=0 endif -LIBS+=-lm -lespeak -lsndfile -lsamplerate +LIBS+=-lespeak -lsndfile -lsamplerate -lstdc++ -lm all: $(APPS) @@@@ -74,7 +74,7 @@@@ $(CC) -pipe $(INCLUDE) $(CFLAGS) -c -o app_espeak.o app_espeak.c app_espeak.so: app_espeak.o - $(CC) -shared -Xlinker -x -o $@@ $< $(LIBS) + $(CC) $(LDFLAGS) -shared -Xlinker -x -o $@@ $< $(LIBS) install: all @@if [ -d $(ASTERISKMODDIR) ]; then \ Index: app_espeak.c --- app_espeak.c.orig 2008-01-29 15:32:21 +0100 +++ app_espeak.c 2008-03-22 11:15:19 +0100 @@@@ -41,10 +41,13 @@@@ 0 == Asterisk 1.0.x 2 == Asterisk 1.2.x 4 == Asterisk 1.4.x + 6 == Asterisk 1.6.x */ - #define ASTERISK_VERSION 4 + #define ASTERISK_VERSION 6 #endif +#include + #include #include #include @@@@ -58,7 +61,7 @@@@ #include #include -#include +#include #include #include @@@@ -128,6 +131,9 @@@@ char wavFilename[27]; int speed = 120; /* Speed of speech in words per minute; default is 170wpm */ const char *voice; +#if ASTERISK_VERSION >= 6 + struct ast_flags config_flags = { 0 }; +#endif /* For wave file creation */ static unsigned char wave_hdr[44] = { @@@@ -160,7 +166,9 @@@@ #endif /* Config file stuff */ -#if ASTERISK_VERSION >= 2 +#if ASTERISK_VERSION >= 6 + cfg = ast_config_load(ESPEAK_CONFIG, config_flags); +#elif ASTERISK_VERSION >= 2 cfg = ast_config_load(ESPEAK_CONFIG); #else cfg = ast_load(ESPEAK_CONFIG); @@@@ -521,7 +529,7 @@@@ return res; } -#if ASTERISK_VERSION == 4 +#if ASTERISK_VERSION >= 4 static int unload_module(void) { int res; @ 1.1 log @new package: asterisk-espeak 0.4 (Asterisk Extension: eSpeak Text-To-Speech (TTS) Engine) @ text @d3 1 a3 1 +++ Makefile 2008-03-21 15:01:23 +0100 d13 9 d33 1 a33 1 +++ app_espeak.c 2008-03-21 15:02:25 +0100 @