Merge pull request #1579 in FS/freeswitch from ~ANDYWOLK/freeswitch:feature/FS-11368-use-system-libflite to master

* commit 'bcd355fea3eb80a1d3b0d2806f44cd9fe17c9494':
  FS-11368: [mod_flite] Use system libflite.
This commit is contained in:
Andrey Volk 2018-08-29 22:09:55 +00:00
commit ad893d8af3
3 changed files with 20 additions and 5 deletions

View File

@ -1427,9 +1427,23 @@ PKG_CHECK_MODULES([SOUNDTOUCH], [soundtouch >= 1.7.0],[
AM_CONDITIONAL([HAVE_SOUNDTOUCH],[true])],[
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_SOUNDTOUCH],[false])])
PKG_CHECK_MODULES([FLITE], [flite >= 2.0.0],[
PKG_CHECK_MODULES([FLITE], [flite >= 2],[
AM_CONDITIONAL([HAVE_FLITE],[true])],[
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_FLITE],[false])])
AC_CHECK_LIB([flite], [flite_init],[
AC_CHECK_HEADERS([flite/flite.h],[
AM_CONDITIONAL([HAVE_FLITE],[true])
FLITE_LIBS="-lflite -lflite_cmu_grapheme_lang -lflite_cmu_grapheme_lex -lflite_cmu_indic_lang -lflite_cmu_indic_lex -lflite_cmulex -lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal16 -lflite_cmu_us_kal -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish"
FLITE_CFLAGS=""
], [
if module_enabled mod_flite; then
AC_MSG_ERROR([You must install libflite-dev to build mod_flite])
else
AC_MSG_RESULT([no])
AM_CONDITIONAL([HAVE_FLITE],[false])
fi
])
])
])
PKG_CHECK_MODULES([MONGOC], [libmongoc-1.0 >= 1.0.8],[
AM_CONDITIONAL([HAVE_MONGOC],[true])],[

View File

@ -31,7 +31,7 @@
*/
#include <switch.h>
#include <flite.h>
#include <flite/flite.h>
cst_voice *register_cmu_us_awb(void);
void unregister_cmu_us_awb(cst_voice * v);

View File

@ -42,16 +42,17 @@
<Target Name="flite-headersTarget" BeforeTargets="CustomBuild" DependsOnTargets="7za">
<DownloadPackageTask
package="http://files.freeswitch.org/windows/packages/flite/$(fliteVersion)/flite-$(fliteVersion)-headers.zip"
expectfileordirectory="$(fliteLibDir)\include\flite.h"
expectfileordirectory="$(fliteLibDir)\flite\flite.h"
outputfolder=""
outputfilename=""
extractto="$(BaseDir)libs"
moveafter="flite-$(fliteVersion)\include|flite-$(fliteVersion)\flite"
/>
</Target>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(fliteLibDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(fliteLibDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(fliteLibDir)\binaries\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>