Autoconf test version 2.61a released

2006-12-11 Thread Paul Eggert
We're happy to announce the release of Autoconf 2.61a.  This is a test
version, meant to shake out bugs in our switch from 'sed' to 'awk' to
implement 'configure'-time substitutions, and (if 'printf' is
available) from 'echo' to 'printf' to output strings containing
special characters.  There is also one important bug fix and one
obsoleted macro.  The important changes since Autoconf 2.61 are listed
in more detail below.

The sources and GPG detached signature are here:

ftp://alpha.gnu.org/gnu/autoconf/autoconf-2.61a.tar.gz
ftp://alpha.gnu.org/gnu/autoconf/autoconf-2.61a.tar.gz.sig
ftp://alpha.gnu.org/gnu/autoconf/autoconf-2.61a.tar.bz2
ftp://alpha.gnu.org/gnu/autoconf/autoconf-2.61a.tar.bz2.sig

Here are the MD5 and SHA-512 checksums:

69e927100759224398b8cd3f5eb40b20  autoconf-2.61a.tar.gz
adcbe3a2031c60413dfaab00897e4d83  autoconf-2.61a.tar.bz2
d96d8ef6d026f2909a326027c4d1b8debfde77671d243abf7e7b59f306a37957a4c8f1da021f6e20f837efec51d4bac0fb80c3780ed32866c169fa3ae103f2c3
  autoconf-2.61a.tar.gz
74b9427065582db4676f6165f213c810990486e9e1e2d4b285528aa6ec883ab493b23694a97fd4ff361b2492e565fa243907f15d9283cbc0bff7d4ba9e8b44af
  autoconf-2.61a.tar.bz2

I'd like to thank the other major contributors to this test release,
who are Ralf Wildenhues, Stepan Kasal, and Eric Blake.

NEWS:

** AC_FUNC_FSEEKO was broken in 2.61; it didn't make fseeko and ftello visible
   on many platforms.  This has been fixed.

** AC_FUNC_SETVBUF_REVERSED is now obsolete.  It is still defined for backward
   compatibility but it does nothing.  The macro was already
   obsolescent, as the last systems to have the problem were those
   based on SVR2, which became obsolete in 1987.  The macro had bugs
   on some modern systems and could no longer be maintained reliably
   due to lack of ancient systems to test it on.

** config.status now uses awk instead of sed for most substitutions, for speed.

   - As a side effect multi-line values of substituted variables no
 longer have a small limit in total size, though for portability
 each line should not exceed the POSIX length limit for text lines.

   - It is now documented that Makefile.in should not contain
 overlapping variable occurrences, e.g., @[EMAIL PROTECTED]@.
 Autoconf's behavior was always iffy in such cases, and the
 awk implementation has changed the behavior.

** Many uses of 'echo' have been rewritten so that Autoconf-generated
   scripts have fewer problems with strings or file names containing
   embedded special characters such as backslash or leading "-".  This
   was implemented by using `printf '%s\n' "$foo"' instead of `echo
   "$foo"' when printf works.  Due to the implementation technique
   used, Autoconf-generated scripts now run considerably more slowly
   on ancient implementations lacking printf.  However, this should
   not be a problem, since Autoconf-generated scripts in practice
   invariably find a more-modern shell these days.


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: export_symbols_cmds erroneously expanded

2006-12-11 Thread Charles Wilson

On Tue, 12 Dec 2006 01:03:41 +0100, "Ralf Wildenhues" said
> Or we need to make sure the extra expansion does not matter.
> Arguably, this is a hack, but in practice it may be enough for now.
> I had to create a directory /s to expose the bug -- do you have an
> S: drive?

Hmm.  As a matter of fact, I do.  On cygwin, I guess you'd only see this
problem if you've explicitly done

$ mkdir /s
$ mount  S: /s

(which I have)

or

$ mount --change-cygdrive-prefix /

(which I have not)

However, you'd always get this bug under MSys/mingw.

> 
> Please try this patch.

Ookay, but: you're still expanding the value of cmd.  You're just
hoping that, for $PLATFORM, the value of export_symbols_cmds contains
nothing that might expand to a directory/file list on the current
machine.  E.g. on unix, if there were an 's' directory in the root /,
you'd also need some version of the patch below -- but in a different
spot in libtool.m4.

Anyway, testing will have to wait a few hours.

