Mercurial > octave-nkf
diff aclocal.m4 @ 6955:4aef2ca14cf9
[project @ 2007-10-04 16:38:11 by jwe]
author | jwe |
---|---|
date | Thu, 04 Oct 2007 16:40:17 +0000 |
parents | 3d555cd5ad0f |
children | 93c65f2a5668 |
line wrap: on
line diff
--- a/aclocal.m4 Thu Oct 04 16:32:38 2007 +0000 +++ b/aclocal.m4 Thu Oct 04 16:40:17 2007 +0000 @@ -806,9 +806,10 @@ # OCTAVE_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. +# as few characters as possible and that supports "\(X\|Y\)" +# style regular expression alternation. Prefer GNU sed if found. AC_DEFUN([OCTAVE_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) +[AC_MSG_CHECKING([for a usable sed]) if test -z "$SED"; then AC_CACHE_VAL(ac_cv_path_sed, [ # Loop through the user's path and test for sed and gsed. @@ -837,6 +838,10 @@ octave_cv_path_sed=${_sed} break; fi + # Reject if RE alternation is not handled. + if test "`echo 'this and that' | ${_sed} -n 's/\(this\|that\).*$/\1/p'`" != "this"; then + continue; + fi while true; do cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" mv "$tmp/sed.tmp" "$tmp/sed.in"