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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. AC_PREREQ([2.63])
  2. AC_INIT([eSpeak], [1.46], [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. if test "$have_portaudio" = 18 -o "$have_portaudio" = 19 ; then
  79. if test "$have_pulseaudio" = yes ; then
  80. PKG_CHECK_MODULES(PULSEAUDIO_SIMPLE, [libpulse-simple >= 0.9],
  81. [
  82. have_pulseaudio=yes
  83. AUDIO=runtime
  84. ],[
  85. have_pulseaudio=no
  86. AUDIO=portaudio
  87. ])
  88. else
  89. AUDIO=portaudio
  90. fi
  91. elif test "$have_pulseaudio" = yes ; then
  92. AUDIO=pulseaudio
  93. else
  94. AUDIO=disabled
  95. fi
  96. AC_SUBST(AUDIO)
  97. AM_CONDITIONAL(AUDIO_RUNTIME, [test x"$AUDIO" = xruntime])
  98. AM_CONDITIONAL(AUDIO_PULSEAUDIO, [test x"$AUDIO" = xpulseaudio])
  99. AM_CONDITIONAL(AUDIO_PORTAUDIO, [test x"$AUDIO" = xportaudio])
  100. AM_CONDITIONAL(AUDIO_PORTAUDIO0, [test x"$AUDIO" = xportaudio0])
  101. AM_CONDITIONAL(AUDIO_PORTAUDIO2, [test x"$AUDIO" = xportaudio2])
  102. AM_CONDITIONAL(AUDIO_SADA, [test x"$AUDIO" = xsada])
  103. dnl ================================================================
  104. dnl wxWidgets checks.
  105. dnl ================================================================
  106. AC_CHECK_PROG(WXCONFIG_CHECK,wx-config,yes)
  107. if test x"$WXCONFIG_CHECK" != x"yes" ; then
  108. AC_MSG_ERROR([Please install wxWidgets which is needed for espeakedit.])
  109. fi
  110. WX_LIBS=`wx-config --libs`
  111. WX_CXXFLAGS=`wx-config --cxxflags`
  112. WX_VERSION=`wx-config --version`
  113. AC_SUBST(WX_LIBS)
  114. AC_SUBST(WX_CXXFLAGS)
  115. dnl ================================================================
  116. dnl Generate output.
  117. dnl ================================================================
  118. AC_CONFIG_FILES([Makefile src/Makefile])
  119. AC_OUTPUT
  120. AC_MSG_NOTICE([
  121. Configuration for eSpeak complete.
  122. Source code location: ${srcdir}
  123. Compiler: ${CXX}
  124. Compiler flags: ${CXXFLAGS}
  125. wxWidgets: ${WX_VERSION}
  126. pulseaudio: ${have_pulseaudio}
  127. portaudio: ${have_portaudio}
  128. audio configuration: ${AUDIO}
  129. ])