--
Chuck


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: export_symbols_cmds erroneously expanded

2006-12-11 Thread Ralf Wildenhues
* Charles Wilson wrote on Mon, Dec 11, 2006 at 06:58:56PM CET:
> On Mon, 11 Dec 2006 18:36:56 +0100, "Ralf Wildenhues" said:
> > 
> > > [[ bug report and export_filter variable "fix" snipped ]]
> >
> > The above looks like a cleaner approach to me than the second one you
> > offer; but it means we'd need to change the definition of
> > export_symbols_cmds for each and every system, not just Cygin/MinGW.
> 
> Yes, I figured that.  I believe it would also be true for the other
> solution, as well.  The problem is we need to expand *part* of cmd, but
> not *all* of it -- and this is true on every system and every tag,
> including the default definition of export_symbols_cmds.

Or we need to make sure the extra expansion does not matter.
Arguably, this is a hack, but in practice it may be enough for now.
I had to create a directory /s to expose the bug -- do you have an
S: drive?

Please try this patch.

Cheers,
Ralf

* libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) [ cygwin, mingw ]
: Avoid shell expansion of '/s/.*' through
double expansion, in case there is a 'S:' drive.
Report by Charles Wilson.

Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.166
diff -u -r1.314.2.166 libtool.m4
--- libtool.m4  19 Oct 2006 05:05:55 -  1.314.2.166
+++ libtool.m4  11 Dec 2006 23:59:40 -
@@ -5490,7 +5490,7 @@
 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
   ;;
   cygwin* | mingw*)
-_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* 
__nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' 
| sort | uniq > $export_symbols'
+_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 
DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I 
/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
   ;;
   *)
 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -5629,7 +5629,7 @@
   _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
   _LT_AC_TAGVAR(always_export_symbols, $1)=no
   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | 
$SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 
DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > 
$export_symbols'
 
   if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs 
$compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base 
-Xlinker --out-implib -Xlinker $lib'


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: export_symbols_cmds erroneously expanded

2006-12-11 Thread Charles Wilson

On Mon, 11 Dec 2006 18:36:56 +0100, "Ralf Wildenhues"
<[EMAIL PROTECTED]> said:
> Hello Charles,
> 
> Thanks for the bug report.
> 
> > [[ bug report and export_filter variable "fix" snipped ]]
>
> The above looks like a cleaner approach to me than the second one you
> offer; but it means we'd need to change the definition of
> export_symbols_cmds for each and every system, not just Cygin/MinGW.

Yes, I figured that.  I believe it would also be true for the other
solution, as well.  The problem is we need to expand *part* of cmd, but
not *all* of it -- and this is true on every system and every tag,
including the default definition of export_symbols_cmds.

> (There is no need for two sed scripts here, by the way, one would be
> just fine.)

That particular expression is already written as two sed invokations;
merging to one invokation would be fine, but since that's not germane to
the problem here I didn't bother.

> Another thing that worries me is I'm pretty certain the use of
> export_symbols_cmds in the too-many-objects case will cause another,
> differently-looking failure.  IOW, tests for both use cases are needed.

You're probably right.

> I can look into this in a couple of days probably.

Cool -- I'd appreciate your efforts [*].  I'm going to go ahead, for
cygwin, and do a quickie release of 'libtool1.5-1.5.23a-2' (still branch
1.5, still 20061014 checkout) but with your --version patch
(http://lists.gnu.org/archive/html/libtool/2006-12/msg00015.html) and
the quick-n-dirty DOTSTAR "fix" for this bug assuming it passes the
testsuite (as well as 1.5.23a-1 did).  [Why? Cause it works, and I
personally need a properly symbol-exported pcre Right Now...]

[*] I'm a bit daunted by the prospect of adding a new LT_TAG_VAR
variable -- I'm not sure what all the ramifications are and I'm afraid
I'll miss some fiddly little but critically necessary item to 'make it
all work' -- which is why I'm happy to leave this to an expert.  But
I'll be glad to test any patch you generate...

Then I'll update cygwin's official release to a new -D date on branch
1.5 with your changes.

Cruddy DOTSTAR patch attached

--
Chuck
diff -urN origsrc/libtool/libtool.m4 src/libtool/libtool.m4 src/libtool/libtool.m4
--- origsrc/libtool/libtool.m4	2006-08-25 11:04:54.0 -0400
+++ src/libtool/libtool.m4	2006-12-11 12:22:29.921833600 -0500
@@ -5440,7 +5440,7 @@
 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 ifelse([$1],[CXX],[
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='DOTSTAR='\''.*'\''~$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/$DOTSTAR //'\'' | sort | uniq > $export_symbols'
   case $host_os in
   aix4* | aix5*)
 # If we're using GNU nm, then we don't want the "-C" option.
@@ -5455,10 +5455,10 @@
 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
   ;;
   cygwin* | mingw*)
-_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+_LT_AC_TAGVAR(export_symbols_cmds, $1)='DOTSTAR='\''.*'\''~$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/$DOTSTAR \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^$DOTSTAR __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/$DOTSTAR //'\'' | sort | uniq > $export_symbols'
   ;;
   *)
