]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (lt_env): New variable. Use it when running commands.
authorBruno Haible <bruno@clisp.org>
Mon, 21 Jan 2008 15:01:24 +0000 (15:01 +0000)
committerPeter O'Gorman <peter@pogma.com>
Mon, 21 Jan 2008 15:01:24 +0000 (15:01 +0000)
ChangeLog
ltmain.in

index c2903f697e539202e523428f29540e3467829215..1d06540f97e577cdd2b0c12d26bc9bfd0e980d03 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-21  Bruno Haible  <bruno@clisp.org>
+
+       * ltmain.in (lt_env): New variable. Use it when running commands.
+
 2008-01-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Backport ISO C++ support from HEAD, 2006-03-17 and 2005-09-12 patches.
index 572ffa0dd9bdd30b0e55515f5a5f7c20e67e5379..63e2024fd0df9bbdb605ddf3e6e7b82d1e783d61 100644 (file)
--- 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