autoconf-patches
[Top][All Lists]
Advanced

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

status.m4: fix many test failures on Solaris


From: Ralf Wildenhues
Subject: status.m4: fix many test failures on Solaris
Date: Wed, 1 Mar 2006 20:54:47 +0100
User-agent: Mutt/1.5.9i

All Autoconf tests which included a config header failed on solaris2.6
like this (context snipped):

| cat: cannot open  config.hin

The extra space got me to move away from thinking this could be an NFS
issue.  Funnily, the config.status files generated there were different
 from those created on sane systems; the interesting difference was this
(minus, of course, the expected LINENO difference):

| --- config.status       2006-03-01 20:24:05.000000000 +0100
| +++ config.status       2006-03-01 20:34:37.000000000 +0100
| @@ -636,12 +636,12 @@
|  s,^[    #]*u.*,/* & */,
|  CEOF
|      sed -f "$tmp/defines.sed" $ac_file_inputs >"$tmp/out1"
| -ac_result="$tmp/out1"
| +ac_result=$ac_file_inputs
|    if test x"$ac_file" != x-; then
|      echo "/* $configure_input  */" >"$tmp/config.h"
| -    cat "$ac_result" >>"$tmp/config.h"
| +    cat $ac_result >>"$tmp/config.h"
|      if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
| -      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
| +      { echo "$as_me:2390: $ac_file is unchanged" >&5
|  echo "$as_me: $ac_file is unchanged" >&6;}
|      else
|        rm -f $ac_file


It can be tracked down to an initialization order issue exposed by the
Solaris shell (which is documented in the shell portability section).

I have taken liberty to apply the patch below to fix this, knowing that
it's the right thing.  ;-)

Cheers,
Ralf

        * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Force correct
        order of variable initialization, so even the Solaris 2.6 shell
        can create a config header correctly.  Fixes lots of test suite
        failures.

Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.84
diff -u -r1.84 status.m4
--- lib/autoconf/status.m4      6 Jan 2006 00:10:37 -0000       1.84
+++ lib/autoconf/status.m4      1 Mar 2006 19:12:14 -0000
@@ -651,7 +651,7 @@
   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
   echo 'CEOF
     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
-  ac_in=$ac_out ac_out=$ac_nxt ac_nxt=$ac_in
+  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
   grep . conftest.tail >/dev/null || break
   rm -f conftest.defines




reply via email to

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