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 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. AC_PREREQ([2.63])
  2. AC_INIT([eSpeak], [1.48], [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 Extended dictionary checks.
  152. dnl ================================================================
  153. AC_ARG_WITH([extdict-ru],
  154. [AS_HELP_STRING([--with-extdict-ru], [use the extended Russian Dictionary file @<:@default=no@:>@])],
  155. [])
  156. if test "$with_extdict_ru" = "yes" ; then
  157. have_extdict_ru=yes
  158. else
  159. have_extdict_ru=no
  160. fi
  161. AC_ARG_WITH([extdict-zh],
  162. [AS_HELP_STRING([--with-extdict-zh], [use the extended Mandarin Chinese Dictionary file @<:@default=no@:>@])],
  163. [])
  164. if test "$with_extdict_zh" = "yes" ; then
  165. have_extdict_zh=yes
  166. else
  167. have_extdict_zh=no
  168. fi
  169. AC_ARG_WITH([extdict-zhy],
  170. [AS_HELP_STRING([--with-extdict-zhy], [use the extended Cantonese Chinese Dictionary file @<:@default=no@:>@])],
  171. [])
  172. if test "$with_extdict_zhy" = "yes" ; then
  173. have_extdict_zhy=yes
  174. else
  175. have_extdict_zhy=no
  176. fi
  177. AM_CONDITIONAL(HAVE_RU_EXTENDED_DICTIONARY, [test x"$have_extdict_ru" = xyes])
  178. AM_CONDITIONAL(HAVE_ZH_EXTENDED_DICTIONARY, [test x"$have_extdict_zh" = xyes])
  179. AM_CONDITIONAL(HAVE_ZHY_EXTENDED_DICTIONARY, [test x"$have_extdict_zhy" = xyes])
  180. dnl ================================================================
  181. dnl wxWidgets checks.
  182. dnl ================================================================
  183. AC_CHECK_PROG(WXCONFIG_CHECK,wx-config,yes)
  184. if test x"$WXCONFIG_CHECK" != x"yes" ; then
  185. AC_MSG_ERROR([Please install wxWidgets which is needed for espeakedit.])
  186. fi
  187. WX_LIBS=`wx-config --libs`
  188. WX_CXXFLAGS=`wx-config --cxxflags`
  189. WX_VERSION=`wx-config --version`
  190. AC_SUBST(WX_LIBS)
  191. AC_SUBST(WX_CXXFLAGS)
  192. dnl ================================================================
  193. dnl Generate output.
  194. dnl ================================================================
  195. AC_CONFIG_FILES([Makefile])
  196. AC_OUTPUT
  197. AC_MSG_NOTICE([
  198. Configuration for eSpeak complete.
  199. Source code location: ${srcdir}
  200. Compiler: ${CXX}
  201. Compiler flags: ${CXXFLAGS}
  202. wxWidgets: ${WX_VERSION}
  203. pulseaudio: ${have_pulseaudio}
  204. portaudio: ${have_portaudio}
  205. sada: ${have_sada}
  206. audio configuration: ${AUDIO}
  207. Klatt: ${have_klatt}
  208. MBROLA: ${have_mbrola}
  209. Sonic: ${have_sonic}
  210. Async: ${have_async}
  211. Extended Dictionaries:
  212. Russian: ${have_extdict_ru}
  213. Chinese (Mandarin): ${have_extdict_zh}
  214. Chinese (Cantonese): ${have_extdict_zhy}
  215. ])