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