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

src/readclause.cpp \ src/readclause.cpp \
src/phonemelist.cpp \ src/phonemelist.cpp \
src/setlengths.cpp \ src/setlengths.cpp \
src/sonic.cpp \
src/synthdata.cpp \ src/synthdata.cpp \
src/synthesize.cpp \ src/synthesize.cpp \
src/synth_mbrola.cpp \ src/synth_mbrola.cpp \
common_SOURCE += src/mbrowrap.cpp common_SOURCE += src/mbrowrap.cpp
endif endif


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

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

+ 12
- 0
configure.ac View File

have_mbrola=yes have_mbrola=yes
fi 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_KLATT, [test x"$have_klatt" = xyes])
AM_CONDITIONAL(OPT_MBROLA, [test x"$have_mbrola" = xyes]) AM_CONDITIONAL(OPT_MBROLA, [test x"$have_mbrola" = xyes])
AM_CONDITIONAL(OPT_SONIC, [test x"$have_sonic" = xyes])


dnl ================================================================ dnl ================================================================
dnl wxWidgets checks. dnl wxWidgets checks.


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

+ 0
- 2
src/sonic.cpp View File



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


struct sonicStreamStruct { struct sonicStreamStruct {
short *inputBuffer; short *inputBuffer;
sonicDestroyStream(stream); sonicDestroyStream(stream);
return numSamples; return numSamples;
} }
#endif // INCLUDE_SONIC

+ 0
- 3
src/speech.h View File



#include <sys/types.h> #include <sys/types.h>


// conditional compilation options
#define INCLUDE_SONIC

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

Loading…
Cancel
Save