summaryrefslogtreecommitdiff
path: root/tools/configure
diff options
context:
space:
mode:
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure58
1 files changed, 37 insertions, 21 deletions
diff --git a/tools/configure b/tools/configure
index 03182cfde4..6be536e109 100755
--- a/tools/configure
+++ b/tools/configure
@@ -288,7 +288,8 @@ whichadvanced () {
288 288
289 # Ask about languages to build 289 # Ask about languages to build
290 echo "Select a number for the language to use (default is english)" 290 echo "Select a number for the language to use (default is english)"
291 echo "You may enter a comma-separated list of languages to build" 291 # The multiple-language feature is currently broken
292 # echo "You may enter a comma-separated list of languages to build"
292 293
293 picklang 294 picklang
294 voicelanguage=`whichlang` 295 voicelanguage=`whichlang`
@@ -329,7 +330,7 @@ voiceconfig () {
329 330
330 if [ -f "`which flite`" ]; then 331 if [ -f "`which flite`" ]; then
331 FLITE="F(l)ite " 332 FLITE="F(l)ite "
332 FLITE_OPTS="FLITE_OPTS=\"\"" 333 FLITE_OPTS=""
333 DEFAULT_TTS="flite" 334 DEFAULT_TTS="flite"
334 DEFAULT_TTS_OPTS=$FLITE_OPTS 335 DEFAULT_TTS_OPTS=$FLITE_OPTS
335 DEFAULT_NOISEFLOOR="500" 336 DEFAULT_NOISEFLOOR="500"
@@ -337,7 +338,7 @@ voiceconfig () {
337 fi 338 fi
338 if [ -f "`which espeak`" ]; then 339 if [ -f "`which espeak`" ]; then
339 ESPEAK="(e)Speak " 340 ESPEAK="(e)Speak "
340 ESPEAK_OPTS="ESPEAK_OPTS=\"\"" 341 ESPEAK_OPTS=""
341 DEFAULT_TTS="espeak" 342 DEFAULT_TTS="espeak"
342 DEFAULT_TTS_OPTS=$ESPEAK_OPTS 343 DEFAULT_TTS_OPTS=$ESPEAK_OPTS
343 DEFAULT_NOISEFLOOR="500" 344 DEFAULT_NOISEFLOOR="500"
@@ -345,7 +346,23 @@ voiceconfig () {
345 fi 346 fi
346 if [ -f "`which festival`" ]; then 347 if [ -f "`which festival`" ]; then
347 FESTIVAL="(F)estival " 348 FESTIVAL="(F)estival "
348 FESTIVAL_OPTS="FESTIVAL_OPTS=\"\"" 349 case "$thislang" in
350 "italiano")
351 FESTIVAL_OPTS="--language italian"
352 ;;
353 "espanol")
354 FESTIVAL_OPTS="--language spanish"
355 ;;
356 "finnish")
357 FESTIVAL_OPTS="--language finnish"
358 ;;
359 "czech")
360 FESTIVAL_OPTS="--language czech"
361 ;;
362 *)
363 FESTIVAL_OPTS=""
364 ;;
365 esac
349 DEFAULT_TTS="festival" 366 DEFAULT_TTS="festival"
350 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS 367 DEFAULT_TTS_OPTS=$FESTIVAL_OPTS
351 DEFAULT_NOISEFLOOR="500" 368 DEFAULT_NOISEFLOOR="500"
@@ -354,7 +371,7 @@ voiceconfig () {
354 # Allow SAPI if Windows is in use 371 # Allow SAPI if Windows is in use
355 if [ -f "`which winver`" ]; then 372 if [ -f "`which winver`" ]; then
356 SAPI5="(S)API5 " 373 SAPI5="(S)API5 "
357 SAPI5_OPTS="SAPI5_OPTS=\"\"" 374 SAPI5_OPTS=""
358 DEFAULT_TTS="sapi5" 375 DEFAULT_TTS="sapi5"
359 DEFAULT_TTS_OPTS=$SAPI5_OPTS 376 DEFAULT_TTS_OPTS=$SAPI5_OPTS
360 DEFAULT_NOISEFLOOR="500" 377 DEFAULT_NOISEFLOOR="500"
@@ -397,10 +414,10 @@ voiceconfig () {
397 echo "Using $TTS_ENGINE for TTS" 414 echo "Using $TTS_ENGINE for TTS"
398 415
399 # Allow the user to input manual commandline options 416 # Allow the user to input manual commandline options
400 printf "Enter $TTS_ENGINE options (enter for defaults `echo $TTS_OPTS |sed 's/.*=//'`): " 417 printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): "
401 USER_TTS_OPTS=`input` 418 USER_TTS_OPTS=`input`
402 if [ -n "$USER_TTS_OPTS" ]; then 419 if [ -n "$USER_TTS_OPTS" ]; then
403 TTS_OPTS="`echo $TTS_OPTS | sed 's/=.*//'`=\"$USER_TTS_OPTS\"" 420 TTS_OPTS="$USER_TTS_OPTS"
404 fi 421 fi
405 422
406 echo "" 423 echo ""
@@ -408,7 +425,7 @@ voiceconfig () {
408 if [ -f "`which oggenc`" ]; then 425 if [ -f "`which oggenc`" ]; then
409 OGGENC="(O)ggenc " 426 OGGENC="(O)ggenc "
410 DEFAULT_ENC="oggenc" 427 DEFAULT_ENC="oggenc"
411 VORBIS_OPTS="VORBIS_OPTS=\"-q0 --downmix\"" 428 VORBIS_OPTS="-q0 --downmix"
412 DEFAULT_ENC_OPTS=$VORBIS_OPTS 429 DEFAULT_ENC_OPTS=$VORBIS_OPTS
413 DEFAULT_CHOICE="O" 430 DEFAULT_CHOICE="O"
414 fi 431 fi
@@ -422,7 +439,7 @@ voiceconfig () {
422 if [ -f "`which lame`" ]; then 439 if [ -f "`which lame`" ]; then
423 LAME="(L)ame " 440 LAME="(L)ame "
424 DEFAULT_ENC="lame" 441 DEFAULT_ENC="lame"
425 LAME_OPTS="LAME_OPTS=\"--resample 12 -t -m m -h -V 9 -S\"" 442 LAME_OPTS="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
426 DEFAULT_ENC_OPTS=$LAME_OPTS 443 DEFAULT_ENC_OPTS=$LAME_OPTS
427 DEFAULT_CHOICE="L" 444 DEFAULT_CHOICE="L"
428 fi 445 fi
@@ -456,25 +473,16 @@ voiceconfig () {
456 echo "Using $ENCODER for encoding voice clips" 473 echo "Using $ENCODER for encoding voice clips"
457 474
458 # Allow the user to input manual commandline options 475 # Allow the user to input manual commandline options
459 printf "Enter $ENCODER options (enter for defaults `echo $ENC_OPTS |sed 's/.*=//'`): " 476 printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): "
460 USER_ENC_OPTS=`input` 477 USER_ENC_OPTS=`input`
461 if [ -n "$USER_ENC_OPTS" ]; then 478 if [ -n "$USER_ENC_OPTS" ]; then
462 ENC_OPTS="`echo $ENC_OPTS | sed 's/=.*//'`=\"$USER_ENC_OPTS\"" 479 ENC_OPTS=$USER_ENC_OPTS
463 fi 480 fi
464 481
465 TEMPDIR="${pwd}" 482 TEMPDIR="${pwd}"
466 if [ -f "`which cygpath`" ]; then 483 if [ -f "`which cygpath`" ]; then
467 TEMPDIR=`cygpath . -a -w` 484 TEMPDIR=`cygpath . -a -w`
468 fi 485 fi
469
470 cat > voicesettings-$thislang.sh <<EOF
471TTS_ENGINE="${TTS_ENGINE}"
472ENCODER="${ENCODER}"
473TEMPDIR="$TEMPDIR"
474NOISEFLOOR="${NOISEFLOOR}"
475${TTS_OPTS}
476${ENC_OPTS}
477EOF
478} 486}
479 487
480picklang() { 488picklang() {
@@ -1664,6 +1672,10 @@ sed > Makefile \
1664 -e "${simmagic1}" \ 1672 -e "${simmagic1}" \
1665 -e "${simmagic2}" \ 1673 -e "${simmagic2}" \
1666 -e "s,@MANUALDEV@,${manualdev},g" \ 1674 -e "s,@MANUALDEV@,${manualdev},g" \
1675 -e "s,@ENCODER@,${ENCODER},g" \
1676 -e "s,@ENC_OPTS@,${ENC_OPTS},g" \
1677 -e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
1678 -e "s,@TTS_OPTS@,${TTS_OPTS},g" \
1667<<EOF 1679<<EOF
1668## Automaticly generated. http://www.rockbox.org/ 1680## Automaticly generated. http://www.rockbox.org/
1669 1681
@@ -1732,6 +1744,10 @@ export GCCVER=@GCCVER@
1732export GCCNUM=@GCCNUM@ 1744export GCCNUM=@GCCNUM@
1733export UNAME=@UNAME@ 1745export UNAME=@UNAME@
1734export MANUALDEV=@MANUALDEV@ 1746export MANUALDEV=@MANUALDEV@
1747export TTS_OPTS=@TTS_OPTS@
1748export TTS_ENGINE=@TTS_ENGINE@
1749export ENC_OPTS=@ENC_OPTS@
1750export ENCODER=@ENCODER@
1735 1751
1736# Do not print "Entering directory ..." 1752# Do not print "Entering directory ..."
1737MAKEFLAGS += --no-print-directory 1753MAKEFLAGS += --no-print-directory
@@ -1866,7 +1882,7 @@ if [ "yes" = "$voice" ]; then
1866 1882
1867voice: tools features 1883voice: tools features
1868 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\ 1884 \$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
1869 for lang in \`echo \$(VOICELANGUAGE) |sed "s/,/ /g"\`; do \$(TOOLSDIR)/genvoice.sh \$(ROOTDIR) \$\$lang \$(ARCHOS)\$\$feat \$(TARGET_ID) voicesettings-\$\$lang.sh ; done \\ 1885 for lang in \`echo \$(VOICELANGUAGE) |sed "s/,/ /g"\`; do \$(TOOLSDIR)/voice.pl -V -l=\$\$lang -t=\$(ARCHOS)\$\$feat -i=\$(TARGET_ID) -e=\$(ENCODER) -E="\$(ENC_OPTS)" -s=\$(TTS_ENGINE) -S="\$(TTS_OPTS)"; done \\
1870EOF 1886EOF
1871 1887
1872fi 1888fi