source: rtems/config-ml.in @ 1cd9dfc

4.104.114.84.95
Last change on this file since 1cd9dfc was 0b22af6, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/25/03 at 08:50:16

Merger from rtems-4-6-branch.

  • 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              *ml ) : ;;
233              *ml/m2 ) : ;;
234              *m3e*) : ;;
235              *m4-single*) : ;;
236              m4*) : ;;
237              *) multidirs="${multidirs} ${x}" ;;
238            esac
239          done
240        ;;
241esac
242# END - RTEMS specific
243
244case "${host}" in
245mips*-*-*)
246        case " $multidirs " in
247        *" mabi=64 "*)
248          # We will not be able to create libraries with -mabi=64 if
249          # we cannot even link a trivial program.  It usually
250          # indicates the 64bit libraries are missing.
251          if echo 'main() {}' > conftest.c &&
252             ${CC-gcc} -mabi=64 conftest.c -o conftest; then
253            :
254          else
255            echo Could not link program with -mabi=64, disabling it.
256            old_multidirs="${multidirs}"
257            multidirs=""
258            for x in ${old_multidirs}; do
259              case "$x" in
260              *mabi=64* ) : ;;
261              *) multidirs="${multidirs} ${x}" ;;
262              esac
263            done
264          fi
265          rm -f conftest.c conftest
266          ;;
267        esac
268        ;;
269sparc*-*-*)
270        case " $multidirs " in
271        *" m64 "*)
272          # We will not be able to create libraries with -m64 if
273          # we cannot even link a trivial program.  It usually
274          # indicates the 64bit libraries are missing.
275          if echo 'main() {}' > conftest.c &&
276             ${CC-gcc} -m64 conftest.c -o conftest; then
277            :
278          else
279            echo Could not link program with -m64, disabling it.
280            old_multidirs="${multidirs}"
281            multidirs=""
282            for x in ${old_multidirs}; do
283              case "$x" in
284              *m64* ) : ;;
285              *) multidirs="${multidirs} ${x}" ;;
286              esac
287            done
288          fi
289          rm -f conftest.c conftest
290          ;;
291        esac
292        ;;
293esac
294
295# Remove extraneous blanks from multidirs.
296# Tests like `if [ -n "$multidirs" ]' require it.
297multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'`
298
299# Add code to library's top level makefile to handle building the multilib
300# subdirs.
301
302cat > Multi.tem <<\EOF
303
304# FIXME: There should be an @-sign in front of the `if'.
305# Leave out until this is tested a bit more.
306multi-do:
307        if [ -z "$(MULTIDIRS)" ]; then \
308          true; \
309        else \
310          rootpre=`pwd`/; export rootpre; \
311          srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
312          lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \
313          compiler="$(CC)"; \
314          for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \
315            dir=`echo $$i | sed -e 's/;.*$$//'`; \
316            if [ "$${dir}" = "." ]; then \
317              true; \
318            else \
319              if [ -d ../$${dir}/$${lib} ]; then \
320                flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
321                if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
322                                CFLAGS="$(CFLAGS) $${flags}" \
323                                prefix="$(prefix)" \
324                                exec_prefix="$(exec_prefix)" \
325                                ASFLAGS="$(ASFLAGS) $${flags}" \
326                                GCJFLAGS="$(GCJFLAGS) $${flags}" \
327                                CXXFLAGS="$(CXXFLAGS) $${flags}" \
328                                LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
329                                LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
330                                LDFLAGS="$(LDFLAGS) $${flags}" \
331                                $(DO)); then \
332                  true; \
333                else \
334                  exit 1; \
335                fi; \
336              else true; \
337              fi; \
338            fi; \
339          done; \
340        fi
341
342# FIXME: There should be an @-sign in front of the `if'.
343# Leave out until this is tested a bit more.
344multi-clean:
345        if [ -z "$(MULTIDIRS)" ]; then \
346          true; \
347        else \
348          lib=`pwd | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
349          for dir in Makefile $(MULTIDIRS); do \
350            if [ -f ../$${dir}/$${lib}/Makefile ]; then \
351              if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \
352              then true; \
353              else exit 1; \
354              fi; \
355            else true; \
356            fi; \
357          done; \
358        fi
359EOF
360
361cat ${Makefile} Multi.tem > Makefile.tem
362rm -f ${Makefile} Multi.tem
363mv Makefile.tem ${Makefile}
364
365fi # ${ml_toplevel_p} = yes
366
367if [ "${ml_verbose}" = --verbose ]; then
368  echo "Adding multilib support to Makefile in ${ml_realsrcdir}"
369  if [ "${ml_toplevel_p}" = yes ]; then
370    echo "multidirs=${multidirs}"
371  fi
372  echo "with_multisubdir=${with_multisubdir}"
373fi
374
375if [ "${srcdir}" = "." ]; then
376  if [ "${with_target_subdir}" != "." ]; then
377    ml_srcdotdot="../"
378  else
379    ml_srcdotdot=""
380  fi
381else
382  ml_srcdotdot=""
383fi
384
385if [ -z "${with_multisubdir}" ]; then
386  ml_subdir=
387  ml_builddotdot=
388  : # ml_srcdotdot= # already set
389else
390  ml_subdir="/${with_multisubdir}"
391  # The '[^/][^/]*' appears that way to work around a SunOS sed bug.
392  ml_builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`/
393  if [ "$srcdir" = "." ]; then
394    ml_srcdotdot=${ml_srcdotdot}${ml_builddotdot}
395  else
396    : # ml_srcdotdot= # already set
397  fi
398fi
399
400if [ "${ml_toplevel_p}" = yes ]; then
401  ml_do='$(MAKE)'
402  ml_clean='$(MAKE)'
403else
404  ml_do=true
405  ml_clean=true
406fi
407
408# TOP is used by newlib and should not be used elsewhere for this purpose.
409# MULTI{SRC,BUILD}TOP are the proper ones to use.  MULTISRCTOP is empty
410# when srcdir != builddir.  MULTIBUILDTOP is always some number of ../'s.
411# FIXME: newlib needs to be updated to use MULTI{SRC,BUILD}TOP so we can
412# delete TOP.  Newlib may wish to continue to use TOP for its own purposes
413# of course.
414# MULTIDIRS is non-empty for the cpu top level Makefile (eg: newlib/Makefile)
415# and lists the subdirectories to recurse into.
416# MULTISUBDIR is non-empty in each cpu subdirectory's Makefile
417# (eg: newlib/h8300h/Makefile) and is the installed subdirectory name with
418# a leading '/'.
419# MULTIDO is used for targets like all, install, and check where
420# $(FLAGS_TO_PASS) augmented with the subdir's compiler option is needed.
421# MULTICLEAN is used for the *clean targets.
422#
423# ??? It is possible to merge MULTIDO and MULTICLEAN into one.  They are
424# currently kept separate because we don't want the *clean targets to require
425# the existence of the compiler (which MULTIDO currently requires) and
426# therefore we'd have to record the directory options as well as names
427# (currently we just record the names and use --print-multi-lib to get the
428# options).
429
430sed -e "s:^TOP[         ]*=[    ]*\([./]*\)[    ]*$:TOP = ${ml_builddotdot}\1:" \
431    -e "s:^MULTISRCTOP[         ]*=.*$:MULTISRCTOP = ${ml_srcdotdot}:" \
432    -e "s:^MULTIBUILDTOP[       ]*=.*$:MULTIBUILDTOP = ${ml_builddotdot}:" \
433    -e "s:^MULTIDIRS[   ]*=.*$:MULTIDIRS = ${multidirs}:" \
434    -e "s:^MULTISUBDIR[         ]*=.*$:MULTISUBDIR = ${ml_subdir}:" \
435    -e "s:^MULTIDO[     ]*=.*$:MULTIDO = $ml_do:" \
436    -e "s:^MULTICLEAN[  ]*=.*$:MULTICLEAN = $ml_clean:" \
437        ${Makefile} > Makefile.tem
438rm -f ${Makefile}
439mv Makefile.tem ${Makefile}
440
441# If this is the library's top level, configure each multilib subdir.
442# This is done at the end because this is the loop that runs configure
443# in each multilib subdir and it seemed reasonable to finish updating the
444# Makefile before going on to configure the subdirs.
445
446if [ "${ml_toplevel_p}" = yes ]; then
447
448# We must freshly configure each subdirectory.  This bit of code is
449# actually partially stolen from the main configure script.  FIXME.
450
451if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
452
453  if [ "${ml_verbose}" = --verbose ]; then
454    echo "Running configure in multilib subdirs ${multidirs}"
455    echo "pwd: `pwd`"
456  fi
457
458  ml_origdir=`pwd`
459  ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'`
460  # cd to top-level-build-dir/${with_target_subdir}
461  cd ..
462
463  for ml_dir in ${multidirs}; do
464
465    if [ "${ml_verbose}" = --verbose ]; then
466      echo "Running configure in multilib subdir ${ml_dir}"
467      echo "pwd: `pwd`"
468    fi
469
470    if [ -d ${ml_dir} ]; then true; else
471      # ``mkdir -p ${ml_dir}'' See also mkinstalldirs.
472      pathcomp=""
473      for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do
474        pathcomp="$pathcomp$d"
475        case "$pathcomp" in
476          -* ) pathcomp=./$pathcomp ;;
477        esac
478        if test ! -d "$pathcomp"; then
479           echo "mkdir $pathcomp" 1>&2
480           mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
481        fi
482        if test ! -d "$pathcomp"; then
483           exit $lasterr
484        fi
485        pathcomp="$pathcomp/"
486      done
487    fi
488    if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi
489
490    # Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../
491    dotdot=../`echo ${ml_dir} | sed -e 's|[^/]||g' -e 's|/|../|g'`
492
493    case ${srcdir} in
494    ".")
495      echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir}
496      if [ "${with_target_subdir}" != "." ]; then
497        ml_unsubdir="../"
498      else
499        ml_unsubdir=""
500      fi
501      (cd ${ml_dir}/${ml_libdir};
502       ../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "")
503      if [ -f ${ml_dir}/${ml_libdir}/Makefile ]; then
504        if [ x"${MAKE}" = x ]; then
505          (cd ${ml_dir}/${ml_libdir}; make distclean)
506        else
507          (cd ${ml_dir}/${ml_libdir}; ${MAKE} distclean)
508        fi
509      fi
510      ml_newsrcdir="."
511      ml_srcdiroption=
512      multisrctop=${dotdot}
513      ;;
514    *)
515      case "${srcdir}" in
516      /* | [A-Za-z]:[\\/]* ) # absolute path
517        ml_newsrcdir=${srcdir}
518        ;;
519      *) # otherwise relative
520        ml_newsrcdir=${dotdot}${srcdir}
521        ;;
522      esac
523      ml_srcdiroption="-srcdir=${ml_newsrcdir}"
524      multisrctop=
525      ;;
526    esac
527
528    case "${progname}" in
529    /* | [A-Za-z]:[\\/]* )     ml_recprog=${progname} ;;
530    *)      ml_recprog=${dotdot}${progname} ;;
531    esac
532
533    # FIXME: POPDIR=${PWD=`pwd`} doesn't work here.
534    ML_POPDIR=`pwd`
535    cd ${ml_dir}/${ml_libdir}
536
537    if [ -f ${ml_newsrcdir}/configure ]; then
538      ml_recprog="${ml_newsrcdir}/configure"
539    fi
540
541    # find compiler flag corresponding to ${ml_dir}
542    for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
543      dir=`echo $i | sed -e 's/;.*$//'`
544      if [ "${dir}" = "${ml_dir}" ]; then
545        flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`
546        break
547      fi
548    done
549    ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" GCJ="${GCJ_}$flags"'
550
551    if [ "${with_target_subdir}" = "." ]; then
552        CC_=$CC' '
553        CXX_=$CXX' '
554        GCJ_=$GCJ' '
555    else
556        # Create a regular expression that matches any string as long
557        # as ML_POPDIR.
558        popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'`
559        CC_=
560        for arg in ${CC}; do
561          case $arg in
562          -[BIL]"${ML_POPDIR}"/*)
563            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"`' ' ;;
564          "${ML_POPDIR}"/*)
565            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"`' ' ;;
566          *)
567            CC_="${CC_}${arg} " ;;
568          esac
569        done
570
571        CXX_=
572        for arg in ${CXX}; do
573          case $arg in
574          -[BIL]"${ML_POPDIR}"/*)
575            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"`' ' ;;
576          "${ML_POPDIR}"/*)
577            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"`' ' ;;
578          *)
579            CXX_="${CXX_}${arg} " ;;
580          esac
581        done
582
583        GCJ_=
584        for arg in ${GCJ}; do
585          case $arg in
586          -[BIL]"${ML_POPDIR}"/*)
587            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"`' ' ;;
588          "${ML_POPDIR}"/*)
589            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"`' ' ;;
590          *)
591            GCJ_="${GCJ_}${arg} " ;;
592          esac
593        done
594
595        if test "x${LD_LIBRARY_PATH+set}" = xset; then
596          LD_LIBRARY_PATH_=
597          for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
598            case "$arg" in
599            "${ML_POPDIR}"/*)
600              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"`
601              ;;
602            esac
603            if test "x$LD_LIBRARY_PATH_" != x; then
604              LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg
605            else
606              LD_LIBRARY_PATH_=$arg
607            fi
608          done
609          ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_"
610        fi
611
612        if test "x${SHLIB_PATH+set}" = xset; then
613          SHLIB_PATH_=
614          for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do
615            case "$arg" in
616            "${ML_POPDIR}"/*)
617              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"`
618              ;;
619            esac
620            if test "x$SHLIB_PATH_" != x; then
621              SHLIB_PATH_=$SHLIB_PATH_:$arg
622            else
623              SHLIB_PATH_=$arg
624            fi
625          done
626          ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_"
627        fi
628    fi
629
630    if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
631        --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
632        --with-multibuildtop=${ml_builddotdot} \
633        ${ml_arguments} ${ml_srcdiroption} ; then
634      true
635    else
636      exit 1
637    fi
638
639    cd ${ML_POPDIR}
640
641  done
642
643  cd ${ml_origdir}
644fi
645
646fi # ${ml_toplevel_p} = yes
647fi # ${enable_multilib} = yes
Note: See TracBrowser for help on using the repository browser.