source: rtems/config-ml.in @ 09969a8

Last change on this file since 09969a8 was 09969a8, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 28, 2003 at 5:08:26 AM

2003-02-28 Ralf Corsepius <corsepiu@…>

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