handle slowlaris idiotic /usr/xpg4/bin/tr(1)
This commit is contained in:
13
Build.sh
13
Build.sh
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $MirOS: src/bin/mksh/Build.sh,v 1.275 2007/10/25 15:23:08 tg Exp $
|
||||
# $MirOS: src/bin/mksh/Build.sh,v 1.276 2008/02/29 11:48:31 tg Exp $
|
||||
#-
|
||||
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
|
||||
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
|
||||
@ -18,6 +18,8 @@ if test -d /usr/xpg4/bin/. >/dev/null 2>&1; then
|
||||
PATH=/usr/xpg4/bin:$PATH
|
||||
export PATH
|
||||
fi
|
||||
tr=/usr/ucb/tr # Solaris: /usr/xpg4/bin/tr fails the rot13 tr command
|
||||
test -f $tr || tr=tr
|
||||
|
||||
if test -n "${ZSH_VERSION+x}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
@ -45,7 +47,7 @@ if test -t 1; then
|
||||
fi
|
||||
|
||||
upper() {
|
||||
echo :"$@" | sed 's/^://' | tr $alll $allu
|
||||
echo :"$@" | sed 's/^://' | $tr $alll $allu
|
||||
}
|
||||
|
||||
# clean up after ac_testrun()
|
||||
@ -174,7 +176,7 @@ ac_header() {
|
||||
na=0
|
||||
fi
|
||||
hf=$1; shift
|
||||
hv=`echo "$hf" | tr -d '\012\015' | tr -c $alll$allu$alln $alls`
|
||||
hv=`echo "$hf" | $tr -d '\012\015' | $tr -c $alll$allu$alln $alls`
|
||||
for i
|
||||
do
|
||||
echo "#include <$i>" >>x
|
||||
@ -382,7 +384,7 @@ cat >scn.c <<-'EOF'
|
||||
#endif
|
||||
EOF
|
||||
ct=unknown
|
||||
eval 'v "$CPP scn.c | grep ct= | tr -d \\\\015 >x" 2>&'$h | sed 's/^/] /'
|
||||
eval 'v "$CPP scn.c | grep ct= | $tr -d \\\\015 >x" 2>&'$h | sed 's/^/] /'
|
||||
test 1 = $h && sed 's/^/[ /' x
|
||||
eval `cat x`
|
||||
rm -f x
|
||||
@ -483,7 +485,7 @@ NOWARN=$save_NOWARN
|
||||
#
|
||||
# Compiler: extra flags (-O2 -f* -W* etc.)
|
||||
#
|
||||
i=`echo :"$orig_CFLAGS" | sed 's/^://' | tr -c -d $alll$allu$alln`
|
||||
i=`echo :"$orig_CFLAGS" | sed 's/^://' | $tr -c -d $alll$allu$alln`
|
||||
# optimisation: only if orig_CFLAGS is empty
|
||||
test x"$i" = x"" && if test $ct = sunpro; then
|
||||
cat >x <<-'EOF'
|
||||
@ -991,6 +993,7 @@ case $curdir in
|
||||
*\ *) echo "#!./mksh" >test.sh ;;
|
||||
*) echo "#!$curdir/mksh" >test.sh ;;
|
||||
esac
|
||||
echo "export tr=$tr" >>test.sh
|
||||
echo "export PATH='$PATH'" >>test.sh
|
||||
echo "exec perl '$srcdir/check.pl' -s '$srcdir/check.t'" \
|
||||
"-p '$curdir/mksh' -C $check_categories \$*$tsts" >>test.sh
|
||||
|
Reference in New Issue
Block a user