diff --git a/Makefile.am b/Makefile.am
index b7d070eb..4cb10391 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -145,7 +145,7 @@ src_libespeak_ng_la_LDFLAGS = -version-info $(SHARED_VERSION) -lpthread -lm \
src_libespeak_ng_la_CFLAGS = \
-fPIC -fvisibility=hidden \
-pedantic -fno-exceptions -DPATH_ESPEAK_DATA=\"$(DATADIR)\" -DLIBESPEAK_NG_EXPORT \
- ${PCAUDIOLIB_CFLAGS} ${AM_CFLAGS}
+ ${PCAUDIOLIB_CFLAGS} ${SONIC_CFLAGS} ${AM_CFLAGS}
src_libespeak_ng_la_SOURCES = \
src/ucd-tools/src/case.c \
diff --git a/configure.ac b/configure.ac
index ed5c97ff..1359545f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -221,7 +221,7 @@ else
AC_CHECK_HEADERS([pcaudiolib/audio.h],
[
have_pcaudiolib=yes
- PCAUDIOLIB_CFLAGS=
+ PCAUDIOLIB_CFLAGS=-DUSE_LIBPCAUDIO=1
PCAUDIOLIB_LIBS=-lpcaudio
],[
have_pcaudiolib=no
@@ -258,12 +258,14 @@ if test "$with_sonic" = "no" ; then
else
AC_CHECK_HEADERS([sonic.h],
[
+ SONIC_CFLAGS=-DUSE_LIBSONIC=1
AC_CHECK_LIB([sonic], [sonicCreateStream])
have_sonic=yes
],[
have_sonic=no
])
fi
+AC_SUBST(SONIC_CFLAGS)
AC_CHECK_HEADERS([valgrind/memcheck.h])
diff --git a/src/windows/libespeak-ng.vcxproj b/src/windows/libespeak-ng.vcxproj
index 1ea3935d..9c5979e9 100644
--- a/src/windows/libespeak-ng.vcxproj
+++ b/src/windows/libespeak-ng.vcxproj
@@ -88,7 +88,7 @@
TurnOffAllWarnings
Disabled
$(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../pcaudiolib/src/include;$(ProjectDir)/../speechPlayer/include;$(ProjectDir)/../include/compat;$(ProjectDir)/../ucd-tools/src/include
- LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_SPEECHPLAYER;INCLUDE_MBROLA;HAVE_PCAUDIOLIB_AUDIO_H;%(PreprocessorDefinitions)
+ LIBESPEAK_NG_EXPORT;USE_KLATT=1;USE_SPEECHPLAYER=1;USE_MBROLA=1;USE_LIBPCAUDIO=1;%(PreprocessorDefinitions)
$(IntDir)libespeak-ng.pdb
@@ -104,7 +104,7 @@
TurnOffAllWarnings
Disabled
- LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_SPEECHPLAYER;INCLUDE_MBROLA;HAVE_PCAUDIOLIB_AUDIO_H;%(PreprocessorDefinitions)
+ LIBESPEAK_NG_EXPORT;USE_KLATT=1;USE_SPEECHPLAYER=1;USE_MBROLA=1;USE_LIBPCAUDIO=1;%(PreprocessorDefinitions)
$(IntDir)libespeak-ng.pdb
$(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../pcaudiolib/src/include;$(ProjectDir)/../speechPlayer/include;$(ProjectDir)/../include/compat;$(ProjectDir)/../ucd-tools/src/include
@@ -124,7 +124,7 @@
true
true
$(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../pcaudiolib/src/include;$(ProjectDir)/../speechPlayer/include;$(ProjectDir)/../include/compat;$(ProjectDir)/../ucd-tools/src/include
- LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_SPEECHPLAYER;INCLUDE_MBROLA;HAVE_PCAUDIOLIB_AUDIO_H;%(PreprocessorDefinitions)
+ LIBESPEAK_NG_EXPORT;USE_KLATT=1;USE_SPEECHPLAYER=1;USE_MBROLA=1;USE_LIBPCAUDIO=1;%(PreprocessorDefinitions)
$(IntDir)libespeak-ng.pdb
@@ -144,7 +144,7 @@
MaxSpeed
true
true
- LIBESPEAK_NG_EXPORT;INCLUDE_KLATT;INCLUDE_SPEECHPLAYER;INCLUDE_MBROLA;HAVE_PCAUDIOLIB_AUDIO_H;%(PreprocessorDefinitions)
+ LIBESPEAK_NG_EXPORT;USE_KLATT=1;USE_SPEECHPLAYER=1;USE_MBROLA=1;USE_LIBPCAUDIO=1;%(PreprocessorDefinitions)
$(IntDir)libespeak-ng.pdb
$(ProjectDir);$(ProjectDir)/../include;$(ProjectDir)/../pcaudiolib/src/include;$(ProjectDir)/../speechPlayer/include;$(ProjectDir)/../include/compat;$(ProjectDir)/../ucd-tools/src/include