Index: src/Makefile
--- src/Makefile.orig	2011-11-22 22:46:08.000000000 +0100
+++ src/Makefile	2011-11-23 19:52:08.000000000 +0100
@@ -27,7 +27,7 @@
 
 # 'runtime' uses pulseaudio if it is running, else uses portaudio
 #AUDIO = runtime
-AUDIO = portaudio
+#AUDIO = portaudio
 #AUDIO = portaudio0
 #AUDIO = portaudio2
 #AUDIO = pulseaudio
@@ -70,6 +70,9 @@
 endif
 endif
 
+CXX = g++
+CXXFLAGS=-O2 -pthread
+
 speak_SOURCES = speak.cpp compiledict.cpp dictionary.cpp intonation.cpp \
 	readclause.cpp setlengths.cpp numbers.cpp synth_mbrola.cpp \
 	synthdata.cpp synthesize.cpp translate.cpp mbrowrap.cpp \
@@ -83,34 +86,34 @@
 
 SRCS1=$(speak_SOURCES)
 OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))
-LIBS1=-lstdc++ $(LIB_AUDIO) -lpthread $(EXTRA_LIBS)
+LIBS1=-lstdc++ $(LIB_AUDIO) -pthread $(EXTRA_LIBS)
 
 SRCS2=$(libespeak_SOURCES)
 OBJS2=$(patsubst %.cpp,x_%.o,$(SRCS2))
-LIBS2=-lstdc++ $(LIB_AUDIO) -lpthread
+LIBS2=-lstdc++ $(LIB_AUDIO) -pthread
 
 SRCS3 = espeak.cpp
 OBJS3=$(patsubst %.cpp,%.o,$(SRCS3))
-LIBS3=-lstdc++ -L . -lespeak
+LIBS3=-lstdc++ -L . -lespeak -pthread
 
 CXXFLAGS=-O2
 
 
-all: $(BIN_NAME) $(LIB_NAME) $(STATIC_LIB_NAME) $(BIN2_NAME)
+all: $(STATIC_LIB_NAME) $(BIN2_NAME)
 
 .cpp.o:
-	$(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -pedantic -I. -c -fno-exceptions  $<
+	$(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -I. -c -fno-exceptions  $<
 
 $(BIN_NAME): $(OBJS1)
 	$(CXX) $(LDFLAGS) -o $@ $(OBJS1) $(LIBS1)
 
-$(BIN2_NAME): $(OBJS3) $(LIB_NAME)
+$(BIN2_NAME): $(OBJS3) $(STATIC_LIB_NAME)
 	$(CXX) $(LDFLAGS) -o $@ $(OBJS3) $(LIBS3)
 
 
 
 x_%.o: %.cpp
-	$(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -fpic -fvisibility=hidden -pedantic \
+	$(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" \
 	-I. -D LIBRARY -c -fno-exceptions  $<  -o x_$*.o
 
 $(LIB_NAME): $(OBJS2)
Index: src/espeak.cpp
--- src/espeak.cpp.orig	2011-11-22 21:47:46.000000000 +0100
+++ src/espeak.cpp	2011-11-23 19:50:39.000000000 +0100
@@ -28,6 +28,10 @@
 
 #include "speak_lib.h"
 
+#define GetFileLength my_GetFileLength
+#define strncpy0 my_strncpy0
+#define samplerate my_samplerate
+
 // This version of the command-line speak program uses the
 // libespeak.so.1  library
 