-_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+_LT_AC_TAGVAR(export_symbols_cmds, $1)='DOTSTAR='\''.*'\''~$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/$DOTSTAR //'\'' | sort | uniq > $export_symbols'
   ;;
   esac
 ],[
@@ -5483,7 +5483,7 @@
   _LT_AC_TAGVAR(module_cmds, $1)=
   _LT_AC_TAGVAR(module_expsym_cmds, $1)=
   _LT_AC_TAGVAR(always_export_symbols, $1)=no
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='DOTSTAR='\''.*'\''~$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/$DOTSTAR //'\'' | sort | uniq > $export_symbols'
   # include_expsyms should be a list of space-separated symbols to be *always*
   # included in the symbol list
   _LT_AC_TAGVAR(include_expsyms, $1)=
@@ -5594,7 +5594,7 @@
   _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
   _LT_AC_TAGVAR(always_export_symbols, $1)=no
   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $ex

Re: export_symbols_cmds erroneously expanded

2006-12-11 Thread Ralf Wildenhues
Hello Charles,

Thanks for the bug report.

* Charles Wilson wrote on Mon, Dec 11, 2006 at 06:17:38PM CET:
> When building pcre (which uses libtool --export-symbols-regex) I get the
> following error (libtool cvs branch 1.5, 20061014 checkout):
> 
> /bin/sh ./libtool --mode=link gcc -export-symbols-regex '^[^_]'  -I.
> -I/c/msys/1.0/local/src/pcre/cygports/pcre-6.7-1/src/pcre-6.7 -rpath
> /usr/lib -no-undefined -version-info \
[...]
> .libs/pcre_valid_utf8.o .libs/pcre_version.o .libs/pcre_xclass.o  | sed
> -n -e 's/^.*[   ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ 
> ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | /usr/bin/sed -e
> '/^[BCDGRS] /s/. /s/.. \([^ ]*\)/\1 DATA/' | /usr/bin/sed -e '/^[AITW]
> /s/. /s/.. //' | sort | uniq > .libs/libpcre.exp
> /usr/bin/sed: -e expression #1, char 20: unknown option to `s'
> /usr/bin/sed: -e expression #1, char 18: unknown option to `s'
> /usr/bin/grep -E -e "^[^_]" ".libs/libpcre.exp" > ".libs/libpcre.expT"

> # The commands to list exported symbols.
> export_filter="sed -e '/^[BCDGRS] /s/.* \\([^ ]*\\)/\\1 DATA/' | sed -e
> '/^[AITW] /s/.* //'"
> export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe
> | \$export_filter | sort | uniq > \$export_symbols"

The above looks like a cleaner approach to me than the second one you
offer; but it means we'd need to change the definition of
export_symbols_cmds for each and every system, not just Cygin/MinGW.
(There is no need for two sed scripts here, by the way, one would be
just fine.)

Another thing that worries me is I'm pretty certain the use of
export_symbols_cmds in the too-many-objects case will cause another,
differently-looking failure.  IOW, tests for both use cases are needed.

I can look into this in a couple of days probably.

> There's also the (uglier, but less invasive -- doesn't require a new
> _LT_TAG_VAR for each tag):
> 
> # The commands to list exported symbols.
> export_symbols_cmds="DOTSTAR='.*'~\$NM \$libobjs \$convenience |
> \$global_symbol_pipe | \$SED -e '/^[BCDGRS] /s/\$DOTSTAR ([^
> ]*)/1 DATA/' | \$SED -e '/^[AITW] /s/\$DOTSTAR //' | sort | uniq
> > \$export_symbols"

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


