source: rtems/config-ml.in @ 948a069

Last change on this file since 948a069 was e4bfc976, checked in by Ralf Corsepius <ralf.corsepius@…>, on 07/15/03 at 14:26:44

2003-07-15 Ralf Corsepius <corsepiu@…>

  • config-ml.in: Partial sync with gcc-3.4's config-ml.in. Add "autoconf-2.5x unquoting" hack.
  • Property mode set to 100644
File size: 18.7 KB
Line 
1#### THIS IS NOT gcc's config-ml.in ####
2
3# 2002-07-06    Imported from from gcc-3.1
4
5# Configure fragment invoked in the post-target section for subdirs
6# wanting multilib support.
7#
8# It is advisable to support a few --enable/--disable options to let the
9# user select which libraries s/he really wants.
10#
11# Subdirectories wishing to use multilib should put the following lines
12# in the "post-target" section of configure.in.
13#
14# if [ "${srcdir}" = "." ] ; then
15#   if [ "${with_target_subdir}" != "." ] ; then
16#     . ${with_multisrctop}../../config-ml.in
17#   else
18#     . ${with_multisrctop}../config-ml.in
19#   fi
20# else
21#   . ${srcdir}/../config-ml.in
22# fi
23#
24#
25# Things are complicated because 6 separate cases must be handled:
26# 2 (native, cross) x 3 (absolute-path, relative-not-dot, dot) = 6.
27#
28# srcdir=. is special.  It must handle make programs that don't handle VPATH.
29# To implement this, a symlink tree is built for each library and for each
30# multilib subdir.
31#
32# The build tree is layed out as
33#
34# ./
35#   newlib
36#   m68020/
37#          newlib
38#          m68881/
39#                 newlib
40#
41# The nice feature about this arrangement is that inter-library references
42# in the build tree work without having to care where you are.  Note that
43# inter-library references also work in the source tree because symlink trees
44# are built when srcdir=.
45#
46# Unfortunately, trying to access the libraries in the build tree requires
47# the user to manually choose which library to use as GCC won't be able to
48# find the right one.  This is viewed as the lesser of two evils.
49#
50# Configure variables:
51# ${with_target_subdir} = "." for native, or ${target_alias} for cross.
52# Set by top level Makefile.
53# ${with_multisrctop} = how many levels of multilibs there are in the source
54# tree.  It exists to handle the case of configuring in the source tree:
55# ${srcdir} is not constant.
56# ${with_multisubdir} = name of multilib subdirectory (eg: m68020/m68881).
57#
58# Makefile variables:
59# MULTISRCTOP = number of multilib levels in source tree (+1 if cross)
60# (FIXME: note that this is different than ${with_multisrctop}.  Check out.).
61# MULTIBUILDTOP = number of multilib levels in build tree
62# MULTIDIRS = list of multilib subdirs (eg: m68000 m68020 ...)
63# (only defined in each library's main Makefile).
64# MULTISUBDIR = installed subdirectory name with leading '/' (eg: /m68000)
65# (only defined in each multilib subdir).
66
67# FIXME: Multilib is currently disabled by default for everything other than
68# newlib.  It is up to each target to turn on multilib support for the other
69# libraries as desired.
70
71# We have to handle being invoked by both Cygnus configure and Autoconf.
72#
73# Cygnus configure incoming variables:
74# srcdir, subdir, host, arguments
75#
76# Autoconf incoming variables:
77# srcdir, host, ac_configure_args
78#
79# We *could* figure srcdir and host out, but we'd have to do work that
80# our caller has already done to figure them out and requiring these two
81# seems reasonable.
82# Note that `host' in this case is GCC's `target'.  Target libraries are
83# configured for a particular host.
84
85Makefile=${ac_file-Makefile}
86ml_config_shell=${CONFIG_SHELL-/bin/sh}
87ml_arguments=${ac_configure_args}
88ml_realsrcdir=${srcdir}
89
90# Scan all the arguments and set all the ones we need.
91
92ml_verbose=--verbose
93for option in ${ml_arguments}
94do
95  case $option in
96# Unquote autoconf >= 2.57 added quotes
97  \'--*\') eval option="$option" ;;
98  --*) ;;
99  -*) option=-$option ;;
100  esac
101
102  case $option in
103  --*=*)
104        optarg=`echo $option | sed -e 's/^[^=]*=//'`
105        ;;
106  esac
107
108  case $option in
109  --disable-*)
110        enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
111        eval $enableopt=no
112        ;;
113  --enable-*)
114        case "$option" in
115        *=*)    ;;
116        *)      optarg=yes ;;
117        esac
118        enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
119        eval $enableopt="$optarg"
120        ;;
121  --norecursion | --no*)
122        ml_norecursion=yes
123        ;;
124  --silent | --sil* | --quiet | --q*)
125        ml_verbose=--silent
126        ;;
127  --verbose | --v | --verb*)
128        ml_verbose=--verbose
129        ;;
130  --with-*)
131        case "$option" in
132        *=*)    ;;
133        *)      optarg=yes ;;
134        esac
135        withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
136        eval $withopt="$optarg"
137        ;;
138  --without-*)
139        withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
140        eval $withopt=no
141        ;;
142  esac
143done
144
145# Only do this if --enable-multilib.
146if [ "${enable_multilib}" = yes ]; then
147
148# Compute whether this is the library's top level directory
149# (ie: not a multilib subdirectory, and not a subdirectory like newlib/src).
150# ${with_multisubdir} tells us we're in the right branch, but we could be
151# in a subdir of that.
152# ??? The previous version could void this test by separating the process into
153# two files: one that only the library's toplevel configure.in ran (to
154# configure the multilib subdirs), and another that all configure.in's ran to
155# update the Makefile.  It seemed reasonable to collapse all multilib support
156# into one file, but it does leave us with having to perform this test.
157ml_toplevel_p=no
158if [ -z "${with_multisubdir}" ]; then
159  if [ "${srcdir}" = "." ]; then
160    # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.
161    # ${with_target_subdir} = "." for native, otherwise target alias.
162    if [ "${with_target_subdir}" = "." ]; then
163      if [ -f ${ml_realsrcdir}/../config-ml.in ]; then
164        ml_toplevel_p=yes
165      fi
166    else
167      if [ -f ${ml_realsrcdir}/../../config-ml.in ]; then
168        ml_toplevel_p=yes
169      fi
170    fi
171  else
172    # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.
173    if [ -f ${ml_realsrcdir}/../config-ml.in ]; then
174      ml_toplevel_p=yes
175    fi
176  fi
177fi
178
179# If this is the library's top level directory, set multidirs to the
180# multilib subdirs to support.  This lives at the top because we need
181# `multidirs' set right away.
182
183if [ "${ml_toplevel_p}" = yes ]; then
184
185multidirs=
186for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
187  dir=`echo $i | sed -e 's/;.*$//'`
188  if [ "${dir}" = "." ]; then
189    true
190  else
191    if [ -z "${multidirs}" ]; then
192      multidirs="${dir}"
193    else
194      multidirs="${multidirs} ${dir}"
195    fi
196  fi
197done
198
199# Target libraries are configured for the host they run on, so we check
200# $host here, not $target.
201
202# BEGIN - RTEMS specific
203#
204# Prune multilib variants RTEMS does not support
205case "${host}" in
206arm-*-rtems*)
207          old_multidirs=${multidirs}
208          multidirs=""
209          for x in ${old_multidirs}; do
210            case "${x}" in
211              *thumb* ) : ;;
212              *fpu* ) : ;;
213              *) multidirs="${multidirs} ${x}" ;;
214            esac
215          done
216        ;;
217
218sh-*-rtems*)
219          old_multidirs=${multidirs}
220          multidirs=""
221          for x in ${old_multidirs}; do
222            case "${x}" in
223              *ml ) : ;;
224              *ml/m2 ) : ;;
225              *m3e*) : ;;
226              *m4-single*) : ;;
227              m4*) : ;;
228              *) multidirs="${multidirs} ${x}" ;;
229            esac
230          done
231        ;;
232esac
233# END - RTEMS specific
234
235case "${host}" in
236mips*-*-*)
237        case " $multidirs " in
238        *" mabi=64 "*)
239          # We will not be able to create libraries with -mabi=64 if
240          # we cannot even link a trivial program.  It usually
241          # indicates the 64bit libraries are missing.
242          if echo 'main() {}' > conftest.c &&
243             ${CC-gcc} -mabi=64 conftest.c -o conftest; then
244            :
245          else
246            echo Could not link program with -mabi=64, disabling it.
247            old_multidirs="${multidirs}"
248            multidirs=""
249            for x in ${old_multidirs}; do
250              case "$x" in
251              *mabi=64* ) : ;;
252              *) multidirs="${multidirs} ${x}" ;;
253              esac
254            done
255          fi
256          rm -f conftest.c conftest
257          ;;
258        esac
259        ;;
260sparc*-*-*)
261        case " $multidirs " in
262        *" m64 "*)
263          # We will not be able to create libraries with -m64 if
264          # we cannot even link a trivial program.  It usually
265          # indicates the 64bit libraries are missing.
266          if echo 'main() {}' > conftest.c &&
267             ${CC-gcc} -m64 conftest.c -o conftest; then
268            :
269          else
270            echo Could not link program with -m64, disabling it.
271            old_multidirs="${multidirs}"
272            multidirs=""
273            for x in ${old_multidirs}; do
274              case "$x" in
275              *m64* ) : ;;
276              *) multidirs="${multidirs} ${x}" ;;
277              esac
278            done
279          fi
280          rm -f conftest.c conftest
281          ;;
282        esac
283        ;;
284esac
285
286# Remove extraneous blanks from multidirs.
287# Tests like `if [ -n "$multidirs" ]' require it.
288multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'`
289
290# Add code to library's top level makefile to handle building the multilib
291# subdirs.
292
293cat > Multi.tem <<\EOF
294
295# FIXME: There should be an @-sign in front of the `if'.
296# Leave out until this is tested a bit more.
297multi-do:
298        if [ -z "$(MULTIDIRS)" ]; then \
299          true; \
300        else \
301          rootpre=`pwd`/; export rootpre; \
302          srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
303          lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \
304          compiler="$(CC)"; \
305          for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \
306            dir=`echo $$i | sed -e 's/;.*$$//'`; \
307            if [ "$${dir}" = "." ]; then \
308              true; \
309            else \
310              if [ -d ../$${dir}/$${lib} ]; then \
311                flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
312                if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
313                                CFLAGS="$(CFLAGS) $${flags}" \
314                                prefix="$(prefix)" \
315                                exec_prefix="$(exec_prefix)" \
316                                ASFLAGS="$(ASFLAGS) $${flags}" \
317                                GCJFLAGS="$(GCJFLAGS) $${flags}" \
318                                CXXFLAGS="$(CXXFLAGS) $${flags}" \
319                                LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
320                                LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
321                                LDFLAGS="$(LDFLAGS) $${flags}" \
322                                $(DO)); then \
323                  true; \
324                else \
325                  exit 1; \
326                fi; \
327              else true; \
328              fi; \
329            fi; \
330          done; \
331        fi
332
333# FIXME: There should be an @-sign in front of the `if'.
334# Leave out until this is tested a bit more.
335multi-clean:
336        if [ -z "$(MULTIDIRS)" ]; then \
337          true; \
338        else \
339          lib=`pwd | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
340          for dir in Makefile $(MULTIDIRS); do \
341            if [ -f ../$${dir}/$${lib}/Makefile ]; then \
342              if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \
343              then true; \
344              else exit 1; \
345              fi; \
346            else true; \
347            fi; \
348          done; \
349        fi
350EOF
351
352cat ${Makefile} Multi.tem > Makefile.tem
353rm -f ${Makefile} Multi.tem
354mv Makefile.tem ${Makefile}
355
356fi # ${ml_toplevel_p} = yes
357
358if [ "${ml_verbose}" = --verbose ]; then
359  echo "Adding multilib support to Makefile in ${ml_realsrcdir}"
360  if [ "${ml_toplevel_p}" = yes ]; then
361    echo "multidirs=${multidirs}"
362  fi
363  echo "with_multisubdir=${with_multisubdir}"
364fi
365
366if [ "${srcdir}" = "." ]; then
367  if [ "${with_target_subdir}" != "." ]; then
368    ml_srcdotdot="../"
369  else
370    ml_srcdotdot=""
371  fi
372else
373  ml_srcdotdot=""
374fi
375
376if [ -z "${with_multisubdir}" ]; then
377  ml_subdir=
378  ml_builddotdot=
379  : # ml_srcdotdot= # already set
380else
381  ml_subdir="/${with_multisubdir}"
382  # The '[^/][^/]*' appears that way to work around a SunOS sed bug.
383  ml_builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`/
384  if [ "$srcdir" = "." ]; then
385    ml_srcdotdot=${ml_srcdotdot}${ml_builddotdot}
386  else
387    : # ml_srcdotdot= # already set
388  fi
389fi
390
391if [ "${ml_toplevel_p}" = yes ]; then
392  ml_do='$(MAKE)'
393  ml_clean='$(MAKE)'
394else
395  ml_do=true
396  ml_clean=true
397fi
398
399# TOP is used by newlib and should not be used elsewhere for this purpose.
400# MULTI{SRC,BUILD}TOP are the proper ones to use.  MULTISRCTOP is empty
401# when srcdir != builddir.  MULTIBUILDTOP is always some number of ../'s.
402# FIXME: newlib needs to be updated to use MULTI{SRC,BUILD}TOP so we can
403# delete TOP.  Newlib may wish to continue to use TOP for its own purposes
404# of course.
405# MULTIDIRS is non-empty for the cpu top level Makefile (eg: newlib/Makefile)
406# and lists the subdirectories to recurse into.
407# MULTISUBDIR is non-empty in each cpu subdirectory's Makefile
408# (eg: newlib/h8300h/Makefile) and is the installed subdirectory name with
409# a leading '/'.
410# MULTIDO is used for targets like all, install, and check where
411# $(FLAGS_TO_PASS) augmented with the subdir's compiler option is needed.
412# MULTICLEAN is used for the *clean targets.
413#
414# ??? It is possible to merge MULTIDO and MULTICLEAN into one.  They are
415# currently kept separate because we don't want the *clean targets to require
416# the existence of the compiler (which MULTIDO currently requires) and
417# therefore we'd have to record the directory options as well as names
418# (currently we just record the names and use --print-multi-lib to get the
419# options).
420
421sed -e "s:^TOP[         ]*=[    ]*\([./]*\)[    ]*$:TOP = ${ml_builddotdot}\1:" \
422    -e "s:^MULTISRCTOP[         ]*=.*$:MULTISRCTOP = ${ml_srcdotdot}:" \
423    -e "s:^MULTIBUILDTOP[       ]*=.*$:MULTIBUILDTOP = ${ml_builddotdot}:" \
424    -e "s:^MULTIDIRS[   ]*=.*$:MULTIDIRS = ${multidirs}:" \
425    -e "s:^MULTISUBDIR[         ]*=.*$:MULTISUBDIR = ${ml_subdir}:" \
426    -e "s:^MULTIDO[     ]*=.*$:MULTIDO = $ml_do:" \
427    -e "s:^MULTICLEAN[  ]*=.*$:MULTICLEAN = $ml_clean:" \
428        ${Makefile} > Makefile.tem
429rm -f ${Makefile}
430mv Makefile.tem ${Makefile}
431
432# If this is the library's top level, configure each multilib subdir.
433# This is done at the end because this is the loop that runs configure
434# in each multilib subdir and it seemed reasonable to finish updating the
435# Makefile before going on to configure the subdirs.
436
437if [ "${ml_toplevel_p}" = yes ]; then
438
439# We must freshly configure each subdirectory.  This bit of code is
440# actually partially stolen from the main configure script.  FIXME.
441
442if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
443
444  if [ "${ml_verbose}" = --verbose ]; then
445    echo "Running configure in multilib subdirs ${multidirs}"
446    echo "pwd: `pwd`"
447  fi
448
449  ml_origdir=`pwd`
450  ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'`
451  # cd to top-level-build-dir/${with_target_subdir}
452  cd ..
453
454  for ml_dir in ${multidirs}; do
455
456    if [ "${ml_verbose}" = --verbose ]; then
457      echo "Running configure in multilib subdir ${ml_dir}"
458      echo "pwd: `pwd`"
459    fi
460
461    if [ -d ${ml_dir} ]; then true; else
462      # ``mkdir -p ${ml_dir}'' See also mkinstalldirs.
463      pathcomp=""
464      for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do
465        pathcomp="$pathcomp$d"
466        case "$pathcomp" in
467          -* ) pathcomp=./$pathcomp ;;
468        esac
469        if test ! -d "$pathcomp"; then
470           echo "mkdir $pathcomp" 1>&2
471           mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
472        fi
473        if test ! -d "$pathcomp"; then
474           exit $lasterr
475        fi
476        pathcomp="$pathcomp/"
477      done
478    fi
479    if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi
480
481    # Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../
482    dotdot=../`echo ${ml_dir} | sed -e 's|[^/]||g' -e 's|/|../|g'`
483
484    case ${srcdir} in
485    ".")
486      echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir}
487      if [ "${with_target_subdir}" != "." ]; then
488        ml_unsubdir="../"
489      else
490        ml_unsubdir=""
491      fi
492      (cd ${ml_dir}/${ml_libdir};
493       ../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "")
494      if [ -f ${ml_dir}/${ml_libdir}/Makefile ]; then
495        if [ x"${MAKE}" = x ]; then
496          (cd ${ml_dir}/${ml_libdir}; make distclean)
497        else
498          (cd ${ml_dir}/${ml_libdir}; ${MAKE} distclean)
499        fi
500      fi
501      ml_newsrcdir="."
502      ml_srcdiroption=
503      multisrctop=${dotdot}
504      ;;
505    *)
506      case "${srcdir}" in
507      /* | [A-Za-z]:[\\/]* ) # absolute path
508        ml_newsrcdir=${srcdir}
509        ;;
510      *) # otherwise relative
511        ml_newsrcdir=${dotdot}${srcdir}
512        ;;
513      esac
514      ml_srcdiroption="-srcdir=${ml_newsrcdir}"
515      multisrctop=
516      ;;
517    esac
518
519    case "${progname}" in
520    /* | [A-Za-z]:[\\/]* )     ml_recprog=${progname} ;;
521    *)      ml_recprog=${dotdot}${progname} ;;
522    esac
523
524    # FIXME: POPDIR=${PWD=`pwd`} doesn't work here.
525    ML_POPDIR=`pwd`
526    cd ${ml_dir}/${ml_libdir}
527
528    if [ -f ${ml_newsrcdir}/configure ]; then
529      ml_recprog="${ml_newsrcdir}/configure"
530    fi
531
532    # find compiler flag corresponding to ${ml_dir}
533    for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
534      dir=`echo $i | sed -e 's/;.*$//'`
535      if [ "${dir}" = "${ml_dir}" ]; then
536        flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`
537        break
538      fi
539    done
540    ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" GCJ="${GCJ_}$flags"'
541
542    if [ "${with_target_subdir}" = "." ]; then
543        CC_=$CC' '
544        CXX_=$CXX' '
545        GCJ_=$GCJ' '
546    else
547        # Create a regular expression that matches any string as long
548        # as ML_POPDIR.
549        popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'`
550        CC_=
551        for arg in ${CC}; do
552          case $arg in
553          -[BIL]"${ML_POPDIR}"/*)
554            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"`' ' ;;
555          "${ML_POPDIR}"/*)
556            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"`' ' ;;
557          *)
558            CC_="${CC_}${arg} " ;;
559          esac
560        done
561
562        CXX_=
563        for arg in ${CXX}; do
564          case $arg in
565          -[BIL]"${ML_POPDIR}"/*)
566            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"`' ' ;;
567          "${ML_POPDIR}"/*)
568            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"`' ' ;;
569          *)
570            CXX_="${CXX_}${arg} " ;;
571          esac
572        done
573
574        GCJ_=
575        for arg in ${GCJ}; do
576          case $arg in
577          -[BIL]"${ML_POPDIR}"/*)
578            GCJ_="${GCJ_}"`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"`' ' ;;
579          "${ML_POPDIR}"/*)
580            GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
581          *)
582            GCJ_="${GCJ_}${arg} " ;;
583          esac
584        done
585
586        if test "x${LD_LIBRARY_PATH+set}" = xset; then
587          LD_LIBRARY_PATH_=
588          for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
589            case "$arg" in
590            "${ML_POPDIR}"/*)
591              arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`
592              ;;
593            esac
594            if test "x$LD_LIBRARY_PATH_" != x; then
595              LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg
596            else
597              LD_LIBRARY_PATH_=$arg
598            fi
599          done
600          ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_"
601        fi
602
603        if test "x${SHLIB_PATH+set}" = xset; then
604          SHLIB_PATH_=
605          for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do
606            case "$arg" in
607            "${ML_POPDIR}"/*)
608              arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`
609              ;;
610            esac
611            if test "x$SHLIB_PATH_" != x; then
612              SHLIB_PATH_=$SHLIB_PATH_:$arg
613            else
614              SHLIB_PATH_=$arg
615            fi
616          done
617          ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_"
618        fi
619    fi
620
621    if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
622        --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
623        --with-multibuildtop=${ml_builddotdot} \
624        ${ml_arguments} ${ml_srcdiroption} ; then
625      true
626    else
627      exit 1
628    fi
629
630    cd ${ML_POPDIR}
631
632  done
633
634  cd ${ml_origdir}
635fi
636
637fi # ${ml_toplevel_p} = yes
638fi # ${enable_multilib} = yes
Note: See TracBrowser for help on using the repository browser.