aboutsummaryrefslogtreecommitdiff
path: root/flite/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'flite/configure.ac')
-rw-r--r--flite/configure.ac57
1 files changed, 36 insertions, 21 deletions
diff --git a/flite/configure.ac b/flite/configure.ac
index 3116e62..97fd4a8 100644
--- a/flite/configure.ac
+++ b/flite/configure.ac
@@ -4,8 +4,8 @@ AC_PREREQ(2.5)
dnl Some handy macros
define([THE_PACKAGE_NAME], [pdflite])
-define([THE_PACKAGE_VERSION], [0.02-2])
-define([THE_PACKAGE_AUTHOR], [moocow@ling.uni-potsdam.de])
+define([THE_PACKAGE_VERSION], [0.02-3])
+define([THE_PACKAGE_AUTHOR], [moocow.bovine@gmail.com])
AC_INIT(THE_PACKAGE_NAME, THE_PACKAGE_VERSION, THE_PACKAGE_AUTHOR)
@@ -88,34 +88,49 @@ if test "$pdflite_have_lib" != "yes"; then
fi
fi
-##-- flite: libs: base
-FLITE_LIBS="-lflite -lm"
-AC_SUBST(FLITE_LIBS)
+##-- flite: libs
+LIBS="$LIBS -lflite -lm"
+AC_SUBST(LIBS)
##-- Check for flite : libs : flite_cmulex
AC_CHECK_LIB(flite_cmulex,[cmu_lex_init],[],
[AC_MSG_ERROR([required library 'flite_cmulex' not found -- quitting],1)],
- [-lflite -lm])
-FLITE_LEXLIBS="-lflite_cmulex"
-AC_SUBST(FLITE_LEXLIBS)
+ [])
+LIBS="$LIBS -lflite_cmulex"
##-- Check for flite : libs : flite_usenglish
AC_CHECK_LIB(flite_usenglish,[usenglish_init],[],
[AC_MSG_ERROR([required library 'flite_usenglish' not found -- quitting],1)],
[-lflite_cmulex -lflite -lm])
-FLITE_LANGLIBS="-lflite_usenglish"
-AC_SUBST(FLITE_LANGLIBS)
-
-##-- Check for flite : libs : flite_cmu_us_kal16
-AC_CHECK_LIB(flite_cmu_us_kal16,[register_cmu_us_kal],[],
- [AC_MSG_ERROR([required library 'flite_cmu_us_kal16' not found -- quitting],1)],
- [-lflite_usenglish -lflite_cmulex -lflite -lm])
-FLITE_VOICELIBS="-lflite_cmu_us_kal16"
-AC_SUBST(FLITE_VOICELIBS)
-
-##-- register voice function
-AC_DEFINE([PDFLITE_REGISTER_VOICE],[register_cmu_us_kal],
- [This is the function we will call to register the synth voice])
+LIBS="$LIBS -lflite_usenglish"
+
+##-- Check for flite : libs : kal16, kal, awb, rms, slt
+VOICELIBS=""
+define([check_flite_voice],
+ [
+ if test -z "$VOICELIBS" ; then
+ AC_CHECK_LIB([flite_cmu_us_[$1]],[register_cmu_us_[$1]],
+ [
+ AC_DEFINE([PDFLITE_REGISTER_VOICE],
+ [register_cmu_us_[$1]],
+ [This is the function we will call to register the synth voice])
+ VOICELIBS="$[]VOICELIBS -lflite_cmu_us_[$1]"
+ ],
+ [AC_MSG_WARN([could not find flite voice library '[$1]'])]
+ [])
+ fi
+ ])
+
+check_flite_voice(kal16)
+check_flite_voice(kal)
+check_flite_voice(awb)
+check_flite_voice(rms)
+check_flite_voice(slt)
+
+if test -z "$VOICELIBS" ; then
+ AC_MSG_ERROR([could not find any flite voice libraries!],1)
+fi
+LIBS="$LIBS $VOICELIBS"
## /local: flite
##^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^