Hi Nicolas, * Nicolas Joly wrote on Thu, Jun 02, 2005 at 01:02:32AM CEST: > On Wed, May 25, 2005 at 06:22:37PM +0200, Ralf Wildenhues wrote: > > > > OK to apply this patch to branch-2-0 and HEAD, and then backport to > > branch-1-5? > > Sorry for the delay.
No problem. Sorry for not providing a branch-1-5 patch right away. The backport is straightforward, patch below. OTOH.. > Unfortunately, i was unable to bootstrap libtool HEAD on my Tru64 unix > workstation. Next step was to bootstrap it on another machine > (NetBSD/amd64); back to the Tru64 machine ... another failure. that just helped us find more HEAD bug(s). :-/ First, could you post the exact output of `bootstrap' on Tru64? > The first failure seems to be related to missing `print' command in > default `/bin/sh': > > [EMAIL PROTECTED] [~]> /bin/sh > $ print -r '\t' > print: not found > [EMAIL PROTECTED] [~]> BIN_SH=xpg4 /bin/sh > $ print -r '\t' > \t Oh, brother. How do we solve this? I suppose $ /bin/sh $ BIN_SH=xpg4; export BIN_SH $ print -r '\t' does not work, right? Can we set CONFIG_SHELL = BIN_SH=xpg4 /bin/sh (and also SHELL) in the Makefile? I can easily spot places where this breaks in our own Makefile.am, let alone any client Makefile's. We could have near the top of libtool something like case $host in $whatever_fits_tru64) BIN_SH=xpg4 exec $SHELL ${1+"$@"} ;; esac Alternatively, the better option might be to tweak *DETECT_BETTER_SHELL to prefer ksh over bin/sh.. > [EMAIL PROTECTED] [~]> /bin/ksh > $ print -r '\t' > \t but that sucks too, as it has nontrivial consequences on other systems. Or maybe search for ksh before testing `print -r'.. By the way, since tru64 seems a rather "interesting" target for libtool: If anyone could provide access to such a system, it would be easier to prevent regressions. Regards, Ralf * ltmain.in (compile mode): In order to find out about forbidden characters in output, check with grep after checking func_quote_for_eval result. Also, warn instead of fail. (func_infer_tag, compile mode, link mode, install mode): Revert SunOS sh bug workaround patch from 2004-12-28 as it triggers bugs in the Tru64 5.1B shell. Reported by Albert Chin <[EMAIL PROTECTED]> and Nicolas Joly <[EMAIL PROTECTED]>. Index: ltmain.in =================================================================== RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v retrieving revision 1.334.2.70 diff -u -r1.334.2.70 ltmain.in --- ltmain.in 31 May 2005 03:47:34 -0000 1.334.2.70 +++ ltmain.in 2 Jun 2005 08:34:11 -0000 @@ -133,7 +133,6 @@ execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" -quote_scanset='[[~#^*{};<>?'"'"' ]' ##################################### # Shell function definitions: @@ -192,7 +191,7 @@ CC_quoted= for arg in $CC; do case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -213,7 +212,7 @@ for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -627,7 +626,7 @@ # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -662,7 +661,7 @@ # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac @@ -737,13 +736,12 @@ qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac - if test "X$libobj" != "X$qlibobj"; then - $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - exit $EXIT_FAILURE - fi + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then @@ -824,7 +822,7 @@ fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac @@ -1111,7 +1109,7 @@ arg="$1" shift case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; @@ -1543,7 +1541,7 @@ # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -1659,7 +1657,7 @@ for flag in $args; do IFS="$save_ifs" case $flag in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac @@ -1677,7 +1675,7 @@ for flag in $args; do IFS="$save_ifs" case $flag in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac @@ -1710,7 +1708,7 @@ # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -1844,7 +1842,7 @@ # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5367,7 +5365,7 @@ # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5383,7 +5381,7 @@ # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5431,7 +5429,7 @@ # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac