[Top][All Lists]

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

Re: Spurious datarootdir warnings in Wine configure

From: Ralf Wildenhues
Subject: Re: Spurious datarootdir warnings in Wine configure
Date: Wed, 21 Jun 2006 20:25:56 +0200
User-agent: Mutt/1.5.11+cvs20060403

Hello Paul, Alexandre,

* Paul Eggert wrote on Tue, Jun 20, 2006 at 10:43:04PM CEST:
> Ralf Wildenhues <address@hidden> writes:
> > The difference being that the existing heuristic has been tested
> > on about a dozen platforms and is thus less likely to break due
> > to, say, some obscure sed limitation on some platform.
> OK, but the new test he added (marked '+' below):
>    { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
> +  { ac_out=`sed -n '/^[[     ]]*datarootdir[[        ]]*:*=/p' "$tmp/out"`; 
> test -z "$ac_out"; } &&
> looks pretty portable to me.  If it breaks, then I'd expect the
> existing sed-based test to break too.

Well.  This change causes us to issue a warning for an empty .in file.
So, apologies for rejecting it for the wrong reason.  ;-)

> (But if you're coming up with something better, never mind.  :-)

I'm merely pondering what to call the macro to silence the checks.
but how about this slightly different reasoning instead:

I would like to make the upgrade 2.59 -> 2.60 as smooth as possible.
The vast majority of packages using Autoconf should not need any change.
Except maybe datarootdir related ones (more likely if they don't use
Automake, but even possible with Automake).  Next, for the transition
time, it's extremely helpful if the package bootstraps unchanged with
both 2.59 and 2.60.  So far, I think all datarootdir induced changes can
be written in a backwards compatible way (so they work with 2.59).

So how about let's make the silencing also backward compatible, to keep
the smooth upgrade path?  (I'm sure this won't pass muster with at least
the documentation, but hey, at least I tried.  ;-)

Cheers, and thanks for any review, even rejects...

        * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Expand tests for
        datarootdir-related errors only if AC_DATAROOTDIR_CHECKED is
        not defined.
        * doc/autoconf.texi (Installation Directory Variables): Document
        * NEWS: Update.
        * tests/torture.at (datarootdir workaround): Extend test.
        Bug report by Alexandre Julliard <address@hidden>.

Index: doc/autoconf.texi
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1053
diff -u -r1.1053 autoconf.texi
--- doc/autoconf.texi   20 Jun 2006 19:49:14 -0000      1.1053
+++ doc/autoconf.texi   21 Jun 2006 18:23:26 -0000
@@ -2644,6 +2644,21 @@
 otherwise the package won't support separated builds.
 @end table
+As a temporary measure, @command{config.status} may warn if it looks like
address@hidden has not been properly defined in some config file.
+To avoid these warnings after making sure proper definitions are in place,
+you can add
address@hidden example
+to @file{configure.ac}.  Note that for your own macros, you should use
+a different prefix (@pxref{Macro Names}).
 For the more specific installation of Erlang libraries, the following variables
 are defined:
Index: NEWS
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.383
diff -u -r1.383 NEWS
--- NEWS        20 Jun 2006 19:49:14 -0000      1.383
+++ NEWS        21 Jun 2006 17:37:06 -0000
@@ -4,6 +4,8 @@
   or LIFO (as in GNU M4 1.4.x).  GNU M4 2.0 is expected to conform to Posix
   here, so m4wrap/m4_wrap users should no longer depend on LIFO behavior.
+** Provide a way to turn off warnings about the changed directory variables.
 * Major changes in Autoconf 2.59d
   Released 2006-06-05, by Ralf Wildenhues.
Index: lib/autoconf/status.m4
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.114
diff -u -r1.114 status.m4
--- lib/autoconf/status.m4      30 May 2006 05:47:40 -0000      1.114
+++ lib/autoconf/status.m4      21 Jun 2006 18:09:55 -0000
@@ -505,7 +505,8 @@
 # If the template does not know about datarootdir, expand it.
 # FIXME: This hack should be removed a few years after 2.60.
 ac_datarootdir_hack=; ac_datarootdir_seen=
@@ -530,6 +531,7 @@
   s&\\\${datarootdir}&$datarootdir&g' ;;
 # Neutralize VPATH when `$srcdir' = `.'.
 # Shell code in configure.ac might set extrasub.
@@ -550,13 +552,14 @@
           [s&@_AC_Var@&$ac_[]_AC_Var&;t t[]AC_SUBST_TRACE(_AC_Var)
+m4_ifndef([AC_DATAROOTDIR_CHECKED], [$ac_datarootdir_hack])
 " $ac_file_inputs m4_defn([_AC_SED_CMDS])>$tmp/out
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+[test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
   AC_MSG_WARN([$ac_file contains a reference to the variable `datarootdir'
-which seems to be undefined.  Please make sure it is defined.])
+which seems to be undefined.  Please make sure it is defined.])])
   rm -f "$tmp/stdin"
   case $ac_file in
Index: tests/torture.at
RCS file: /cvsroot/autoconf/autoconf/tests/torture.at,v
retrieving revision 1.64
diff -u -r1.64 torture.at
--- tests/torture.at    28 May 2006 12:38:49 -0000      1.64
+++ tests/torture.at    21 Jun 2006 17:58:03 -0000
@@ -673,6 +673,8 @@
+d@&address@hidden # The following line silences the warnings, if uncommented:
 # This substitution is wrong and bogus!  Don't use it in your own code!
@@ -690,6 +692,13 @@
 which seems to be undefined.  Please make sure it is defined.
 AT_CHECK([grep datarootdir Foo], 1, [])
+sed 's/d@&address@hidden //' configure.ac >t
+mv t configure.ac

reply via email to

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