| 1 | # Configure fragment invoked in the post-target section for subdirs
|
|---|
| 2 | # wanting multilib support.
|
|---|
| 3 | #
|
|---|
| 4 | # Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
|---|
| 5 | # Free Software Foundation, Inc.
|
|---|
| 6 | #
|
|---|
| 7 | # This file is free software; you can redistribute it and/or modify
|
|---|
| 8 | # it under the terms of the GNU General Public License as published by
|
|---|
| 9 | # the Free Software Foundation; either version 2 of the License, or
|
|---|
| 10 | # (at your option) any later version.
|
|---|
| 11 | #
|
|---|
| 12 | # This program is distributed in the hope that it will be useful,
|
|---|
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 15 | # GNU General Public License for more details.
|
|---|
| 16 | #
|
|---|
| 17 | # You should have received a copy of the GNU General Public License
|
|---|
| 18 | # along with this program; if not, write to the Free Software
|
|---|
| 19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|---|
| 20 | # Boston, MA 02110-1301, USA.
|
|---|
| 21 | #
|
|---|
| 22 | # As a special exception to the GNU General Public License, if you
|
|---|
| 23 | # distribute this file as part of a program that contains a
|
|---|
| 24 | # configuration script generated by Autoconf, you may include it under
|
|---|
| 25 | # the same distribution terms that you use for the rest of that program.
|
|---|
| 26 | #
|
|---|
| 27 | # Please report bugs to <[email protected]>
|
|---|
| 28 | # and send patches to <[email protected]>.
|
|---|
| 29 |
|
|---|
| 30 | # It is advisable to support a few --enable/--disable options to let the
|
|---|
| 31 | # user select which libraries s/he really wants.
|
|---|
| 32 | #
|
|---|
| 33 | # Subdirectories wishing to use multilib should put the following lines
|
|---|
| 34 | # in the "post-target" section of configure.in.
|
|---|
| 35 | #
|
|---|
| 36 | # if [ "${srcdir}" = "." ] ; then
|
|---|
| 37 | # if [ "${with_target_subdir}" != "." ] ; then
|
|---|
| 38 | # . ${with_multisrctop}../../config-ml.in
|
|---|
| 39 | # else
|
|---|
| 40 | # . ${with_multisrctop}../config-ml.in
|
|---|
| 41 | # fi
|
|---|
| 42 | # else
|
|---|
| 43 | # . ${srcdir}/../config-ml.in
|
|---|
| 44 | # fi
|
|---|
| 45 | #
|
|---|
| 46 | #
|
|---|
| 47 | # Things are complicated because 6 separate cases must be handled:
|
|---|
| 48 | # 2 (native, cross) x 3 (absolute-path, relative-not-dot, dot) = 6.
|
|---|
| 49 | #
|
|---|
| 50 | # srcdir=. is special. It must handle make programs that don't handle VPATH.
|
|---|
| 51 | # To implement this, a symlink tree is built for each library and for each
|
|---|
| 52 | # multilib subdir.
|
|---|
| 53 | #
|
|---|
| 54 | # The build tree is layed out as
|
|---|
| 55 | #
|
|---|
| 56 | # ./
|
|---|
| 57 | # newlib
|
|---|
| 58 | # m68020/
|
|---|
| 59 | # newlib
|
|---|
| 60 | # m68881/
|
|---|
| 61 | # newlib
|
|---|
| 62 | #
|
|---|
| 63 | # The nice feature about this arrangement is that inter-library references
|
|---|
| 64 | # in the build tree work without having to care where you are. Note that
|
|---|
| 65 | # inter-library references also work in the source tree because symlink trees
|
|---|
| 66 | # are built when srcdir=.
|
|---|
| 67 | #
|
|---|
| 68 | # Unfortunately, trying to access the libraries in the build tree requires
|
|---|
| 69 | # the user to manually choose which library to use as GCC won't be able to
|
|---|
| 70 | # find the right one. This is viewed as the lesser of two evils.
|
|---|
| 71 | #
|
|---|
| 72 | # Configure variables:
|
|---|
| 73 | # ${with_target_subdir} = "." for native, or ${target_alias} for cross.
|
|---|
| 74 | # Set by top level Makefile.
|
|---|
| 75 | # ${with_multisrctop} = how many levels of multilibs there are in the source
|
|---|
| 76 | # tree. It exists to handle the case of configuring in the source tree:
|
|---|
| 77 | # ${srcdir} is not constant.
|
|---|
| 78 | # ${with_multisubdir} = name of multilib subdirectory (eg: m68020/m68881).
|
|---|
| 79 | #
|
|---|
| 80 | # Makefile variables:
|
|---|
| 81 | # MULTISRCTOP = number of multilib levels in source tree (+1 if cross)
|
|---|
| 82 | # (FIXME: note that this is different than ${with_multisrctop}. Check out.).
|
|---|
| 83 | # MULTIBUILDTOP = number of multilib levels in build tree
|
|---|
| 84 | # MULTIDIRS = list of multilib subdirs (eg: m68000 m68020 ...)
|
|---|
| 85 | # (only defined in each library's main Makefile).
|
|---|
| 86 | # MULTISUBDIR = installed subdirectory name with leading '/' (eg: /m68000)
|
|---|
| 87 | # (only defined in each multilib subdir).
|
|---|
| 88 |
|
|---|
| 89 | # FIXME: Multilib is currently disabled by default for everything other than
|
|---|
| 90 | # newlib. It is up to each target to turn on multilib support for the other
|
|---|
| 91 | # libraries as desired.
|
|---|
| 92 |
|
|---|
| 93 | # Autoconf incoming variables:
|
|---|
| 94 | # srcdir, host, ac_configure_args
|
|---|
| 95 | #
|
|---|
| 96 | # We *could* figure srcdir and host out, but we'd have to do work that
|
|---|
| 97 | # our caller has already done to figure them out and requiring these two
|
|---|
| 98 | # seems reasonable.
|
|---|
| 99 | # Note that `host' in this case is GCC's `target'. Target libraries are
|
|---|
| 100 | # configured for a particular host.
|
|---|
| 101 |
|
|---|
| 102 | Makefile=${ac_file-Makefile}
|
|---|
| 103 | ml_config_shell=${CONFIG_SHELL-/bin/sh}
|
|---|
| 104 | ml_realsrcdir=${srcdir}
|
|---|
| 105 |
|
|---|
| 106 | # Scan all the arguments and set all the ones we need.
|
|---|
| 107 |
|
|---|
| 108 | ml_verbose=--verbose
|
|---|
| 109 | for option in ${ac_configure_args}
|
|---|
| 110 | do
|
|---|
| 111 | # strip single quotes surrounding individual options
|
|---|
| 112 | case $option in
|
|---|
| 113 | \'*\') eval option=$option ;;
|
|---|
| 114 | esac
|
|---|
| 115 |
|
|---|
| 116 | case $option in
|
|---|
| 117 | --*) ;;
|
|---|
| 118 | -*) option=-$option ;;
|
|---|
| 119 | esac
|
|---|
| 120 |
|
|---|
| 121 | case $option in
|
|---|
| 122 | --*=*)
|
|---|
| 123 | optarg=`echo $option | sed -e 's/^[^=]*=//'`
|
|---|
| 124 | ;;
|
|---|
| 125 | esac
|
|---|
| 126 |
|
|---|
| 127 | case $option in
|
|---|
| 128 | --disable-*)
|
|---|
| 129 | enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
|
|---|
| 130 | eval $enableopt=no
|
|---|
| 131 | ;;
|
|---|
| 132 | --enable-*)
|
|---|
| 133 | case "$option" in
|
|---|
| 134 | *=*) ;;
|
|---|
| 135 | *) optarg=yes ;;
|
|---|
| 136 | esac
|
|---|
| 137 | enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
|
|---|
| 138 | eval $enableopt="$optarg"
|
|---|
| 139 | ;;
|
|---|
| 140 | --norecursion | --no-recursion)
|
|---|
| 141 | ml_norecursion=yes
|
|---|
| 142 | ;;
|
|---|
| 143 | --silent | --sil* | --quiet | --q*)
|
|---|
| 144 | ml_verbose=--silent
|
|---|
| 145 | ;;
|
|---|
| 146 | --verbose | --v | --verb*)
|
|---|
| 147 | ml_verbose=--verbose
|
|---|
| 148 | ;;
|
|---|
| 149 | --with-*)
|
|---|
| 150 | case "$option" in
|
|---|
| 151 | *=*) ;;
|
|---|
| 152 | *) optarg=yes ;;
|
|---|
| 153 | esac
|
|---|
| 154 | withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
|
|---|
| 155 | eval $withopt="$optarg"
|
|---|
| 156 | ;;
|
|---|
| 157 | --without-*)
|
|---|
| 158 | withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
|
|---|
| 159 | eval $withopt=no
|
|---|
| 160 | ;;
|
|---|
| 161 | esac
|
|---|
| 162 | done
|
|---|
| 163 |
|
|---|
| 164 | # Only do this if --enable-multilib.
|
|---|
| 165 | if [ "${enable_multilib}" = yes ]; then
|
|---|
| 166 |
|
|---|
| 167 | # Compute whether this is the library's top level directory
|
|---|
| 168 | # (ie: not a multilib subdirectory, and not a subdirectory like newlib/src).
|
|---|
| 169 | # ${with_multisubdir} tells us we're in the right branch, but we could be
|
|---|
| 170 | # in a subdir of that.
|
|---|
| 171 | # ??? The previous version could void this test by separating the process into
|
|---|
| 172 | # two files: one that only the library's toplevel configure.in ran (to
|
|---|
| 173 | # configure the multilib subdirs), and another that all configure.in's ran to
|
|---|
| 174 | # update the Makefile. It seemed reasonable to collapse all multilib support
|
|---|
| 175 | # into one file, but it does leave us with having to perform this test.
|
|---|
| 176 | ml_toplevel_p=no
|
|---|
| 177 | if [ -z "${with_multisubdir}" ]; then
|
|---|
| 178 | if [ "${srcdir}" = "." ]; then
|
|---|
| 179 | # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.
|
|---|
| 180 | # ${with_target_subdir} = "." for native, otherwise target alias.
|
|---|
| 181 | if [ "${with_target_subdir}" = "." ]; then
|
|---|
| 182 | if [ -f ${ml_realsrcdir}/../config-ml.in ]; then
|
|---|
| 183 | ml_toplevel_p=yes
|
|---|
| 184 | fi
|
|---|
| 185 | else
|
|---|
| 186 | if [ -f ${ml_realsrcdir}/../../config-ml.in ]; then
|
|---|
| 187 | ml_toplevel_p=yes
|
|---|
| 188 | fi
|
|---|
| 189 | fi
|
|---|
| 190 | else
|
|---|
| 191 | # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.
|
|---|
| 192 | if [ -f ${ml_realsrcdir}/../config-ml.in ]; then
|
|---|
| 193 | ml_toplevel_p=yes
|
|---|
| 194 | fi
|
|---|
| 195 | fi
|
|---|
| 196 | fi
|
|---|
| 197 |
|
|---|
| 198 | # If this is the library's top level directory, set multidirs to the
|
|---|
| 199 | # multilib subdirs to support. This lives at the top because we need
|
|---|
| 200 | # `multidirs' set right away.
|
|---|
| 201 |
|
|---|
| 202 | if [ "${ml_toplevel_p}" = yes ]; then
|
|---|
| 203 |
|
|---|
| 204 | multidirs=
|
|---|
| 205 | for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
|
|---|
| 206 | dir=`echo $i | sed -e 's/;.*$//'`
|
|---|
| 207 | if [ "${dir}" = "." ]; then
|
|---|
| 208 | true
|
|---|
| 209 | else
|
|---|
| 210 | if [ -z "${multidirs}" ]; then
|
|---|
| 211 | multidirs="${dir}"
|
|---|
| 212 | else
|
|---|
| 213 | multidirs="${multidirs} ${dir}"
|
|---|
| 214 | fi
|
|---|
| 215 | fi
|
|---|
| 216 | done
|
|---|
| 217 |
|
|---|
| 218 | # Target libraries are configured for the host they run on, so we check
|
|---|
| 219 | # $host here, not $target.
|
|---|
| 220 |
|
|---|
| 221 | case "${host}" in
|
|---|
| 222 | arc-*-elf*)
|
|---|
| 223 | if [ x$enable_biendian != xyes ]
|
|---|
| 224 | then
|
|---|
| 225 | old_multidirs=${multidirs}
|
|---|
| 226 | multidirs=""
|
|---|
| 227 | for x in ${old_multidirs}; do
|
|---|
| 228 | case "${x}" in
|
|---|
| 229 | *be*) : ;;
|
|---|
| 230 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 231 | esac
|
|---|
| 232 | done
|
|---|
| 233 | fi
|
|---|
| 234 | ;;
|
|---|
| 235 | arm-*-*)
|
|---|
| 236 | if [ x"$enable_fpu" = xno ]
|
|---|
| 237 | then
|
|---|
| 238 | old_multidirs=${multidirs}
|
|---|
| 239 | multidirs=""
|
|---|
| 240 | for x in ${old_multidirs}; do
|
|---|
| 241 | case "${x}" in
|
|---|
| 242 | *fpu*) : ;;
|
|---|
| 243 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 244 | esac
|
|---|
| 245 | done
|
|---|
| 246 | fi
|
|---|
| 247 | if [ x"$enable_26bit" = xno ]
|
|---|
| 248 | then
|
|---|
| 249 | old_multidirs=${multidirs}
|
|---|
| 250 | multidirs=""
|
|---|
| 251 | for x in ${old_multidirs}; do
|
|---|
| 252 | case "${x}" in
|
|---|
| 253 | *26bit*) : ;;
|
|---|
| 254 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 255 | esac
|
|---|
| 256 | done
|
|---|
| 257 | fi
|
|---|
| 258 | if [ x"$enable_underscore" = xno ]
|
|---|
| 259 | then
|
|---|
| 260 | old_multidirs=${multidirs}
|
|---|
| 261 | multidirs=""
|
|---|
| 262 | for x in ${old_multidirs}; do
|
|---|
| 263 | case "${x}" in
|
|---|
| 264 | *under*) : ;;
|
|---|
| 265 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 266 | esac
|
|---|
| 267 | done
|
|---|
| 268 | fi
|
|---|
| 269 | if [ x"$enable_interwork" = xno ]
|
|---|
| 270 | then
|
|---|
| 271 | old_multidirs=${multidirs}
|
|---|
| 272 | multidirs=""
|
|---|
| 273 | for x in ${old_multidirs}; do
|
|---|
| 274 | case "${x}" in
|
|---|
| 275 | *interwork*) : ;;
|
|---|
| 276 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 277 | esac
|
|---|
| 278 | done
|
|---|
| 279 | fi
|
|---|
| 280 | if [ x$enable_biendian = xno ]
|
|---|
| 281 | then
|
|---|
| 282 | old_multidirs="${multidirs}"
|
|---|
| 283 | multidirs=""
|
|---|
| 284 | for x in ${old_multidirs}; do
|
|---|
| 285 | case "$x" in
|
|---|
| 286 | *le* ) : ;;
|
|---|
| 287 | *be* ) : ;;
|
|---|
| 288 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 289 | esac
|
|---|
| 290 | done
|
|---|
| 291 | fi
|
|---|
| 292 | if [ x"$enable_nofmult" = xno ]
|
|---|
| 293 | then
|
|---|
| 294 | old_multidirs="${multidirs}"
|
|---|
| 295 | multidirs=""
|
|---|
| 296 | for x in ${old_multidirs}; do
|
|---|
| 297 | case "$x" in
|
|---|
| 298 | *nofmult* ) : ;;
|
|---|
| 299 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 300 | esac
|
|---|
| 301 | done
|
|---|
| 302 | fi
|
|---|
| 303 | ;;
|
|---|
| 304 | m68*-*-*)
|
|---|
| 305 | if [ x$enable_softfloat = xno ]
|
|---|
| 306 | then
|
|---|
| 307 | old_multidirs="${multidirs}"
|
|---|
| 308 | multidirs=""
|
|---|
| 309 | for x in ${old_multidirs}; do
|
|---|
| 310 | case "$x" in
|
|---|
| 311 | *soft-float* ) : ;;
|
|---|
| 312 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 313 | esac
|
|---|
| 314 | done
|
|---|
| 315 | fi
|
|---|
| 316 | if [ x$enable_m68881 = xno ]
|
|---|
| 317 | then
|
|---|
| 318 | old_multidirs="${multidirs}"
|
|---|
| 319 | multidirs=""
|
|---|
| 320 | for x in ${old_multidirs}; do
|
|---|
| 321 | case "$x" in
|
|---|
| 322 | *m68881* ) : ;;
|
|---|
| 323 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 324 | esac
|
|---|
| 325 | done
|
|---|
| 326 | fi
|
|---|
| 327 | if [ x$enable_m68000 = xno ]
|
|---|
| 328 | then
|
|---|
| 329 | old_multidirs="${multidirs}"
|
|---|
| 330 | multidirs=""
|
|---|
| 331 | for x in ${old_multidirs}; do
|
|---|
| 332 | case "$x" in
|
|---|
| 333 | *m68000* ) : ;;
|
|---|
| 334 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 335 | esac
|
|---|
| 336 | done
|
|---|
| 337 | fi
|
|---|
| 338 | if [ x$enable_m68020 = xno ]
|
|---|
| 339 | then
|
|---|
| 340 | old_multidirs="${multidirs}"
|
|---|
| 341 | multidirs=""
|
|---|
| 342 | for x in ${old_multidirs}; do
|
|---|
| 343 | case "$x" in
|
|---|
| 344 | *m68020* ) : ;;
|
|---|
| 345 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 346 | esac
|
|---|
| 347 | done
|
|---|
| 348 | fi
|
|---|
| 349 | ;;
|
|---|
| 350 | mips*-*-*)
|
|---|
| 351 | if [ x$enable_single_float = xno ]
|
|---|
| 352 | then
|
|---|
| 353 | old_multidirs="${multidirs}"
|
|---|
| 354 | multidirs=""
|
|---|
| 355 | for x in ${old_multidirs}; do
|
|---|
| 356 | case "$x" in
|
|---|
| 357 | *single* ) : ;;
|
|---|
| 358 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 359 | esac
|
|---|
| 360 | done
|
|---|
| 361 | fi
|
|---|
| 362 | if [ x$enable_biendian = xno ]
|
|---|
| 363 | then
|
|---|
| 364 | old_multidirs="${multidirs}"
|
|---|
| 365 | multidirs=""
|
|---|
| 366 | for x in ${old_multidirs}; do
|
|---|
| 367 | case "$x" in
|
|---|
| 368 | *el* ) : ;;
|
|---|
| 369 | *eb* ) : ;;
|
|---|
| 370 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 371 | esac
|
|---|
| 372 | done
|
|---|
| 373 | fi
|
|---|
| 374 | if [ x$enable_softfloat = xno ]
|
|---|
| 375 | then
|
|---|
| 376 | old_multidirs="${multidirs}"
|
|---|
| 377 | multidirs=""
|
|---|
| 378 | for x in ${old_multidirs}; do
|
|---|
| 379 | case "$x" in
|
|---|
| 380 | *soft-float* ) : ;;
|
|---|
| 381 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 382 | esac
|
|---|
| 383 | done
|
|---|
| 384 | fi
|
|---|
| 385 | case " $multidirs " in
|
|---|
| 386 | *" mabi=64 "*)
|
|---|
| 387 | # We will not be able to create libraries with -mabi=64 if
|
|---|
| 388 | # we cannot even link a trivial program. It usually
|
|---|
| 389 | # indicates the 64bit libraries are missing.
|
|---|
| 390 | if echo 'main() {}' > conftest.c &&
|
|---|
| 391 | ${CC-gcc} -mabi=64 conftest.c -o conftest; then
|
|---|
| 392 | :
|
|---|
| 393 | else
|
|---|
| 394 | echo Could not link program with -mabi=64, disabling it.
|
|---|
| 395 | old_multidirs="${multidirs}"
|
|---|
| 396 | multidirs=""
|
|---|
| 397 | for x in ${old_multidirs}; do
|
|---|
| 398 | case "$x" in
|
|---|
| 399 | *mabi=64* ) : ;;
|
|---|
| 400 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 401 | esac
|
|---|
| 402 | done
|
|---|
| 403 | fi
|
|---|
| 404 | rm -f conftest.c conftest
|
|---|
| 405 | ;;
|
|---|
| 406 | esac
|
|---|
| 407 | ;;
|
|---|
| 408 | powerpc*-*-* | rs6000*-*-*)
|
|---|
| 409 | if [ x$enable_aix64 = xno ]
|
|---|
| 410 | then
|
|---|
| 411 | old_multidirs="${multidirs}"
|
|---|
| 412 | multidirs=""
|
|---|
| 413 | for x in ${old_multidirs}; do
|
|---|
| 414 | case "$x" in
|
|---|
| 415 | *ppc64* ) : ;;
|
|---|
| 416 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 417 | esac
|
|---|
| 418 | done
|
|---|
| 419 | fi
|
|---|
| 420 | if [ x$enable_pthread = xno ]
|
|---|
| 421 | then
|
|---|
| 422 | old_multidirs="${multidirs}"
|
|---|
| 423 | multidirs=""
|
|---|
| 424 | for x in ${old_multidirs}; do
|
|---|
| 425 | case "$x" in
|
|---|
| 426 | *pthread* ) : ;;
|
|---|
| 427 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 428 | esac
|
|---|
| 429 | done
|
|---|
| 430 | fi
|
|---|
| 431 | if [ x$enable_softfloat = xno ]
|
|---|
| 432 | then
|
|---|
| 433 | old_multidirs="${multidirs}"
|
|---|
| 434 | multidirs=""
|
|---|
| 435 | for x in ${old_multidirs}; do
|
|---|
| 436 | case "$x" in
|
|---|
| 437 | *soft-float* ) : ;;
|
|---|
| 438 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 439 | esac
|
|---|
| 440 | done
|
|---|
| 441 | fi
|
|---|
| 442 | if [ x$enable_powercpu = xno ]
|
|---|
| 443 | then
|
|---|
| 444 | old_multidirs="${multidirs}"
|
|---|
| 445 | multidirs=""
|
|---|
| 446 | for x in ${old_multidirs}; do
|
|---|
| 447 | case "$x" in
|
|---|
| 448 | power | */power | */power/* ) : ;;
|
|---|
| 449 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 450 | esac
|
|---|
| 451 | done
|
|---|
| 452 | fi
|
|---|
| 453 | if [ x$enable_powerpccpu = xno ]
|
|---|
| 454 | then
|
|---|
| 455 | old_multidirs="${multidirs}"
|
|---|
| 456 | multidirs=""
|
|---|
| 457 | for x in ${old_multidirs}; do
|
|---|
| 458 | case "$x" in
|
|---|
| 459 | *powerpc* ) : ;;
|
|---|
| 460 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 461 | esac
|
|---|
| 462 | done
|
|---|
| 463 | fi
|
|---|
| 464 | if [ x$enable_powerpcos = xno ]
|
|---|
| 465 | then
|
|---|
| 466 | old_multidirs="${multidirs}"
|
|---|
| 467 | multidirs=""
|
|---|
| 468 | for x in ${old_multidirs}; do
|
|---|
| 469 | case "$x" in
|
|---|
| 470 | *mcall-linux* | *mcall-solaris* ) : ;;
|
|---|
| 471 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 472 | esac
|
|---|
| 473 | done
|
|---|
| 474 | fi
|
|---|
| 475 | if [ x$enable_biendian = xno ]
|
|---|
| 476 | then
|
|---|
| 477 | old_multidirs="${multidirs}"
|
|---|
| 478 | multidirs=""
|
|---|
| 479 | for x in ${old_multidirs}; do
|
|---|
| 480 | case "$x" in
|
|---|
| 481 | *mlittle* | *mbig* ) : ;;
|
|---|
| 482 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 483 | esac
|
|---|
| 484 | done
|
|---|
| 485 | fi
|
|---|
| 486 | if [ x$enable_sysv = xno ]
|
|---|
| 487 | then
|
|---|
| 488 | old_multidirs="${multidirs}"
|
|---|
| 489 | multidirs=""
|
|---|
| 490 | for x in ${old_multidirs}; do
|
|---|
| 491 | case "$x" in
|
|---|
| 492 | *mcall-sysv* ) : ;;
|
|---|
| 493 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 494 | esac
|
|---|
| 495 | done
|
|---|
| 496 | fi
|
|---|
| 497 | ;;
|
|---|
| 498 | sparc*-*-*)
|
|---|
| 499 | case " $multidirs " in
|
|---|
| 500 | *" m64 "*)
|
|---|
| 501 | # We will not be able to create libraries with -m64 if
|
|---|
| 502 | # we cannot even link a trivial program. It usually
|
|---|
| 503 | # indicates the 64bit libraries are missing.
|
|---|
| 504 | if echo 'main() {}' > conftest.c &&
|
|---|
| 505 | ${CC-gcc} -m64 conftest.c -o conftest; then
|
|---|
| 506 | :
|
|---|
| 507 | else
|
|---|
| 508 | echo Could not link program with -m64, disabling it.
|
|---|
| 509 | old_multidirs="${multidirs}"
|
|---|
| 510 | multidirs=""
|
|---|
| 511 | for x in ${old_multidirs}; do
|
|---|
| 512 | case "$x" in
|
|---|
| 513 | *m64* ) : ;;
|
|---|
| 514 | *) multidirs="${multidirs} ${x}" ;;
|
|---|
| 515 | esac
|
|---|
| 516 | done
|
|---|
| 517 | fi
|
|---|
| 518 | rm -f conftest.c conftest
|
|---|
| 519 | ;;
|
|---|
| 520 | esac
|
|---|
| 521 | ;;
|
|---|
| 522 | esac
|
|---|
| 523 |
|
|---|
| 524 | # Remove extraneous blanks from multidirs.
|
|---|
| 525 | # Tests like `if [ -n "$multidirs" ]' require it.
|
|---|
| 526 | multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'`
|
|---|
| 527 |
|
|---|
| 528 | # Add code to library's top level makefile to handle building the multilib
|
|---|
| 529 | # subdirs.
|
|---|
| 530 |
|
|---|
| 531 | cat > Multi.tem <<\EOF
|
|---|
| 532 |
|
|---|
| 533 | PWD_COMMAND=$${PWDCMD-pwd}
|
|---|
| 534 |
|
|---|
| 535 | # FIXME: There should be an @-sign in front of the `if'.
|
|---|
| 536 | # Leave out until this is tested a bit more.
|
|---|
| 537 | multi-do:
|
|---|
| 538 | if [ -z "$(MULTIDIRS)" ]; then \
|
|---|
| 539 | true; \
|
|---|
| 540 | else \
|
|---|
| 541 | rootpre=`${PWD_COMMAND}`/; export rootpre; \
|
|---|
| 542 | srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \
|
|---|
| 543 | lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \
|
|---|
| 544 | compiler="$(CC)"; \
|
|---|
| 545 | for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \
|
|---|
| 546 | dir=`echo $$i | sed -e 's/;.*$$//'`; \
|
|---|
| 547 | if [ "$${dir}" = "." ]; then \
|
|---|
| 548 | true; \
|
|---|
| 549 | else \
|
|---|
| 550 | if [ -d ../$${dir}/$${lib} ]; then \
|
|---|
| 551 | flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
|
|---|
| 552 | if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
|
|---|
| 553 | CFLAGS="$(CFLAGS) $${flags}" \
|
|---|
| 554 | FCFLAGS="$(FCFLAGS) $${flags}" \
|
|---|
| 555 | FFLAGS="$(FFLAGS) $${flags}" \
|
|---|
| 556 | ADAFLAGS="$(ADAFLAGS) $${flags}" \
|
|---|
| 557 | prefix="$(prefix)" \
|
|---|
| 558 | exec_prefix="$(exec_prefix)" \
|
|---|
| 559 | GCJFLAGS="$(GCJFLAGS) $${flags}" \
|
|---|
| 560 | CXXFLAGS="$(CXXFLAGS) $${flags}" \
|
|---|
| 561 | LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
|
|---|
| 562 | LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
|
|---|
| 563 | LDFLAGS="$(LDFLAGS) $${flags}" \
|
|---|
| 564 | MULTIFLAGS="$${flags}" \
|
|---|
| 565 | DESTDIR="$(DESTDIR)" \
|
|---|
| 566 | INSTALL="$(INSTALL)" \
|
|---|
| 567 | INSTALL_DATA="$(INSTALL_DATA)" \
|
|---|
| 568 | INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
|
|---|
| 569 | INSTALL_SCRIPT="$(INSTALL_SCRIPT)" \
|
|---|
| 570 | $(DO)); then \
|
|---|
| 571 | true; \
|
|---|
| 572 | else \
|
|---|
| 573 | exit 1; \
|
|---|
| 574 | fi; \
|
|---|
| 575 | else true; \
|
|---|
| 576 | fi; \
|
|---|
| 577 | fi; \
|
|---|
| 578 | done; \
|
|---|
| 579 | fi
|
|---|
| 580 |
|
|---|
| 581 | # FIXME: There should be an @-sign in front of the `if'.
|
|---|
| 582 | # Leave out until this is tested a bit more.
|
|---|
| 583 | multi-clean:
|
|---|
| 584 | if [ -z "$(MULTIDIRS)" ]; then \
|
|---|
| 585 | true; \
|
|---|
| 586 | else \
|
|---|
| 587 | lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
|
|---|
| 588 | for dir in Makefile $(MULTIDIRS); do \
|
|---|
| 589 | if [ -f ../$${dir}/$${lib}/Makefile ]; then \
|
|---|
| 590 | if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \
|
|---|
| 591 | then true; \
|
|---|
| 592 | else exit 1; \
|
|---|
| 593 | fi; \
|
|---|
| 594 | else true; \
|
|---|
| 595 | fi; \
|
|---|
| 596 | done; \
|
|---|
| 597 | fi
|
|---|
| 598 | EOF
|
|---|
| 599 |
|
|---|
| 600 | cat ${Makefile} Multi.tem > Makefile.tem
|
|---|
| 601 | rm -f ${Makefile} Multi.tem
|
|---|
| 602 | mv Makefile.tem ${Makefile}
|
|---|
| 603 |
|
|---|
| 604 | fi # ${ml_toplevel_p} = yes
|
|---|
| 605 |
|
|---|
| 606 | if [ "${ml_verbose}" = --verbose ]; then
|
|---|
| 607 | echo "Adding multilib support to Makefile in ${ml_realsrcdir}"
|
|---|
| 608 | if [ "${ml_toplevel_p}" = yes ]; then
|
|---|
| 609 | echo "multidirs=${multidirs}"
|
|---|
| 610 | fi
|
|---|
| 611 | echo "with_multisubdir=${with_multisubdir}"
|
|---|
| 612 | fi
|
|---|
| 613 |
|
|---|
| 614 | if [ "${srcdir}" = "." ]; then
|
|---|
| 615 | if [ "${with_target_subdir}" != "." ]; then
|
|---|
| 616 | ml_srcdotdot="../"
|
|---|
| 617 | else
|
|---|
| 618 | ml_srcdotdot=""
|
|---|
| 619 | fi
|
|---|
| 620 | else
|
|---|
| 621 | ml_srcdotdot=""
|
|---|
| 622 | fi
|
|---|
| 623 |
|
|---|
| 624 | if [ -z "${with_multisubdir}" ]; then
|
|---|
| 625 | ml_subdir=
|
|---|
| 626 | ml_builddotdot=
|
|---|
| 627 | : # ml_srcdotdot= # already set
|
|---|
| 628 | else
|
|---|
| 629 | ml_subdir="/${with_multisubdir}"
|
|---|
| 630 | # The '[^/][^/]*' appears that way to work around a SunOS sed bug.
|
|---|
| 631 | ml_builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`/
|
|---|
| 632 | if [ "$srcdir" = "." ]; then
|
|---|
| 633 | ml_srcdotdot=${ml_srcdotdot}${ml_builddotdot}
|
|---|
| 634 | else
|
|---|
| 635 | : # ml_srcdotdot= # already set
|
|---|
| 636 | fi
|
|---|
| 637 | fi
|
|---|
| 638 |
|
|---|
| 639 | if [ "${ml_toplevel_p}" = yes ]; then
|
|---|
| 640 | ml_do='$(MAKE)'
|
|---|
| 641 | ml_clean='$(MAKE)'
|
|---|
| 642 | else
|
|---|
| 643 | ml_do=true
|
|---|
| 644 | ml_clean=true
|
|---|
| 645 | fi
|
|---|
| 646 |
|
|---|
| 647 | # TOP is used by newlib and should not be used elsewhere for this purpose.
|
|---|
| 648 | # MULTI{SRC,BUILD}TOP are the proper ones to use. MULTISRCTOP is empty
|
|---|
| 649 | # when srcdir != builddir. MULTIBUILDTOP is always some number of ../'s.
|
|---|
| 650 | # FIXME: newlib needs to be updated to use MULTI{SRC,BUILD}TOP so we can
|
|---|
| 651 | # delete TOP. Newlib may wish to continue to use TOP for its own purposes
|
|---|
| 652 | # of course.
|
|---|
| 653 | # MULTIDIRS is non-empty for the cpu top level Makefile (eg: newlib/Makefile)
|
|---|
| 654 | # and lists the subdirectories to recurse into.
|
|---|
| 655 | # MULTISUBDIR is non-empty in each cpu subdirectory's Makefile
|
|---|
| 656 | # (eg: newlib/h8300h/Makefile) and is the installed subdirectory name with
|
|---|
| 657 | # a leading '/'.
|
|---|
| 658 | # MULTIDO is used for targets like all, install, and check where
|
|---|
| 659 | # $(FLAGS_TO_PASS) augmented with the subdir's compiler option is needed.
|
|---|
| 660 | # MULTICLEAN is used for the *clean targets.
|
|---|
| 661 | #
|
|---|
| 662 | # ??? It is possible to merge MULTIDO and MULTICLEAN into one. They are
|
|---|
| 663 | # currently kept separate because we don't want the *clean targets to require
|
|---|
| 664 | # the existence of the compiler (which MULTIDO currently requires) and
|
|---|
| 665 | # therefore we'd have to record the directory options as well as names
|
|---|
| 666 | # (currently we just record the names and use --print-multi-lib to get the
|
|---|
| 667 | # options).
|
|---|
| 668 |
|
|---|
| 669 | sed -e "s:^TOP[ ]*=[ ]*\([./]*\)[ ]*$:TOP = ${ml_builddotdot}\1:" \
|
|---|
| 670 | -e "s:^MULTISRCTOP[ ]*=.*$:MULTISRCTOP = ${ml_srcdotdot}:" \
|
|---|
| 671 | -e "s:^MULTIBUILDTOP[ ]*=.*$:MULTIBUILDTOP = ${ml_builddotdot}:" \
|
|---|
| 672 | -e "s:^MULTIDIRS[ ]*=.*$:MULTIDIRS = ${multidirs}:" \
|
|---|
| 673 | -e "s:^MULTISUBDIR[ ]*=.*$:MULTISUBDIR = ${ml_subdir}:" \
|
|---|
| 674 | -e "s:^MULTIDO[ ]*=.*$:MULTIDO = $ml_do:" \
|
|---|
| 675 | -e "s:^MULTICLEAN[ ]*=.*$:MULTICLEAN = $ml_clean:" \
|
|---|
| 676 | ${Makefile} > Makefile.tem
|
|---|
| 677 | rm -f ${Makefile}
|
|---|
| 678 | mv Makefile.tem ${Makefile}
|
|---|
| 679 |
|
|---|
| 680 | # If this is the library's top level, configure each multilib subdir.
|
|---|
| 681 | # This is done at the end because this is the loop that runs configure
|
|---|
| 682 | # in each multilib subdir and it seemed reasonable to finish updating the
|
|---|
| 683 | # Makefile before going on to configure the subdirs.
|
|---|
| 684 |
|
|---|
| 685 | if [ "${ml_toplevel_p}" = yes ]; then
|
|---|
| 686 |
|
|---|
| 687 | # We must freshly configure each subdirectory. This bit of code is
|
|---|
| 688 | # actually partially stolen from the main configure script. FIXME.
|
|---|
| 689 |
|
|---|
| 690 | if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
|
|---|
| 691 |
|
|---|
| 692 | if [ "${ml_verbose}" = --verbose ]; then
|
|---|
| 693 | echo "Running configure in multilib subdirs ${multidirs}"
|
|---|
| 694 | echo "pwd: `${PWDCMD-pwd}`"
|
|---|
| 695 | fi
|
|---|
| 696 |
|
|---|
| 697 | ml_origdir=`${PWDCMD-pwd}`
|
|---|
| 698 | ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'`
|
|---|
| 699 | # cd to top-level-build-dir/${with_target_subdir}
|
|---|
| 700 | cd ..
|
|---|
| 701 |
|
|---|
| 702 | for ml_dir in ${multidirs}; do
|
|---|
| 703 |
|
|---|
| 704 | if [ "${ml_verbose}" = --verbose ]; then
|
|---|
| 705 | echo "Running configure in multilib subdir ${ml_dir}"
|
|---|
| 706 | echo "pwd: `${PWDCMD-pwd}`"
|
|---|
| 707 | fi
|
|---|
| 708 |
|
|---|
| 709 | if [ -d ${ml_dir} ]; then true; else
|
|---|
| 710 | # ``mkdir -p ${ml_dir}'' See also mkinstalldirs.
|
|---|
| 711 | pathcomp=""
|
|---|
| 712 | for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do
|
|---|
| 713 | pathcomp="$pathcomp$d"
|
|---|
| 714 | case "$pathcomp" in
|
|---|
| 715 | -* ) pathcomp=./$pathcomp ;;
|
|---|
| 716 | esac
|
|---|
| 717 | if test ! -d "$pathcomp"; then
|
|---|
| 718 | echo "mkdir $pathcomp" 1>&2
|
|---|
| 719 | mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
|
|---|
| 720 | fi
|
|---|
| 721 | if test ! -d "$pathcomp"; then
|
|---|
| 722 | exit $lasterr
|
|---|
| 723 | fi
|
|---|
| 724 | pathcomp="$pathcomp/"
|
|---|
| 725 | done
|
|---|
| 726 | fi
|
|---|
| 727 | if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi
|
|---|
| 728 |
|
|---|
| 729 | # Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../
|
|---|
| 730 | dotdot=../`echo ${ml_dir} | sed -e 's|[^/]||g' -e 's|/|../|g'`
|
|---|
| 731 |
|
|---|
| 732 | case ${srcdir} in
|
|---|
| 733 | ".")
|
|---|
| 734 | echo Building symlink tree in `${PWDCMD-pwd}`/${ml_dir}/${ml_libdir}
|
|---|
| 735 | if [ "${with_target_subdir}" != "." ]; then
|
|---|
| 736 | ml_unsubdir="../"
|
|---|
| 737 | else
|
|---|
| 738 | ml_unsubdir=""
|
|---|
| 739 | fi
|
|---|
| 740 | (cd ${ml_dir}/${ml_libdir};
|
|---|
| 741 | ../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "")
|
|---|
| 742 | if [ -f ${ml_dir}/${ml_libdir}/Makefile ]; then
|
|---|
| 743 | if [ x"${MAKE}" = x ]; then
|
|---|
| 744 | (cd ${ml_dir}/${ml_libdir}; make distclean)
|
|---|
| 745 | else
|
|---|
| 746 | (cd ${ml_dir}/${ml_libdir}; ${MAKE} distclean)
|
|---|
| 747 | fi
|
|---|
| 748 | fi
|
|---|
| 749 | ml_newsrcdir="."
|
|---|
| 750 | ml_srcdiroption=
|
|---|
| 751 | multisrctop=${dotdot}
|
|---|
| 752 | ;;
|
|---|
| 753 | *)
|
|---|
| 754 | case "${srcdir}" in
|
|---|
| 755 | /* | [A-Za-z]:[\\/]* ) # absolute path
|
|---|
| 756 | ml_newsrcdir=${srcdir}
|
|---|
| 757 | ;;
|
|---|
| 758 | *) # otherwise relative
|
|---|
| 759 | ml_newsrcdir=${dotdot}${srcdir}
|
|---|
| 760 | ;;
|
|---|
| 761 | esac
|
|---|
| 762 | ml_srcdiroption="-srcdir=${ml_newsrcdir}"
|
|---|
| 763 | multisrctop=
|
|---|
| 764 | ;;
|
|---|
| 765 | esac
|
|---|
| 766 |
|
|---|
| 767 | case "${progname}" in
|
|---|
| 768 | /* | [A-Za-z]:[\\/]* ) ml_recprog=${progname} ;;
|
|---|
| 769 | *) ml_recprog=${dotdot}${progname} ;;
|
|---|
| 770 | esac
|
|---|
| 771 |
|
|---|
| 772 | # FIXME: POPDIR=${PWD=`pwd`} doesn't work here.
|
|---|
| 773 | ML_POPDIR=`${PWDCMD-pwd}`
|
|---|
| 774 | cd ${ml_dir}/${ml_libdir}
|
|---|
| 775 |
|
|---|
| 776 | if [ -f ${ml_newsrcdir}/configure ]; then
|
|---|
| 777 | ml_recprog="${ml_newsrcdir}/configure"
|
|---|
| 778 | fi
|
|---|
| 779 |
|
|---|
| 780 | # find compiler flag corresponding to ${ml_dir}
|
|---|
| 781 | for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
|
|---|
| 782 | dir=`echo $i | sed -e 's/;.*$//'`
|
|---|
| 783 | if [ "${dir}" = "${ml_dir}" ]; then
|
|---|
| 784 | flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`
|
|---|
| 785 | break
|
|---|
| 786 | fi
|
|---|
| 787 | done
|
|---|
| 788 | ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags"'
|
|---|
| 789 |
|
|---|
| 790 | if [ "${with_target_subdir}" = "." ]; then
|
|---|
| 791 | CC_=$CC' '
|
|---|
| 792 | CXX_=$CXX' '
|
|---|
| 793 | F77_=$F77' '
|
|---|
| 794 | GCJ_=$GCJ' '
|
|---|
| 795 | GFORTRAN_=$GFORTRAN' '
|
|---|
| 796 | else
|
|---|
| 797 | # Create a regular expression that matches any string as long
|
|---|
| 798 | # as ML_POPDIR.
|
|---|
| 799 | popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'`
|
|---|
| 800 | CC_=
|
|---|
| 801 | for arg in ${CC}; do
|
|---|
| 802 | case $arg in
|
|---|
| 803 | -[BIL]"${ML_POPDIR}"/*)
|
|---|
| 804 | 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"`' ' ;;
|
|---|
| 805 | "${ML_POPDIR}"/*)
|
|---|
| 806 | 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"`' ' ;;
|
|---|
| 807 | *)
|
|---|
| 808 | CC_="${CC_}${arg} " ;;
|
|---|
| 809 | esac
|
|---|
| 810 | done
|
|---|
| 811 |
|
|---|
| 812 | CXX_=
|
|---|
| 813 | for arg in ${CXX}; do
|
|---|
| 814 | case $arg in
|
|---|
| 815 | -[BIL]"${ML_POPDIR}"/*)
|
|---|
| 816 | 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"`' ' ;;
|
|---|
| 817 | "${ML_POPDIR}"/*)
|
|---|
| 818 | 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"`' ' ;;
|
|---|
| 819 | *)
|
|---|
| 820 | CXX_="${CXX_}${arg} " ;;
|
|---|
| 821 | esac
|
|---|
| 822 | done
|
|---|
| 823 |
|
|---|
| 824 | F77_=
|
|---|
| 825 | for arg in ${F77}; do
|
|---|
| 826 | case $arg in
|
|---|
| 827 | -[BIL]"${ML_POPDIR}"/*)
|
|---|
| 828 | F77_="${F77_}"`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"`' ' ;;
|
|---|
| 829 | "${ML_POPDIR}"/*)
|
|---|
| 830 | F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
|
|---|
| 831 | *)
|
|---|
| 832 | F77_="${F77_}${arg} " ;;
|
|---|
| 833 | esac
|
|---|
| 834 | done
|
|---|
| 835 |
|
|---|
| 836 | GCJ_=
|
|---|
| 837 | for arg in ${GCJ}; do
|
|---|
| 838 | case $arg in
|
|---|
| 839 | -[BIL]"${ML_POPDIR}"/*)
|
|---|
| 840 | 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"`' ' ;;
|
|---|
| 841 | "${ML_POPDIR}"/*)
|
|---|
| 842 | 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"`' ' ;;
|
|---|
| 843 | *)
|
|---|
| 844 | GCJ_="${GCJ_}${arg} " ;;
|
|---|
| 845 | esac
|
|---|
| 846 | done
|
|---|
| 847 |
|
|---|
| 848 | GFORTRAN_=
|
|---|
| 849 | for arg in ${GFORTRAN}; do
|
|---|
| 850 | case $arg in
|
|---|
| 851 | -[BIL]"${ML_POPDIR}"/*)
|
|---|
| 852 | GFORTRAN_="${GFORTRAN_}"`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"`' ' ;;
|
|---|
| 853 | "${ML_POPDIR}"/*)
|
|---|
| 854 | GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
|
|---|
| 855 | *)
|
|---|
| 856 | GFORTRAN_="${GFORTRAN_}${arg} " ;;
|
|---|
| 857 | esac
|
|---|
| 858 | done
|
|---|
| 859 |
|
|---|
| 860 | if test "x${LD_LIBRARY_PATH+set}" = xset; then
|
|---|
| 861 | LD_LIBRARY_PATH_=
|
|---|
| 862 | for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
|
|---|
| 863 | case "$arg" in
|
|---|
| 864 | "${ML_POPDIR}"/*)
|
|---|
| 865 | 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"`
|
|---|
| 866 | ;;
|
|---|
| 867 | esac
|
|---|
| 868 | if test "x$LD_LIBRARY_PATH_" != x; then
|
|---|
| 869 | LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg
|
|---|
| 870 | else
|
|---|
| 871 | LD_LIBRARY_PATH_=$arg
|
|---|
| 872 | fi
|
|---|
| 873 | done
|
|---|
| 874 | ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_"
|
|---|
| 875 | fi
|
|---|
| 876 |
|
|---|
| 877 | if test "x${SHLIB_PATH+set}" = xset; then
|
|---|
| 878 | SHLIB_PATH_=
|
|---|
| 879 | for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do
|
|---|
| 880 | case "$arg" in
|
|---|
| 881 | "${ML_POPDIR}"/*)
|
|---|
| 882 | 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"`
|
|---|
| 883 | ;;
|
|---|
| 884 | esac
|
|---|
| 885 | if test "x$SHLIB_PATH_" != x; then
|
|---|
| 886 | SHLIB_PATH_=$SHLIB_PATH_:$arg
|
|---|
| 887 | else
|
|---|
| 888 | SHLIB_PATH_=$arg
|
|---|
| 889 | fi
|
|---|
| 890 | done
|
|---|
| 891 | ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_"
|
|---|
| 892 | fi
|
|---|
| 893 | fi
|
|---|
| 894 |
|
|---|
| 895 | if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
|
|---|
| 896 | --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
|
|---|
| 897 | ${ac_configure_args} ${ml_srcdiroption} ; then
|
|---|
| 898 | true
|
|---|
| 899 | else
|
|---|
| 900 | exit 1
|
|---|
| 901 | fi
|
|---|
| 902 |
|
|---|
| 903 | cd ${ML_POPDIR}
|
|---|
| 904 |
|
|---|
| 905 | done
|
|---|
| 906 |
|
|---|
| 907 | cd ${ml_origdir}
|
|---|
| 908 | fi
|
|---|
| 909 |
|
|---|
| 910 | fi # ${ml_toplevel_p} = yes
|
|---|
| 911 | fi # ${enable_multilib} = yes
|
|---|