From 60523a834b4042e080f69666f4f28defa0747f87 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 3 Aug 2000 19:20:16 +0000 Subject: [PATCH] * config-ml.in: Adjust multilib search paths to the appropriate multilib tree. --- ChangeLog | 5 +++++ config-ml.in | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 14c234b8abf..9e9d1d119dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-08-03 Alexandre Oliva + + * config-ml.in: Adjust multilib search paths to the + appropriate multilib tree. + 2000-08-02 Alexandre Oliva * configure.in (CHILL_FOR_TARGET, CXX_FOR_TARGET): Convert blanks to diff --git a/config-ml.in b/config-ml.in index e5ca10ec1db..090cc2bb482 100644 --- a/config-ml.in +++ b/config-ml.in @@ -753,7 +753,40 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then break fi done - ml_config_env='CC="${CC} $flags"' + ml_config_env='CC="${CC_} $flags" CXX="${CXX_} $flags"' + + if [ "${with_target_subdir}" = "." ]; then + CC_=$CC + CXX_=$CXX + else + # Create a regular expression that matches any string as long + # as ML_POPDIR. + popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'` + CC_= + for arg in ${CC}; do + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CC_="${CC_} "`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"` ;; + "${ML_POPDIR}"/*) + CC_="${CC_} "`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p""`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` ;; + *) + CC_="${CC_} ${arg}" ;; + esac + done + + CXX_= + for arg in ${CXX}; do + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CXX_="${CXX_} "`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"` ;; + "${ML_POPDIR}"/*) + CXX_="${CXX_} "`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` ;; + *) + CXX_="${CXX_} ${arg}" ;; + esac + done + + fi if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \ --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \ -- 2.30.2