Subject: automake 1.14, make check failures on AIX

From: Thomas Jahns <[email-masked]>
Date: Tue, 22 Oct 2013 13:56:46 +0200

Hello,

I've built automake 1.14 on our AIX 6.1 system, there are some bugs creeping up.
Two (libtool7 and libtool9) are more of a libtool affair which I've filed
separately to the libtool bug list.

The others are problems with automake itself it seems.

Those which were related to t/get-sysconf.sh I already fixed.

Please find the attached patch which handles a problem with the attempt to call
lex with option --version.
AIX lex gives the following behaviour when called as lex --version:

$ lex --version
0: Warning: 1285-300 The - flag is not valid.
0: Warning: 1285-300 The e flag is not valid.
0: Warning: 1285-339 Ratfor is not supported with lex.
0: Warning: 1285-300 The s flag is not valid.
0: Warning: 1285-300 The i flag is not valid.
0: Warning: 1285-300 The o flag is not valid.

At this point the program hangs waiting for input on stdin.

When entering C-D and line-feed, lex finished:

^D
Error: 1285-340 The rules section delimiter is missing.
$

The one in t/lex-clean-cxx results from mainfoo.cc not correctly declaring yylex
as extern "C". I therefore propose to change the declaration in mainfoo.cc
accordingly. Please see the attached patch.

Unfortunately I don't understand what's tripping up t/lex-line, but I'm quite
willing to test any suggestion.

The same is true for t/tap-signal-w. No idea what's going on there.

Regards, Thomas
-- 
Thomas Jahns
DKRZ GmbH, Department: Application software

Deutsches Klimarechenzentrum
Bundesstraße 45a
D-20146 Hamburg

Phone: +49-40-460094-151
Fax: +49-40-460094-270
Email: Thomas Jahns <[email-masked]>
--- a/t/lex-clean-cxx.sh	2013-06-09 11:31:22.000000000 +0200
+++ b/t/lex-clean-cxx.sh	2013-10-22 13:48:48.000000000 +0200
@@ -70,9 +70,11 @@
 cat > mainfoo.cc << 'END'
 // This file should contain valid C++ but invalid C.
 using namespace std;
+
+extern "C" int yylex (void);
+
 int main (int argc, char **argv)
 {
-  extern int yylex (void);
   return yylex ();
 }
 END
--- a/t/get-sysconf.sh	2013-10-18 14:21:12.000000000 +0200
+++ b/t/get-sysconf.sh	2013-10-18 14:19:54.000000000 +0200
@@ -49,10 +49,10 @@
 # It's OK if the selected Lex and Yacc programs don't know how to print
 # the version number or the help screen; those are usually available only
 # for Flex and Bison.
-$LEX --version || :
-$LEX --help || :
-$YACC --version || :
-$YACC --help || :
+$LEX --version </dev/null || :
+$LEX --help </dev/null || :
+$YACC --version </dev/null || :
+$YACC --help </dev/null || :
 
 cat "$am_top_builddir/config.log" || st=1
 cat "$am_top_builddir/t/wrap/aclocal-$APIVERSION" || st=1