From: Bruno Haible Date: Mon, 21 Jan 2008 15:01:24 +0000 (+0000) Subject: * ltmain.in (lt_env): New variable. Use it when running commands. X-Git-Tag: release-1-5-26~8 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb0495676a997f31ee93690f07796108c78e3ec8;p=thirdparty%2Flibtool.git * ltmain.in (lt_env): New variable. Use it when running commands. --- diff --git a/ChangeLog b/ChangeLog index c2903f697..1d06540f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-01-21 Bruno Haible + + * ltmain.in (lt_env): New variable. Use it when running commands. + 2008-01-19 Ralf Wildenhues Backport ISO C++ support from HEAD, 2006-03-17 and 2005-09-12 patches. diff --git a/ltmain.in b/ltmain.in index 572ffa0dd..63e2024fd 100644 --- a/ltmain.in +++ b/ltmain.in @@ -113,15 +113,21 @@ esac # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. +lt_env= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var + lt_env=\"$lt_var=\$$lt_var \$lt_env\" $lt_var=C export $lt_var fi" done +if test -n "$lt_env"; then + lt_env="env $lt_env" +fi + # Make sure IFS has a sensible default lt_nl=' ' @@ -957,7 +963,7 @@ EOF $run $rm "$lobj" "$output_obj" $show "$command" - if $run eval "$command"; then : + if $run eval $lt_env "$command"; then : else test -n "$output_obj" && $run $rm $removelist exit $EXIT_FAILURE @@ -1029,7 +1035,7 @@ EOF command="$command$suppress_output" $run $rm "$obj" "$output_obj" $show "$command" - if $run eval "$command"; then : + if $run eval $lt_env "$command"; then : else $run $rm $removelist exit $EXIT_FAILURE