Browse Source

autotools: add support for disabling libsonic (--without-sonic/--with-sonic=no)

master
Reece H. Dunn 11 years ago
parent
commit
00861d3bc3
4 changed files with 17 additions and 6 deletions
  1. 5
    1
      Makefile.am
  2. 12
    0
      configure.ac
  3. 0
    2
      src/sonic.cpp
  4. 0
    3
      src/speech.h

+ 5
- 1
Makefile.am View File

@@ -64,7 +64,6 @@ common_SOURCE = \
src/readclause.cpp \
src/phonemelist.cpp \
src/setlengths.cpp \
src/sonic.cpp \
src/synthdata.cpp \
src/synthesize.cpp \
src/synth_mbrola.cpp \
@@ -105,6 +104,11 @@ common_FLAGS += -DINCLUDE_MBROLA
common_SOURCE += src/mbrowrap.cpp
endif

if OPT_SONIC
common_FLAGS += -DINCLUDE_SONIC
common_SOURCE += src/sonic.cpp
endif

if AUDIO_RUNTIME
wave_SOURCE = src/wave.cpp src/wave_pulse.cpp
wave_LIBS = -lpulse -lpulse-simple -lportaudio

+ 12
- 0
configure.ac View File

@@ -148,8 +148,19 @@ else
have_mbrola=yes
fi

AC_ARG_WITH([sonic],
[AS_HELP_STRING([--with-sonic], [enable the sonic library to speed up the audio @<:@default=yes@:>@])],
[])

if test "$with_sonic" = "no" ; then
have_sonic=no
else
have_sonic=yes
fi

AM_CONDITIONAL(OPT_KLATT, [test x"$have_klatt" = xyes])
AM_CONDITIONAL(OPT_MBROLA, [test x"$have_mbrola" = xyes])
AM_CONDITIONAL(OPT_SONIC, [test x"$have_sonic" = xyes])

dnl ================================================================
dnl wxWidgets checks.
@@ -191,4 +202,5 @@ AC_MSG_NOTICE([

Klatt: ${have_klatt}
MBROLA: ${have_mbrola}
Sonic: ${have_sonic}
])

+ 0
- 2
src/sonic.cpp View File

@@ -28,7 +28,6 @@

#include "speech.h"
#include "sonic.h"
#ifdef INCLUDE_SONIC

struct sonicStreamStruct {
short *inputBuffer;
@@ -969,4 +968,3 @@ int sonicChangeShortSpeed(
sonicDestroyStream(stream);
return numSamples;
}
#endif // INCLUDE_SONIC

+ 0
- 3
src/speech.h View File

@@ -23,9 +23,6 @@

#include <sys/types.h>

// conditional compilation options
#define INCLUDE_SONIC

#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
#define ARCH_BIG
#endif

Loading…
Cancel
Save