1
0
Fork 0
forked from len0rd/rockbox

Don't break if the program paths looked for contain spaces.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14261 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonas Häggqvist 2007-08-09 22:16:10 +00:00
parent edf54496ad
commit 2f6f52d7e4
2 changed files with 18 additions and 16 deletions

16
tools/configure vendored
View file

@ -308,7 +308,7 @@ voiceconfig () {
echo "Building voice for $archos" echo "Building voice for $archos"
echo "" echo ""
if [ `which flite` ]; then if [ "`which flite`" != "" ]; then
FLITE="F(l)ite " FLITE="F(l)ite "
FLITE_OPTS="FLITE_OPTS=\"\"" FLITE_OPTS="FLITE_OPTS=\"\""
DEFAULT_TTS="flite" DEFAULT_TTS="flite"
@ -316,7 +316,7 @@ voiceconfig () {
DEFAULT_NOISEFLOOR="500" DEFAULT_NOISEFLOOR="500"
DEFAULT_CHOICE="L" DEFAULT_CHOICE="L"
fi fi
if [ `which espeak` ]; then if [ "`which espeak`" != "" ]; then
ESPEAK="(e)Speak " ESPEAK="(e)Speak "
ESPEAK_OPTS="ESPEAK_OPTS=\"\"" ESPEAK_OPTS="ESPEAK_OPTS=\"\""
DEFAULT_TTS="espeak" DEFAULT_TTS="espeak"
@ -324,7 +324,7 @@ voiceconfig () {
DEFAULT_NOISEFLOOR="500" DEFAULT_NOISEFLOOR="500"
DEFAULT_CHOICE="e" DEFAULT_CHOICE="e"
fi fi
if [ `which festival` ]; then if [ "`which festival`" != "" ]; then
FESTIVAL="(F)estival " FESTIVAL="(F)estival "
FESTIVAL_OPTS="FESTIVAL_OPTS=\"\"" FESTIVAL_OPTS="FESTIVAL_OPTS=\"\""
DEFAULT_TTS="festival" DEFAULT_TTS="festival"
@ -333,7 +333,7 @@ voiceconfig () {
DEFAULT_CHOICE="F" DEFAULT_CHOICE="F"
fi fi
# Allow SAPI if Windows is in use # Allow SAPI if Windows is in use
if [ `which winver` ]; then if [ "`which winver`" != "" ]; then
SAPI5="(S)API5 " SAPI5="(S)API5 "
SAPI5_OPTS="SAPI5_OPTS=\"\"" SAPI5_OPTS="SAPI5_OPTS=\"\""
DEFAULT_TTS="sapi5" DEFAULT_TTS="sapi5"
@ -379,21 +379,21 @@ voiceconfig () {
echo "" echo ""
if [ `which oggenc` ]; then if [ "`which oggenc`" != "" ]; then
OGGENC="(O)ggenc " OGGENC="(O)ggenc "
DEFAULT_ENC="oggenc" DEFAULT_ENC="oggenc"
VORBIS_OPTS="VORBIS_OPTS=\"-q0 --downmix\"" VORBIS_OPTS="VORBIS_OPTS=\"-q0 --downmix\""
DEFAULT_ENC_OPTS=$VORBIS_OPTS DEFAULT_ENC_OPTS=$VORBIS_OPTS
DEFAULT_CHOICE="O" DEFAULT_CHOICE="O"
fi fi
if [ `which speexenc` ]; then if [ "`which speexenc`" != "" ]; then
SPEEXENC="(S)peexenc " SPEEXENC="(S)peexenc "
DEFAULT_ENC="speexenc" DEFAULT_ENC="speexenc"
SPEEX_OPTS="" # TODO: find appropriate options for speex SPEEX_OPTS="" # TODO: find appropriate options for speex
DEFAULT_ENC_OPTS=$SPEEX_OPTS DEFAULT_ENC_OPTS=$SPEEX_OPTS
DEFAULT_CHOICE="S" DEFAULT_CHOICE="S"
fi fi
if [ `which lame` ]; then if [ "`which lame`" != "" ]; then
LAME="(L)ame " LAME="(L)ame "
DEFAULT_ENC="lame" DEFAULT_ENC="lame"
LAME_OPTS="LAME_OPTS=\"--resample 12 -t -m m -h -V 9 -S\"" LAME_OPTS="LAME_OPTS=\"--resample 12 -t -m m -h -V 9 -S\""
@ -428,7 +428,7 @@ voiceconfig () {
# esac # esac
echo "Using $ENCODER for encoding voice clips" echo "Using $ENCODER for encoding voice clips"
TEMPDIR="${pwd}" TEMPDIR="${pwd}"
if [ `which cygpath` ]; then if [ "`which cygpath`" != "" ]; then
TEMPDIR=`cygpath . -a -w` TEMPDIR=`cygpath . -a -w`
fi fi

View file

@ -53,7 +53,9 @@ TOOLSDIR=`dirname $0`
WAVTRIM=$TOOLSDIR/wavtrim WAVTRIM=$TOOLSDIR/wavtrim
# The SAPI5 script directory # The SAPI5 script directory
SAPI5DIR=`cygpath $TOOLSDIR -a -w` if [ "`which cygpath`" != "" ]; then
SAPI5DIR=`cygpath $TOOLSDIR -a -w`
fi
##################### #####################
# Festival settings # # Festival settings #
@ -126,14 +128,14 @@ init_tts() {
case $TTS_ENGINE in case $TTS_ENGINE in
festival) festival)
# Check for festival_client # Check for festival_client
if [ ! `which $FESTIVAL_CLIENT` ]; then if [ "`which $FESTIVAL_CLIENT`" = "" ]; then
echo "Error: $FESTIVAL_CLIENT not found" echo "Error: $FESTIVAL_CLIENT not found"
exit 4 exit 4
fi fi
# Check for, and start festival server if specified # Check for, and start festival server if specified
if [ X$FESTIVAL_START = XY ]; then if [ X$FESTIVAL_START = XY ]; then
if [ ! `which $FESTIVAL_BIN` ]; then if [ "`which $FESTIVAL_BIN`" = "" ]; then
echo "Error: $FESTIVAL_BIN not found" echo "Error: $FESTIVAL_BIN not found"
exit 3 exit 3
fi fi
@ -158,14 +160,14 @@ init_tts() {
;; ;;
flite) flite)
# Check for flite # Check for flite
if [ ! `which $FLITE_BIN` ]; then if [ "`which $FLITE_BIN`" = "" ]; then
echo "Error: $FLITE_BIN not found" echo "Error: $FLITE_BIN not found"
exit 5 exit 5
fi fi
;; ;;
espeak) espeak)
# Check for espeak # Check for espeak
if [ ! `which $ESPEAK_BIN` ]; then if [ "`which $ESPEAK_BIN`" = "" ]; then
echo "Error: $ESPEAK_BIN not found" echo "Error: $ESPEAK_BIN not found"
exit 5 exit 5
fi fi
@ -206,21 +208,21 @@ init_encoder() {
case $ENCODER in case $ENCODER in
lame) lame)
# Check for lame binary # Check for lame binary
if [ ! `which $LAME_BIN` ]; then if [ "" = "`which $LAME_BIN`" ]; then
echo "Error: $LAME_BIN not found" echo "Error: $LAME_BIN not found"
exit 6 exit 6
fi fi
;; ;;
speex) speex)
# Check for speexenc binary # Check for speexenc binary
if [ ! `which $SPEEX_BIN` ]; then if [ "" = "`which $SPEEX_BIN`" ]; then
echo "Error: $SPEEX_BIN not found" echo "Error: $SPEEX_BIN not found"
exit 7 exit 7
fi fi
;; ;;
vorbis) vorbis)
# Check for vorbis encoder binary # Check for vorbis encoder binary
if [ ! `which $VORBIS_BIN` ]; then if [ "" = "`which $VORBIS_BIN`" ]; then
echo "Error: $VORBIS_BIN not found" echo "Error: $VORBIS_BIN not found"
exit 10 exit 10
fi fi