This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix config-ml.in (take 2)


On Wed, Oct 01, 2003 at 11:25:47AM -0700, H. J. Lu wrote:
> config-ml.in sets environment with ${ml_config_env}. But configure
> may override them if the same variable is passed at the command
> line in ${ml_arguments}. One of them is CC, among others. This patch
> makes sure the ones in ${ml_config_env} will be used.
> 
> 

It turns out that not all configures can take FOO=bar. This patch
passes ${ml_config_env} only if ${ml_arguments} has some FOO=bar.


H.J.
---
2003-10-01  H.J. Lu  <hongjiu.lu@intel.com>

	* config-ml.in: Also pass ${ml_config_env} as arguments.

--- config-ml.in.multilib	2003-07-07 14:44:21.000000000 -0700
+++ config-ml.in	2003-10-01 12:44:44.000000000 -0700
@@ -843,9 +843,17 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n
 	fi
     fi
 
-    if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
-	--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
-	${ml_arguments} ${ml_srcdiroption} ; then
+    ml_run_config="${ml_config_env} ${ml_config_shell} ${ml_recprog}
+		   --with-multisubdir=${ml_dir}
+		   --with-multisrctop=${multisrctop} ${ml_arguments}
+		   ${ml_srcdiroption}"
+    case "${ml_arguments}" in
+    *\'CC=* | *\'CXX=* | *\'GCJ=* | *\`LD_LIBRARY_PATH=* | *\`SHLIB_PATH=*)
+      ml_run_config="${ml_run_config} ${ml_config_env}"
+      ;;
+    esac
+
+    if eval ${ml_run_config} ; then
       true
     else
       exit 1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]