[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: zgrep bug
From: |
Paul Eggert |
Subject: |
Re: zgrep bug |
Date: |
Sat, 28 Apr 2007 22:28:27 -0700 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
address@hidden writes:
> /opt/exp/gnu/bin/zgrep: syntax error at line 61: `(' unexpected
Thanks for the bug report. I think you have an old-fashioned shell
that doesn't understand "(" in the front of shell case labels. To
work around the problem, you can set the SHELL environment variable to
the fully-qualified name of a modern (i.e., POSIX-conforming) shell
before running 'configure'. This should cause zgrep to use a better
shell and avoid the bug.
I have installed the following patch to gzip, so that its build
procedure detects the problem in future gzip versions.
2007-04-28 Paul Eggert <address@hidden>
* m4/shell.m4 (AC_PROG_SHELL): Check for old-fashioned shells that
don't allow "(" in front of case labels. Problem reported by midair
in <http://lists.gnu.org/archive/html/bug-gzip/2007-04/msg00004.html>.
Also, check for buggy shells that require ";;" before "esac".
Index: m4/shell.m4
===================================================================
RCS file: /cvsroot/gzip/gzip/m4/shell.m4,v
retrieving revision 1.7
diff -u -p -r1.7 shell.m4
--- m4/shell.m4 13 Apr 2007 21:42:54 -0000 1.7
+++ m4/shell.m4 29 Apr 2007 05:24:24 -0000
@@ -37,15 +37,15 @@ AC_DEFUN([AC_PROG_SHELL],
ac_cv_path_shell=no
case $SHELL in
- /*)
+ (/*)
rm -f conftest.c
if ("$SHELL" -c "$ac_command") 2>/dev/null; then
ac_cv_path_shell=$SHELL
- fi;;
+ fi
esac
case $ac_cv_path_shell in
- no)
+ (no)
# Prefer shells that are more likely to be installed in the
# same place on all hosts of this platform. Therefore, prefer
# shells in /bin and /usr/bin to shells in the installer's
@@ -57,7 +57,7 @@ AC_DEFUN([AC_PROG_SHELL],
do
IFS=$as_save_IFS
case $as_dir in
- /*)
+ (/*)
for ac_base in sh bash ksh sh5; do
rm -f conftest.c
if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
@@ -66,11 +66,11 @@ AC_DEFUN([AC_PROG_SHELL],
fi
done
case $ac_cv_path_shell in
- /*) break;;
- esac;;
+ (/*) break
+ esac
esac
done
- rm -f conftest.c;;
+ rm -f conftest.c
esac])
AC_MSG_RESULT($ac_cv_path_shell)
SHELL=$ac_cv_path_shell
- zgrep bug, midair, 2007/04/27
- Re: zgrep bug,
Paul Eggert <=