Hi.

First of all, we need to patch linux-espeak/ so that it builds on Debian
systems:

* Change include to tcl8.4/tcl.h
* Link against -ltcl8.4 not -ltcl
* Fix a const modifier mismatch error with g++-4.3
* Remove the use of libtool since libtool --mode=link does not pass
  --shared to g++ for some reason which leads to a linker error

It would be a good first step if this patch were applied already
so that individual users do not have to do these modifications manually.

Build-Depends: libespeak-dev, tcl8.4-dev

diff -ru linux-espeak.orig/Makefile linux-espeak/Makefile
--- linux-espeak.orig/Makefile	2008-10-03 02:43:51.000000000 +0200
+++ linux-espeak/Makefile	2009-08-28 13:00:28.000000000 +0200
@@ -13,20 +13,19 @@
 libparentdir = ${PREFIX}/share/emacs/site-lisp
 libdir2 =$(libparentdir)/emacspeak/servers/linux-espeak
 CFLAGS= -O2 -I/usr/include/espeak -fPIC  -DPIC -pedantic -ansi -Wall
-LIBS= -ltcl -lespeak
+LIBS= -ltcl8.4 -lespeak
 
 TTS=libtclespeak.so
 all: libtclespeak.so
 
-tclespeak.lo: tclespeak.cpp
-	libtool --mode=compile $(CC) $(CFLAGS) -c $<
+tclespeak.o: tclespeak.cpp
+	$(CC) $(CFLAGS) -c $<
 
-libtclespeak.so: tclespeak.lo 
-	libtool --mode=link $(CC) $(CFLAGS) -g -o $@ tclespeak.lo $(LIBS)  -shared
+libtclespeak.so: tclespeak.o 
+	$(CC) -shared $(CFLAGS) -g -o $@ tclespeak.o $(LIBS)
 
 clean:
-	rm -f *.so *.o *.lo libtclespeak.so
-	rm -rf .libs
+	rm -f *.so *.o
 
 install:  tclespeak.so
 	if test ! -d $(libdir2) ; then mkdir $(libdir2); fi ; \
diff -ru linux-espeak.orig/tclespeak.cpp linux-espeak/tclespeak.cpp
--- linux-espeak.orig/tclespeak.cpp	2008-10-03 02:43:51.000000000 +0200
+++ linux-espeak/tclespeak.cpp	2009-08-28 12:49:41.000000000 +0200
@@ -37,7 +37,7 @@
 
 #include <sys/time.h>
 #include <dlfcn.h>
-#include <tcl.h>
+#include <tcl8.4/tcl.h>
 #include <string.h>
 #include <stdlib.h>
 #include <string>
@@ -593,7 +593,7 @@
 	  continue;
 	}
 
-      char* aLangCode = 1 + voices[i]->languages;
+      const char* aLangCode = 1 + voices[i]->languages;
 
       snprintf(buffer_i, 3, "%d", aLang); 
       snprintf(buffer_j, 3, "%d", j++); 
-- 
Regards,
      Mario Lang

Graz University of Technology        mailto:ml...@tugraz.at
Department Computing               http://www.ZID.TUGraz.at/lang/
Phone: +43 (0) 316 / 873 - 6897

Reply via email to