]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (variables_saved_for_relink): Attempt to unset them
authorAlexandre Oliva <aoliva@redhat.com>
Sun, 3 Sep 2000 03:15:23 +0000 (03:15 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Sun, 3 Sep 2000 03:15:23 +0000 (03:15 +0000)
instead of setting them to an empty string.

ChangeLog
ltmain.in

index 1a2dea37739daba9548ef61e6300121d1e6339ce..b288b25eaa86725a30e4a4d7fc3d61a344433d55 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-09-03  Alexandre Oliva  <aoliva@redhat.com>
+
+       * ltmain.in (variables_saved_for_relink): Attempt to unset them
+       instead of setting them to an empty string.
+
 2000-09-02  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
 
        * ltmain.in (shtool): Actually check in 2000-08-01's patch.
index 4d27ad639c499f1b113569c687459a329e5c349e..eaabfebae11c23e24894cb02b8edf25d8e69a517 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -2768,9 +2768,14 @@ static const void *lt_preloaded_setup() {
       if test -n "$relink_command"; then
        # 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"`
-         relink_command="$var=\"$var_value\"; export $var; $relink_command"
+         if eval test -z \"\${$var+set}\"; then
+           relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+         elif eval var_value=\$$var; test -z "$var_value"; then
+           relink_command="$var=; export $var; $relink_command"
+         else
+           var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+           relink_command="$var=\"$var_value\"; export $var; $relink_command"
+         fi
        done
        relink_command="cd `pwd`; $relink_command"
        relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`