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

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