Re: Fix chdir-long.m4 caching

2007-10-11 Thread Ralf Wildenhues
[ http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/7149/focus=5820 ]

* Eric Blake wrote on Tue, Oct 02, 2007 at 02:11:25PM CEST:
> According to Ralf Wildenhues on 10/1/2007 12:16 PM:
> > 
> > I guess branch-1-5 Libtool is affected just as well, and I wonder
> > whether, if we rename variables in Libtool, we need to provide the old
> > names for compatibility as well.
> 
> Nah.  They're cache variables; when they had the wrong name, the user
> could feasibly override the check, but the override was not saved between
> runs.  I think we're okay just upgrading to use new names, without
> worrying about priming the new names from the value of the old, nor in
> propagating the result of the new name back to the old, unless we can
> prove that the old name was in use elsewhere.

 and

indicate as such.  But I think in this case we're fine if we announce
the change in the NEWS file.

I'm committing the following hopefully-obvious changes to respective
Libtool branches.

Cheers,
Ralf

2007-10-11  Ralf Wildenhues  <[EMAIL PROTECTED]>

* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC)
: Renamed from
lt_prog_compiler_pic_works.
: Renamed from
lt_prog_compiler_static_works.
* NEWS: Update.

Index: NEWS
===
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.207
diff -u -r1.207 NEWS
--- NEWS1 Sep 2007 10:55:42 -   1.207
+++ NEWS11 Oct 2007 17:21:45 -
@@ -99,6 +99,9 @@
   - More robust parsing of mangled `.la' files inside libltdl, fixing a
 possible overrun and a crash due to memory exhaustion.
   - Fix compile command line for gcj on MinGW.
+  - Some configure variables have been renamed to fix caching:
+lt_prog_compiler_pic_works to lt_cv_prog_compiler_pic_works
+lt_prog_compiler_static_works to lt_cv_prog_compiler_static_works.
   - Loads of smaller bug fixes.
 
 
Index: libltdl/m4/libtool.m4
===
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.117
diff -u -r1.117 libtool.m4
--- libltdl/m4/libtool.m4   29 Aug 2007 20:54:53 -  1.117
+++ libltdl/m4/libtool.m4   11 Oct 2007 17:21:45 -
@@ -3967,7 +3967,7 @@
 #
 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, 
$1) works],
-[_LT_TAGVAR(lt_prog_compiler_pic_works, $1)],
+[_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&[EMAIL PROTECTED]([$1],[],[ 
-DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  "" | " "*) ;;
@@ -3984,7 +3984,7 @@
 #
 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval 
lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
-  _LT_TAGVAR(lt_prog_compiler_static_works, $1),
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
   $lt_tmp_static_flag,
   [],
   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])


2007-10-11  Ralf Wildenhues  <[EMAIL PROTECTED]>

* libtool.m4 (AC_LIBTOOL_PROG_COMPILER_PIC)
: Renamed from
lt_prog_compiler_pic_works.
: Renamed from
lt_prog_compiler_static_works.
* NEWS: Update.

Index: NEWS
===
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.109.2.59
diff -u -r1.109.2.59 NEWS
--- NEWS1 Sep 2007 10:56:08 -   1.109.2.59
+++ NEWS11 Oct 2007 17:23:51 -
@@ -4,6 +4,9 @@
 * More robust parsing of mangled `.la' files inside libltdl, fixing a
   possible overrun and a crash due to memory exhaustion.
 * Fix compile command line for gcj on MinGW.
+* Some configure variables have been renamed to fix caching:
+  lt_prog_compiler_pic_works to lt_cv_prog_compiler_pic_works
+  lt_prog_compiler_static_works to lt_cv_prog_compiler_static_works.
 * Bug Fixes.
 
 New in 1.5.24: 2007-06-17; CVS version 1.5.23c, Libtool team:
Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.187
diff -u -r1.314.2.187 libtool.m4
--- libtool.m4  16 Aug 2007 18:23:24 -  1.314.2.187
+++ libtool.m4  11 Oct 2007 17:23:53 -
@@ -5461,7 +5461,7 @@
 #
 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag 
$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
-_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+_LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ 
-DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  

Re: Fix chdir-long.m4 caching

2007-10-02 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Ralf Wildenhues on 10/1/2007 12:16 PM:
> Ahh, now I remember why I postponed that.  With a package using CVS HEAD
> Libtool:
> 
> | configure.ac:1001: warning: 
> AC_CACHE_VAL(_LT_TAGVAR(lt_prog_compiler_pic_works, ), ...): suspicious 
> cache-id, must contain _cv_ to be cached
> 
> Bugs in both Autoconf and Libtool (the error messages seem a bit
> inconsistent)?

