+2000-07-26 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ Merge from development tree:
+ 2000-03-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+ * ltconfig.in (variables_saved_for_relink): Set to `PATH
+ $shlibpath_var $runpath_var'. If with_gcc, add gcc-related
+ environment variables. Add it to the configuration section.
+ * ltmain.in (relink_command): Expand those variables.
+
2000-07-24 Mocha <netbsd_alpha@yahoo.com>
* ltconfig.in (NetBSD, deplibs_check_method): Use file_magic.
#! /bin/sh
# ltconfig - Create a system-specific libtool.
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; you can redistribute it and/or modify it
enable_fast_install=needless
fi
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$with_gcc" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
echo $ac_n "checking for objdir... $ac_c" 1>&6
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
# the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
# Compile-time system search path for libraries
sys_lib_search_path_spec=$sys_lib_search_path_spec
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun ltconfig.
#
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
# Quote the relink command for shipping.
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"
+ done
+ relink_command="cd `pwd`; $relink_command"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
fi