source: rtems/c/src/config-ml.in @ 5543770e

4.104.114.84.95
Last change on this file since 5543770e was d9af8a8e, checked in by Joel Sherrill <joel.sherrill@…>, on 05/14/02 at 16:12:04

2002-05-14 Ralf Corsepius <corsepiu@…>

  • config-ml.in: Take out arm and sh variants RTEMS does not support.
  • Property mode set to 100644
File size: 18.9 KB
Line 
1#### THIS IS NOT gcc's config-ml.in ####
2
3# 2001-12-18    Imported from from gcc-cvs/gcc-3.0-branch and modified
4#               for RTEMS.
5
6# Configure fragment invoked in the post-target section for subdirs
7# wanting multilib support.
8#
9# It is advisable to support a few --enable/--disable options to let the
10# user select which libraries s/he really wants.
11#
12# Subdirectories wishing to use multilib should put the following lines
13# in the "post-target" section of configure.in.
14#
15# if [ "${srcdir}" = "." ] ; then
16#   if [ "${with_target_subdir}" != "." ] ; then
17#     . ${with_multisrctop}../../config-ml.in
18#   else
19#     . ${with_multisrctop}../config-ml.in
20#   fi
21# else
22#   . ${srcdir}/../config-ml.in
23# fi
24#
25#
26# Things are complicated because 6 separate cases must be handled:
27# 2 (native, cross) x 3 (absolute-path, relative-not-dot, dot) = 6.
28#
29# srcdir=. is special.  It must handle make programs that don't handle VPATH.
30# To implement this, a symlink tree is built for each library and for each
31# multilib subdir.
32#
33# The build tree is layed out as
34#
35# ./
36#   newlib
37#   m68020/
38#          newlib
39#          m68881/
40#                 newlib
41#
42# The nice feature about this arrangement is that inter-library references
43# in the build tree work without having to care where you are.  Note that
44# inter-library references also work in the source tree because symlink trees
45# are built when srcdir=.
46#
47# Unfortunately, trying to access the libraries in the build tree requires
48# the user to manually choose which library to use as GCC won't be able to
49# find the right one.  This is viewed as the lesser of two evils.
50#
51# Configure variables:
52# ${with_target_subdir} = "." for native, or ${target_alias} for cross.
53# Set by top level Makefile.
54# ${with_multisrctop} = how many levels of multilibs there are in the source
55# tree.  It exists to handle the case of configuring in the source tree:
56# ${srcdir} is not constant.
57# ${with_multisubdir} = name of multilib subdirectory (eg: m68020/m68881).
58#
59# Makefile variables:
60# MULTISRCTOP = number of multilib levels in source tree (+1 if cross)
61# (FIXME: note that this is different than ${with_multisrctop}.  Check out.).
62# MULTIBUILDTOP = number of multilib levels in build tree
63# MULTIDIRS = list of multilib subdirs (eg: m68000 m68020 ...)
64# (only defined in each library's main Makefile).
65# MULTISUBDIR = installed subdirectory name with leading '/' (eg: /m68000)
66# (only defined in each multilib subdir).
67
68# FIXME: Multilib is currently disabled by default for everything other than
69# newlib.  It is up to each target to turn on multilib support for the other
70# libraries as desired.
71
72# We have to handle being invoked by both Cygnus configure and Autoconf.
73#
74# Cygnus configure incoming variables:
75# srcdir, subdir, host, arguments
76#
77# Autoconf incoming variables:
78# srcdir, host, ac_configure_args
79#
80# We *could* figure srcdir and host out, but we'd have to do work that
81# our caller has already done to figure them out and requiring these two
82# seems reasonable.
83# Note that `host' in this case is GCC's `target'.  Target libraries are
84# configured for a particular host.
85
86if [ -n "${ac_configure_args}" ]; then
87  Makefile=${ac_file-Makefile}
88  ml_config_shell=${CONFIG_SHELL-/bin/sh}
89  ml_arguments="${ac_configure_args}"
90  ml_realsrcdir=${srcdir}
91else
92  Makefile=${Makefile-Makefile}
93  ml_config_shell=${config_shell-/bin/sh}
94  ml_arguments="${arguments}"
95  if [ -n "${subdir}" -a "${subdir}" != "." ] ; then
96    ml_realsrcdir=${srcdir}/${subdir}
97  else
98    ml_realsrcdir=${srcdir}
99  fi
100fi
101
102# Scan all the arguments and set all the ones we need.
103
104ml_verbose=--verbose
105for option in ${ml_arguments}
106do
107  case $option in
108  --*) ;;
109  -*) option=-$option ;;
110  esac
111
112  case $option in
113  --*=*)
114        optarg=`echo $option | sed -e 's/^[^=]*=//'`
115        ;;
116  esac
117
118  case $option in
119  --disable-*)
120        enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
121        eval $enableopt=no
122        ;;
123  --enable-*)
124        case "$option" in
125        *=*)    ;;
126        *)      optarg=yes ;;
127        esac
128        enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
129        eval $enableopt="$optarg"
130        ;;
131  --norecursion | --no*)
132        ml_norecursion=yes
133        ;;
134  --silent | --sil* | --quiet | --q*)
135        ml_verbose=--silent
136        ;;
137  --verbose | --v | --verb*)
138        ml_verbose=--verbose
139        ;;
140  --with-*)
141        case "$option" in
142        *=*)    ;;
143        *)      optarg=yes ;;
144        esac
145        withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
146        eval $withopt="$optarg"
147        ;;
148  --without-*)
149        withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
150        eval $withopt=no
151        ;;
152  esac
153done
154
155# Only do this if --enable-multilib.
156if [ "${enable_multilib}" = yes ]; then
157
158# Compute whether this is the library's top level directory
159# (ie: not a multilib subdirectory, and not a subdirectory like newlib/src).
160# ${with_multisubdir} tells us we're in the right branch, but we could be
161# in a subdir of that.
162# ??? The previous version could void this test by separating the process into
163# two files: one that only the library's toplevel configure.in ran (to
164# configure the multilib subdirs), and another that all configure.in's ran to
165# update the Makefile.  It seemed reasonable to collapse all multilib support
166# into one file, but it does leave us with having to perform this test.
167ml_toplevel_p=no
168if [ -z "${with_multisubdir}" ]; then
169  if [ "${srcdir}" = "." ]; then
170    # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.
171    # ${with_target_subdir} = "." for native, otherwise target alias.
172    if [ "${with_target_subdir}" = "." ]; then
173      if [ -f ${ml_realsrcdir}/../config-ml.in ]; then
174        ml_toplevel_p=yes
175      fi
176    else
177      if [ -f ${ml_realsrcdir}/../../config-ml.in ]; then
178        ml_toplevel_p=yes
179      fi
180    fi
181  else
182    # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.
183    if [ -f ${ml_realsrcdir}/../config-ml.in ]; then
184      ml_toplevel_p=yes
185    fi
186  fi
187fi
188
189# If this is the library's top level directory, set multidirs to the
190# multilib subdirs to support.  This lives at the top because we need
191# `multidirs' set right away.
192
193if [ "${ml_toplevel_p}" = yes ]; then
194
195multidirs=
196for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
197  dir=`echo $i | sed -e 's/;.*$//'`
198  if [ "${dir}" = "." ]; then
199    true
200  else
201    if [ -z "${multidirs}" ]; then
202      multidirs="${dir}"
203    else
204      multidirs="${multidirs} ${dir}"
205    fi
206  fi
207done
208
209# Target libraries are configured for the host they run on, so we check
210# $host here, not $target.
211
212# BEGIN - RTEMS specific
213#
214# Prune multilib variants RTEMS does not support
215case "${host}" in
216arm-*-rtems*)
217          old_multidirs=${multidirs}
218          multidirs=""
219          for x in ${old_multidirs}; do
220            case "${x}" in
221              *thumb*) : ;;
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.