autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU Autoconf 2.59c] testsuite: 1 6 7 11 50 51 52 53 54 55 56 57 59


From: Paul Eggert
Subject: Re: [GNU Autoconf 2.59c] testsuite: 1 6 7 11 50 51 52 53 54 55 56 57 59 60 61 62 63 64 65 66 67 70 71 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
Date: Wed, 25 May 2005 11:38:43 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Ouch!  That's a pretty major breakage; we should fix it right away.
I installed the patch enclosed at the end of this message; does
it fix things for you?

Stepan Kasal <address@hidden> writes:

> awk '/^ \t*case/,/^ \t*esac/{if(/\[\^.*\)/) exit(1)}'

That code looks incorrect.  " \t*" should be "[ \t]*", surely.  There
are other quoting problems too, which you can see if you try to read
the testsuite script.

> 1) either adapt the script so that it works even with Solaris' /bin/awk
>
> What may be the root of the problem?
> - the commma in:   /re1/, /re2/
> - the regex in if:   if(/re/)
> - or, most likely, the "exit"

It's the regex.  You need to say "if ($0 ~ /re/)".  But if you
try to say that, you'll have even more quoting problems with M4.
(And also at the shell script level.)

Worse, even if we could convince Autotest to generate the shell
script that we want, the test is still way too brittle.  It
reports too many false positives.

> 2) Or, preferably, add AC_PROG_AWK to configure.ac and use $AWK.

I'd rather not assume POSIX awk yet.  For now let's continue to
port to traditional awk.  Let's wait for Autoconf 3 before we
start to assume POSIX tools.

It's better to remove the test for now.  I installed this:

2005-05-25  Paul Eggert  <address@hidden>

        * tests/local.at: Don't attempt to check for negated character
        classes in shell scripts.  The test was too brittle.

--- local.at.~1.15.~    2005-05-24 09:46:35 -0700
+++ local.at    2005-05-25 11:29:38 -0700
@@ -48,12 +48,10 @@ AT_CHECK([$at_diff "$1" "$2"])
 # AT_CHECK_SHELL_SYNTAX(PROGRAM, ALT-COMMAND)
 # -------------------------------------------
 # If the shell handles `-n' well, use it to check the syntax of PROGRAM;
-# otherwise, run ALT-COMMAND.  Grep for [^...] negated character classes in
-# shell patterns, an extension to POSIX that many shells do not support.
+# otherwise, run ALT-COMMAND.
 m4_define([AT_CHECK_SHELL_SYNTAX],
 [AS_IF([test x"$ac_cv_sh_n_works" != xno],
-  [AT_CHECK([/bin/sh -n $1], 0)], [$2])
-AT_CHECK([awk '/^[ \t]*case/,/^[ \t]*esac/{if(/\@<:@\^.*\)/) exit(1)}' $1])])
+  [AT_CHECK([/bin/sh -n $1], 0)], [$2])])
 
 m4_define([AT_CHECK_PERL_SYNTAX],
 [AT_CHECK([autom4te_perllibdir=$abs_top_srcdir/lib $PERL -c 
$abs_top_builddir/bin/$1],




reply via email to

[Prev in Thread] Current Thread [Next in Thread]