export_symbols_cmds erroneously expanded

2006-12-11 Thread Charles Wilson
When building pcre (which uses libtool --export-symbols-regex) I get the
following error (libtool cvs branch 1.5, 20061014 checkout):

/bin/sh ./libtool --mode=link gcc -export-symbols-regex '^[^_]'  -I.
-I/c/msys/1.0/local/src/pcre/cygports/pcre-6.7-1/src/pcre-6.7 -rpath
/usr/lib -no-undefined -version-info \
'0:1:0' -o libpcre.la pcre_chartables.lo pcre_compile.lo 
pcre_config.lo pcre_dfa_exec.lo pcre_exec.lo pcre_fullinfo.lo pcre_get.lo 
pcre_globals.lo pcre_info.lo pcre_maketables.lo pcre_ord2utf8.lo 
pcre_refcount.lo pcre_study.lo pcre_tables.lo pcre_try_flipped.lo 
pcre_ucp_searchfuncs.lo pcre_valid_utf8.lo pcre_version.lo pcre_xclass.lo 
generating symbol list for `libpcre.la'
/usr/bin/nm -B  .libs/pcre_chartables.o .libs/pcre_compile.o
.libs/pcre_config.o .libs/pcre_dfa_exec.o .libs/pcre_exec.o
.libs/pcre_fullinfo.o .libs/pcre_get.o .libs/pcre_globals.o
.libs/pcre_info.o .libs/pcre_maketables.o .libs/pcre_ord2utf8.o
.libs/pcre_refcount.o .libs/pcre_study.o .libs/pcre_tables.o
.libs/pcre_try_flipped.o .libs/pcre_ucp_searchfuncs.o
.libs/pcre_valid_utf8.o .libs/pcre_version.o .libs/pcre_xclass.o  | sed
-n -e 's/^.*[   ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ 
]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | /usr/bin/sed -e
'/^[BCDGRS] /s/. /s/.. \([^ ]*\)/\1 DATA/' | /usr/bin/sed -e '/^[AITW]
/s/. /s/.. //' | sort | uniq > .libs/libpcre.exp
/usr/bin/sed: -e expression #1, char 20: unknown option to `s'
/usr/bin/sed: -e expression #1, char 18: unknown option to `s'
/usr/bin/grep -E -e "^[^_]" ".libs/libpcre.exp" > ".libs/libpcre.expT"


The two offending sed expressions are:

'/^[BCDGRS] /s/. /s/.. \([^ ]*\)/\1 DATA/'
'/^[AITW] /s/. /s/.. //'

These *should* have been

'/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'
'/^[AITW] /s/.* //'

It appears that around line 3978 in ltmain.in:

cmds=$export_symbols_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
  IFS="$save_ifs"
[[ cmd ok here , but $NM etc are not expanded ]]
  eval cmd=\"$cmd\"
[[ cmd not ok here -- $NM etc are expanded, but s/// expression messed
up ]]
  if len=`expr "X$cmd" : ".*"` &&
   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le
   -1; then
$show "$cmd"
$run eval "$cmd" || exit $?
skipped_export=false
  else

bad things are happening to the .* in the original s/// expressions.  I
tried umpteen ways of changing the quotes but couldn't seem to get
libtool to DTRT, short of introducing another variable for an extra
level of indirection (similar to how global_symbol_pipe itself is
handled):

# The commands to list exported symbols.
export_filter="sed -e '/^[BCDGRS] /s/.* \\([^ ]*\\)/\\1 DATA/' | sed -e
'/^[AITW] /s/.* //'"
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe
| \$export_filter | sort | uniq > \$export_symbols"

(We can't change global_symbol_pipe itself, because it's used in other
contexts).

There's also the (uglier, but less invasive -- doesn't require a new
_LT_TAG_VAR for each tag):

# The commands to list exported symbols.
export_symbols_cmds="DOTSTAR='.*'~\$NM \$libobjs \$convenience |
\$global_symbol_pipe | \$SED -e '/^[BCDGRS] /s/\$DOTSTAR ([^
]*)/1 DATA/' | \$SED -e '/^[AITW] /s/\$DOTSTAR //' | sort | uniq
> \$export_symbols"


Any ideas what the RIGHT fix for this problem is?

--
Chuck



___
http://lists.gnu.org/mailman/listinfo/libtool