head 1.3; access; symbols; locks; strict; comment @# @; 1.3 date 2008.03.22.10.29.26; author rse; state Exp; branches; next 1.2; commitid SSDag1MeBe73L6Ws; 1.2 date 2008.03.22.10.10.58; author rse; state Exp; branches; next 1.1; commitid kxDf1K5Vq8rIE6Ws; 1.1 date 2008.03.20.18.32.47; author rse; state Exp; branches; next ; commitid JNpCLLly7QuPuTVs; desc @@ 1.3 log @also fix inter-lib dependencies @ text @Index: Makefile --- Makefile.orig 2007-01-11 20:07:14 +0100 +++ Makefile 2008-03-22 11:26:25 +0100 @@@@ -39,7 +39,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) @@@@ -54,7 +54,7 @@@@ CFLAGS+=-DASTERISK_VERSION=0 endif -LIBS+=-lm -lflite -lflite_cmulex -lflite_usenglish -lflite_cmu_us_kal +LIBS+=-lflite_cmu_us_kal -lflite_cmulex -lflite_usenglish -lflite -lm all: $(APPS) @@@@ -68,7 +68,7 @@@@ $(CC) -pipe $(INCLUDE) $(CFLAGS) -c -o app_flite.o app_flite.c app_flite.so: app_flite.o - $(CC) -shared -Xlinker -x -o $@@ $< $(LIBS) + $(CC) $(LDFLAGS) -shared -Xlinker -x -o $@@ $< $(LIBS) install: all @@if [ -d $(ASTERISKMODDIR) ]; then \ Index: app_flite.c --- app_flite.c.orig 2007-01-11 20:07:14 +0100 +++ app_flite.c 2008-03-22 11:25:47 +0100 @@@@ -38,10 +38,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 @@@@ -76,7 +79,7 @@@@ "the user, allowing any given interrupt keys to immediately terminate\n" "and return.\n"; -#if ASTERISK_VERSION != 4 +#if ASTERISK_VERSION < 4 STANDARD_LOCAL_USER; LOCAL_USER_DECL; @@@@ -108,6 +111,9 @@@@ char filename[27]; char wavFilename[27]; cst_voice *v; +#if ASTERISK_VERSION >= 6 + struct ast_flags config_flags = { 0 }; +#endif if (ast_strlen_zero(data)) { @@@@ -115,14 +121,16 @@@@ return -1; } -#if ASTERISK_VERSION == 4 +#if ASTERISK_VERSION >= 4 u = ast_module_user_add(chan); #else LOCAL_USER_ADD(u); #endif /* Config file stuff */ -#if ASTERISK_VERSION >= 2 +#if ASTERISK_VERSION >= 6 + cfg = ast_config_load(FLITE_CONFIG, config_flags); +#elif ASTERISK_VERSION >= 2 cfg = ast_config_load(FLITE_CONFIG); #else cfg = ast_load(FLITE_CONFIG); @@@@ -210,7 +218,7 @@@@ ast_log(LOG_WARNING, "ast_streamfile failed on %s for Flite\n", chan->name); } -#if ASTERISK_VERSION == 4 +#if ASTERISK_VERSION >= 4 ast_module_user_remove(u); #else LOCAL_USER_REMOVE(u); @@@@ -263,7 +271,7 @@@@ sprintf(cmd, "rm -f %s*", filename); system(cmd); -#if ASTERISK_VERSION == 4 +#if ASTERISK_VERSION >= 4 ast_module_user_remove(u); #else LOCAL_USER_REMOVE(u); @@@@ -271,7 +279,7 @@@@ return res; } -#if ASTERISK_VERSION == 4 +#if ASTERISK_VERSION >= 4 static int unload_module(void) { int res; @ 1.2 log @fix building by using correct library link order @ text @d3 1 a3 1 +++ Makefile 2008-03-22 11:09:30 +0100 d18 1 a18 1 +LIBS+=-lflite_cmulex -lflite_usenglish -lflite_cmu_us_kal -lflite -lm d33 1 a33 1 +++ app_flite.c 2008-03-22 11:07:56 +0100 @ 1.1 log @new package: asterisk-flite 0.5 (Asterisk Extension: Flite Text-To-Speech (TTS) Engine) @ text @d3 1 a3 1 +++ Makefile 2008-03-20 19:20:17 +0100 d13 9 d33 1 a33 1 +++ app_flite.c 2008-03-20 19:19:18 +0100 @