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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. 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. AC_CHECK_LIB([portaudio], [Pa_IsStreamActive],
  50. [
  51. have_portaudio=19
  52. ],[
  53. AC_CHECK_LIB([portaudio], [Pa_StreamActive],
  54. [
  55. have_portaudio=18
  56. ],[
  57. have_portaudio=no
  58. ])
  59. ])
  60. ],[
  61. have_portaudio=no
  62. ])
  63. fi
  64. dnl ================================================================
  65. dnl Audio checks.
  66. dnl ================================================================
  67. if test "$have_portaudio" = 18 -o "$have_portaudio" = 19 ; then
  68. if test "$have_pulseaudio" = yes ; then
  69. PKG_CHECK_MODULES(PULSEAUDIO_SIMPLE, [libpulse-simple >= 0.9],
  70. [
  71. have_pulseaudio=yes
  72. AUDIO=runtime
  73. ],[
  74. have_pulseaudio=no
  75. AUDIO=portaudio
  76. ])
  77. else
  78. AUDIO=portaudio
  79. fi
  80. elif test "$have_pulseaudio" = yes ; then
  81. AUDIO=pulseaudio
  82. else
  83. AUDIO=disabled
  84. fi
  85. AC_SUBST(AUDIO)
  86. AM_CONDITIONAL(AUDIO_RUNTIME, [test x"$AUDIO" = xruntime])
  87. AM_CONDITIONAL(AUDIO_PULSEAUDIO, [test x"$AUDIO" = xpulseaudio])
  88. AM_CONDITIONAL(AUDIO_PORTAUDIO, [test x"$AUDIO" = xportaudio])
  89. AM_CONDITIONAL(AUDIO_PORTAUDIO0, [test x"$AUDIO" = xportaudio0])
  90. AM_CONDITIONAL(AUDIO_PORTAUDIO2, [test x"$AUDIO" = xportaudio2])
  91. AM_CONDITIONAL(AUDIO_SADA, [test x"$AUDIO" = xsada])
  92. dnl ================================================================
  93. dnl wxWidgets checks.
  94. dnl ================================================================
  95. AC_CHECK_PROG(WXCONFIG_CHECK,wx-config,yes)
  96. if test x"$WXCONFIG_CHECK" != x"yes" ; then
  97. AC_MSG_ERROR([Please install wxWidgets which is needed for espeakedit.])
  98. fi
  99. WX_LIBS=`wx-config --libs`
  100. WX_CXXFLAGS=`wx-config --cxxflags`
  101. WX_VERSION=`wx-config --version`
  102. AC_SUBST(WX_LIBS)
  103. AC_SUBST(WX_CXXFLAGS)
  104. dnl ================================================================
  105. dnl Generate output.
  106. dnl ================================================================
  107. AC_CONFIG_FILES([Makefile src/Makefile])
  108. AC_OUTPUT
  109. AC_MSG_NOTICE([
  110. Configuration for eSpeak complete.
  111. Source code location: ${srcdir}
  112. Compiler: ${CXX}
  113. Compiler flags: ${CXXFLAGS}
  114. wxWidgets: ${WX_VERSION}
  115. pulseaudio: ${have_pulseaudio}
  116. portaudio: ${have_portaudio}
  117. audio configuration: ${AUDIO}
  118. ])