Thank you for to update. Error of missing module_utils_speak_queue.h is fixed.
/bin/bash ../../libtool --tag=CXX --mode=link g++ -g -DESPEAK_NG_INCLUDE -I../../../src -I../../../utfcpp/source -I../../../sonic -g -O2 -o sd_ekho sd_ekho-ekho.o module_main.o module_readline.o module_process.o module_config.o module_utils.o speak_queue.o ../../../libekho.a -lm -lsndfile -lpulse-simple -pthread -lpulse -pthread ../../src/common/
libcommon.la -dlopen ../audio/
spd_pulse.la -dlopen ../audio/
spd_alsa.la -dlopen ../audio/
spd_oss.la -lespeak-ng -ldotconf -lglib-2.0 -dlopen force -lc -lc -lltdl -lm
libtool: link: rm -f .libs/sd_ekho.nm .libs/sd_ekho.nmS .libs/sd_ekho.nmT
libtool: link: rm -f ".libs/sd_ekho.nmI"
libtool: link: (cd .libs && gcc -g -O2 -c -fno-builtin "sd_ekhoS.c")
libtool: link: rm -f ".libs/sd_ekhoS.c" ".libs/sd_ekho.nm" ".libs/sd_ekho.nmS" ".libs/sd_ekho.nmT" ".libs/sd_ekho.nmI"
libtool: link: g++ -g -DESPEAK_NG_INCLUDE -I../../../src -I../../../utfcpp/source -I../../../sonic -g -O2 -o sd_ekho sd_ekho-ekho.o module_main.o module_readline.o module_process.o module_config.o module_utils.o speak_queue.o -pthread -pthread .libs/sd_ekhoS.o -Wl,--export-dynamic ../../../libekho.a -lsndfile -lpulse-simple -lpulse ../../src/common/.libs/libcommon.a -lespeak-ng -ldotconf -lglib-2.0 -lc -lltdl -lm -pthread
/usr/bin/ld: sd_ekho-ekho.o: in function `ekho_callback(short*, int, int, int, int, int)':
/home/hgneng/ekho/speechd-api/src/modules/ekho.cpp:159: undefined reference to `module_speak_queue_stop_requested()'
/usr/bin/ld: /home/hgneng/ekho/speechd-api/src/modules/ekho.cpp:163: undefined reference to `module_speak_queue_before_play()'
/usr/bin/ld: /home/hgneng/ekho/speechd-api/src/modules/ekho.cpp:176: undefined reference to `module_speak_queue_add_end()'
/usr/bin/ld: /home/hgneng/ekho/speechd-api/src/modules/ekho.cpp:173: undefined reference to `module_speak_queue_add_audio(AudioTrack const*, AudioFormat)'
/usr/bin/ld: sd_ekho-ekho.o: in function `module_init':
/home/hgneng/ekho/speechd-api/src/modules/ekho.cpp:87: undefined reference to `module_speak_queue_init(int, char**)'
/usr/bin/ld: sd_ekho-ekho.o: in function `module_speak(char*, unsigned long, SPDMessageType)':
/home/hgneng/ekho/speechd-api/src/modules/ekho.cpp:195: undefined reference to `module_speak_queue_before_synth()'
/usr/bin/ld: sd_ekho-ekho.o: in function `module_stop':
/home/hgneng/ekho/speechd-api/src/modules/ekho.cpp:239: undefined reference to `module_speak_queue_stop()'
/usr/bin/ld: sd_ekho-ekho.o: in function `module_pause':
/home/hgneng/ekho/speechd-api/src/modules/ekho.cpp:246: undefined reference to `module_speak_queue_pause()'
/usr/bin/ld: sd_ekho-ekho.o: in function `module_close':
/home/hgneng/ekho/speechd-api/src/modules/ekho.cpp:253: undefined reference to `module_speak_queue_terminate()'
/usr/bin/ld: /home/hgneng/ekho/speechd-api/src/modules/ekho.cpp:256: undefined reference to `module_speak_queue_free()'
/usr/bin/ld: speak_queue.o: in function `speak_queue_stop_or_pause':
/home/hgneng/ekho/speechd-api/src/modules/speak_queue.c:665: undefined reference to `module_speak_queue_cancel'
collect2: error: ld returned 1 exit status
I know module_utils_speak_queue.c is moved to src/common/speak_queue.c. So I make a symbol link from src/modules/speak_queue.c to src/common/speak_queue.c. However, I don't why it doesn't work. It still complains undefined references. Here is the Makefile part of my module:
EKHO_ROOT = ../../..
sd_ekho_SOURCES = ekho.cpp $(audio_SOURCES) $(common_SOURCES) speak_queue.c
sd_ekho_CXXFLAGS = -g -DESPEAK_NG_INCLUDE $(ESPEAK_NG_CFLAGS) -I$(EKHO_ROOT)/src -I$(EKHO_ROOT)/utfcpp/source -I$(EKHO_ROOT)/sonic
sd_ekho_LDADD = $(EKHO_ROOT)/libekho.a -lm -lsndfile \
@LIB_PULSEAUDIO@ $(MP3LAME_LIBS) \
$(top_builddir)/src/common/
libcommon.la \
$(audio_dlopen_modules) \
$(ESPEAK_NG_LIBS) $(EXTRA_ESPEAK_LIBS) \
$(common_LDADD)