eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure.ac 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. AC_PREREQ([2.63])
  2. AC_INIT([eSpeak], [1.47], [https://github.com/rhdunn/espeak/issues], [espeak], [https://github.com/rhdunn/espeak])
  3. AM_INIT_AUTOMAKE()
  4. m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES])
  5. AM_SILENT_RULES([yes])
  6. AC_CONFIG_SRCDIR([src])
  7. AC_CONFIG_MACRO_DIR([m4])
  8. AC_CONFIG_HEADERS([config.h])
  9. dnl ================================================================
  10. dnl Program checks.
  11. dnl ================================================================
  12. AC_PROG_CXX
  13. AC_PROG_MAKE_SET
  14. AC_PROG_LIBTOOL
  15. AC_CHECK_PROG(NDKBUILD_CHECK,[ndk-build],yes)
  16. if test x"$NDKBUILD_CHECK" != xyes ; then
  17. AC_MSG_ERROR([Please ensure that the Android NDK is installed and ndk-build is usable from the command line.])
  18. fi
  19. dnl ================================================================
  20. dnl getopt checks.
  21. dnl ================================================================
  22. AC_CHECK_HEADERS([getopt.h])
  23. AC_CHECK_FUNCS([getopt_long])
  24. dnl ================================================================
  25. dnl PulseAudio checks.
  26. dnl ================================================================
  27. AC_ARG_WITH([pulseaudio],
  28. [AS_HELP_STRING([--with-pulseaudio], [use the pulseaudio library for audio output @<:@default=yes@:>@])],
  29. [])
  30. if test "$with_pulseaudio" = "no"; then
  31. echo "Disabling pulseaudio output support via pulseaudio"
  32. have_pulseaudio=no
  33. else
  34. PKG_CHECK_MODULES(PULSEAUDIO, [libpulse >= 0.9],
  35. [
  36. have_pulseaudio=yes
  37. ],[
  38. have_pulseaudio=no
  39. ])
  40. fi
  41. dnl ================================================================
  42. dnl PortAudio checks.
  43. dnl ================================================================
  44. AC_ARG_WITH([portaudio],
  45. [AS_HELP_STRING([--with-portaudio], [use the portaudio library for audio output @<:@default=yes@:>@])],
  46. [])
  47. if test "$with_portaudio" = "no"; then
  48. echo "Disabling portaudio output support via portaudio"
  49. have_portaudio=no
  50. else
  51. AC_CHECK_HEADERS([portaudio.h],
  52. [
  53. # Check the portaudio library.
  54. AC_CHECK_LIB([portaudio], [Pa_IsStreamActive]) # portaudio 19
  55. AC_CHECK_LIB([portaudio], [Pa_StreamActive]) # portaudio 18
  56. # Then use the headers to determine the portaudio version.
  57. # This is because on some systems with both libportaudio0 and
  58. # libportaudio2 installed, portaudio.h and -lportaudio refer
  59. # to different versions.
  60. AC_CHECK_FUNC([Pa_IsStreamActive],
  61. [
  62. have_portaudio=19
  63. ],[
  64. AC_CHECK_FUNC([Pa_StreamActive],
  65. [
  66. have_portaudio=18
  67. ],[
  68. have_portaudio=no
  69. ])
  70. ])
  71. ],[
  72. have_portaudio=no
  73. ])
  74. fi
  75. dnl ================================================================
  76. dnl Audio checks.
  77. dnl ================================================================
  78. AC_ARG_WITH([sada],
  79. [AS_HELP_STRING([--with-sada], [use the Solaris SADA audio API @<:@default=no@:>@])],
  80. [])
  81. if test "$with_sada" = "yes" ; then
  82. have_sada=yes
  83. else
  84. have_sada=no
  85. fi
  86. if test "$have_portaudio" = 18 -o "$have_portaudio" = 19 ; then
  87. if test "$have_pulseaudio" = yes ; then
  88. PKG_CHECK_MODULES(PULSEAUDIO_SIMPLE, [libpulse-simple >= 0.9],
  89. [
  90. have_pulseaudio=yes
  91. AUDIO=runtime
  92. ],[
  93. have_pulseaudio=no
  94. AUDIO=portaudio
  95. ])
  96. else
  97. AUDIO=portaudio
  98. fi
  99. elif test "$have_pulseaudio" = yes ; then
  100. AUDIO=pulseaudio
  101. elif test "$have_sada" = yes ; then
  102. AUDIO=sada
  103. else
  104. AUDIO=disabled
  105. fi
  106. AC_SUBST(AUDIO)
  107. AM_CONDITIONAL(AUDIO_RUNTIME, [test x"$AUDIO" = xruntime])
  108. AM_CONDITIONAL(AUDIO_PULSEAUDIO, [test x"$AUDIO" = xpulseaudio])
  109. AM_CONDITIONAL(AUDIO_PORTAUDIO, [test x"$AUDIO" = xportaudio])
  110. AM_CONDITIONAL(AUDIO_SADA, [test x"$AUDIO" = xsada])
  111. dnl ================================================================
  112. dnl Optional compilation checks.
  113. dnl ================================================================
  114. AC_ARG_WITH([klatt],
  115. [AS_HELP_STRING([--with-klatt], [enable the Klatt formant synthesizer @<:@default=yes@:>@])],
  116. [])
  117. if test "$with_klatt" = "no" ; then
  118. have_klatt=no
  119. else
  120. have_klatt=yes
  121. fi
  122. AC_ARG_WITH([mbrola],
  123. [AS_HELP_STRING([--with-mbrola], [enable the MBROLA speech synthesizer @<:@default=yes@:>@])],
  124. [])
  125. if test "$with_mbrola" = "no" ; then
  126. have_mbrola=no
  127. else
  128. have_mbrola=yes
  129. fi
  130. AC_ARG_WITH([sonic],
  131. [AS_HELP_STRING([--with-sonic], [enable the sonic library to speed up the audio @<:@default=yes@:>@])],
  132. [])
  133. if test "$with_sonic" = "no" ; then
  134. have_sonic=no
  135. else
  136. have_sonic=yes
  137. fi
  138. AC_ARG_WITH([async],
  139. [AS_HELP_STRING([--with-async], [enable support for async command processing @<:@default=yes@:>@])],
  140. [])
  141. if test "$with_async" = "no" ; then
  142. have_async=no
  143. else
  144. have_async=yes
  145. fi
  146. AM_CONDITIONAL(OPT_KLATT, [test x"$have_klatt" = xyes])
  147. AM_CONDITIONAL(OPT_MBROLA, [test x"$have_mbrola" = xyes])
  148. AM_CONDITIONAL(OPT_SONIC, [test x"$have_sonic" = xyes])
  149. AM_CONDITIONAL(OPT_ASYNC, [test x"$have_async" = xyes])
  150. dnl ================================================================
  151. dnl wxWidgets checks.
  152. dnl ================================================================
  153. AC_CHECK_PROG(WXCONFIG_CHECK,wx-config,yes)
  154. if test x"$WXCONFIG_CHECK" != x"yes" ; then
  155. AC_MSG_ERROR([Please install wxWidgets which is needed for espeakedit.])
  156. fi
  157. WX_LIBS=`wx-config --libs`
  158. WX_CXXFLAGS=`wx-config --cxxflags`
  159. WX_VERSION=`wx-config --version`
  160. AC_SUBST(WX_LIBS)
  161. AC_SUBST(WX_CXXFLAGS)
  162. dnl ================================================================
  163. dnl Generate output.
  164. dnl ================================================================
  165. AC_CONFIG_FILES([Makefile])
  166. AC_OUTPUT
  167. AC_MSG_NOTICE([
  168. Configuration for eSpeak complete.
  169. Source code location: ${srcdir}
  170. Compiler: ${CXX}
  171. Compiler flags: ${CXXFLAGS}
  172. wxWidgets: ${WX_VERSION}
  173. pulseaudio: ${have_pulseaudio}
  174. portaudio: ${have_portaudio}
  175. sada: ${have_sada}
  176. audio configuration: ${AUDIO}
  177. Klatt: ${have_klatt}
  178. MBROLA: ${have_mbrola}
  179. Sonic: ${have_sonic}
  180. Async: ${have_async}
  181. ])