Browse Source

autotools: add support for disabling MBROLA (--without-mbrola/--with-mbrola=no)

master
Reece H. Dunn 11 years ago
parent
commit
83df50a40f
4 changed files with 19 additions and 6 deletions
  1. 5
    1
      Makefile.am
  2. 13
    1
      configure.ac
  3. 1
    3
      src/mbrowrap.cpp
  4. 0
    1
      src/speech.h

+ 5
- 1
Makefile.am View File

src/compiledict.cpp \ src/compiledict.cpp \
src/dictionary.cpp \ src/dictionary.cpp \
src/intonation.cpp \ src/intonation.cpp \
src/mbrowrap.cpp \
src/numbers.cpp \ src/numbers.cpp \
src/readclause.cpp \ src/readclause.cpp \
src/phonemelist.cpp \ src/phonemelist.cpp \
common_SOURCE += src/klatt.cpp common_SOURCE += src/klatt.cpp
endif endif


if OPT_MBROLA
common_FLAGS += -DINCLUDE_MBROLA
common_SOURCE += src/mbrowrap.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

+ 13
- 1
configure.ac View File

have_klatt=yes have_klatt=yes
fi fi


AM_CONDITIONAL(OPT_KLATT, [test x"$have_klatt" = xyes])
AC_ARG_WITH([mbrola],
[AS_HELP_STRING([--with-mbrola], [enable the MBROLA speech synthesizer @<:@default=yes@:>@])],
[])

if test "$with_mbrola" = "no" ; then
have_mbrola=no
else
have_mbrola=yes
fi

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


dnl ================================================================ dnl ================================================================
dnl wxWidgets checks. dnl wxWidgets checks.
audio configuration: ${AUDIO} audio configuration: ${AUDIO}


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

+ 1
- 3
src/mbrowrap.cpp View File

* providing a subset of the API from the Windows mbrola DLL. * providing a subset of the API from the Windows mbrola DLL.
* *
* Copyright (C) 2010 by Nicolas Pitre <[email protected]> * Copyright (C) 2010 by Nicolas Pitre <[email protected]>
* Copyright (C) 2013 Reece H. Dunn
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
*/ */


#include "speech.h" #include "speech.h"
#ifdef INCLUDE_MBROLA


#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
{ {
mbr_errorbuf[0] = 0; mbr_errorbuf[0] = 0;
} }

#endif // INCLUDE_MBROLA

+ 0
- 1
src/speech.h View File

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


// conditional compilation options // conditional compilation options
#define INCLUDE_MBROLA
#define INCLUDE_SONIC #define INCLUDE_SONIC


#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN

Loading…
Cancel
Save