I'm not sure I follow what you think is the Autoconf bug?  But yes, I
agree that libtool is certainly not caching what it was trying to do.

> 
> I guess branch-1-5 Libtool is affected just as well, and I wonder
> whether, if we rename variables in Libtool, we need to provide the old
> names for compatibility as well.

Nah.  They're cache variables; when they had the wrong name, the user
could feasibly override the check, but the override was not saved between
runs.  I think we're okay just upgrading to use new names, without
worrying about priming the new names from the value of the old, nor in
propagating the result of the new name back to the old, unless we can
prove that the old name was in use elsewhere.

- --
Don't work too hard, make some time for fun as well!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHAjVs84KuGfSFAYARAqgKAJoCtYDOEmHxQ0SyKlW+JEXT68kjdQCgti+Z
DW+pU1xCezXvcBk8SPDyqa0=
=1TCM
-END PGP SIGNATURE-


___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool


Re: Fix chdir-long.m4 caching

2007-10-01 Thread Ralf Wildenhues
* Eric Blake wrote on Fri, Sep 28, 2007 at 06:33:45AM CEST:
> >> 2006-09-26  Eric Blake  <[EMAIL PROTECTED]>
> >>and Ralf Wildenhues  <[EMAIL PROTECTED]>
> > 
> >>* lib/autoconf/general.m4 (AC_CACHE_VAL): Warn if cache-id is not
> >>cached.
> >>* tests/base.at (AC_CACHE_CHECK): Adjust test to expect this,
> >>also test that macro names and correct literals are not checked.
> > 
> > Applied as follows:
[...]

Ahh, now I remember why I postponed that.  With a package using CVS HEAD
Libtool:

| configure.ac:1001: warning: 
AC_CACHE_VAL(_LT_TAGVAR(lt_prog_compiler_pic_works, ), ...): suspicious 
cache-id, must contain _cv_ to be cached
| ../../../autoconf/lib/autoconf/general.m4:1952: AC_CACHE_VAL is expanded 
from...
| ../../../autoconf/lib/autoconf/general.m4:1972: AC_CACHE_CHECK is expanded 
from...
| aclocal.m4:1282: _LT_COMPILER_OPTION is expanded from...
| aclocal.m4:3415: _LT_COMPILER_PIC is expanded from...
| aclocal.m4:5148: _LT_LANG_C_CONFIG is expanded from...
| aclocal.m4:142: _LT_SETUP is expanded from...
| aclocal.m4:75: LT_INIT is expanded from...
| configure.ac:1001: the top level
| configure.ac:1001: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): 
suspicious cache-id, must contain _cv_ to be cached
| aclocal.m4:1334: _LT_LINKER_OPTION is expanded from...
| configure.ac:1001: warning: 
AC_CACHE_VAL(_LT_TAGVAR(lt_prog_compiler_pic_works, CXX), ...): suspicious 
cache-id, must contain _cv_ to be cached
| aclocal.m4:5251: _LT_LANG_CXX_CONFIG is expanded from...
| aclocal.m4:785: _LT_LANG is expanded from...
| aclocal.m4:768: LT_LANG is expanded from...
| aclocal.m4:796: _LT_LANG_DEFAULT_CONFIG is expanded from...
| configure.ac:1001: warning: AC_CACHE_VAL(lt_prog_compiler_static_works_CXX, 
...): suspicious cache-id, must contain _cv_ to be cached
| configure.ac:1001: warning: 
AC_CACHE_VAL(_LT_TAGVAR(lt_prog_compiler_pic_works, F77), ...): suspicious 
cache-id, must contain _cv_ to be cached
| aclocal.m4:6559: _LT_LANG_F77_CONFIG is expanded from...
| configure.ac:1001: warning: AC_CACHE_VAL(lt_prog_compiler_static_works_F77, 
...): suspicious cache-id, must contain _cv_ to be cached
| configure.ac:1001: warning: 
AC_CACHE_VAL(_LT_TAGVAR(lt_prog_compiler_pic_works, FC), ...): suspicious 
cache-id, must contain _cv_ to be cached
| aclocal.m4:6700: _LT_LANG_FC_CONFIG is expanded from...
| configure.ac:1001: warning: AC_CACHE_VAL(lt_prog_compiler_static_works_FC, 
...): suspicious cache-id, must contain _cv_ to be cached

Bugs in both Autoconf and Libtool (the error messages seem a bit
inconsistent)?

I guess branch-1-5 Libtool is affected just as well, and I wonder
whether, if we rename variables in Libtool, we need to provide the old
names for compatibility as well.

FWIW, HEAD autoconf is about 8 sec, i.e., 25% faster on this package
(Open MPI) now.  Nice work, Eric!

Cheers,
Ralf


___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool