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

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