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.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  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_CC
  13. AC_PROG_CXX
  14. AC_PROG_MAKE_SET
  15. AC_PROG_LIBTOOL
  16. dnl ================================================================
  17. dnl getopt checks.
  18. dnl ================================================================
  19. AC_CHECK_HEADERS([getopt.h])
  20. AC_CHECK_FUNCS([getopt_long])
  21. dnl ================================================================
  22. dnl PulseAudio checks.
  23. dnl ================================================================
  24. AC_ARG_WITH([pulseaudio],
  25. [AS_HELP_STRING([--with-pulseaudio], [use the pulseaudio library for audio output @<:@default=yes@:>@])],
  26. [])
  27. if test "$with_pulseaudio" = "no"; then
  28. echo "Disabling pulseaudio output support via pulseaudio"
  29. have_pulseaudio=no
  30. else
  31. PKG_CHECK_MODULES(PULSEAUDIO, [libpulse >= 0.9],
  32. [
  33. have_pulseaudio=yes
  34. ],[
  35. have_pulseaudio=no
  36. ])
  37. fi
  38. dnl ================================================================
  39. dnl PortAudio checks.
  40. dnl ================================================================
  41. AC_ARG_WITH([portaudio],
  42. [AS_HELP_STRING([--with-portaudio], [use the portaudio library for audio output @<:@default=yes@:>@])],
  43. [])
  44. if test "$with_portaudio" = "no"; then
  45. echo "Disabling portaudio output support via portaudio"
  46. have_portaudio=no
  47. else
  48. AC_CHECK_HEADERS([portaudio.h],
  49. [
  50. # Check the portaudio library.
  51. AC_CHECK_LIB([portaudio], [Pa_IsStreamActive]) # portaudio 19
  52. AC_CHECK_LIB([portaudio], [Pa_StreamActive]) # portaudio 18
  53. # Then use the headers to determine the portaudio version.
  54. # This is because on some systems with both libportaudio0 and
  55. # libportaudio2 installed, portaudio.h and -lportaudio refer
  56. # to different versions.
  57. AC_CHECK_FUNC([Pa_IsStreamActive],
  58. [
  59. have_portaudio=19
  60. ],[
  61. AC_CHECK_FUNC([Pa_StreamActive],
  62. [
  63. have_portaudio=18
  64. ],[
  65. have_portaudio=no
  66. ])
  67. ])
  68. ],[
  69. have_portaudio=no
  70. ])
  71. fi
  72. dnl ================================================================
  73. dnl Audio checks.
  74. dnl ================================================================
  75. AC_ARG_WITH([sada],
  76. [AS_HELP_STRING([--with-sada], [use the Solaris SADA audio API @<:@default=no@:>@])],
  77. [])
  78. if test "$with_sada" = "yes" ; then
  79. have_sada=yes
  80. else
  81. have_sada=no
  82. fi
  83. if test "$have_portaudio" = 18 -o "$have_portaudio" = 19 ; then
  84. if test "$have_pulseaudio" = yes ; then
  85. PKG_CHECK_MODULES(PULSEAUDIO_SIMPLE, [libpulse-simple >= 0.9],
  86. [
  87. have_pulseaudio=yes
  88. AUDIO=runtime
  89. ],[
  90. have_pulseaudio=no
  91. AUDIO=portaudio
  92. ])
  93. else
  94. AUDIO=portaudio
  95. fi
  96. elif test "$have_pulseaudio" = yes ; then
  97. AUDIO=pulseaudio
  98. elif test "$have_sada" = yes ; then
  99. AUDIO=sada
  100. else
  101. AUDIO=disabled
  102. fi
  103. AC_SUBST(AUDIO)
  104. AM_CONDITIONAL(AUDIO_RUNTIME, [test x"$AUDIO" = xruntime])
  105. AM_CONDITIONAL(AUDIO_PULSEAUDIO, [test x"$AUDIO" = xpulseaudio])
  106. AM_CONDITIONAL(AUDIO_PORTAUDIO, [test x"$AUDIO" = xportaudio])
  107. AM_CONDITIONAL(AUDIO_SADA, [test x"$AUDIO" = xsada])
  108. dnl ================================================================
  109. dnl Optional compilation checks.
  110. dnl ================================================================
  111. AC_ARG_WITH([klatt],
  112. [AS_HELP_STRING([--with-klatt], [enable the Klatt formant synthesizer @<:@default=yes@:>@])],
  113. [])
  114. if test "$with_klatt" = "no" ; then
  115. have_klatt=no
  116. else
  117. have_klatt=yes
  118. fi
  119. AC_ARG_WITH([mbrola],
  120. [AS_HELP_STRING([--with-mbrola], [enable the MBROLA speech synthesizer @<:@default=yes@:>@])],
  121. [])
  122. if test "$with_mbrola" = "no" ; then
  123. have_mbrola=no
  124. else
  125. have_mbrola=yes
  126. fi
  127. AC_ARG_WITH([sonic],
  128. [AS_HELP_STRING([--with-sonic], [enable the sonic library to speed up the audio @<:@default=yes@:>@])],
  129. [])
  130. if test "$with_sonic" = "no" ; then
  131. have_sonic=no
  132. else
  133. have_sonic=yes
  134. fi
  135. AC_ARG_WITH([async],
  136. [AS_HELP_STRING([--with-async], [enable support for async command processing @<:@default=yes@:>@])],
  137. [])
  138. if test "$with_async" = "no" ; then
  139. have_async=no
  140. else
  141. have_async=yes
  142. fi
  143. AM_CONDITIONAL(OPT_KLATT, [test x"$have_klatt" = xyes])
  144. AM_CONDITIONAL(OPT_MBROLA, [test x"$have_mbrola" = xyes])
  145. AM_CONDITIONAL(OPT_SONIC, [test x"$have_sonic" = xyes])
  146. AM_CONDITIONAL(OPT_ASYNC, [test x"$have_async" = xyes])
  147. dnl ================================================================
  148. dnl Extended dictionary checks.
  149. dnl ================================================================
  150. AC_ARG_WITH([extdict-ru],
  151. [AS_HELP_STRING([--with-extdict-ru], [use the extended Russian Dictionary file @<:@default=no@:>@])],
  152. [])
  153. if test "$with_extdict_ru" = "yes" ; then
  154. have_extdict_ru=yes
  155. else
  156. have_extdict_ru=no
  157. fi
  158. AC_ARG_WITH([extdict-zh],
  159. [AS_HELP_STRING([--with-extdict-zh], [use the extended Mandarin Chinese Dictionary file @<:@default=no@:>@])],
  160. [])
  161. if test "$with_extdict_zh" = "yes" ; then
  162. have_extdict_zh=yes
  163. else
  164. have_extdict_zh=no
  165. fi
  166. AC_ARG_WITH([extdict-zhy],
  167. [AS_HELP_STRING([--with-extdict-zhy], [use the extended Cantonese Chinese Dictionary file @<:@default=no@:>@])],
  168. [])
  169. if test "$with_extdict_zhy" = "yes" ; then
  170. have_extdict_zhy=yes
  171. else
  172. have_extdict_zhy=no
  173. fi
  174. AM_CONDITIONAL(HAVE_RU_EXTENDED_DICTIONARY, [test x"$have_extdict_ru" = xyes])
  175. AM_CONDITIONAL(HAVE_ZH_EXTENDED_DICTIONARY, [test x"$have_extdict_zh" = xyes])
  176. AM_CONDITIONAL(HAVE_ZHY_EXTENDED_DICTIONARY, [test x"$have_extdict_zhy" = xyes])
  177. dnl ================================================================
  178. dnl wxWidgets checks.
  179. dnl ================================================================
  180. AC_ARG_WITH([wx-config],
  181. [AS_HELP_STRING([--with-wx-config], [specify the location of wx-config @<:@default=wx-config@:>@])],
  182. [WX_CONFIG=$with_wx_config],
  183. [WX_CONFIG=wx-config])
  184. if test ! -e "${WX_CONFIG}" ; then
  185. AC_CHECK_PROG(WXCONFIG_CHECK,${WX_CONFIG},yes)
  186. if test x"$WXCONFIG_CHECK" != x"yes" ; then
  187. AC_MSG_ERROR([Cannot find wxWidgets which is needed for espeakedit to build the voices.])
  188. fi
  189. fi
  190. WX_LIBS=`${WX_CONFIG} --libs`
  191. WX_CXXFLAGS=`${WX_CONFIG} --cxxflags`
  192. WX_VERSION=`${WX_CONFIG} --version`
  193. AC_SUBST(WX_LIBS)
  194. AC_SUBST(WX_CXXFLAGS)
  195. dnl ================================================================
  196. dnl Generate output.
  197. dnl ================================================================
  198. AC_CONFIG_FILES([Makefile])
  199. AC_OUTPUT
  200. AC_MSG_NOTICE([
  201. Configuration for eSpeak complete.
  202. Source code location: ${srcdir}
  203. Compiler: ${CXX}
  204. Compiler flags: ${CXXFLAGS}
  205. wxWidgets: ${WX_VERSION} (${WX_CONFIG})
  206. pulseaudio: ${have_pulseaudio}
  207. portaudio: ${have_portaudio}
  208. sada: ${have_sada}
  209. audio configuration: ${AUDIO}
  210. Klatt: ${have_klatt}
  211. MBROLA: ${have_mbrola}
  212. Sonic: ${have_sonic}
  213. Async: ${have_async}
  214. Extended Dictionaries:
  215. Russian: ${have_extdict_ru}
  216. Chinese (Mandarin): ${have_extdict_zh}
  217. Chinese (Cantonese): ${have_extdict_zhy}
  218. ])