#! /bin/sh
need_prefix=no
if test -z "$srcdir"; then
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
test "$srcdir" = "$0" && srcdir=.
test "${VERBOSE+set}" != "set" && VERBOSE=yes
fi
. $srcdir/defs || exit 1
status=0
scripts="$srcdir/../ltmain.sh"
if egrep -n -e "if[ ]+[\"']?\\$.*(=|-[lg][te]|-eq|-ne)" $scripts; then
echo "use \`if test \$something =' instead of \`if \$something ='"
status=1
fi
if egrep -n -e 'if[ ]+-' $scripts; then
echo "use \`if test -X' instead of \`if -X'"
status=1
fi
if egrep -n -e 'if[ ]+\[' $scripts; then
echo "use \`if test' instead of \`if ['"
status=1
fi
if egrep -n -e 'test[ ]+X' $scripts; then
echo "use \`test \"X...\"' instead of \`test X'"
status=1
fi
if egrep -n -e 'test[ ]+-e' $scripts; then
echo "use \`test -f' instead of \`test -e'"
status=1
fi
if egrep -n -e '[^ ]=[^ ].*(break|continue)' $scripts; then
echo "assignments on the same line as a \`break' or \`continue' may have no effect"
status=1
fi
if egrep -n -e '\$Xsed' $scripts | egrep -v -n -e '\$echo \\*"X'; then
echo "occurrences of \`\$Xsed\' without \`echo \"X\' on the same line"
status=1
fi
if egrep -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | \
egrep -v "### testsuite: skip nested quoting test$"; then
echo "nested quotes are dangerous"
status=1
fi
exit $status