Hi,
when creating executables with libtool in a way, that a wrapper script is
necessary, the relink-command looks like (short part of it):
relink_command="cd /bi
... LD_RUN_PATH=\"\\\"X\\\"\"; ... PATH=\"\\\"X/usr/local/bin:/usr/bi ..."
Note the "X"s and the doubled \" which shouldn't be there. E.g. for my
system g++ is in /usr/local/bin, but as PATH contains "X/usr/local/bin"
the compiler isn't found when running the wrapper script.
The reason is the loop cycling through all to-be-saved environment vars,
in two places. The diff below fixes it. A quick scan through all uses of
Xsed revealed two other places which look strange (or better not the way
all the others look):
eval shlib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| ...
and
if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
Note the space between X and $. (simply search for "X ") It should be OK,
but for consistency...
Ciao,
Michael.
Index: ltmain.in
===================================================================
RCS file: /home/cvs/libtool/ltmain.in,v
retrieving revision 1.200.2.17
diff -u -r1.200.2.17 ltmain.in
--- ltmain.in 2000/05/26 05:40:31 1.200.2.17
+++ ltmain.in 2000/05/28 22:52:12
@@ -3550,7 +3554,7 @@
# Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do
eval var_value=\$$var
- var_value=`\$echo \"X$var_value\" | $Xsed -e "$sed_quote_subst"`
+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
relink_command="$var=\"$var_value\"; export $var; $relink_command"
done
relink_command="cd `pwd`; $relink_command"
@@ -3868,7 +3872,7 @@
# Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do
eval var_value=\$$var
- var_value=`\$echo \"X$var_value\" | $Xsed -e "$sed_quote_subst"`
+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
relink_command="$var=\"$var_value\"; export $var; $relink_command"
done
# Quote the link command for shipping.