Browse Source

autotools: add support for disabling async command support (--without-async/--with-async=no)

master
Reece H. Dunn 12 years ago
parent
commit
6dd5529dd8
6 changed files with 29 additions and 26 deletions
  1. 11
    5
      Makefile.am
  2. 12
    0
      configure.ac
  3. 2
    4
      src/espeak_command.cpp
  4. 2
    6
      src/event.cpp
  5. 2
    6
      src/fifo.cpp
  6. 0
    5
      src/speech.h

+ 11
- 5
Makefile.am View File

@@ -72,11 +72,9 @@ common_SOURCE = \
src/voices.cpp \
src/wavegen.cpp

libespeak_FLAGS =
libespeak_SOURCE = \
src/speak_lib.cpp \
src/espeak_command.cpp \
src/event.cpp \
src/fifo.cpp \
src/debug.cpp

espeakedit_SOURCE = \
@@ -109,6 +107,14 @@ common_FLAGS += -DINCLUDE_SONIC
common_SOURCE += src/sonic.cpp
endif

if OPT_ASYNC
libespeak_FLAGS += -DUSE_ASYNC
libespeak_SOURCE += \
src/espeak_command.cpp \
src/event.cpp \
src/fifo.cpp
endif

if AUDIO_RUNTIME
wave_SOURCE = src/wave.cpp src/wave_pulse.cpp
wave_LIBS = -lpulse -lpulse-simple -lportaudio
@@ -140,7 +146,7 @@ docs/speak_lib.h: src/speak_lib.h
lib_LTLIBRARIES += src/libespeak.la

src_libespeak_la_LDFLAGS = -version-info $(SHARED_VERSION) $(wave_LIBS) -lpthread
src_libespeak_la_CXXFLAGS = $(common_FLAGS) $(wave_FLAGS) \
src_libespeak_la_CXXFLAGS = $(common_FLAGS) $(libespeak_FLAGS) $(wave_FLAGS) \
-fpic -fvisibility=hidden -D LIBRARY \
-pedantic -fno-exceptions -D PATH_ESPEAK_DATA=\"$(DATADIR)\"
src_libespeak_la_SOURCES = $(common_SOURCE) $(libespeak_SOURCE) $(wave_SOURCE)
@@ -159,7 +165,7 @@ src_espeak_SOURCES = src/espeak.cpp
bin_PROGRAMS += src/espeakedit

src_espeakedit_LDFLAGS = $(wave_LIBS) ${WX_LIBS}
src_espeakedit_CXXFLAGS = ${WX_CXXFLAGS} $(common_FLAGS) $(wave_FLAGS) \
src_espeakedit_CXXFLAGS = ${WX_CXXFLAGS} $(common_FLAGS) $(libespeak_FLAGS) $(wave_FLAGS) \
-D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT
src_espeakedit_SOURCES = $(common_SOURCE) $(libespeak_SOURCE) $(espeakedit_SOURCE) $(wave_SOURCE)


+ 12
- 0
configure.ac View File

@@ -158,9 +158,20 @@ else
have_sonic=yes
fi

AC_ARG_WITH([async],
[AS_HELP_STRING([--with-async], [enable support for async command processing @<:@default=yes@:>@])],
[])

if test "$with_async" = "no" ; then
have_async=no
else
have_async=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])
AM_CONDITIONAL(OPT_ASYNC, [test x"$have_async" = xyes])

dnl ================================================================
dnl wxWidgets checks.
@@ -203,4 +214,5 @@ AC_MSG_NOTICE([
Klatt: ${have_klatt}
MBROLA: ${have_mbrola}
Sonic: ${have_sonic}
Async: ${have_async}
])

+ 2
- 4
src/espeak_command.cpp View File

@@ -1,5 +1,6 @@
/***************************************************************************
* Copyright (C) 2007, Gilles Casse <[email protected]> *
* Copyright (C) 2013 Reece H. Dunn *
* *
* 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 *
@@ -16,11 +17,10 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "speech.h"

#ifdef USE_ASYNC
// This source file is only used for asynchronious modes

#include "speech.h"
#include "espeak_command.h"
#include <stdlib.h>
#include <string.h>
@@ -702,6 +702,4 @@ void display_espeak_command( t_espeak_command* the_command)
}
#endif
}

#endif
//>

+ 2
- 6
src/event.cpp View File

@@ -1,5 +1,6 @@
/***************************************************************************
* Copyright (C) 2007, Gilles Casse <[email protected]> *
* Copyright (C) 2013 Reece H. Dunn *
* *
* 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 *
@@ -17,9 +18,6 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/

#include "speech.h"

#ifdef USE_ASYNC
// This source file is only used for asynchronious modes


@@ -33,6 +31,7 @@
#include <sys/time.h>
#include <errno.h>

#include "speech.h"
#include "speak_lib.h"
#include "event.h"
#include "wave.h"
@@ -723,7 +722,4 @@ ENTER("event_terminate");
init(); // purge event
}
}

#endif
//>


+ 2
- 6
src/fifo.cpp View File

@@ -1,5 +1,6 @@
/***************************************************************************
* Copyright (C) 2007, Gilles Casse <[email protected]> *
* Copyright (C) 2013 Reece H. Dunn *
* *
* 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 *
@@ -16,12 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "speech.h"

#ifdef USE_ASYNC
// This source file is only used for asynchronious modes


//<includes

#include <unistd.h>
@@ -35,6 +33,7 @@
#include <sys/time.h>
#include <time.h>

#include "speech.h"
#include "fifo.h"
#include "wave.h"
#include "debug.h"
@@ -601,7 +600,4 @@ void fifo_terminate()

init(0); // purge fifo
}

#endif
//>


+ 0
- 5
src/speech.h View File

@@ -42,12 +42,7 @@
#define __cdecl
//#define ESPEAK_API extern "C"

#ifdef LIBRARY
#define USE_ASYNC
#endif

#ifdef _ESPEAKEDIT
#define USE_ASYNC
#define LOG_FRAMES // write keyframe info to log-espeakedit
#endif


Loading…
Cancel
Save