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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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 wxWidgets checks.
  113. dnl ================================================================
  114. AC_CHECK_PROG(WXCONFIG_CHECK,wx-config,yes)
  115. if test x"$WXCONFIG_CHECK" != x"yes" ; then
  116. AC_MSG_ERROR([Please install wxWidgets which is needed for espeakedit.])
  117. fi
  118. WX_LIBS=`wx-config --libs`
  119. WX_CXXFLAGS=`wx-config --cxxflags`
  120. WX_VERSION=`wx-config --version`
  121. AC_SUBST(WX_LIBS)
  122. AC_SUBST(WX_CXXFLAGS)
  123. dnl ================================================================
  124. dnl Generate output.
  125. dnl ================================================================
  126. AC_CONFIG_FILES([Makefile])
  127. AC_OUTPUT
  128. AC_MSG_NOTICE([
  129. Configuration for eSpeak complete.
  130. Source code location: ${srcdir}
  131. Compiler: ${CXX}
  132. Compiler flags: ${CXXFLAGS}
  133. wxWidgets: ${WX_VERSION}
  134. pulseaudio: ${have_pulseaudio}
  135. portaudio: ${have_portaudio}
  136. sada: ${have_sada}
  137. audio configuration: ${AUDIO}
  138. ])