libtool/tests/sh.test

94 lines
3.1 KiB
Plaintext
Raw Normal View History

1998-03-06 00:22:50 +08:00
#! /bin/sh
1998-12-19 06:23:51 +08:00
# sh.test - check that we haven't forgotten a `test' command
1998-03-06 00:22:50 +08:00
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
2003-10-15 05:46:13 +08:00
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, a copy can be downloaded from
# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
1998-03-06 00:22:50 +08:00
if test -z "$srcdir"; then
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
test "$srcdir" = "$0" && srcdir=.
fi
. $srcdir/defs || exit 1
# Check all the "portable" shell scripts.
2003-10-15 05:46:13 +08:00
status=$EXIT_SUCCESS
1998-03-06 00:22:50 +08:00
# Check for bad binary operators.
if $EGREP -n -e 'if[ ]+["'\'']?\\$[^ ]+[ ]+(=|-[lg][te]|-eq|-ne)' $scripts; then
1998-03-06 00:22:50 +08:00
echo "use \`if test \$something =' instead of \`if \$something ='"
2003-10-15 05:46:13 +08:00
status=$EXIT_FAILURE
1998-03-06 00:22:50 +08:00
fi
# Check for bad unary operators.
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no longer requires them; you're supposed to use grep -E and grep -F instead. Also, don't assume that "test -a" works, since POSIX doesn't require it. * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE, AC_LIBTOOL_PROG_LD_SHLIBS): egrep -> grep, when that makes no difference. * libtoolize.in: Likewise. * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise. * ltmain.in: Likewise. * demo/Makefile.am (hc-direct): Likewise. * pdemo/Makefile.am (hc-direct): Likewise. * tests/build-relink.test, tests/build-relink2.test, tests/cdemo-conf.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-nofast.test, tests/demo-shared.test, tests/demo-static.test, tests/depdemo-conf.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/hardcode.test, tests/mdemo-conf.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/pdemo-conf.test, tests/tagdemo-conf.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Likewise. * libtool.m4 (AC_PROG_EGREP): New macro, defined if Autoconf doesn't define. (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it. (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Use shell pattern matching rather than egrep. (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP. * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep. * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise. * tests/defs (EGREP, FGREP): New vars. * ltmain.in: egrep -> $EGREP * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test: Likewise. * tests/hardcode.test: fgrep -> $FGREP * tests/f77demo-exec.test: test -a -> test &&
2002-11-19 17:42:39 +08:00
if $EGREP -n -e 'if[ ]+-' $scripts; then
1998-03-06 00:22:50 +08:00
echo "use \`if test -X' instead of \`if -X'"
2003-10-15 05:46:13 +08:00
status=$EXIT_FAILURE
1998-03-06 00:22:50 +08:00
fi
# Check for using `[' instead of `test'.
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no longer requires them; you're supposed to use grep -E and grep -F instead. Also, don't assume that "test -a" works, since POSIX doesn't require it. * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE, AC_LIBTOOL_PROG_LD_SHLIBS): egrep -> grep, when that makes no difference. * libtoolize.in: Likewise. * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise. * ltmain.in: Likewise. * demo/Makefile.am (hc-direct): Likewise. * pdemo/Makefile.am (hc-direct): Likewise. * tests/build-relink.test, tests/build-relink2.test, tests/cdemo-conf.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-nofast.test, tests/demo-shared.test, tests/demo-static.test, tests/depdemo-conf.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/hardcode.test, tests/mdemo-conf.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/pdemo-conf.test, tests/tagdemo-conf.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Likewise. * libtool.m4 (AC_PROG_EGREP): New macro, defined if Autoconf doesn't define. (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it. (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Use shell pattern matching rather than egrep. (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP. * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep. * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise. * tests/defs (EGREP, FGREP): New vars. * ltmain.in: egrep -> $EGREP * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test: Likewise. * tests/hardcode.test: fgrep -> $FGREP * tests/f77demo-exec.test: test -a -> test &&
2002-11-19 17:42:39 +08:00
if $EGREP -n -e 'if[ ]+\[' $scripts; then
1998-03-06 00:22:50 +08:00
echo "use \`if test' instead of \`if ['"
2003-10-15 05:46:13 +08:00
status=$EXIT_FAILURE
1998-03-06 00:22:50 +08:00
fi
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no longer requires them; you're supposed to use grep -E and grep -F instead. Also, don't assume that "test -a" works, since POSIX doesn't require it. * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE, AC_LIBTOOL_PROG_LD_SHLIBS): egrep -> grep, when that makes no difference. * libtoolize.in: Likewise. * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise. * ltmain.in: Likewise. * demo/Makefile.am (hc-direct): Likewise. * pdemo/Makefile.am (hc-direct): Likewise. * tests/build-relink.test, tests/build-relink2.test, tests/cdemo-conf.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-nofast.test, tests/demo-shared.test, tests/demo-static.test, tests/depdemo-conf.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/hardcode.test, tests/mdemo-conf.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/pdemo-conf.test, tests/tagdemo-conf.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Likewise. * libtool.m4 (AC_PROG_EGREP): New macro, defined if Autoconf doesn't define. (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it. (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Use shell pattern matching rather than egrep. (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP. * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep. * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise. * tests/defs (EGREP, FGREP): New vars. * ltmain.in: egrep -> $EGREP * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test: Likewise. * tests/hardcode.test: fgrep -> $FGREP * tests/f77demo-exec.test: test -a -> test &&
2002-11-19 17:42:39 +08:00
if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?"?[.,_x]' $scripts; then
echo "use \`test \"X...\"' instead of \`test \"x...\"'"
2003-10-15 05:46:13 +08:00
status=$EXIT_FAILURE
fi
1998-03-06 00:22:50 +08:00
# Check for using test X... instead of test "X...
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no longer requires them; you're supposed to use grep -E and grep -F instead. Also, don't assume that "test -a" works, since POSIX doesn't require it. * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE, AC_LIBTOOL_PROG_LD_SHLIBS): egrep -> grep, when that makes no difference. * libtoolize.in: Likewise. * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise. * ltmain.in: Likewise. * demo/Makefile.am (hc-direct): Likewise. * pdemo/Makefile.am (hc-direct): Likewise. * tests/build-relink.test, tests/build-relink2.test, tests/cdemo-conf.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-nofast.test, tests/demo-shared.test, tests/demo-static.test, tests/depdemo-conf.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/hardcode.test, tests/mdemo-conf.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/pdemo-conf.test, tests/tagdemo-conf.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Likewise. * libtool.m4 (AC_PROG_EGREP): New macro, defined if Autoconf doesn't define. (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it. (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Use shell pattern matching rather than egrep. (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP. * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep. * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise. * tests/defs (EGREP, FGREP): New vars. * ltmain.in: egrep -> $EGREP * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test: Likewise. * tests/hardcode.test: fgrep -> $FGREP * tests/f77demo-exec.test: test -a -> test &&
2002-11-19 17:42:39 +08:00
if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X' $scripts; then
echo "use \`test \"X...\"' instead of \`test X'"
2003-10-15 05:46:13 +08:00
status=$EXIT_FAILURE
1998-03-06 00:22:50 +08:00
fi
# Check for using test $... instead of test "$...
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no longer requires them; you're supposed to use grep -E and grep -F instead. Also, don't assume that "test -a" works, since POSIX doesn't require it. * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE, AC_LIBTOOL_PROG_LD_SHLIBS): egrep -> grep, when that makes no difference. * libtoolize.in: Likewise. * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise. * ltmain.in: Likewise. * demo/Makefile.am (hc-direct): Likewise. * pdemo/Makefile.am (hc-direct): Likewise. * tests/build-relink.test, tests/build-relink2.test, tests/cdemo-conf.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-nofast.test, tests/demo-shared.test, tests/demo-static.test, tests/depdemo-conf.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/hardcode.test, tests/mdemo-conf.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/pdemo-conf.test, tests/tagdemo-conf.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Likewise. * libtool.m4 (AC_PROG_EGREP): New macro, defined if Autoconf doesn't define. (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it. (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Use shell pattern matching rather than egrep. (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP. * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep. * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise. * tests/defs (EGREP, FGREP): New vars. * ltmain.in: egrep -> $EGREP * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test: Likewise. * tests/hardcode.test: fgrep -> $FGREP * tests/f77demo-exec.test: test -a -> test &&
2002-11-19 17:42:39 +08:00
if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X?\$' $scripts; then
echo "use \`test \"\$...\"' instead of \`test \$'"
2003-10-15 05:46:13 +08:00
status=$EXIT_FAILURE
fi
1998-03-06 00:22:50 +08:00
# Never use test -e.
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no longer requires them; you're supposed to use grep -E and grep -F instead. Also, don't assume that "test -a" works, since POSIX doesn't require it. * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE, AC_LIBTOOL_PROG_LD_SHLIBS): egrep -> grep, when that makes no difference. * libtoolize.in: Likewise. * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise. * ltmain.in: Likewise. * demo/Makefile.am (hc-direct): Likewise. * pdemo/Makefile.am (hc-direct): Likewise. * tests/build-relink.test, tests/build-relink2.test, tests/cdemo-conf.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-nofast.test, tests/demo-shared.test, tests/demo-static.test, tests/depdemo-conf.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/hardcode.test, tests/mdemo-conf.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/pdemo-conf.test, tests/tagdemo-conf.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Likewise. * libtool.m4 (AC_PROG_EGREP): New macro, defined if Autoconf doesn't define. (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it. (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Use shell pattern matching rather than egrep. (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP. * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep. * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise. * tests/defs (EGREP, FGREP): New vars. * ltmain.in: egrep -> $EGREP * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test: Likewise. * tests/hardcode.test: fgrep -> $FGREP * tests/f77demo-exec.test: test -a -> test &&
2002-11-19 17:42:39 +08:00
if $EGREP -n -e 'test[ ]+(![ ])?-e' $scripts; then
1998-03-06 00:22:50 +08:00
echo "use \`test -f' instead of \`test -e'"
2003-10-15 05:46:13 +08:00
status=$EXIT_FAILURE
1998-03-06 00:22:50 +08:00
fi
# Check for problems with variable assignments.
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no longer requires them; you're supposed to use grep -E and grep -F instead. Also, don't assume that "test -a" works, since POSIX doesn't require it. * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE, AC_LIBTOOL_PROG_LD_SHLIBS): egrep -> grep, when that makes no difference. * libtoolize.in: Likewise. * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise. * ltmain.in: Likewise. * demo/Makefile.am (hc-direct): Likewise. * pdemo/Makefile.am (hc-direct): Likewise. * tests/build-relink.test, tests/build-relink2.test, tests/cdemo-conf.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-nofast.test, tests/demo-shared.test, tests/demo-static.test, tests/depdemo-conf.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/hardcode.test, tests/mdemo-conf.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/pdemo-conf.test, tests/tagdemo-conf.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Likewise. * libtool.m4 (AC_PROG_EGREP): New macro, defined if Autoconf doesn't define. (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it. (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Use shell pattern matching rather than egrep. (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP. * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep. * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise. * tests/defs (EGREP, FGREP): New vars. * ltmain.in: egrep -> $EGREP * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test: Likewise. * tests/hardcode.test: fgrep -> $FGREP * tests/f77demo-exec.test: test -a -> test &&
2002-11-19 17:42:39 +08:00
if $EGREP -n -e '[^ ]=[^ ].*(break|continue)' $scripts; then
1998-03-06 00:22:50 +08:00
echo "assignments on the same line as a \`break' or \`continue' may have no effect"
2003-10-15 05:46:13 +08:00
status=$EXIT_FAILURE
1998-03-06 00:22:50 +08:00
fi
# Check for uses of Xsed without corresponding echo "X
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no longer requires them; you're supposed to use grep -E and grep -F instead. Also, don't assume that "test -a" works, since POSIX doesn't require it. * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE, AC_LIBTOOL_PROG_LD_SHLIBS): egrep -> grep, when that makes no difference. * libtoolize.in: Likewise. * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise. * ltmain.in: Likewise. * demo/Makefile.am (hc-direct): Likewise. * pdemo/Makefile.am (hc-direct): Likewise. * tests/build-relink.test, tests/build-relink2.test, tests/cdemo-conf.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-nofast.test, tests/demo-shared.test, tests/demo-static.test, tests/depdemo-conf.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/hardcode.test, tests/mdemo-conf.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/pdemo-conf.test, tests/tagdemo-conf.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Likewise. * libtool.m4 (AC_PROG_EGREP): New macro, defined if Autoconf doesn't define. (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it. (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Use shell pattern matching rather than egrep. (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP. * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep. * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise. * tests/defs (EGREP, FGREP): New vars. * ltmain.in: egrep -> $EGREP * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test: Likewise. * tests/hardcode.test: fgrep -> $FGREP * tests/f77demo-exec.test: test -a -> test &&
2002-11-19 17:42:39 +08:00
if $EGREP -n -e '\$Xsed' $scripts | $EGREP -v -n -e '\$echo \\*"X'; then
echo "occurrences of \`\$Xsed\' without \`echo \"X\' on the same line"
2003-10-15 05:46:13 +08:00
status=$EXIT_FAILURE
fi
# Check for quotes within backquotes within quotes "`"bar"`"
Don't assume that egrep and fgrep exist. POSIX 1003.1-2001 no longer requires them; you're supposed to use grep -E and grep -F instead. Also, don't assume that "test -a" works, since POSIX doesn't require it. * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_CXX_CONFIG, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE, AC_LIBTOOL_PROG_LD_SHLIBS): egrep -> grep, when that makes no difference. * libtoolize.in: Likewise. * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Likewise. * ltmain.in: Likewise. * demo/Makefile.am (hc-direct): Likewise. * pdemo/Makefile.am (hc-direct): Likewise. * tests/build-relink.test, tests/build-relink2.test, tests/cdemo-conf.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-nofast.test, tests/demo-shared.test, tests/demo-static.test, tests/depdemo-conf.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/hardcode.test, tests/mdemo-conf.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/pdemo-conf.test, tests/tagdemo-conf.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Likewise. * libtool.m4 (AC_PROG_EGREP): New macro, defined if Autoconf doesn't define. (AC_PATH_TOOL_PREFIX, AC_PROG_LD_GNU): Use it. (AC_PROG_LD, AC_PROG_NM, AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Use shell pattern matching rather than egrep. (AC_LIBTOOL_CONFIG): Set lt_EGREP and EGREP. * demo/Makefile.am (SET_HARDCODE_FLAGS): Use sed instead of egrep. * pdemo/Makefile.am (SET_HARDCODE_FLAGS): Likewise. * tests/defs (EGREP, FGREP): New vars. * ltmain.in: egrep -> $EGREP * tests/assign.test, tests/demo-exec.test, tests/demo-inst.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/sh.test: Likewise. * tests/hardcode.test: fgrep -> $FGREP * tests/f77demo-exec.test: test -a -> test &&
2002-11-19 17:42:39 +08:00
if $EGREP -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | \
$EGREP -v "### testsuite: skip nested quoting test$"; then
echo "nested quotes are dangerous"
2003-10-15 05:46:13 +08:00
status=$EXIT_FAILURE
fi
1998-03-06 00:22:50 +08:00
exit $status