Changeset 605
- Timestamp:
- Aug 16, 2003, 6:41:03 PM (22 years ago)
- Location:
- branches/GNU/src/binutils
- Files:
-
- 1 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/GNU/src/binutils/config-ml.in ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 1 # Configure fragment invoked in the post-target section for subdirs2 # wanting multilib support.3 #4 # It is advisable to support a few --enable/--disable options to let the5 # user select which libraries s/he really wants.6 #7 # Subdirectories wishing to use multilib should put the following lines8 # in the "post-target" section of configure.in.9 #10 # if [ "${srcdir}" = "." ] ; then11 # if [ "${with_target_subdir}" != "." ] ; then12 # . ${with_multisrctop}../../config-ml.in13 # else14 # . ${with_multisrctop}../config-ml.in15 # fi16 # else17 # . ${srcdir}/../config-ml.in18 # fi19 #20 # See librx/configure.in in the libg++ distribution for an example of how21 # to handle autoconf'd libraries.22 #23 # Things are complicated because 6 separate cases must be handled:24 # 2 (native, cross) x 3 (absolute-path, relative-not-dot, dot) = 6.25 #26 # srcdir=. is special. It must handle make programs that don't handle VPATH.27 # To implement this, a symlink tree is built for each library and for each28 # multilib subdir.29 #30 # The build tree is layed out as31 #32 # ./33 # libg++34 # newlib35 # m68020/36 # libg++37 # newlib38 # m68881/39 # libg++40 # newlib41 #42 # The nice feature about this arrangement is that inter-library references43 # in the build tree work without having to care where you are. Note that44 # inter-library references also work in the source tree because symlink trees45 # are built when srcdir=.46 #47 # Unfortunately, trying to access the libraries in the build tree requires48 # the user to manually choose which library to use as GCC won't be able to49 # find the right one. This is viewed as the lesser of two evils.50 #51 # Configure variables:52 # ${with_target_subdir} = "." for native, or ${target_alias} for cross.53 # Set by top level Makefile.54 # ${with_multisrctop} = how many levels of multilibs there are in the source55 # tree. It exists to handle the case of configuring in the source tree:56 # ${srcdir} is not constant.57 # ${with_multisubdir} = name of multilib subdirectory (eg: m68020/m68881).58 #59 # Makefile variables:60 # MULTISRCTOP = number of multilib levels in source tree (+1 if cross)61 # (FIXME: note that this is different than ${with_multisrctop}. Check out.).62 # MULTIBUILDTOP = number of multilib levels in build tree63 # MULTIDIRS = list of multilib subdirs (eg: m68000 m68020 ...)64 # (only defined in each library's main Makefile).65 # MULTISUBDIR = installed subdirectory name with leading '/' (eg: /m68000)66 # (only defined in each multilib subdir).67 68 # FIXME: Multilib is currently disabled by default for everything other than69 # newlib. It is up to each target to turn on multilib support for the other70 # libraries as desired.71 72 # We have to handle being invoked by both Cygnus configure and Autoconf.73 #74 # Cygnus configure incoming variables:75 # srcdir, subdir, host, arguments76 #77 # Autoconf incoming variables:78 # srcdir, host, ac_configure_args79 #80 # We *could* figure srcdir and host out, but we'd have to do work that81 # our caller has already done to figure them out and requiring these two82 # seems reasonable.83 # Note that `host' in this case is GCC's `target'. Target libraries are84 # configured for a particular host.85 86 if [ -n "${ac_configure_args}" ]; then87 Makefile=${ac_file-Makefile}88 ml_config_shell=${CONFIG_SHELL-/bin/sh}89 ml_arguments="${ac_configure_args}"90 ml_realsrcdir=${srcdir}91 else92 Makefile=${Makefile-Makefile}93 ml_config_shell=${config_shell-/bin/sh}94 ml_arguments="${arguments}"95 if [ -n "${subdir}" -a "${subdir}" != "." ] ; then96 ml_realsrcdir=${srcdir}/${subdir}97 else98 ml_realsrcdir=${srcdir}99 fi100 fi101 102 # Scan all the arguments and set all the ones we need.103 104 ml_verbose=--verbose105 for option in ${ml_arguments}106 do107 case $option in108 --*) ;;109 -*) option=-$option ;;110 esac111 112 case $option in113 --*=*)114 optarg=`echo $option | sed -e 's/^[^=]*=//'`115 ;;116 esac117 118 case $option in119 --disable-*)120 enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`121 eval $enableopt=no122 ;;123 --enable-*)124 case "$option" in125 *=*) ;;126 *) optarg=yes ;;127 esac128 enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`129 eval $enableopt="$optarg"130 ;;131 --norecursion | --no*)132 ml_norecursion=yes133 ;;134 --silent | --sil* | --quiet | --q*)135 ml_verbose=--silent136 ;;137 --verbose | --v | --verb*)138 ml_verbose=--verbose139 ;;140 --with-*)141 case "$option" in142 *=*) ;;143 *) optarg=yes ;;144 esac145 withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`146 eval $withopt="$optarg"147 ;;148 --without-*)149 withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`150 eval $withopt=no151 ;;152 esac153 done154 155 # Only do this if --enable-multilib.156 if [ "${enable_multilib}" = yes ]; then157 158 # Compute whether this is the library's top level directory159 # (ie: not a multilib subdirectory, and not a subdirectory like libg++/src).160 # ${with_multisubdir} tells us we're in the right branch, but we could be161 # in a subdir of that.162 # ??? The previous version could void this test by separating the process into163 # two files: one that only the library's toplevel configure.in ran (to164 # configure the multilib subdirs), and another that all configure.in's ran to165 # update the Makefile. It seemed reasonable to collapse all multilib support166 # into one file, but it does leave us with having to perform this test.167 ml_toplevel_p=no168 if [ -z "${with_multisubdir}" ]; then169 if [ "${srcdir}" = "." ]; then170 # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.171 # ${with_target_subdir} = "." for native, otherwise target alias.172 if [ "${with_target_subdir}" = "." ]; then173 if [ -f ${ml_realsrcdir}/../config-ml.in ]; then174 ml_toplevel_p=yes175 fi176 else177 if [ -f ${ml_realsrcdir}/../../config-ml.in ]; then178 ml_toplevel_p=yes179 fi180 fi181 else182 # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.183 if [ -f ${ml_realsrcdir}/../config-ml.in ]; then184 ml_toplevel_p=yes185 fi186 fi187 fi188 189 # If this is the library's top level directory, set multidirs to the190 # multilib subdirs to support. This lives at the top because we need191 # `multidirs' set right away.192 193 if [ "${ml_toplevel_p}" = yes ]; then194 195 multidirs=196 for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do197 dir=`echo $i | sed -e 's/;.*$//'`198 if [ "${dir}" = "." ]; then199 true200 else201 if [ -z "${multidirs}" ]; then202 multidirs="${dir}"203 else204 multidirs="${multidirs} ${dir}"205 fi206 fi207 done208 209 # Target libraries are configured for the host they run on, so we check210 # $host here, not $target.211 212 case "${host}" in213 arc-*-elf*)214 if [ x$enable_biendian != xyes ]215 then216 old_multidirs=${multidirs}217 multidirs=""218 for x in ${old_multidirs}; do219 case "${x}" in220 *be*) : ;;221 *) multidirs="${multidirs} ${x}" ;;222 esac223 done224 fi225 ;;226 arm-*-*)227 if [ x"$enable_fpu" = xno ]228 then229 old_multidirs=${multidirs}230 multidirs=""231 for x in ${old_multidirs}; do232 case "${x}" in233 *fpu*) : ;;234 *) multidirs="${multidirs} ${x}" ;;235 esac236 done237 fi238 if [ x"$enable_26bit" = xno ]239 then240 old_multidirs=${multidirs}241 multidirs=""242 for x in ${old_multidirs}; do243 case "${x}" in244 *26bit*) : ;;245 *) multidirs="${multidirs} ${x}" ;;246 esac247 done248 fi249 if [ x"$enable_underscore" = xno ]250 then251 old_multidirs=${multidirs}252 multidirs=""253 for x in ${old_multidirs}; do254 case "${x}" in255 *under*) : ;;256 *) multidirs="${multidirs} ${x}" ;;257 esac258 done259 fi260 if [ x"$enable_interwork" = xno ]261 then262 old_multidirs=${multidirs}263 multidirs=""264 for x in ${old_multidirs}; do265 case "${x}" in266 *interwork*) : ;;267 *) multidirs="${multidirs} ${x}" ;;268 esac269 done270 fi271 if [ x$enable_biendian = xno ]272 then273 old_multidirs="${multidirs}"274 multidirs=""275 for x in ${old_multidirs}; do276 case "$x" in277 *le* ) : ;;278 *be* ) : ;;279 *) multidirs="${multidirs} ${x}" ;;280 esac281 done282 fi283 if [ x"$enable_nofmult" = xno ]284 then285 old_multidirs="${multidirs}"286 multidirs=""287 for x in ${old_multidirs}; do288 case "$x" in289 *nofmult* ) : ;;290 *) multidirs="${multidirs} ${x}" ;;291 esac292 done293 fi294 ;;295 m68*-*-*)296 if [ x$enable_softfloat = xno ]297 then298 old_multidirs="${multidirs}"299 multidirs=""300 for x in ${old_multidirs}; do301 case "$x" in302 *soft-float* ) : ;;303 *) multidirs="${multidirs} ${x}" ;;304 esac305 done306 fi307 if [ x$enable_m68881 = xno ]308 then309 old_multidirs="${multidirs}"310 multidirs=""311 for x in ${old_multidirs}; do312 case "$x" in313 *m68881* ) : ;;314 *) multidirs="${multidirs} ${x}" ;;315 esac316 done317 fi318 if [ x$enable_m68000 = xno ]319 then320 old_multidirs="${multidirs}"321 multidirs=""322 for x in ${old_multidirs}; do323 case "$x" in324 *m68000* ) : ;;325 *) multidirs="${multidirs} ${x}" ;;326 esac327 done328 fi329 if [ x$enable_m68020 = xno ]330 then331 old_multidirs="${multidirs}"332 multidirs=""333 for x in ${old_multidirs}; do334 case "$x" in335 *m68020* ) : ;;336 *) multidirs="${multidirs} ${x}" ;;337 esac338 done339 fi340 ;;341 mips*-*-*)342 if [ x$enable_single_float = xno ]343 then344 old_multidirs="${multidirs}"345 multidirs=""346 for x in ${old_multidirs}; do347 case "$x" in348 *single* ) : ;;349 *) multidirs="${multidirs} ${x}" ;;350 esac351 done352 fi353 if [ x$enable_biendian = xno ]354 then355 old_multidirs="${multidirs}"356 multidirs=""357 for x in ${old_multidirs}; do358 case "$x" in359 *el* ) : ;;360 *eb* ) : ;;361 *) multidirs="${multidirs} ${x}" ;;362 esac363 done364 fi365 if [ x$enable_softfloat = xno ]366 then367 old_multidirs="${multidirs}"368 multidirs=""369 for x in ${old_multidirs}; do370 case "$x" in371 *soft-float* ) : ;;372 *) multidirs="${multidirs} ${x}" ;;373 esac374 done375 fi376 case " $multidirs " in377 *" mabi=64 "*)378 # We will not be able to create libraries with -mabi=64 if379 # we cannot even link a trivial program. It usually380 # indicates the 64bit libraries are missing.381 if echo 'main() {}' > conftest.c &&382 ${CC-gcc} -mabi=64 conftest.c -o conftest; then383 :384 else385 echo Could not link program with -mabi=64, disabling it.386 old_multidirs="${multidirs}"387 multidirs=""388 for x in ${old_multidirs}; do389 case "$x" in390 *mabi=64* ) : ;;391 *) multidirs="${multidirs} ${x}" ;;392 esac393 done394 fi395 rm -f conftest.c conftest396 ;;397 esac398 ;;399 powerpc*-*-* | rs6000*-*-*)400 if [ x$enable_softfloat = xno ]401 then402 old_multidirs="${multidirs}"403 multidirs=""404 for x in ${old_multidirs}; do405 case "$x" in406 *soft-float* ) : ;;407 *) multidirs="${multidirs} ${x}" ;;408 esac409 done410 fi411 if [ x$enable_powercpu = xno ]412 then413 old_multidirs="${multidirs}"414 multidirs=""415 for x in ${old_multidirs}; do416 case "$x" in417 power | */power | */power/* ) : ;;418 *) multidirs="${multidirs} ${x}" ;;419 esac420 done421 fi422 if [ x$enable_powerpccpu = xno ]423 then424 old_multidirs="${multidirs}"425 multidirs=""426 for x in ${old_multidirs}; do427 case "$x" in428 *powerpc* ) : ;;429 *) multidirs="${multidirs} ${x}" ;;430 esac431 done432 fi433 if [ x$enable_powerpcos = xno ]434 then435 old_multidirs="${multidirs}"436 multidirs=""437 for x in ${old_multidirs}; do438 case "$x" in439 *mcall-linux* | *mcall-solaris* ) : ;;440 *) multidirs="${multidirs} ${x}" ;;441 esac442 done443 fi444 if [ x$enable_biendian = xno ]445 then446 old_multidirs="${multidirs}"447 multidirs=""448 for x in ${old_multidirs}; do449 case "$x" in450 *mlittle* | *mbig* ) : ;;451 *) multidirs="${multidirs} ${x}" ;;452 esac453 done454 fi455 if [ x$enable_sysv = xno ]456 then457 old_multidirs="${multidirs}"458 multidirs=""459 for x in ${old_multidirs}; do460 case "$x" in461 *mcall-sysv* ) : ;;462 *) multidirs="${multidirs} ${x}" ;;463 esac464 done465 fi466 if [ x$enable_aix = xno ]467 then468 old_multidirs="${multidirs}"469 multidirs=""470 for x in ${old_multidirs}; do471 case "$x" in472 *mcall-aix* ) : ;;473 *) multidirs="${multidirs} ${x}" ;;474 esac475 done476 fi477 ;;478 sparc*-*-*)479 case " $multidirs " in480 *" m64 "*)481 # We will not be able to create libraries with -m64 if482 # we cannot even link a trivial program. It usually483 # indicates the 64bit libraries are missing.484 if echo 'main() {}' > conftest.c &&485 ${CC-gcc} -m64 conftest.c -o conftest; then486 :487 else488 echo Could not link program with -m64, disabling it.489 old_multidirs="${multidirs}"490 multidirs=""491 for x in ${old_multidirs}; do492 case "$x" in493 *m64* ) : ;;494 *) multidirs="${multidirs} ${x}" ;;495 esac496 done497 fi498 rm -f conftest.c conftest499 ;;500 esac501 ;;502 esac503 504 # Remove extraneous blanks from multidirs.505 # Tests like `if [ -n "$multidirs" ]' require it.506 multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'`507 508 # Add code to library's top level makefile to handle building the multilib509 # subdirs.510 511 cat > Multi.tem <<\EOF512 513 # FIXME: There should be an @-sign in front of the `if'.514 # Leave out until this is tested a bit more.515 multi-do:516 if [ -z "$(MULTIDIRS)" ]; then \517 true; \518 else \519 rootpre=`pwd`/; export rootpre; \520 srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \521 lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \522 compiler="$(CC)"; \523 for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \524 dir=`echo $$i | sed -e 's/;.*$$//'`; \525 if [ "$${dir}" = "." ]; then \526 true; \527 else \528 if [ -d ../$${dir}/$${lib} ]; then \529 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \530 if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \531 CFLAGS="$(CFLAGS) $${flags}" \532 prefix="$(prefix)" \533 exec_prefix="$(exec_prefix)" \534 CXXFLAGS="$(CXXFLAGS) $${flags}" \535 LIBCFLAGS="$(LIBCFLAGS) $${flags}" \536 LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \537 LDFLAGS="$(LDFLAGS) $${flags}" \538 $(DO)); then \539 true; \540 else \541 exit 1; \542 fi; \543 else true; \544 fi; \545 fi; \546 done; \547 fi548 549 # FIXME: There should be an @-sign in front of the `if'.550 # Leave out until this is tested a bit more.551 multi-clean:552 if [ -z "$(MULTIDIRS)" ]; then \553 true; \554 else \555 lib=`pwd | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \556 for dir in Makefile $(MULTIDIRS); do \557 if [ -f ../$${dir}/$${lib}/Makefile ]; then \558 if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \559 then true; \560 else exit 1; \561 fi; \562 else true; \563 fi; \564 done; \565 fi566 EOF567 568 cat ${Makefile} Multi.tem > Makefile.tem569 rm -f ${Makefile} Multi.tem570 mv Makefile.tem ${Makefile}571 572 fi # ${ml_toplevel_p} = yes573 574 if [ "${ml_verbose}" = --verbose ]; then575 echo "Adding multilib support to Makefile in ${ml_realsrcdir}"576 if [ "${ml_toplevel_p}" = yes ]; then577 echo "multidirs=${multidirs}"578 fi579 echo "with_multisubdir=${with_multisubdir}"580 fi581 582 if [ "${srcdir}" = "." ]; then583 if [ "${with_target_subdir}" != "." ]; then584 ml_srcdotdot="../"585 else586 ml_srcdotdot=""587 fi588 else589 ml_srcdotdot=""590 fi591 592 if [ -z "${with_multisubdir}" ]; then593 ml_subdir=594 ml_builddotdot=595 : # ml_srcdotdot= # already set596 else597 ml_subdir="/${with_multisubdir}"598 # The '[^/][^/]*' appears that way to work around a SunOS sed bug.599 ml_builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`/600 if [ "$srcdir" = "." ]; then601 ml_srcdotdot=${ml_srcdotdot}${ml_builddotdot}602 else603 : # ml_srcdotdot= # already set604 fi605 fi606 607 if [ "${ml_toplevel_p}" = yes ]; then608 ml_do='$(MAKE)'609 ml_clean='$(MAKE)'610 else611 ml_do=true612 ml_clean=true613 fi614 615 # TOP is used by newlib and should not be used elsewhere for this purpose.616 # MULTI{SRC,BUILD}TOP are the proper ones to use. MULTISRCTOP is empty617 # when srcdir != builddir. MULTIBUILDTOP is always some number of ../'s.618 # FIXME: newlib needs to be updated to use MULTI{SRC,BUILD}TOP so we can619 # delete TOP. Newlib may wish to continue to use TOP for its own purposes620 # of course.621 # MULTIDIRS is non-empty for the cpu top level Makefile (eg: newlib/Makefile)622 # and lists the subdirectories to recurse into.623 # MULTISUBDIR is non-empty in each cpu subdirectory's Makefile624 # (eg: newlib/h8300h/Makefile) and is the installed subdirectory name with625 # a leading '/'.626 # MULTIDO is used for targets like all, install, and check where627 # $(FLAGS_TO_PASS) augmented with the subdir's compiler option is needed.628 # MULTICLEAN is used for the *clean targets.629 #630 # ??? It is possible to merge MULTIDO and MULTICLEAN into one. They are631 # currently kept separate because we don't want the *clean targets to require632 # the existence of the compiler (which MULTIDO currently requires) and633 # therefore we'd have to record the directory options as well as names634 # (currently we just record the names and use --print-multi-lib to get the635 # options).636 637 sed -e "s:^TOP[ ]*=[ ]*\([./]*\)[ ]*$:TOP = ${ml_builddotdot}\1:" \638 -e "s:^MULTISRCTOP[ ]*=.*$:MULTISRCTOP = ${ml_srcdotdot}:" \639 -e "s:^MULTIBUILDTOP[ ]*=.*$:MULTIBUILDTOP = ${ml_builddotdot}:" \640 -e "s:^MULTIDIRS[ ]*=.*$:MULTIDIRS = ${multidirs}:" \641 -e "s:^MULTISUBDIR[ ]*=.*$:MULTISUBDIR = ${ml_subdir}:" \642 -e "s:^MULTIDO[ ]*=.*$:MULTIDO = $ml_do:" \643 -e "s:^MULTICLEAN[ ]*=.*$:MULTICLEAN = $ml_clean:" \644 ${Makefile} > Makefile.tem645 rm -f ${Makefile}646 mv Makefile.tem ${Makefile}647 648 # If this is the library's top level, configure each multilib subdir.649 # This is done at the end because this is the loop that runs configure650 # in each multilib subdir and it seemed reasonable to finish updating the651 # Makefile before going on to configure the subdirs.652 653 if [ "${ml_toplevel_p}" = yes ]; then654 655 # We must freshly configure each subdirectory. This bit of code is656 # actually partially stolen from the main configure script. FIXME.657 658 if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then659 660 if [ "${ml_verbose}" = --verbose ]; then661 echo "Running configure in multilib subdirs ${multidirs}"662 echo "pwd: `pwd`"663 fi664 665 ml_origdir=`pwd`666 ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'`667 # cd to top-level-build-dir/${with_target_subdir}668 cd ..669 670 for ml_dir in ${multidirs}; do671 672 if [ "${ml_verbose}" = --verbose ]; then673 echo "Running configure in multilib subdir ${ml_dir}"674 echo "pwd: `pwd`"675 fi676 677 if [ -d ${ml_dir} ]; then true; else678 # ``mkdir -p ${ml_dir}'' See also mkinstalldirs.679 pathcomp=""680 for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do681 pathcomp="$pathcomp$d"682 case "$pathcomp" in683 -* ) pathcomp=./$pathcomp ;;684 esac685 if test ! -d "$pathcomp"; then686 echo "mkdir $pathcomp" 1>&2687 mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?688 fi689 if test ! -d "$pathcomp"; then690 exit $lasterr691 fi692 pathcomp="$pathcomp/"693 done694 fi695 if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi696 697 # Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../698 dotdot=../`echo ${ml_dir} | sed -e 's|[^/]||g' -e 's|/|../|g'`699 700 case ${srcdir} in701 ".")702 echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir}703 if [ "${with_target_subdir}" != "." ]; then704 ml_unsubdir="../"705 else706 ml_unsubdir=""707 fi708 (cd ${ml_dir}/${ml_libdir};709 ../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "")710 if [ -f ${ml_dir}/${ml_libdir}/Makefile ]; then711 if [ x"${MAKE}" = x ]; then712 (cd ${ml_dir}/${ml_libdir}; make distclean)713 else714 (cd ${ml_dir}/${ml_libdir}; ${MAKE} distclean)715 fi716 fi717 ml_newsrcdir="."718 ml_srcdiroption=719 multisrctop=${dotdot}720 ;;721 *)722 case "${srcdir}" in723 /*) # absolute path724 ml_newsrcdir=${srcdir}725 ;;726 *) # otherwise relative727 ml_newsrcdir=${dotdot}${srcdir}728 ;;729 esac730 ml_srcdiroption="-srcdir=${ml_newsrcdir}"731 multisrctop=732 ;;733 esac734 735 case "${progname}" in736 /*) ml_recprog=${progname} ;;737 *) ml_recprog=${dotdot}${progname} ;;738 esac739 740 # FIXME: POPDIR=${PWD=`pwd`} doesn't work here.741 ML_POPDIR=`pwd`742 cd ${ml_dir}/${ml_libdir}743 744 if [ -f ${ml_newsrcdir}/configure ]; then745 ml_recprog="${ml_newsrcdir}/configure --cache-file=../config.cache"746 fi747 748 # find compiler flag corresponding to ${ml_dir}749 for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do750 dir=`echo $i | sed -e 's/;.*$//'`751 if [ "${dir}" = "${ml_dir}" ]; then752 flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`753 break754 fi755 done756 ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags"'757 758 if [ "${with_target_subdir}" = "." ]; then759 CC_=$CC' '760 CXX_=$CXX' '761 else762 # Create a regular expression that matches any string as long763 # as ML_POPDIR.764 popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'`765 CC_=766 for arg in ${CC}; do767 case $arg in768 -[BIL]"${ML_POPDIR}"/*)769 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"`' ' ;;770 "${ML_POPDIR}"/*)771 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"`' ' ;;772 *)773 CC_="${CC_}${arg} " ;;774 esac775 done776 777 CXX_=778 for arg in ${CXX}; do779 case $arg in780 -[BIL]"${ML_POPDIR}"/*)781 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"`' ' ;;782 "${ML_POPDIR}"/*)783 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"`' ' ;;784 *)785 CXX_="${CXX_}${arg} " ;;786 esac787 done788 789 if test "x${LD_LIBRARY_PATH+set}" = xset; then790 LD_LIBRARY_PATH_=791 for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do792 case "$arg" in793 "${ML_POPDIR}"/*)794 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"`795 ;;796 esac797 if test "x$LD_LIBRARY_PATH_" != x; then798 LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg799 else800 LD_LIBRARY_PATH_=$arg801 fi802 done803 ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_"804 fi805 806 if test "x${SHLIB_PATH+set}" = xset; then807 SHLIB_PATH_=808 for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do809 case "$arg" in810 "${ML_POPDIR}"/*)811 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"`812 ;;813 esac814 if test "x$SHLIB_PATH_" != x; then815 SHLIB_PATH_=$SHLIB_PATH_:$arg816 else817 SHLIB_PATH_=$arg818 fi819 done820 ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_"821 fi822 fi823 824 if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \825 --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \826 ${ml_arguments} ${ml_srcdiroption} ; then827 true828 else829 exit 1830 fi831 832 cd ${ML_POPDIR}833 834 done835 836 cd ${ml_origdir}837 fi838 839 fi # ${ml_toplevel_p} = yes840 fi # ${enable_multilib} = yes -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/config.guess ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 1 1 #! /bin/sh 2 2 # Attempt to guess a canonical system name. 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 20014 # Free Software Foundation, Inc.5 6 timestamp='200 1-03-16'3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 5 6 timestamp='2003-05-09' 7 7 8 8 # This file is free software; you can redistribute it and/or modify it … … 25 25 # the same distribution terms that you use for the rest of that program. 26 26 27 # Written by Per Bothner <bothner@cygnus.com>. 28 # Please send patches to <config-patches@gnu.org>. 27 # Originally written by Per Bothner <per@bothner.com>. 28 # Please send patches to <config-patches@gnu.org>. Submit a context 29 # diff and a properly formatted ChangeLog entry. 29 30 # 30 31 # This script attempts to guess a canonical system name similar to … … 53 54 54 55 Originally written by Per Bothner. 55 Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 200056 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 56 57 Free Software Foundation, Inc. 57 58 … … 88 89 fi 89 90 90 91 dummy=dummy-$$ 92 trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 93 94 # CC_FOR_BUILD -- compiler used by this script. 91 trap 'exit 1' 1 2 15 92 93 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a 94 # compiler to aid in system detection is discouraged as it requires 95 # temporary files to be created and, as you can see below, it is a 96 # headache to deal with in a portable fashion. 97 95 98 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 96 99 # use `HOST_CC' if defined, but it is deprecated. 97 100 101 # Portable tmp directory creation inspired by the Autoconf team. 102 103 set_cc_for_build=' 104 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 105 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 106 : ${TMPDIR=/tmp} ; 107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 110 dummy=$tmp/dummy ; 111 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 98 112 case $CC_FOR_BUILD,$HOST_CC,$CC in 99 ,,) echo "int dummy(){}" > $dummy.c 100 for c in cc gcc c89 ; do 101 ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 102 if test $? = 0 ; then 103 CC_FOR_BUILD="$c"; break 104 fi 105 done 106 rm -f $dummy.c $dummy.o $dummy.rel 113 ,,) echo "int x;" > $dummy.c ; 114 for c in cc gcc c89 c99 ; do 115 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 116 CC_FOR_BUILD="$c"; break ; 117 fi ; 118 done ; 107 119 if test x"$CC_FOR_BUILD" = x ; then 108 CC_FOR_BUILD=no_compiler_found 120 CC_FOR_BUILD=no_compiler_found ; 109 121 fi 110 122 ;; 111 123 ,,*) CC_FOR_BUILD=$CC ;; 112 124 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 113 esac 125 esac ;' 114 126 115 127 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 116 # (ghazi@noc.rutgers.edu 8/24/94.)128 # (ghazi@noc.rutgers.edu 1994-08-24) 117 129 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 118 130 PATH=$PATH:/.attbin ; export PATH … … 128 140 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 129 141 *:NetBSD:*:*) 130 # Net bsd(nbsd) targets should (where applicable) match one or142 # NetBSD (nbsd) targets should (where applicable) match one or 131 143 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 132 144 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently … … 135 147 # compatibility and a consistent mechanism for selecting the 136 148 # object file format. 137 # Determine the machine/vendor (is the vendor relevant). 138 case "${UNAME_MACHINE}" in 139 amiga) machine=m68k-unknown ;; 140 arm32) machine=arm-unknown ;; 141 atari*) machine=m68k-atari ;; 142 sun3*) machine=m68k-sun ;; 143 mac68k) machine=m68k-apple ;; 144 macppc) machine=powerpc-apple ;; 145 hp3[0-9][05]) machine=m68k-hp ;; 146 ibmrt|romp-ibm) machine=romp-ibm ;; 147 *) machine=${UNAME_MACHINE}-unknown ;; 149 # 150 # Note: NetBSD doesn't particularly care about the vendor 151 # portion of the name. We always set it to "unknown". 152 sysctl="sysctl -n hw.machine_arch" 153 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 154 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 155 case "${UNAME_MACHINE_ARCH}" in 156 armeb) machine=armeb-unknown ;; 157 arm*) machine=arm-unknown ;; 158 sh3el) machine=shl-unknown ;; 159 sh3eb) machine=sh-unknown ;; 160 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 148 161 esac 149 162 # The Operating System including object format, if it has switched 150 163 # to ELF recently, or will in the future. 151 case "${UNAME_MACHINE}" in 152 i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) 164 case "${UNAME_MACHINE_ARCH}" in 165 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 166 eval $set_cc_for_build 153 167 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 154 168 | grep __ELF__ >/dev/null … … 166 180 esac 167 181 # The OS release 168 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 182 # Debian GNU/NetBSD machines have a different userland, and 183 # thus, need a distinct triplet. However, they do not need 184 # kernel version information, so it can be replaced with a 185 # suitable tag, in the style of linux-gnu. 186 case "${UNAME_VERSION}" in 187 Debian*) 188 release='-gnu' 189 ;; 190 *) 191 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 192 ;; 193 esac 169 194 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 170 195 # contains redundant information, the shorter form: … … 172 197 echo "${machine}-${os}${release}" 173 198 exit 0 ;; 199 amiga:OpenBSD:*:*) 200 echo m68k-unknown-openbsd${UNAME_RELEASE} 201 exit 0 ;; 202 arc:OpenBSD:*:*) 203 echo mipsel-unknown-openbsd${UNAME_RELEASE} 204 exit 0 ;; 205 hp300:OpenBSD:*:*) 206 echo m68k-unknown-openbsd${UNAME_RELEASE} 207 exit 0 ;; 208 mac68k:OpenBSD:*:*) 209 echo m68k-unknown-openbsd${UNAME_RELEASE} 210 exit 0 ;; 211 macppc:OpenBSD:*:*) 212 echo powerpc-unknown-openbsd${UNAME_RELEASE} 213 exit 0 ;; 214 mvme68k:OpenBSD:*:*) 215 echo m68k-unknown-openbsd${UNAME_RELEASE} 216 exit 0 ;; 217 mvme88k:OpenBSD:*:*) 218 echo m88k-unknown-openbsd${UNAME_RELEASE} 219 exit 0 ;; 220 mvmeppc:OpenBSD:*:*) 221 echo powerpc-unknown-openbsd${UNAME_RELEASE} 222 exit 0 ;; 223 pmax:OpenBSD:*:*) 224 echo mipsel-unknown-openbsd${UNAME_RELEASE} 225 exit 0 ;; 226 sgi:OpenBSD:*:*) 227 echo mipseb-unknown-openbsd${UNAME_RELEASE} 228 exit 0 ;; 229 sun3:OpenBSD:*:*) 230 echo m68k-unknown-openbsd${UNAME_RELEASE} 231 exit 0 ;; 232 wgrisc:OpenBSD:*:*) 233 echo mipsel-unknown-openbsd${UNAME_RELEASE} 234 exit 0 ;; 235 *:OpenBSD:*:*) 236 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 237 exit 0 ;; 174 238 alpha:OSF1:*:*) 175 239 if test $UNAME_RELEASE = "V4.0"; then 176 240 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 177 241 fi 242 # According to Compaq, /usr/sbin/psrinfo has been available on 243 # OSF/1 and Tru64 systems produced since 1995. I hope that 244 # covers most systems running today. This code pipes the CPU 245 # types through head -n 1, so we only detect the type of CPU 0. 246 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 247 case "$ALPHA_CPU_TYPE" in 248 "EV4 (21064)") 249 UNAME_MACHINE="alpha" ;; 250 "EV4.5 (21064)") 251 UNAME_MACHINE="alpha" ;; 252 "LCA4 (21066/21068)") 253 UNAME_MACHINE="alpha" ;; 254 "EV5 (21164)") 255 UNAME_MACHINE="alphaev5" ;; 256 "EV5.6 (21164A)") 257 UNAME_MACHINE="alphaev56" ;; 258 "EV5.6 (21164PC)") 259 UNAME_MACHINE="alphapca56" ;; 260 "EV5.7 (21164PC)") 261 UNAME_MACHINE="alphapca57" ;; 262 "EV6 (21264)") 263 UNAME_MACHINE="alphaev6" ;; 264 "EV6.7 (21264A)") 265 UNAME_MACHINE="alphaev67" ;; 266 "EV6.8CB (21264C)") 267 UNAME_MACHINE="alphaev68" ;; 268 "EV6.8AL (21264B)") 269 UNAME_MACHINE="alphaev68" ;; 270 "EV6.8CX (21264D)") 271 UNAME_MACHINE="alphaev68" ;; 272 "EV6.9A (21264/EV69A)") 273 UNAME_MACHINE="alphaev69" ;; 274 "EV7 (21364)") 275 UNAME_MACHINE="alphaev7" ;; 276 "EV7.9 (21364A)") 277 UNAME_MACHINE="alphaev79" ;; 278 esac 178 279 # A Vn.n version is a released version. 179 280 # A Tn.n version is a released field test version. 180 281 # A Xn.n version is an unreleased experimental baselevel. 181 282 # 1.2 uses "1.2" for uname -r. 182 cat <<EOF >$dummy.s183 .data184 \$Lformat:185 .byte 37,100,45,37,120,10,0 # "%d-%x\n"186 187 .text188 .globl main189 .align 4190 .ent main191 main:192 .frame \$30,16,\$26,0193 ldgp \$29,0(\$27)194 .prologue 1195 .long 0x47e03d80 # implver \$0196 lda \$2,-1197 .long 0x47e20c21 # amask \$2,\$1198 lda \$16,\$Lformat199 mov \$0,\$17200 not \$1,\$18201 jsr \$26,printf202 ldgp \$29,0(\$26)203 mov 0,\$16204 jsr \$26,exit205 .end main206 EOF207 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null208 if test "$?" = 0 ; then209 case `./$dummy` in210 0-0)211 UNAME_MACHINE="alpha"212 ;;213 1-0)214 UNAME_MACHINE="alphaev5"215 ;;216 1-1)217 UNAME_MACHINE="alphaev56"218 ;;219 1-101)220 UNAME_MACHINE="alphapca56"221 ;;222 2-303)223 UNAME_MACHINE="alphaev6"224 ;;225 2-307)226 UNAME_MACHINE="alphaev67"227 ;;228 esac229 fi230 rm -f $dummy.s $dummy231 283 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 232 284 exit 0 ;; … … 243 295 echo m68k-unknown-sysv4 244 296 exit 0;; 245 amiga:OpenBSD:*:*)246 echo m68k-unknown-openbsd${UNAME_RELEASE}247 exit 0 ;;248 297 *:[Aa]miga[Oo][Ss]:*:*) 249 298 echo ${UNAME_MACHINE}-unknown-amigaos 250 299 exit 0 ;; 251 arc64:OpenBSD:*:*) 252 echo mips64el-unknown-openbsd${UNAME_RELEASE} 253 exit 0 ;; 254 arc:OpenBSD:*:*) 255 echo mipsel-unknown-openbsd${UNAME_RELEASE} 256 exit 0 ;; 257 hkmips:OpenBSD:*:*) 258 echo mips-unknown-openbsd${UNAME_RELEASE} 259 exit 0 ;; 260 pmax:OpenBSD:*:*) 261 echo mipsel-unknown-openbsd${UNAME_RELEASE} 262 exit 0 ;; 263 sgi:OpenBSD:*:*) 264 echo mips-unknown-openbsd${UNAME_RELEASE} 265 exit 0 ;; 266 wgrisc:OpenBSD:*:*) 267 echo mipsel-unknown-openbsd${UNAME_RELEASE} 300 *:[Mm]orph[Oo][Ss]:*:*) 301 echo ${UNAME_MACHINE}-unknown-morphos 268 302 exit 0 ;; 269 303 *:OS/390:*:*) … … 287 321 echo pyramid-pyramid-svr4 288 322 exit 0 ;; 323 DRS?6000:UNIX_SV:4.2*:7*) 324 case `/usr/bin/uname -p` in 325 sparc) echo sparc-icl-nx7 && exit 0 ;; 326 esac ;; 289 327 sun4H:SunOS:5.*:*) 290 328 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` … … 315 353 exit 0 ;; 316 354 sun*:*:4.2BSD:*) 317 UNAME_RELEASE=`( head -1/etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`355 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 318 356 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 319 357 case "`/bin/arch`" in … … 328 366 aushp:SunOS:*:*) 329 367 echo sparc-auspex-sunos${UNAME_RELEASE} 330 exit 0 ;;331 atari*:OpenBSD:*:*)332 echo m68k-unknown-openbsd${UNAME_RELEASE}333 368 exit 0 ;; 334 369 # The situation for MiNT is a little confusing. The machine name … … 358 393 echo m68k-unknown-mint${UNAME_RELEASE} 359 394 exit 0 ;; 360 sun3*:OpenBSD:*:*)361 echo m68k-unknown-openbsd${UNAME_RELEASE}362 exit 0 ;;363 mac68k:OpenBSD:*:*)364 echo m68k-unknown-openbsd${UNAME_RELEASE}365 exit 0 ;;366 mvme68k:OpenBSD:*:*)367 echo m68k-unknown-openbsd${UNAME_RELEASE}368 exit 0 ;;369 mvme88k:OpenBSD:*:*)370 echo m88k-unknown-openbsd${UNAME_RELEASE}371 exit 0 ;;372 395 powerpc:machten:*:*) 373 396 echo powerpc-apple-machten${UNAME_RELEASE} … … 386 409 exit 0 ;; 387 410 mips:*:*:UMIPS | mips:*:*:RISCos) 411 eval $set_cc_for_build 388 412 sed 's/^ //' << EOF >$dummy.c 389 413 #ifdef __cplusplus … … 407 431 } 408 432 EOF 409 $CC_FOR_BUILD $dummy.c -o $dummy \ 410 && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 411 && rm -f $dummy.c $dummy && exit 0 412 rm -f $dummy.c $dummy 433 $CC_FOR_BUILD -o $dummy $dummy.c \ 434 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 435 && exit 0 413 436 echo mips-mips-riscos${UNAME_RELEASE} 437 exit 0 ;; 438 Motorola:PowerMAX_OS:*:*) 439 echo powerpc-motorola-powermax 440 exit 0 ;; 441 Motorola:*:4.3:PL8-*) 442 echo powerpc-harris-powermax 443 exit 0 ;; 444 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 445 echo powerpc-harris-powermax 414 446 exit 0 ;; 415 447 Night_Hawk:Power_UNIX:*:*) … … 460 492 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 461 493 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 462 i ?86:AIX:*:*)494 i*86:AIX:*:*) 463 495 echo i386-ibm-aix 464 496 exit 0 ;; … … 473 505 *:AIX:2:3) 474 506 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 507 eval $set_cc_for_build 475 508 sed 's/^ //' << EOF >$dummy.c 476 509 #include <sys/systemcfg.h> … … 484 517 } 485 518 EOF 486 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 487 rm -f $dummy.c $dummy 519 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 488 520 echo rs6000-ibm-aix3.2.5 489 521 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then … … 494 526 exit 0 ;; 495 527 *:AIX:*:[45]) 496 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1| awk '{ print $1 }'`528 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 497 529 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 498 530 IBM_ARCH=rs6000 … … 534 566 9000/[34]?? ) HP_ARCH=m68k ;; 535 567 9000/[678][0-9][0-9]) 536 case "${HPUX_REV}" in 537 11.[0-9][0-9]) 538 if [ -x /usr/bin/getconf ]; then 539 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 568 if [ -x /usr/bin/getconf ]; then 569 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 540 570 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 541 571 case "${sc_cpu_version}" in … … 546 576 32) HP_ARCH="hppa2.0n" ;; 547 577 64) HP_ARCH="hppa2.0w" ;; 578 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 548 579 esac ;; 549 580 esac 550 fi ;; 551 esac 552 if [ "${HP_ARCH}" = "" ]; then 553 581 fi 582 if [ "${HP_ARCH}" = "" ]; then 583 eval $set_cc_for_build 584 sed 's/^ //' << EOF >$dummy.c 554 585 555 586 #define _HPUX_SOURCE … … 584 615 } 585 616 EOF 586 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` 587 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi 588 rm -f $dummy.c $dummy 589 fi ;; 617 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 618 test -z "$HP_ARCH" && HP_ARCH=hppa 619 fi ;; 590 620 esac 621 if [ ${HP_ARCH} = "hppa2.0w" ] 622 then 623 # avoid double evaluation of $set_cc_for_build 624 test -n "$CC_FOR_BUILD" || eval $set_cc_for_build 625 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null 626 then 627 HP_ARCH="hppa2.0w" 628 else 629 HP_ARCH="hppa64" 630 fi 631 fi 591 632 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 592 633 exit 0 ;; … … 596 637 exit 0 ;; 597 638 3050*:HI-UX:*:*) 639 eval $set_cc_for_build 598 640 sed 's/^ //' << EOF >$dummy.c 599 641 #include <unistd.h> … … 621 663 } 622 664 EOF 623 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 624 rm -f $dummy.c $dummy 665 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 625 666 echo unknown-hitachi-hiuxwe2 626 667 exit 0 ;; … … 631 672 echo hppa1.0-hp-bsd 632 673 exit 0 ;; 633 *9??*:MPE/iX:*:* )674 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 634 675 echo hppa1.0-hp-mpeix 635 676 exit 0 ;; … … 640 681 echo hppa1.0-hp-osf 641 682 exit 0 ;; 642 i ?86:OSF1:*:*)683 i*86:OSF1:*:*) 643 684 if [ -x /usr/sbin/sysversion ] ; then 644 685 echo ${UNAME_MACHINE}-unknown-osf1mk … … 649 690 parisc*:Lites*:*:*) 650 691 echo hppa1.1-hp-lites 651 exit 0 ;;652 hppa*:OpenBSD:*:*)653 echo hppa-unknown-openbsd654 692 exit 0 ;; 655 693 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) … … 671 709 echo c4-convex-bsd 672 710 exit 0 ;; 673 CRAY*X-MP:*:*:*)674 echo xmp-cray-unicos675 exit 0 ;;676 711 CRAY*Y-MP:*:*:*) 677 echo ymp-cray-unicos${UNAME_RELEASE} 712 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 678 713 exit 0 ;; 679 714 CRAY*[A-Z]90:*:*:*) 680 715 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 681 716 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 682 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ 717 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 718 -e 's/\.[^.]*$/.X/' 683 719 exit 0 ;; 684 720 CRAY*TS:*:*:*) 685 721 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 686 722 exit 0 ;; 687 CRAY*T3D:*:*:*)688 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'689 exit 0 ;;690 723 CRAY*T3E:*:*:*) 691 724 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' … … 694 727 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 695 728 exit 0 ;; 696 CRAY-2:*:*:*)697 echo cray2-cray-unicos698 729 *:UNICOS/mp:*:*) 730 echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 731 exit 0 ;; 699 732 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 700 733 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` … … 703 736 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 704 737 exit 0 ;; 705 hp300:OpenBSD:*:*) 706 echo m68k-unknown-openbsd${UNAME_RELEASE} 707 exit 0 ;; 708 i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 738 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 709 739 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 710 740 exit 0 ;; … … 715 745 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 716 746 exit 0 ;; 717 *:FreeBSD:*:*) 718 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 719 exit 0 ;; 720 *:OpenBSD:*:*) 721 echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 747 *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) 748 # Determine whether the default compiler uses glibc. 749 eval $set_cc_for_build 750 sed 's/^ //' << EOF >$dummy.c 751 #include <features.h> 752 #if __GLIBC__ >= 2 753 LIBC=gnu 754 #else 755 LIBC= 756 #endif 757 EOF 758 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 759 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} 722 760 exit 0 ;; 723 761 i*:CYGWIN*:*) … … 729 767 i*:PW*:*) 730 768 echo ${UNAME_MACHINE}-pc-pw32 769 exit 0 ;; 770 x86:Interix*:3*) 771 echo i586-pc-interix3 772 exit 0 ;; 773 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 774 echo i${UNAME_MACHINE}-pc-mks 731 775 exit 0 ;; 732 776 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) … … 734 778 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 735 779 # UNAME_MACHINE based on the output of uname instead of i386? 736 echo i 386-pc-interix780 echo i586-pc-interix 737 781 exit 0 ;; 738 782 i*:UWIN*:*) … … 755 799 exit 0 ;; 756 800 ia64:Linux:*:*) 757 echo ${UNAME_MACHINE}-unknown-linux 801 echo ${UNAME_MACHINE}-unknown-linux-gnu 758 802 exit 0 ;; 759 803 m68*:Linux:*:*) … … 761 805 exit 0 ;; 762 806 mips:Linux:*:*) 763 cat >$dummy.c <<EOF 764 #ifdef __cplusplus 765 #include <stdio.h> /* for printf() prototype */ 766 int main (int argc, char *argv[]) { 767 #else 768 int main (argc, argv) int argc; char *argv[]; { 769 #endif 770 #ifdef __MIPSEB__ 771 printf ("%s-unknown-linux-gnu\n", argv[1]); 772 #endif 773 #ifdef __MIPSEL__ 774 printf ("%sel-unknown-linux-gnu\n", argv[1]); 775 #endif 776 return 0; 777 } 807 eval $set_cc_for_build 808 sed 's/^ //' << EOF >$dummy.c 809 #undef CPU 810 #undef mips 811 #undef mipsel 812 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 813 CPU=mipsel 814 #else 815 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 816 CPU=mips 817 #else 818 CPU= 819 #endif 820 #endif 778 821 EOF 779 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 780 rm -f $dummy.c $dummy 822 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 823 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 824 ;; 825 mips64:Linux:*:*) 826 eval $set_cc_for_build 827 sed 's/^ //' << EOF >$dummy.c 828 #undef CPU 829 #undef mips64 830 #undef mips64el 831 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 832 CPU=mips64el 833 #else 834 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 835 CPU=mips64 836 #else 837 CPU= 838 #endif 839 #endif 840 EOF 841 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 842 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 781 843 ;; 782 844 ppc:Linux:*:*) 783 # Determine Lib Version 784 cat >$dummy.c <<EOF 785 #include <features.h> 786 #if defined(__GLIBC__) 787 extern char __libc_version[]; 788 extern char __libc_release[]; 789 #endif 790 main(argc, argv) 791 int argc; 792 char *argv[]; 793 { 794 #if defined(__GLIBC__) 795 printf("%s %s\n", __libc_version, __libc_release); 796 #else 797 printf("unknown\n"); 798 #endif 799 return 0; 800 } 801 EOF 802 LIBC="" 803 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null 804 if test "$?" = 0 ; then 805 ./$dummy | grep 1\.99 > /dev/null 806 if test "$?" = 0 ; then LIBC="libc1" ; fi 807 fi 808 rm -f $dummy.c $dummy 809 echo powerpc-unknown-linux-gnu${LIBC} 845 echo powerpc-unknown-linux-gnu 846 exit 0 ;; 847 ppc64:Linux:*:*) 848 echo powerpc64-unknown-linux-gnu 810 849 exit 0 ;; 811 850 alpha:Linux:*:*) 812 cat <<EOF >$dummy.s 813 .data 814 \$Lformat: 815 .byte 37,100,45,37,120,10,0 # "%d-%x\n" 816 .text 817 .globl main 818 .align 4 819 .ent main 820 main: 821 .frame \$30,16,\$26,0 822 ldgp \$29,0(\$27) 823 .prologue 1 824 .long 0x47e03d80 # implver \$0 825 lda \$2,-1 826 .long 0x47e20c21 # amask \$2,\$1 827 lda \$16,\$Lformat 828 mov \$0,\$17 829 not \$1,\$18 830 jsr \$26,printf 831 ldgp \$29,0(\$26) 832 mov 0,\$16 833 jsr \$26,exit 834 .end main 835 EOF 836 LIBC="" 837 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 838 if test "$?" = 0 ; then 839 case `./$dummy` in 840 0-0) UNAME_MACHINE="alpha" ;; 841 1-0) UNAME_MACHINE="alphaev5" ;; 842 1-1) UNAME_MACHINE="alphaev56" ;; 843 1-101) UNAME_MACHINE="alphapca56" ;; 844 2-303) UNAME_MACHINE="alphaev6" ;; 845 2-307) UNAME_MACHINE="alphaev67" ;; 846 esac 847 objdump --private-headers $dummy | \ 848 grep ld.so.1 > /dev/null 849 if test "$?" = 0 ; then 850 LIBC="libc1" 851 fi 852 fi 853 rm -f $dummy.s $dummy 851 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 852 EV5) UNAME_MACHINE=alphaev5 ;; 853 EV56) UNAME_MACHINE=alphaev56 ;; 854 PCA56) UNAME_MACHINE=alphapca56 ;; 855 PCA57) UNAME_MACHINE=alphapca56 ;; 856 EV6) UNAME_MACHINE=alphaev6 ;; 857 EV67) UNAME_MACHINE=alphaev67 ;; 858 EV68*) UNAME_MACHINE=alphaev68 ;; 859 esac 860 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 861 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 854 862 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 855 863 exit 0 ;; … … 877 885 echo x86_64-unknown-linux-gnu 878 886 exit 0 ;; 879 i ?86:Linux:*:*)887 i*86:Linux:*:*) 880 888 # The BFD linker knows what the default object file format is, so 881 889 # first see if it will tell us. cd to the root directory to prevent 882 890 # problems with other programs or directories called `ld' in the path. 883 ld_supported_emulations=`cd /; ld --help 2>&1 \ 884 | sed -ne '/supported emulations:/!d 891 # Set LC_ALL=C to ensure ld outputs messages in English. 892 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 893 | sed -ne '/supported targets:/!d 885 894 s/[ ][ ]*/ /g 886 s/.*supported emulations: *//895 s/.*supported targets: *// 887 896 s/ .*// 888 897 p'` 889 case "$ld_supported_emulations" in 890 i?86linux) 891 echo "${UNAME_MACHINE}-pc-linux-gnuaout" 892 exit 0 893 ;; 894 elf_i?86) 898 case "$ld_supported_targets" in 899 elf32-i386) 895 900 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 896 901 ;; 897 i?86coff) 902 a.out-i386-linux) 903 echo "${UNAME_MACHINE}-pc-linux-gnuaout" 904 exit 0 ;; 905 coff-i386) 898 906 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 899 exit 0 900 ;; 901 esac 902 # Either a pre-BFD a.out linker (linux-gnuoldld) 903 # or one that does not give us useful --help. 904 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. 905 # If ld does not provide *any* "supported emulations:" 906 # that means it is gnuoldld. 907 test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 908 case "${UNAME_MACHINE}" in 909 i?86) 910 VENDOR=pc; 911 ;; 912 *) 913 VENDOR=unknown; 914 ;; 907 exit 0 ;; 908 "") 909 # Either a pre-BFD a.out linker (linux-gnuoldld) or 910 # one that does not give us useful --help. 911 echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 912 exit 0 ;; 915 913 esac 916 914 # Determine whether the default compiler is a.out or elf 917 cat >$dummy.c <<EOF 918 #include <features.h> 919 #ifdef __cplusplus 920 #include <stdio.h> /* for printf() prototype */ 921 int main (int argc, char *argv[]) { 922 #else 923 int main (argc, argv) int argc; char *argv[]; { 924 #endif 925 #ifdef __ELF__ 926 # ifdef __GLIBC__ 927 # if __GLIBC__ >= 2 928 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); 929 # else 930 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); 931 # endif 932 # else 933 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); 934 # endif 935 #else 936 printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); 937 #endif 938 return 0; 939 } 915 eval $set_cc_for_build 916 sed 's/^ //' << EOF >$dummy.c 917 #include <features.h> 918 #ifdef __ELF__ 919 # ifdef __GLIBC__ 920 # if __GLIBC__ >= 2 921 LIBC=gnu 922 # else 923 LIBC=gnulibc1 924 # endif 925 # else 926 LIBC=gnulibc1 927 # endif 928 #else 929 #ifdef __INTEL_COMPILER 930 LIBC=gnu 931 #else 932 LIBC=gnuaout 933 #endif 934 #endif 940 935 EOF 941 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0942 rm -f $dummy.c $dummy936 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 937 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 943 938 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 944 939 ;; 945 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions 946 # are messed up and put the nodename in both sysname and nodename. 947 i?86:DYNIX/ptx:4*:*) 940 i*86:DYNIX/ptx:4*:*) 941 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 942 # earlier versions are messed up and put the nodename in both 943 # sysname and nodename. 948 944 echo i386-sequent-sysv4 949 945 exit 0 ;; 950 i ?86:UNIX_SV:4.2MP:2.*)946 i*86:UNIX_SV:4.2MP:2.*) 951 947 # Unixware is an offshoot of SVR4, but it has its own version 952 948 # number series starting with 2... … … 956 952 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 957 953 exit 0 ;; 958 i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) 954 i*86:OS/2:*:*) 955 # If we were able to find `uname', then EMX Unix compatibility 956 # is probably installed. 957 echo ${UNAME_MACHINE}-pc-os2-emx 958 exit 0 ;; 959 i*86:XTS-300:*:STOP) 960 echo ${UNAME_MACHINE}-unknown-stop 961 exit 0 ;; 962 i*86:atheos:*:*) 963 echo ${UNAME_MACHINE}-unknown-atheos 964 exit 0 ;; 965 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 966 echo i386-unknown-lynxos${UNAME_RELEASE} 967 exit 0 ;; 968 i*86:*DOS:*:*) 969 echo ${UNAME_MACHINE}-pc-msdosdjgpp 970 exit 0 ;; 971 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 959 972 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 960 973 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then … … 964 977 fi 965 978 exit 0 ;; 966 i?86:*:5:7*) 967 # Fixed at (any) Pentium or better 968 UNAME_MACHINE=i586 969 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then 970 echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} 971 else 972 echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} 973 fi 974 exit 0 ;; 975 i?86:*:3.2:*) 979 i*86:*:5:[78]*) 980 case `/bin/uname -X | grep "^Machine"` in 981 *486*) UNAME_MACHINE=i486 ;; 982 *Pentium) UNAME_MACHINE=i586 ;; 983 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 984 esac 985 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 986 exit 0 ;; 987 i*86:*:3.2:*) 976 988 if test -f /usr/options/cb.name; then 977 989 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 978 990 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 979 991 elif /bin/uname -X 2>/dev/null >/dev/null ; then 980 UNAME_REL=`(/bin/uname -X| egrep Release|sed -e 's/.*= //')`981 (/bin/uname -X| egrep i80486 >/dev/null) && UNAME_MACHINE=i486982 (/bin/uname -X| egrep '^Machine.*Pentium' >/dev/null) \992 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 993 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 994 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 983 995 && UNAME_MACHINE=i586 984 (/bin/uname -X| egrep '^Machine.*Pent ?II' >/dev/null) \996 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 985 997 && UNAME_MACHINE=i686 986 (/bin/uname -X| egrep '^Machine.*Pentium Pro' >/dev/null) \998 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 987 999 && UNAME_MACHINE=i686 988 1000 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL … … 990 1002 echo ${UNAME_MACHINE}-pc-sysv32 991 1003 fi 992 exit 0 ;;993 i?86:*DOS:*:*)994 echo ${UNAME_MACHINE}-pc-msdosdjgpp995 1004 exit 0 ;; 996 1005 pc:*:*:*) … … 1017 1026 echo m68010-convergent-sysv 1018 1027 exit 0 ;; 1028 mc68k:UNIX:SYSTEM5:3.51m) 1029 echo m68k-convergent-sysv 1030 exit 0 ;; 1031 M680?0:D-NIX:5.3:*) 1032 echo m68k-diab-dnix 1033 exit 0 ;; 1019 1034 M68*:*:R3V[567]*:*) 1020 1035 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 1021 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)1036 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) 1022 1037 OS_REL='' 1023 1038 test -r /etc/.relid \ … … 1030 1045 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1031 1046 && echo i486-ncr-sysv4 && exit 0 ;; 1032 m68*:LynxOS:2.*:* )1047 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1033 1048 echo m68k-unknown-lynxos${UNAME_RELEASE} 1034 1049 exit 0 ;; … … 1036 1051 echo m68k-atari-sysv4 1037 1052 exit 0 ;; 1038 i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)1039 echo i386-unknown-lynxos${UNAME_RELEASE}1040 exit 0 ;;1041 1053 TSUNAMI:LynxOS:2.*:*) 1042 1054 echo sparc-unknown-lynxos${UNAME_RELEASE} … … 1045 1057 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1046 1058 exit 0 ;; 1047 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* )1059 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1048 1060 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1049 1061 exit 0 ;; … … 1065 1077 fi 1066 1078 exit 0 ;; 1067 PENTIUM: CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort1068 1079 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1080 # says <Richard.M.Bartel@ccMail.Census.GOV> 1069 1081 echo i586-unisys-sysv4 1070 1082 exit 0 ;; … … 1078 1090 echo i860-stratus-sysv4 1079 1091 exit 0 ;; 1092 *:VOS:*:*) 1093 # From Paul.Green@stratus.com. 1094 echo hppa1.1-stratus-vos 1095 exit 0 ;; 1080 1096 mc68*:A/UX:*:*) 1081 1097 echo m68k-apple-aux${UNAME_RELEASE} … … 1106 1122 echo sx5-nec-superux${UNAME_RELEASE} 1107 1123 exit 0 ;; 1124 SX-6:SUPER-UX:*:*) 1125 echo sx6-nec-superux${UNAME_RELEASE} 1126 exit 0 ;; 1108 1127 Power*:Rhapsody:*:*) 1109 1128 echo powerpc-apple-rhapsody${UNAME_RELEASE} … … 1113 1132 exit 0 ;; 1114 1133 *:Darwin:*:*) 1115 echo `uname -p`-apple-darwin${UNAME_RELEASE} 1134 case `uname -p` in 1135 *86) UNAME_PROCESSOR=i686 ;; 1136 powerpc) UNAME_PROCESSOR=powerpc ;; 1137 esac 1138 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1116 1139 exit 0 ;; 1117 1140 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1118 if test "${UNAME_MACHINE}" = "x86pc"; then 1141 UNAME_PROCESSOR=`uname -p` 1142 if test "$UNAME_PROCESSOR" = "x86"; then 1143 UNAME_PROCESSOR=i386 1119 1144 UNAME_MACHINE=pc 1120 1145 fi 1121 echo `uname -p`-${UNAME_MACHINE}-nto-qnx1146 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1122 1147 exit 0 ;; 1123 1148 *:QNX:*:4*) 1124 1149 echo i386-pc-qnx 1125 1150 exit 0 ;; 1126 NSR-[ KW]:NONSTOP_KERNEL:*:*)1151 NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) 1127 1152 echo nsr-tandem-nsk${UNAME_RELEASE} 1128 1153 exit 0 ;; … … 1147 1172 echo ${UNAME_MACHINE}-unknown-plan9 1148 1173 exit 0 ;; 1149 i?86:OS/2:*:*)1150 # If we were able to find `uname', then EMX Unix compatibility1151 # is probably installed.1152 echo ${UNAME_MACHINE}-pc-os2-emx1153 exit 0 ;;1154 1174 *:TOPS-10:*:*) 1155 1175 echo pdp10-unknown-tops10 … … 1175 1195 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1176 1196 1197 eval $set_cc_for_build 1177 1198 cat >$dummy.c <<EOF 1178 1199 #ifdef _SEQUENT_ … … 1289 1310 EOF 1290 1311 1291 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 1292 rm -f $dummy.c $dummy 1312 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 1293 1313 1294 1314 # Apollos put the system type in the environment. -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/config.if ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 3 3 # determine: 4 4 # 5 # 1. libstcxx_interface: the interface name for libstdc++. 6 # 2. cxx_interface: the interface name for c++. 7 # 3. libc_interface: the interface name for libc. 5 # 1. libstcxx_incdir: the interface name for libstdc++. 6 # 2. libc_interface: the interface name for libc. 8 7 # 9 8 … … 22 21 fi 23 22 24 if [ "${enable_libstdcxx_v3}" = "yes" ] ; then 25 libstdcxx_srcdir=${if_topsrcdir}/libstdc++-v3 26 else 27 libstdcxx_srcdir=${if_topsrcdir}/libstdc++ 23 # Set libstdcxx_incdir. 24 # This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4. 25 if test -z "$gcc_version"; then 26 if test -z "${gcc_version_trigger}" \ 27 && test -f ${if_topsrcdir}/gcc/version.c; then 28 gcc_version_trigger=${if_topsrcdir}/gcc/version.c 29 fi 30 if test -f "${gcc_version_trigger}"; then 31 gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'` 32 else 33 gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'` 34 fi 35 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` 28 36 fi 29 30 if [ -f ${libstdcxx_srcdir}/Makefile.in ]; then 31 # We check libstdc++ for libstdcxx_interface. 32 libstdcxx_interface=`grep "^INTERFACE" ${libstdcxx_srcdir}/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'` 33 else 34 libstdcxx_interface= 35 fi 36 37 if [ -f ${if_topsrcdir}/gcc/cp/Makefile.in ]; then 38 # We check gcc/cp for cxx_interface. 39 cxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/gcc/cp/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'` 40 else 41 cxx_interface= 42 fi 37 libstdcxx_incdir=c++/${gcc_version} 43 38 44 39 # The trickiest part is libc_interface. -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/config.sub ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 1 1 #! /bin/sh 2 2 # Configuration validation subroutine script. 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 20014 # Free Software Foundation, Inc.5 6 timestamp='200 1-03-19'3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 5 6 timestamp='2003-05-09' 7 7 8 8 # This file is (in principle) common to ALL GNU software. … … 30 30 # the same distribution terms that you use for the rest of that program. 31 31 32 # Please send patches to <config-patches@gnu.org>. 32 # Please send patches to <config-patches@gnu.org>. Submit a context 33 # diff and a properly formatted ChangeLog entry. 33 34 # 34 35 # Configuration subroutine to validate and canonicalize a configuration type. … … 118 119 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 119 120 case $maybe_os in 120 nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)121 nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) 121 122 os=-$maybe_os 122 123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` … … 158 159 basic_machine=$1 159 160 ;; 161 -chorusos*) 162 os=-chorusos 163 basic_machine=$1 164 ;; 165 -chorusrdb) 166 os=-chorusrdb 167 basic_machine=$1 168 ;; 160 169 -hiux*) 161 170 os=-hiuxwe2 … … 216 225 # Recognize the basic CPU types without company name. 217 226 # Some are omitted here because they have special meanings below. 218 tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ 219 | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ 220 | pyramid | mn10200 | mn10300 | tron | a29k \ 221 | 580 | i960 | h8300 \ 222 | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ 223 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ 224 | hppa64 \ 225 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ 226 | alphaev6[78] \ 227 | we32k | ns16k | clipper | i370 | sh | sh[34] \ 228 | powerpc | powerpcle \ 229 | 1750a | dsp16xx | pdp10 | pdp11 \ 230 | mips16 | mips64 | mipsel | mips64el \ 231 | mips64orion | mips64orionel | mipstx39 | mipstx39el \ 232 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ 233 | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ 234 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ 235 | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ 236 | pj | pjl | h8500) 227 1750a | 580 \ 228 | a29k \ 229 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 230 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 231 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ 232 | clipper \ 233 | d10v | d30v | dlx | dsp16xx \ 234 | fr30 | frv \ 235 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 236 | i370 | i860 | i960 | ia64 \ 237 | ip2k \ 238 | m32r | m68000 | m68k | m88k | mcore \ 239 | mips | mipsbe | mipseb | mipsel | mipsle \ 240 | mips16 \ 241 | mips64 | mips64el \ 242 | mips64vr | mips64vrel \ 243 | mips64orion | mips64orionel \ 244 | mips64vr4100 | mips64vr4100el \ 245 | mips64vr4300 | mips64vr4300el \ 246 | mips64vr5000 | mips64vr5000el \ 247 | mipsisa32 | mipsisa32el \ 248 | mipsisa32r2 | mipsisa32r2el \ 249 | mipsisa64 | mipsisa64el \ 250 | mipsisa64sb1 | mipsisa64sb1el \ 251 | mipsisa64sr71k | mipsisa64sr71kel \ 252 | mipstx39 | mipstx39el \ 253 | mn10200 | mn10300 \ 254 | msp430 \ 255 | ns16k | ns32k \ 256 | openrisc | or32 \ 257 | pdp10 | pdp11 | pj | pjl \ 258 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 259 | pyramid \ 260 | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 261 | sh64 | sh64le \ 262 | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ 263 | strongarm \ 264 | tahoe | thumb | tic80 | tron \ 265 | v850 | v850e \ 266 | we32k \ 267 | x86 | xscale | xstormy16 | xtensa \ 268 | z8k) 237 269 basic_machine=$basic_machine-unknown 238 270 ;; … … 242 274 os=-none 243 275 ;; 244 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)276 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 245 277 ;; 246 278 … … 248 280 # because (1) that's what they normally are, and 249 281 # (2) the word "unknown" tends to confuse beginning users. 250 i [234567]86 | x86_64)282 i*86 | x86_64) 251 283 basic_machine=$basic_machine-pc 252 284 ;; … … 257 289 ;; 258 290 # Recognize the basic CPU types with company name. 259 # FIXME: clean up the formatting here. 260 vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ 261 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ 262 | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ 263 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ 264 | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ 265 | xmp-* | ymp-* \ 266 | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ 267 | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ 268 | hppa2.0n-* | hppa64-* \ 269 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ 270 | alphaev6[78]-* \ 271 | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ 272 | clipper-* | orion-* \ 273 | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ 274 | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ 275 | mips64el-* | mips64orion-* | mips64orionel-* \ 276 | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ 277 | mipstx39-* | mipstx39el-* | mcore-* \ 278 | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ 279 | [cjt]90-* \ 280 | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ 281 | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ 282 | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) 291 580-* \ 292 | a29k-* \ 293 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 294 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 295 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 296 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 297 | avr-* \ 298 | bs2000-* \ 299 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 300 | clipper-* | cydra-* \ 301 | d10v-* | d30v-* | dlx-* \ 302 | elxsi-* \ 303 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 304 | h8300-* | h8500-* \ 305 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 306 | i*86-* | i860-* | i960-* | ia64-* \ 307 | ip2k-* \ 308 | m32r-* \ 309 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 310 | m88110-* | m88k-* | mcore-* \ 311 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 312 | mips16-* \ 313 | mips64-* | mips64el-* \ 314 | mips64vr-* | mips64vrel-* \ 315 | mips64orion-* | mips64orionel-* \ 316 | mips64vr4100-* | mips64vr4100el-* \ 317 | mips64vr4300-* | mips64vr4300el-* \ 318 | mips64vr5000-* | mips64vr5000el-* \ 319 | mipsisa32-* | mipsisa32el-* \ 320 | mipsisa32r2-* | mipsisa32r2el-* \ 321 | mipsisa64-* | mipsisa64el-* \ 322 | mipsisa64sb1-* | mipsisa64sb1el-* \ 323 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 324 | mipstx39-* | mipstx39el-* \ 325 | msp430-* \ 326 | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ 327 | orion-* \ 328 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 329 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 330 | pyramid-* \ 331 | romp-* | rs6000-* \ 332 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ 333 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 334 | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ 335 | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ 336 | tahoe-* | thumb-* \ 337 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 338 | tron-* \ 339 | v850-* | v850e-* | vax-* \ 340 | we32k-* \ 341 | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ 342 | xtensa-* \ 343 | ymp-* \ 344 | z8k-*) 283 345 ;; 284 346 # Recognize the various machine names and aliases which stand … … 312 374 os=-bsd 313 375 ;; 376 amd64) 377 basic_machine=x86_64-pc 378 ;; 314 379 amdahl) 315 380 basic_machine=580-amdahl … … 343 408 os=-dynix 344 409 ;; 410 c90) 411 basic_machine=c90-cray 412 os=-unicos 413 ;; 345 414 convex-c1) 346 415 basic_machine=c1-convex … … 363 432 os=-bsd 364 433 ;; 365 cray | ymp) 366 basic_machine=ymp-cray 367 os=-unicos 368 ;; 369 cray2) 370 basic_machine=cray2-cray 371 os=-unicos 372 ;; 373 [cjt]90) 374 basic_machine=${basic_machine}-cray 434 cray | j90) 435 basic_machine=j90-cray 375 436 os=-unicos 376 437 ;; … … 386 447 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 387 448 basic_machine=mips-dec 449 ;; 450 decsystem10* | dec10*) 451 basic_machine=pdp10-dec 452 os=-tops10 453 ;; 454 decsystem20* | dec20*) 455 basic_machine=pdp10-dec 456 os=-tops20 388 457 ;; 389 458 delta | 3300 | motorola-3300 | motorola-delta \ … … 507 576 ;; 508 577 # I'm not sure what "Sysv32" means. Should this be sysv3.2? 509 i [34567]86v32)578 i*86v32) 510 579 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 511 580 os=-sysv32 512 581 ;; 513 i [34567]86v4*)582 i*86v4*) 514 583 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 515 584 os=-sysv4 516 585 ;; 517 i [34567]86v)586 i*86v) 518 587 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 519 588 os=-sysv 520 589 ;; 521 i [34567]86sol2)590 i*86sol2) 522 591 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 523 592 os=-solaris2 … … 567 636 os=-mint 568 637 ;; 569 mipsel*-linux*)570 basic_machine=mipsel-unknown571 os=-linux-gnu572 ;;573 mips*-linux*)574 basic_machine=mips-unknown575 os=-linux-gnu576 ;;577 638 mips3*-*) 578 639 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` … … 588 649 basic_machine=m68k-rom68k 589 650 os=-coff 651 ;; 652 morphos) 653 basic_machine=powerpc-unknown 654 os=-morphos 590 655 ;; 591 656 msdos) … … 661 726 basic_machine=np1-gould 662 727 ;; 728 nv1) 729 basic_machine=nv1-cray 730 os=-unicosmp 731 ;; 663 732 nsr-tandem) 664 733 basic_machine=nsr-tandem … … 668 737 os=-proelf 669 738 ;; 739 or32 | or32-*) 740 basic_machine=or32-unknown 741 os=-coff 742 ;; 670 743 OSE68000 | ose68000) 671 744 basic_machine=m68000-ericsson … … 690 763 basic_machine=m68k-tti 691 764 ;; 692 765 pc532 | pc532-*) 693 766 basic_machine=ns32k-pc532 694 767 ;; 695 pentium | p5 | k5 | k6 | nexgen )768 pentium | p5 | k5 | k6 | nexgen | viac3) 696 769 basic_machine=i586-pc 697 770 ;; 698 pentiumpro | p6 | 6x86 | athlon )771 pentiumpro | p6 | 6x86 | athlon | athlon_*) 699 772 basic_machine=i686-pc 700 773 ;; … … 702 775 basic_machine=i686-pc 703 776 ;; 704 pentium-* | p5-* | k5-* | k6-* | nexgen-* )777 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 705 778 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 706 779 ;; … … 717 790 ;; 718 791 ppc) basic_machine=powerpc-unknown 719 792 ;; 720 793 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 721 794 ;; 722 795 ppcle | powerpclittle | ppc-le | powerpc-little) 723 796 basic_machine=powerpcle-unknown 724 797 ;; 725 798 ppcle-* | powerpclittle-*) 726 799 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 800 ;; 801 ppc64) basic_machine=powerpc64-unknown 802 ;; 803 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 804 ;; 805 ppc64le | powerpc64little | ppc64-le | powerpc64-little) 806 basic_machine=powerpc64le-unknown 807 ;; 808 ppc64le-* | powerpc64little-*) 809 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 727 810 ;; 728 811 ps2) … … 743 826 basic_machine=romp-ibm 744 827 ;; 828 s390 | s390-*) 829 basic_machine=s390-ibm 830 ;; 831 s390x | s390x-*) 832 basic_machine=s390x-ibm 833 ;; 745 834 sa29200) 746 835 basic_machine=a29k-amd 747 836 os=-udi 748 837 ;; 838 sb1) 839 basic_machine=mipsisa64sb1-unknown 840 ;; 841 sb1el) 842 basic_machine=mipsisa64sb1el-unknown 843 ;; 749 844 sequent) 750 845 basic_machine=i386-sequent … … 754 849 os=-hms 755 850 ;; 756 sparclite-wrs )851 sparclite-wrs | simso-wrs) 757 852 basic_machine=sparclite-wrs 758 853 os=-vxworks … … 821 916 ;; 822 917 t3e) 823 basic_machine= t3e-cray918 basic_machine=alphaev5-cray 824 919 os=-unicos 920 ;; 921 t90) 922 basic_machine=t90-cray 923 os=-unicos 924 ;; 925 tic4x | c4x*) 926 basic_machine=tic4x-unknown 927 os=-coff 825 928 ;; 826 929 tic54x | c54x*) … … 828 931 os=-coff 829 932 ;; 933 tic55x | c55x*) 934 basic_machine=tic55x-unknown 935 os=-coff 936 ;; 937 tic6x | c6x*) 938 basic_machine=tic6x-unknown 939 os=-coff 940 ;; 830 941 tx39) 831 942 basic_machine=mipstx39-unknown … … 833 944 tx39el) 834 945 basic_machine=mipstx39el-unknown 946 ;; 947 toad1) 948 basic_machine=pdp10-xkl 949 os=-tops20 835 950 ;; 836 951 tower | tower-32) … … 858 973 ;; 859 974 vpp*|vx|vx-*) 860 861 975 basic_machine=f301-fujitsu 976 ;; 862 977 vxworks960) 863 978 basic_machine=i960-wrs … … 880 995 os=-proelf 881 996 ;; 882 xmp) 883 basic_machine=xmp-cray 997 xps | xps100) 998 basic_machine=xps100-honeywell 999 ;; 1000 ymp) 1001 basic_machine=ymp-cray 884 1002 os=-unicos 885 ;;886 xps | xps100)887 basic_machine=xps100-honeywell888 1003 ;; 889 1004 z8k-*-coff) … … 907 1022 basic_machine=hppa1.1-oki 908 1023 ;; 909 mips)910 if [ x$os = x-linux-gnu ]; then911 basic_machine=mips-unknown912 else913 basic_machine=mips-mips914 fi915 ;;916 1024 romp) 917 1025 basic_machine=romp-ibm … … 933 1041 basic_machine=we32k-att 934 1042 ;; 935 sh3 | sh4 )1043 sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) 936 1044 basic_machine=sh-unknown 937 1045 ;; 938 sparc | sparcv9) 1046 sh64) 1047 basic_machine=sh64-unknown 1048 ;; 1049 sparc | sparcv9 | sparcv9b) 939 1050 basic_machine=sparc-sun 940 1051 ;; 941 1052 cydra) 942 1053 basic_machine=cydra-cydrome 943 1054 ;; … … 954 1065 basic_machine=powerpc-apple 955 1066 ;; 956 c4x*) 957 basic_machine=c4x-none 958 os=-coff 1067 *-unknown) 1068 # Make sure to match an already-canonicalized machine name. 959 1069 ;; 960 1070 *) … … 1014 1124 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1015 1125 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1126 | -chorusos* | -chorusrdb* \ 1016 1127 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1017 1128 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ 1018 | -interix* | -uwin* | - rhapsody* | -darwin* | -opened* \1129 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1019 1130 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1020 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) 1131 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1132 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1133 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1134 | -powermax* | -dnix*) 1021 1135 # Remember, each alternative MUST END IN *, to match a version number. 1022 1136 ;; 1023 1137 -qnx*) 1024 1138 case $basic_machine in 1025 x86-* | i [34567]86-*)1139 x86-* | i*86-*) 1026 1140 ;; 1027 1141 *) … … 1030 1144 esac 1031 1145 ;; 1146 -nto-qnx*) 1147 ;; 1032 1148 -nto*) 1033 os= -nto-qnx1149 os=`echo $os | sed -e 's|nto|nto-qnx|'` 1034 1150 ;; 1035 1151 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ … … 1070 1186 os=-aos 1071 1187 ;; 1188 -atheos*) 1189 os=-atheos 1190 ;; 1072 1191 -386bsd) 1073 1192 os=-bsd … … 1076 1195 os=-sysv 1077 1196 ;; 1197 -nova*) 1198 os=-rtmk-nova 1199 ;; 1078 1200 -ns2 ) 1079 1201 os=-nextstep2 1080 1202 ;; 1081 1203 -nsk*) … … 1116 1238 os=-xenix 1117 1239 ;; 1118 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1119 os=-mint 1240 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1241 os=-mint 1242 ;; 1243 -aros*) 1244 os=-aros 1245 ;; 1246 -kaos*) 1247 os=-kaos 1120 1248 ;; 1121 1249 -none) … … 1150 1278 os=-aout 1151 1279 ;; 1280 # This must come before the *-dec entry. 1152 1281 pdp10-*) 1153 1282 os=-tops20 1154 1283 ;; 1155 1284 pdp11-*) 1156 1285 os=-none 1157 1286 ;; … … 1180 1309 os=-elf 1181 1310 ;; 1311 or32-*) 1312 os=-coff 1313 ;; 1182 1314 *-tti) # must be before sparc entry or we get the wrong os. 1183 1315 os=-sysv3 … … 1243 1375 os=-nextstep3 1244 1376 ;; 1245 1377 *-gould) 1246 1378 os=-sysv 1247 1379 ;; 1248 1380 *-highlevel) 1249 1381 os=-bsd 1250 1382 ;; … … 1252 1384 os=-bsd 1253 1385 ;; 1254 1386 *-sgi) 1255 1387 os=-irix 1256 1388 ;; 1257 1389 *-siemens) 1258 1390 os=-sysv4 1259 1391 ;; … … 1327 1459 vendor=sequent 1328 1460 ;; 1329 -vxsim* | -vxworks* )1461 -vxsim* | -vxworks* | -windiss*) 1330 1462 vendor=wrs 1331 1463 ;; … … 1341 1473 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1342 1474 vendor=atari 1475 ;; 1476 -vos*) 1477 vendor=stratus 1343 1478 ;; 1344 1479 esac -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/configure ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 1 #!/bin/sh 2 3 ### WARNING: this file contains embedded tabs. Do not run untabify on this file. 4 5 # Configuration script 6 # Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 7 # Free Software Foundation, Inc. 8 9 # This program is free software; you can redistribute it and/or modify 10 # it under the terms of the GNU General Public License as published by 11 # the Free Software Foundation; either version 2 of the License, or 12 # (at your option) any later version. 13 # 14 # This program is distributed in the hope that it will be useful, 15 # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 # GNU General Public License for more details. 18 # 19 # You should have received a copy of the GNU General Public License 20 # along with this program; if not, write to the Free Software 21 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22 23 # This file was originally written by K. Richard Pixley. 24 1 #! /bin/sh 2 3 # Guess values for system-dependent variables and create Makefiles. 4 # Generated automatically using autoconf version 2.13 5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. 25 6 # 26 # Shell script to create proper links to machine-dependent files in 27 # preparation for compilation. 28 # 29 # If configure succeeds, it leaves its status in config.status. 30 # If configure fails after disturbing the status quo, 31 # config.status is removed. 32 # 33 34 export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0 $argv; kill $$) 35 36 remove=rm 37 hard_link=ln 38 symbolic_link='ln -s' 39 40 #for Test 41 #remove="echo rm" 42 #hard_link="echo ln" 43 #symbolic_link="echo ln -s" 44 45 # clear some things potentially inherited from environment. 46 47 Makefile=Makefile 48 Makefile_in=Makefile.in 49 arguments= 50 build_alias= 51 cache_file=config.cache 52 cache_file_option= 53 configdirs= 54 extraconfigdirs= 55 diroptions= 56 exec_prefix= 57 exec_prefixoption= 58 fatal= 59 floating_point=default 60 gas=default 61 gcc_version= 62 gcc_version_trigger= 63 host_alias=NOHOST 64 host_makefile_frag= 65 moveifchange= 66 norecursion= 67 other_options= 68 package_makefile_frag= 69 package_makefile_rules_frag= 70 prefix=/usr/local 71 progname= 72 program_prefix= 73 program_prefixoption= 74 program_suffix= 75 program_suffixoption= 76 program_transform_name= 77 program_transform_nameoption= 78 redirect= 79 removing= 7 # This configure script is free software; the Free Software Foundation 8 # gives unlimited permission to copy, distribute and modify it. 9 10 # Defaults: 11 ac_help= 12 ac_default_prefix=/usr/local 13 # Any additions from configure.in: 14 ac_help="$ac_help 15 --disable-serial-[{host,target,build}-]configure 16 Don't force sequential configuration of 17 sub-packages for the host, target or build 18 machine, or of any sub-packages at all" 19 ac_help="$ac_help 20 --enable-maintainer-mode enable make rules and dependencies not useful 21 (and sometimes confusing) to the casual installer" 22 23 # Initialize some variables set by options. 24 # The variables have the same names as the options, with 25 # dashes changed to underlines. 26 build=NONE 27 cache_file=./config.cache 28 exec_prefix=NONE 29 host=NONE 30 no_create= 31 nonopt=NONE 32 no_recursion= 33 prefix=NONE 34 program_prefix=NONE 35 program_suffix=NONE 36 program_transform_name=s,x,x, 37 silent= 80 38 site= 81 site_makefile_frag=82 site_option=83 39 srcdir= 84 srctrigger= 85 subdirs= 86 target_alias=NOTARGET 87 target_makefile_frag= 88 undefs=NOUNDEFS 89 version="$Revision: 1.11 $" 90 x11=default 40 target=NONE 41 verbose= 42 x_includes=NONE 43 x_libraries=NONE 91 44 bindir='${exec_prefix}/bin' 92 45 sbindir='${exec_prefix}/sbin' … … 102 55 mandir='${prefix}/man' 103 56 57 # Initialize some other variables. 58 subdirs= 59 MFLAGS= MAKEFLAGS= 60 SHELL=${CONFIG_SHELL-/bin/sh} 61 # Maximum number of lines to put in a shell here document. 62 ac_max_here_lines=12 63 64 ac_prev= 65 for ac_option 66 do 67 68 # If the previous option needs an argument, assign it. 69 if test -n "$ac_prev"; then 70 eval "$ac_prev=\$ac_option" 71 ac_prev= 72 continue 73 fi 74 75 case "$ac_option" in 76 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 77 *) ac_optarg= ;; 78 esac 79 80 # Accept the important Cygnus configure options, so we can diagnose typos. 81 82 case "$ac_option" in 83 84 -bindir | --bindir | --bindi | --bind | --bin | --bi) 85 ac_prev=bindir ;; 86 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 87 bindir="$ac_optarg" ;; 88 89 -build | --build | --buil | --bui | --bu) 90 ac_prev=build ;; 91 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 92 build="$ac_optarg" ;; 93 94 -cache-file | --cache-file | --cache-fil | --cache-fi \ 95 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 96 ac_prev=cache_file ;; 97 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 98 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 99 cache_file="$ac_optarg" ;; 100 101 -datadir | --datadir | --datadi | --datad | --data | --dat | --da) 102 ac_prev=datadir ;; 103 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ 104 | --da=*) 105 datadir="$ac_optarg" ;; 106 107 -disable-* | --disable-*) 108 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` 109 # Reject names that are not valid shell variable names. 110 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then 111 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 112 fi 113 ac_feature=`echo $ac_feature| sed 's/-/_/g'` 114 eval "enable_${ac_feature}=no" ;; 115 116 -enable-* | --enable-*) 117 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` 118 # Reject names that are not valid shell variable names. 119 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then 120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 121 fi 122 ac_feature=`echo $ac_feature| sed 's/-/_/g'` 123 case "$ac_option" in 124 *=*) ;; 125 *) ac_optarg=yes ;; 126 esac 127 eval "enable_${ac_feature}='$ac_optarg'" ;; 128 129 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 130 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 131 | --exec | --exe | --ex) 132 ac_prev=exec_prefix ;; 133 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 134 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 135 | --exec=* | --exe=* | --ex=*) 136 exec_prefix="$ac_optarg" ;; 137 138 -gas | --gas | --ga | --g) 139 # Obsolete; use --with-gas. 140 with_gas=yes ;; 141 142 -help | --help | --hel | --he) 143 # Omit some internal or obsolete options to make the list less imposing. 144 # This message is too long to be a string in the A/UX 3.1 sh. 145 cat << EOF 146 Usage: configure [options] [host] 147 Options: [defaults in brackets after descriptions] 148 Configuration: 149 --cache-file=FILE cache test results in FILE 150 --help print this message 151 --no-create do not create output files 152 --quiet, --silent do not print \`checking...' messages 153 --version print the version of autoconf that created configure 154 Directory and file names: 155 --prefix=PREFIX install architecture-independent files in PREFIX 156 [$ac_default_prefix] 157 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 158 [same as prefix] 159 --bindir=DIR user executables in DIR [EPREFIX/bin] 160 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] 161 --libexecdir=DIR program executables in DIR [EPREFIX/libexec] 162 --datadir=DIR read-only architecture-independent data in DIR 163 [PREFIX/share] 164 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] 165 --sharedstatedir=DIR modifiable architecture-independent data in DIR 166 [PREFIX/com] 167 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] 168 --libdir=DIR object code libraries in DIR [EPREFIX/lib] 169 --includedir=DIR C header files in DIR [PREFIX/include] 170 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] 171 --infodir=DIR info documentation in DIR [PREFIX/info] 172 --mandir=DIR man documentation in DIR [PREFIX/man] 173 --srcdir=DIR find the sources in DIR [configure dir or ..] 174 --program-prefix=PREFIX prepend PREFIX to installed program names 175 --program-suffix=SUFFIX append SUFFIX to installed program names 176 --program-transform-name=PROGRAM 177 run sed PROGRAM on installed program names 178 EOF 179 cat << EOF 180 Host type: 181 --build=BUILD configure for building on BUILD [BUILD=HOST] 182 --host=HOST configure for HOST [guessed] 183 --target=TARGET configure for TARGET [TARGET=HOST] 184 Features and packages: 185 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 186 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 187 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 188 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 189 --x-includes=DIR X include files are in DIR 190 --x-libraries=DIR X library files are in DIR 191 EOF 192 if test -n "$ac_help"; then 193 echo "--enable and --with options recognized:$ac_help" 194 fi 195 exit 0 ;; 196 197 -host | --host | --hos | --ho) 198 ac_prev=host ;; 199 -host=* | --host=* | --hos=* | --ho=*) 200 host="$ac_optarg" ;; 201 202 -includedir | --includedir | --includedi | --included | --include \ 203 | --includ | --inclu | --incl | --inc) 204 ac_prev=includedir ;; 205 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 206 | --includ=* | --inclu=* | --incl=* | --inc=*) 207 includedir="$ac_optarg" ;; 208 209 -infodir | --infodir | --infodi | --infod | --info | --inf) 210 ac_prev=infodir ;; 211 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 212 infodir="$ac_optarg" ;; 213 214 -libdir | --libdir | --libdi | --libd) 215 ac_prev=libdir ;; 216 -libdir=* | --libdir=* | --libdi=* | --libd=*) 217 libdir="$ac_optarg" ;; 218 219 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 220 | --libexe | --libex | --libe) 221 ac_prev=libexecdir ;; 222 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 223 | --libexe=* | --libex=* | --libe=*) 224 libexecdir="$ac_optarg" ;; 225 226 -localstatedir | --localstatedir | --localstatedi | --localstated \ 227 | --localstate | --localstat | --localsta | --localst \ 228 | --locals | --local | --loca | --loc | --lo) 229 ac_prev=localstatedir ;; 230 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 231 | --localstate=* | --localstat=* | --localsta=* | --localst=* \ 232 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 233 localstatedir="$ac_optarg" ;; 234 235 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 236 ac_prev=mandir ;; 237 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 238 mandir="$ac_optarg" ;; 239 240 -nfp | --nfp | --nf) 241 # Obsolete; use --without-fp. 242 with_fp=no ;; 243 244 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 245 | --no-cr | --no-c) 246 no_create=yes ;; 247 248 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 249 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 250 no_recursion=yes ;; 251 252 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 253 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 254 | --oldin | --oldi | --old | --ol | --o) 255 ac_prev=oldincludedir ;; 256 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 257 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 258 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 259 oldincludedir="$ac_optarg" ;; 260 261 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 262 ac_prev=prefix ;; 263 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 264 prefix="$ac_optarg" ;; 265 266 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 267 | --program-pre | --program-pr | --program-p) 268 ac_prev=program_prefix ;; 269 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 270 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 271 program_prefix="$ac_optarg" ;; 272 273 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 274 | --program-suf | --program-su | --program-s) 275 ac_prev=program_suffix ;; 276 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 277 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 278 program_suffix="$ac_optarg" ;; 279 280 -program-transform-name | --program-transform-name \ 281 | --program-transform-nam | --program-transform-na \ 282 | --program-transform-n | --program-transform- \ 283 | --program-transform | --program-transfor \ 284 | --program-transfo | --program-transf \ 285 | --program-trans | --program-tran \ 286 | --progr-tra | --program-tr | --program-t) 287 ac_prev=program_transform_name ;; 288 -program-transform-name=* | --program-transform-name=* \ 289 | --program-transform-nam=* | --program-transform-na=* \ 290 | --program-transform-n=* | --program-transform-=* \ 291 | --program-transform=* | --program-transfor=* \ 292 | --program-transfo=* | --program-transf=* \ 293 | --program-trans=* | --program-tran=* \ 294 | --progr-tra=* | --program-tr=* | --program-t=*) 295 program_transform_name="$ac_optarg" ;; 296 297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 298 | -silent | --silent | --silen | --sile | --sil) 299 silent=yes ;; 300 301 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 302 ac_prev=sbindir ;; 303 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 304 | --sbi=* | --sb=*) 305 sbindir="$ac_optarg" ;; 306 307 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 308 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 309 | --sharedst | --shareds | --shared | --share | --shar \ 310 | --sha | --sh) 311 ac_prev=sharedstatedir ;; 312 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 313 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 314 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 315 | --sha=* | --sh=*) 316 sharedstatedir="$ac_optarg" ;; 317 318 -site | --site | --sit) 319 ac_prev=site ;; 320 -site=* | --site=* | --sit=*) 321 site="$ac_optarg" ;; 322 323 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 324 ac_prev=srcdir ;; 325 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 326 srcdir="$ac_optarg" ;; 327 328 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 329 | --syscon | --sysco | --sysc | --sys | --sy) 330 ac_prev=sysconfdir ;; 331 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 332 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 333 sysconfdir="$ac_optarg" ;; 334 335 -target | --target | --targe | --targ | --tar | --ta | --t) 336 ac_prev=target ;; 337 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 338 target="$ac_optarg" ;; 339 340 -v | -verbose | --verbose | --verbos | --verbo | --verb) 341 verbose=yes ;; 342 343 -version | --version | --versio | --versi | --vers) 344 echo "configure generated by autoconf version 2.13" 345 exit 0 ;; 346 347 -with-* | --with-*) 348 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` 349 # Reject names that are not valid shell variable names. 350 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then 351 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 352 fi 353 ac_package=`echo $ac_package| sed 's/-/_/g'` 354 case "$ac_option" in 355 *=*) ;; 356 *) ac_optarg=yes ;; 357 esac 358 eval "with_${ac_package}='$ac_optarg'" ;; 359 360 -without-* | --without-*) 361 ac_package=`echo $ac_option|sed -e 's/-*without-//'` 362 # Reject names that are not valid shell variable names. 363 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then 364 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 365 fi 366 ac_package=`echo $ac_package| sed 's/-/_/g'` 367 eval "with_${ac_package}=no" ;; 368 369 --x) 370 # Obsolete; use --with-x. 371 with_x=yes ;; 372 373 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 374 | --x-incl | --x-inc | --x-in | --x-i) 375 ac_prev=x_includes ;; 376 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 377 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 378 x_includes="$ac_optarg" ;; 379 380 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 381 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 382 ac_prev=x_libraries ;; 383 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 384 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 385 x_libraries="$ac_optarg" ;; 386 387 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } 388 ;; 389 390 *) 391 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then 392 echo "configure: warning: $ac_option: invalid host type" 1>&2 393 fi 394 if test "x$nonopt" != xNONE; then 395 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } 396 fi 397 nonopt="$ac_option" 398 ;; 399 400 esac 401 done 402 403 if test -n "$ac_prev"; then 404 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } 405 fi 406 407 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 408 409 # File descriptor usage: 410 # 0 standard input 411 # 1 file creation 412 # 2 errors and warnings 413 # 3 some systems may open it to /dev/tty 414 # 4 used on the Kubota Titan 415 # 6 checking for... messages and results 416 # 5 compiler messages saved in config.log 417 if test "$silent" = yes; then 418 exec 6>/dev/null 419 else 420 exec 6>&1 421 fi 422 exec 5>./config.log 423 424 echo "\ 425 This file contains any messages produced by compilers while 426 running configure, to aid debugging if configure makes a mistake. 427 " 1>&5 428 429 # Strip out --no-create and --no-recursion so they do not pile up. 430 # Also quote any args containing shell metacharacters. 431 ac_configure_args= 432 for ac_arg 433 do 434 case "$ac_arg" in 435 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 436 | --no-cr | --no-c) ;; 437 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 438 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; 439 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) 440 ac_configure_args="$ac_configure_args '$ac_arg'" ;; 441 *) ac_configure_args="$ac_configure_args $ac_arg" ;; 442 esac 443 done 444 445 # NLS nuisances. 446 # Only set these to C if already set. These must not be set unconditionally 447 # because not all systems understand e.g. LANG=C (notably SCO). 448 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! 449 # Non-C LC_CTYPE values break the ctype check. 450 if test "${LANG+set}" = set; then LANG=C; export LANG; fi 451 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi 452 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi 453 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi 454 455 # confdefs.h avoids OS command line length limits that DEFS can exceed. 456 rm -rf conftest* confdefs.h 457 # AIX cpp loses on an empty file, so make sure it contains at least a newline. 458 echo > confdefs.h 459 460 # A filename unique to this package, relative to the directory that 461 # configure is in, which we can look for to find out if srcdir is correct. 462 ac_unique_file=move-if-change 463 464 # Find the source files, if location was not specified. 465 if test -z "$srcdir"; then 466 ac_srcdir_defaulted=yes 467 # Try the directory containing this script, then its parent. 468 ac_prog=$0 469 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` 470 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. 471 srcdir=$ac_confdir 472 if test ! -r $srcdir/$ac_unique_file; then 473 srcdir=.. 474 fi 475 else 476 ac_srcdir_defaulted=no 477 fi 478 if test ! -r $srcdir/$ac_unique_file; then 479 if test "$ac_srcdir_defaulted" = yes; then 480 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } 481 else 482 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } 483 fi 484 fi 485 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` 486 487 # Prefer explicitly selected file to automatically selected ones. 488 if test -z "$CONFIG_SITE"; then 489 if test "x$prefix" != xNONE; then 490 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" 491 else 492 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 493 fi 494 fi 495 for ac_site_file in $CONFIG_SITE; do 496 if test -r "$ac_site_file"; then 497 echo "loading site script $ac_site_file" 498 . "$ac_site_file" 499 fi 500 done 501 502 if test -r "$cache_file"; then 503 echo "loading cache $cache_file" 504 . $cache_file 505 else 506 echo "creating cache $cache_file" 507 > $cache_file 508 fi 509 510 ac_ext=c 511 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 512 ac_cpp='$CPP $CPPFLAGS' 513 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 514 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 515 cross_compiling=$ac_cv_prog_cc_cross 516 517 ac_exeext= 518 ac_objext=o 519 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 520 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 521 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 522 ac_n= ac_c=' 523 ' ac_t=' ' 524 else 525 ac_n=-n ac_c= ac_t= 526 fi 527 else 528 ac_n= ac_c='\c' ac_t= 529 fi 530 531 532 533 ac_aux_dir= 534 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do 535 if test -f $ac_dir/install-sh; then 536 ac_aux_dir=$ac_dir 537 ac_install_sh="$ac_aux_dir/install-sh -c" 538 break 539 elif test -f $ac_dir/install.sh; then 540 ac_aux_dir=$ac_dir 541 ac_install_sh="$ac_aux_dir/install.sh -c" 542 break 543 fi 544 done 545 if test -z "$ac_aux_dir"; then 546 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } 547 fi 548 ac_config_guess=$ac_aux_dir/config.guess 549 ac_config_sub=$ac_aux_dir/config.sub 550 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. 551 552 553 # Do some error checking and defaulting for the host and target type. 554 # The inputs are: 555 # configure --host=HOST --target=TARGET --build=BUILD NONOPT 556 # 557 # The rules are: 558 # 1. You are not allowed to specify --host, --target, and nonopt at the 559 # same time. 560 # 2. Host defaults to nonopt. 561 # 3. If nonopt is not specified, then host defaults to the current host, 562 # as determined by config.guess. 563 # 4. Target and build default to nonopt. 564 # 5. If nonopt is not specified, then target and build default to host. 565 566 # The aliases save the names the user supplied, while $host etc. 567 # will get canonicalized. 568 case $host---$target---$nonopt in 569 NONE---*---* | *---NONE---* | *---*---NONE) ;; 570 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; 571 esac 572 573 574 # Make sure we can run config.sub. 575 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : 576 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } 577 fi 578 579 echo $ac_n "checking host system type""... $ac_c" 1>&6 580 echo "configure:581: checking host system type" >&5 581 582 host_alias=$host 583 case "$host_alias" in 584 NONE) 585 case $nonopt in 586 NONE) 587 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : 588 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } 589 fi ;; 590 *) host_alias=$nonopt ;; 591 esac ;; 592 esac 593 594 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` 595 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 596 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 597 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 598 echo "$ac_t""$host" 1>&6 599 600 echo $ac_n "checking target system type""... $ac_c" 1>&6 601 echo "configure:602: checking target system type" >&5 602 603 target_alias=$target 604 case "$target_alias" in 605 NONE) 606 case $nonopt in 607 NONE) target_alias=$host_alias ;; 608 *) target_alias=$nonopt ;; 609 esac ;; 610 esac 611 612 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` 613 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 614 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 615 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 616 echo "$ac_t""$target" 1>&6 617 618 echo $ac_n "checking build system type""... $ac_c" 1>&6 619 echo "configure:620: checking build system type" >&5 620 621 build_alias=$build 622 case "$build_alias" in 623 NONE) 624 case $nonopt in 625 NONE) build_alias=$host_alias ;; 626 *) build_alias=$nonopt ;; 627 esac ;; 628 esac 629 630 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` 631 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 632 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 633 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 634 echo "$ac_t""$build" 1>&6 635 636 test "$host_alias" != "$target_alias" && 637 test "$program_prefix$program_suffix$program_transform_name" = \ 638 NONENONEs,x,x, && 639 program_prefix=${target_alias}- 640 641 if test "$program_transform_name" = s,x,x,; then 642 program_transform_name= 643 else 644 # Double any \ or $. echo might interpret backslashes. 645 cat <<\EOF_SED > conftestsed 646 s,\\,\\\\,g; s,\$,$$,g 647 EOF_SED 648 program_transform_name="`echo $program_transform_name|sed -f conftestsed`" 649 rm -f conftestsed 650 fi 651 test "$program_prefix" != NONE && 652 program_transform_name="s,^,${program_prefix},; $program_transform_name" 653 # Use a double $ so make ignores it. 654 test "$program_suffix" != NONE && 655 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" 656 657 # sed with no file args requires a program. 658 test "$program_transform_name" = "" && program_transform_name="s,x,x," 659 660 661 # Autoconf M4 include file defining utility macros for complex Canadian 662 # cross builds. 663 664 #### 665 # _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM 666 # or AC_INIT. 667 # These demand that AC_CANONICAL_SYSTEM be called beforehand. 668 669 #### 670 # NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) 671 # Like AC_CHECK_TOOL, but tries a prefix of the target, not the host. 672 # Code is pretty much lifted from autoconf2.53. 673 674 675 676 #### 677 # NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) 678 # Like AC_CHECK_TOOL, but requires the prefix if build!=host. 679 680 681 682 #### 683 # NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) 684 # Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target. 685 686 687 104 688 ### we might need to use some other shell than /bin/sh for running subshells 105 106 689 ### If we are on Windows, search for the shell. This will permit people 107 690 ### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure … … 110 693 case "${OSTYPE}" in 111 694 *win32*) 112 if [ x${CONFIG_SHELL} = x ]; then113 if [ ! -f /bin/sh ]; then114 if [ x${SHELL} != x ] && [ -f ${SHELL} ]; then695 if test x${CONFIG_SHELL} = x ; then 696 if test ! -f /bin/sh ; then 697 if test x${SHELL} != x && test -f ${SHELL} ; then 115 698 CONFIG_SHELL=${SHELL} 116 699 export CONFIG_SHELL … … 137 720 config_shell=${CONFIG_SHELL-/bin/sh} 138 721 139 NO_EDIT="This file was generated automatically by configure. Do not edit."140 141 ## this is a little touchy and won't always work, but...142 ##143 ## if the argv[0] starts with a slash then it is an absolute name that can (and144 ## must) be used as is.145 ##146 ## otherwise, if argv[0] has no slash in it, we can assume that it is on the147 ## path. Since PATH might include "." we also add `pwd` to the end of PATH.148 ##149 150 722 progname=$0 151 723 # if PWD already has a value, it is probably wrong. 152 if [ -n "$PWD" ]; then PWD=`pwd`; fi 153 154 case "${progname}" in 155 /*) ;; 156 */*) ;; 157 *) 158 PATH=$PATH:${PWD=`pwd`} ; export PATH 159 ;; 160 esac 161 162 # Loop over all args 163 164 while : 165 do 166 167 # Break out if there are no more args 168 case $# in 169 0) 170 break 171 ;; 172 esac 173 174 # Get the first arg, and shuffle 175 option=$1 176 shift 177 178 # Make all options have two hyphens 179 orig_option=$option # Save original for error messages 180 case $option in 181 --*) ;; 182 -*) option=-$option ;; 183 esac 184 185 # Split out the argument for options that take them 186 case $option in 187 --*=*) 188 optarg=`echo $option | sed -e 's/^[^=]*=//'` 189 arguments="$arguments $option" 190 ;; 191 # These options have mandatory values. Since we didn't find an = sign, 192 # the value must be in the next argument 193 --bu* | --cache* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-* | --bi* | --sb* | --li* | --da* | --sy* | --sh* | --lo* | --in* | --ol* | --ma*) 194 optarg=$1 195 shift 196 arguments="$arguments $option=$optarg" 197 ;; 198 --v) 199 arguments="$arguments -v" 200 ;; 201 --*) 202 arguments="$arguments $option" 203 ;; 204 esac 205 206 # Now, process the options 207 case $option in 208 209 --bi*) 210 bindir=$optarg 211 diroptions="$diroptions --bindir=$optarg" 212 ;; 213 --build* | --bu*) 214 case "$build_alias" in 215 "") build_alias=$optarg ;; 216 *) echo '***' Can only configure for one build machine at a time. 1>&2 217 fatal=yes 218 ;; 219 esac 220 ;; 221 --cache*) 222 cache_file=$optarg 223 ;; 224 --da*) 225 datadir=$optarg 226 diroptions="$diroptions --datadir=$optarg" 227 ;; 228 --disable-*) 229 enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'` 230 eval $enableopt=no 231 disableoptions="$disableoptions $option" 232 ;; 233 --enable-*) 234 case "$option" in 235 *=*) ;; 236 *) optarg=yes ;; 237 esac 238 239 enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` 240 eval "$enableopt=\$optarg" 241 enableoptions="$enableoptions '$option'" 242 ;; 243 --exec-prefix* | --ex*) 244 exec_prefix=$optarg 245 exec_prefixoption="--exec-prefix=$optarg" 246 ;; 247 --gas | --g*) 248 gas=yes 249 ;; 250 --help | --he*) 251 fatal=yes 252 ;; 253 --host* | --ho*) 254 case $host_alias in 255 NOHOST) host_alias=$optarg ;; 256 *) echo '***' Can only configure for one host at a time. 1>&2 257 fatal=yes 258 ;; 259 esac 260 ;; 261 --inc*) 262 includedir=$optarg 263 diroptions="$diroptions --includedir=$optarg" 264 ;; 265 --inf*) 266 infodir=$optarg 267 diroptions="$diroptions --infodir=$optarg" 268 ;; 269 --libd*) 270 libdir=$optarg 271 diroptions="$diroptions --libdir=$optarg" 272 ;; 273 --libe*) 274 libexecdir=$optarg 275 diroptions="$diroptions --libexecdir=$optarg" 276 ;; 277 --lo*) 278 localstatedir=$optarg 279 diroptions="$diroptions --localstatedir=$optarg" 280 ;; 281 --ma*) 282 mandir=$optarg 283 diroptions="$diroptions --mandir=$optarg" 284 ;; 285 --nfp | --nf*) 286 floating_point=no 287 floating_pointoption="--nfp" 288 ;; 289 --norecursion | --no*) 290 norecursion=yes 291 ;; 292 --ol*) 293 oldincludedir=$optarg 294 diroptions="$diroptions --oldincludedir=$optarg" 295 ;; 296 --prefix* | --pre*) 297 prefix=$optarg 298 prefixoption="--prefix=$optarg" 299 ;; 300 --program-prefix* | --program-p*) 301 program_prefix=$optarg 302 program_prefixoption="--program-prefix=$optarg" 303 ;; 304 --program-suffix* | --program-s*) 305 program_suffix=$optarg 306 program_suffixoption="--program-suffix=$optarg" 307 ;; 308 --program-transform-name* | --program-t*) 309 # Double any backslashes or dollar signs in the argument 310 program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`" 311 program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'" 312 ;; 313 --rm) 314 removing=--rm 315 ;; 316 --sb*) 317 sbindir=$optarg 318 diroptions="$diroptions --sbindir=$optarg" 319 ;; 320 --sh*) 321 sharedstatedir=$optarg 322 diroptions="$diroptions --sharedstatedir=$optarg" 323 ;; 324 --silent | --sil* | --quiet | --q*) 325 redirect=">/dev/null" 326 verbose=--silent 327 ;; 328 --site* | --sit*) 329 site=$optarg 330 site_option="--site=$optarg" 331 ;; 332 --srcdir*/ | --sr*/) 333 # Remove trailing slashes. Otherwise, when the file name gets 334 # bolted into an object file as debug info, it has two slashes 335 # in it. Ordinarily this is ok, but emacs takes double slash 336 # to mean "forget the first part". 337 srcdir=`echo $optarg | sed -e 's:/$::'` 338 ;; 339 --srcdir* | --sr*) 340 srcdir=$optarg 341 ;; 342 --sy*) 343 sysconfdir=$optarg 344 diroptions="$diroptions --sysconfdir=$optarg" 345 ;; 346 --target* | --ta*) 347 case $target_alias in 348 NOTARGET) target_alias=$optarg ;; 349 *) echo '***' Can only configure for one target at a time. 1>&2 350 fatal=yes 351 ;; 352 esac 353 ;; 354 --tmpdir* | --tm*) 355 TMPDIR=$optarg 356 tmpdiroption="--tmpdir=$optarg" 357 ;; 358 --verbose | --v | --verb*) 359 redirect= 360 verbose=--verbose 361 ;; 362 --version | --V | --vers*) 363 echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'` 364 exit 0 365 ;; 366 --with-*) 367 case "$option" in 368 *=*) ;; 369 *) optarg=yes ;; 370 esac 371 372 withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` 373 eval $withopt="\$optarg" 374 withoptions="$withoptions $option" 375 ;; 376 --without-*) 377 withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'` 378 eval $withopt=no 379 withoutoptions="$withoutoptions $option" 380 ;; 381 --x) with_x=yes 382 withoptions="$withoptions --with-x" 383 ;; 384 --x-i* | --x-l*) other_options="$other_options $orig_option" 385 ;; 386 --*) 387 echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2 388 exit 1 389 ;; 390 *) 391 case $undefs in 392 NOUNDEFS) undefs=$option ;; 393 *) echo '***' Can only configure for one host and one target at a time. 1>&2 394 fatal=yes 395 ;; 396 esac 397 ;; 398 esac 399 done 400 401 # process host and target 402 403 # Do some error checking and defaulting for the host and target type. 404 # The inputs are: 405 # configure --host=HOST --target=TARGET UNDEFS 406 # 407 # The rules are: 408 # 1. You aren't allowed to specify --host, --target, and undefs at the 409 # same time. 410 # 2. Host defaults to undefs. 411 # 3. If undefs is not specified, then host defaults to the current host, 412 # as determined by config.guess. 413 # 4. Target defaults to undefs. 414 # 5. If undefs is not specified, then target defaults to host. 415 416 case "${fatal}" in 417 "") 418 # Make sure that host, target & undefs aren't all specified at the 419 # same time. 420 case $host_alias---$target_alias---$undefs in 421 NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS) 422 ;; 423 *) echo '***' Can only configure for one host and one target at a time. 1>&2 424 fatal=yes 425 break 2 426 ;; 427 esac 428 429 # Now, do defaulting for host. 430 case $host_alias in 431 NOHOST) 432 case $undefs in 433 NOUNDEFS) 434 # Neither --host option nor undefs were present. 435 # Call config.guess. 436 guesssys=`echo ${progname} | sed 's/configure$/config.guess/'` 437 if host_alias=`${config_shell} ${guesssys}` 438 then 439 # If the string we are going to use for 440 # the target is a prefix of the string 441 # we just guessed for the host, then 442 # assume we are running native, and force 443 # the same string for both target and host. 444 case $target_alias in 445 NOTARGET) ;; 446 *) 447 if expr $host_alias : $target_alias >/dev/null 448 then 449 host_alias=$target_alias 450 fi 451 ;; 452 esac 453 echo "Configuring for a ${host_alias} host." 1>&2 454 arguments="--host=$host_alias $arguments" 455 else 456 echo 'Config.guess failed to determine the host type. You need to specify one.' 1>&2 457 fatal=yes 458 fi 459 ;; 460 *) 461 host_alias=$undefs 462 arguments="--host=$host_alias $arguments" 463 undefs=NOUNDEFS 464 ;; 465 esac 466 esac 467 468 # Do defaulting for target. If --target option isn't present, default 469 # to undefs. If undefs isn't present, default to host. 470 case $target_alias in 471 NOTARGET) 472 case $undefs in 473 NOUNDEFS) 474 target_alias=$host_alias 475 ;; 476 *) 477 target_alias=$undefs 478 arguments="--target=$target_alias $arguments" 479 ;; 480 esac 481 esac 482 ;; 483 *) ;; 484 esac 485 486 if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then 487 exec 1>&2 488 echo Usage: configure [OPTIONS] [HOST] 489 echo 490 echo Options: [defaults in brackets] 491 echo ' --prefix=MYDIR install into MYDIR [/usr/local]' 492 echo ' --exec-prefix=MYDIR install host-dependent files into MYDIR [/usr/local]' 493 echo ' --help print this message [normal config]' 494 echo ' --build=BUILD configure for building on BUILD [BUILD=HOST]' 495 echo ' --host=HOST configure for HOST [determined via config.guess]' 496 echo ' --norecursion configure this directory only [recurse]' 497 echo ' --program-prefix=FOO prepend FOO to installed program names [""]' 498 echo ' --program-suffix=FOO append FOO to installed program names [""]' 499 echo ' --program-transform-name=P transform installed names by sed pattern P [""]' 500 echo ' --site=SITE configure with site-specific makefile for SITE' 501 echo ' --srcdir=DIR find the sources in DIR [. or ..]' 502 echo ' --target=TARGET configure for TARGET [TARGET=HOST]' 503 echo ' --tmpdir=TMPDIR create temporary files in TMPDIR [/tmp]' 504 echo ' --nfp configure for software floating point [hard float]' 505 echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)' 506 echo ' --without-FOO package FOO is NOT available' 507 echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)' 508 echo ' --disable-FOO do not include feature FOO' 509 echo 510 echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.' 511 echo 512 if [ -r config.status ] ; then 513 cat config.status 514 fi 515 516 exit 1 517 fi 518 519 configsub=`echo ${progname} | sed 's/configure$/config.sub/'` 520 moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'` 521 ## the sed command below emulates the dirname command 522 topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; pwd` 523 524 525 # this is a hack. sun4 must always be a valid host alias or this will fail. 526 if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then 527 true 528 else 529 echo '***' cannot find config.sub. 1>&2 530 exit 1 531 fi 532 533 touch config.junk 534 if ${config_shell} ${moveifchange} config.junk config.trash ; then 535 true 536 else 537 echo '***' cannot find move-if-change. 1>&2 538 exit 1 539 fi 540 rm -f config.junk config.trash 541 542 case "${srcdir}" in 543 "") 544 if [ -r configure.in ] ; then 545 srcdir=. 546 else 547 if [ -r ${progname}.in ] ; then 548 srcdir=`echo ${progname} | sed 's:/configure$::'` 549 else 550 echo '***' "Can't find configure.in. Try using --srcdir=some_dir" 1>&2 551 exit 1 552 fi 553 fi 554 ;; 555 *) 556 # Set srcdir to "." if that's what it is. 557 # This is important for multilib support. 558 if [ ! -d ${srcdir} ] ; then 559 echo "Invalid source directory ${srcdir}" >&2 560 exit 1 561 fi 562 pwd=`pwd` 563 srcpwd=`cd ${srcdir} ; pwd` 564 if [ "${pwd}" = "${srcpwd}" ] ; then 565 srcdir=. 566 fi 567 esac 568 569 ### warn about some conflicting configurations. 570 571 case "${srcdir}" in 572 ".") ;; 573 *) 574 if [ -f ${srcdir}/config.status ] ; then 575 echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2 576 exit 1 577 fi 578 esac 579 580 # default exec_prefix 581 case "${exec_prefixoption}" in 582 "") exec_prefix="\$(prefix)" ;; 583 *) ;; 584 esac 585 724 if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi 725 726 # Export original configure arguments for use by sub-configures. 727 TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@" 728 729 730 moveifchange=${srcdir}/move-if-change 731 732 # Set srcdir to "." if that's what it is. 733 # This is important for multilib support. 734 pwd=`${PWDCMD-pwd}` 735 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` 736 if test "${pwd}" = "${srcpwd}" ; then 737 srcdir=. 738 fi 739 740 topsrcdir=$srcpwd 741 742 extra_host_args= 586 743 # Define the trigger file to make sure configure will re-run whenever 587 744 # the gcc version number changes. 588 if [ "${with_gcc_version_trigger+set}" = set ]; then 589 gcc_version_trigger="$with_gcc_version_trigger" 590 gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` 591 else 592 # If gcc's sources are available, define the trigger file. 593 if [ -f ${topsrcdir}/gcc/version.c ] ; then 594 gcc_version_trigger=${topsrcdir}/gcc/version.c 595 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` 596 case "$arguments" in 597 *--with-gcc-version-trigger=$gcc_version_trigger* ) 598 ;; 599 * ) 600 # Make sure configure.in knows about this. 601 arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments" 745 if test "${with_gcc_version_trigger+set}" = set ; then 746 gcc_version_trigger="$with_gcc_version_trigger" 747 gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` 748 else 749 # If gcc's sources are available, define the trigger file. 750 if test -f ${topsrcdir}/gcc/version.c ; then 751 gcc_version_trigger=${topsrcdir}/gcc/version.c 752 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` 753 case "$ac_configure_args" in 754 *--with-gcc-version-trigger=$gcc_version_trigger* ) 755 ;; 756 * ) 757 # Add to all subconfigure arguments: build, host, and target. 758 ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger" 759 ;; 760 esac 761 fi 762 fi 763 764 ### To add a new directory to the tree, first choose whether it is a target 765 ### or a host dependent tool. Then put it into the appropriate list 766 ### (library or tools, host or target), doing a dependency sort. 767 768 # Subdirs will be configured in the order listed in build_configdirs, 769 # configdirs, or target_configdirs; see the serialization section below. 770 771 # Dependency sorting is only needed when *configuration* must be done in 772 # a particular order. In all cases a dependency should be specified in 773 # the Makefile, whether or not it's implicitly specified here. 774 775 # Double entries in build_configdirs, configdirs, or target_configdirs may 776 # cause circular dependencies and break everything horribly. 777 778 # these libraries are used by various programs built for the host environment 779 # 780 host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib" 781 782 # these tools are built for the host environment 783 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to 784 # know that we are building the simulator. 785 # binutils, gas and ld appear in that order because it makes sense to run 786 # "make check" in that particular order. 787 host_tools="texinfo byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar" 788 789 # libgcj represents the runtime libraries only used by gcj. 790 libgcj="target-libffi \ 791 target-boehm-gc \ 792 target-zlib \ 793 target-qthreads \ 794 target-libjava" 795 796 # these libraries are built for the target environment, and are built after 797 # the host libraries and the host tools (which may be a cross compiler) 798 # 799 target_libs="target-libiberty \ 800 target-libgloss \ 801 target-newlib \ 802 target-libstdc++-v3 \ 803 target-libf2c \ 804 ${libgcj} \ 805 target-libobjc" 806 807 # these tools are built using the target libs, and are intended to run only 808 # in the target environment 809 # 810 # note: any program that *uses* libraries that are in the "target_libs" 811 # list belongs in this list. those programs are also very likely 812 # candidates for the "native_only" list which follows 813 # 814 target_tools="target-examples target-groff target-gperf target-rda" 815 816 ################################################################################ 817 818 ## All tools belong in one of the four categories, and are assigned above 819 ## We assign ${configdirs} this way to remove all embedded newlines. This 820 ## is important because configure will choke if they ever get through. 821 ## ${configdirs} is directories we build using the host tools. 822 ## ${target_configdirs} is directories we build using the target tools. 823 # 824 configdirs=`echo ${host_libs} ${host_tools}` 825 target_configdirs=`echo ${target_libs} ${target_tools}` 826 827 ################################################################################ 828 829 srcname="gnu development package" 830 831 # This gets set non-empty for some net releases of packages. 832 appdirs="" 833 834 # Define is_cross_compiler to save on calls to 'test'. 835 is_cross_compiler= 836 if test x"${host}" = x"${target}" ; then 837 is_cross_compiler=no 838 else 839 is_cross_compiler=yes 840 fi 841 842 # We always want to use the same name for this directory, so that dejagnu 843 # can reliably find it. 844 target_subdir=${target_alias} 845 846 if test ! -d ${target_subdir} ; then 847 if mkdir ${target_subdir} ; then true 848 else 849 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2 850 exit 1 851 fi 852 fi 853 854 build_prefix=build- 855 build_subdir=${build_prefix}${build_alias} 856 857 if test x"${build_alias}" != x"${host}" ; then 858 if test ! -d ${build_subdir} ; then 859 if mkdir ${build_subdir} ; then true 860 else 861 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2 862 exit 1 863 fi 864 fi 865 fi 866 867 # Skipdirs are removed silently. 868 skipdirs= 869 # Noconfigdirs are removed loudly. 870 noconfigdirs="" 871 872 use_gnu_ld= 873 # Make sure we don't let GNU ld be added if we didn't want it. 874 if test x$with_gnu_ld = xno ; then 875 use_gnu_ld=no 876 noconfigdirs="$noconfigdirs ld" 877 fi 878 879 use_gnu_as= 880 # Make sure we don't let GNU as be added if we didn't want it. 881 if test x$with_gnu_as = xno ; then 882 use_gnu_as=no 883 noconfigdirs="$noconfigdirs gas" 884 fi 885 886 # some tools are so dependent upon X11 that if we're not building with X, 887 # it's not even worth trying to configure, much less build, that tool. 888 889 case ${with_x} in 890 yes | "") ;; # the default value for this tree is that X11 is available 891 no) 892 skipdirs="${skipdirs} tk tix itcl libgui" 893 # We won't be able to build gdbtk without X. 894 enable_gdbtk=no 895 ;; 896 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;; 897 esac 898 899 # Some tools are only suitable for building in a "native" situation. 900 # Remove these if host!=target. 901 native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf" 902 903 # Similarly, some are only suitable for cross toolchains. 904 # Remove these if host=target. 905 cross_only="target-libgloss target-newlib target-opcodes" 906 907 case $is_cross_compiler in 908 no) skipdirs="${skipdirs} ${cross_only}" ;; 909 yes) skipdirs="${skipdirs} ${native_only}" ;; 910 esac 911 912 # If both --with-headers and --with-libs are specified, default to 913 # --without-newlib. 914 if test x"${with_headers}" != x && test x"${with_libs}" != x ; then 915 if test x"${with_newlib}" = x ; then 916 with_newlib=no 917 fi 918 fi 919 920 # Recognize --with-newlib/--without-newlib. 921 case ${with_newlib} in 922 no) skipdirs="${skipdirs} target-newlib" ;; 923 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;; 924 esac 925 926 # Configure extra directories which are host specific 927 928 case "${host}" in 929 *-cygwin*) 930 configdirs="$configdirs libtermcap" ;; 931 esac 932 933 # Remove more programs from consideration, based on the host or 934 # target this usually means that a port of the program doesn't 935 # exist yet. 936 937 case "${host}" in 938 hppa*64*-*-*) 939 noconfigdirs="$noconfigdirs byacc" 940 ;; 941 i[3456]86-*-vsta) 942 noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext" 943 ;; 944 i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*) 945 noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi" 946 ;; 947 i[3456]86-*-mingw32*) 948 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv" 949 noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool" 950 ;; 951 i[3456]86-*-beos*) 952 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb" 953 ;; 954 *-*-cygwin*) 955 noconfigdirs="autoconf automake send-pr rcs guile perl" 956 ;; 957 *-*-netbsd*) 958 noconfigdirs="rcs" 959 ;; 960 ppc*-*-pe) 961 noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv" 962 ;; 963 powerpc-*-beos*) 964 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline" 965 ;; 966 *-*-darwin*) 967 noconfigdirs="$noconfigdirs tk itcl tix libgui" 968 ;; 969 esac 970 971 # Save it here so that, even in case of --enable-libgcj, if the Java 972 # front-end isn't enabled, we still get libgcj disabled. 973 libgcj_saved=$libgcj 974 case $enable_libgcj in 975 yes) 976 # If we reset it here, it won't get added to noconfigdirs in the 977 # target-specific build rules, so it will be forcibly enabled 978 # (unless the Java language itself isn't enabled). 979 libgcj= 980 ;; 981 no) 982 # Make sure we get it printed in the list of not supported target libs. 983 noconfigdirs="$noconfigdirs ${libgcj}" 984 ;; 985 esac 986 987 case "${target}" in 988 *-*-chorusos) 989 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 990 ;; 991 *-*-darwin*) 992 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof" 993 noconfigdirs="$noconfigdirs target-libobjc ${libgcj}" 994 ;; 995 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*) 996 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 997 ;; 998 *-*-kaos*) 999 # Remove unsupported stuff on all kaOS configurations. 1000 skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx" 1001 skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf" 1002 skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib" 1003 noconfigdirs="$noconfigdirs target-libgloss" 1004 ;; 1005 *-*-netbsd*) 1006 # Skip some stuff on all NetBSD configurations. 1007 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss" 1008 1009 # Skip some stuff that's unsupported on some NetBSD configurations. 1010 case "${target}" in 1011 i*86-*-netbsdelf*) ;; 1012 arm*-*-netbsdelf*) ;; 1013 *) 1014 noconfigdirs="$noconfigdirs ${libgcj}" 1015 ;; 1016 esac 1017 ;; 1018 *-*-netware) 1019 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}" 1020 ;; 1021 *-*-rtems*) 1022 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1023 case ${target} in 1024 h8300*-*-* | h8500-*-*) 1025 noconfigdirs="$noconfigdirs target-libf2c" 1026 ;; 1027 *) ;; 1028 esac 1029 ;; 1030 *-*-vxworks*) 1031 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 1032 ;; 1033 alpha*-dec-osf*) 1034 # ld works, but does not support shared libraries. 1035 # newlib is not 64 bit ready. I'm not sure about fileutils. 1036 # gas doesn't generate exception information. 1037 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss" 1038 ;; 1039 alpha*-*-*vms*) 1040 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}" 1041 ;; 1042 alpha*-*-linux*) 1043 # newlib is not 64 bit ready 1044 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 1045 ;; 1046 alpha*-*-freebsd*) 1047 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 1048 ;; 1049 alpha*-*-*) 1050 # newlib is not 64 bit ready 1051 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 1052 ;; 1053 sh-*-linux*) 1054 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" 1055 ;; 1056 sh*-*-pe|mips*-*-pe|*arm-wince-pe) 1057 noconfigdirs="$noconfigdirs ${libgcj}" 1058 noconfigdirs="$noconfigdirs target-examples" 1059 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr" 1060 noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim" 1061 noconfigdirs="$noconfigdirs expect dejagnu" 1062 # the C++ libraries don't build on top of CE's C libraries 1063 noconfigdirs="$noconfigdirs target-libstdc++-v3" 1064 noconfigdirs="$noconfigdirs target-newlib" 1065 case "${host}" in 1066 *-*-cygwin*) ;; # keep gdb and readline 1067 *) noconfigdirs="$noconfigdirs gdb readline" 1068 ;; 1069 esac 1070 ;; 1071 arc-*-*) 1072 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1073 ;; 1074 arm-*-coff | strongarm-*-coff | xscale-*-coff) 1075 noconfigdirs="$noconfigdirs ${libgcj}" 1076 ;; 1077 arm-*-elf* | strongarm-*-elf* | xscale-*-elf*) 1078 noconfigdirs="$noconfigdirs target-libffi target-qthreads" 1079 ;; 1080 arm-*-pe*) 1081 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1082 ;; 1083 arm-*-oabi*) 1084 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1085 ;; 1086 thumb-*-coff) 1087 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1088 ;; 1089 thumb-*-elf) 1090 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1091 ;; 1092 thumb-*-oabi) 1093 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1094 ;; 1095 thumb-*-pe) 1096 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1097 ;; 1098 arm-*-riscix*) 1099 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}" 1100 ;; 1101 avr-*-*) 1102 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}" 1103 ;; 1104 c4x-*-* | tic4x-*-*) 1105 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" 1106 ;; 1107 c54x*-*-* | tic54x-*-*) 1108 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib" 1109 ;; 1110 cris-*-*) 1111 noconfigdirs="$noconfigdirs ${libgcj}" 1112 ;; 1113 d10v-*-*) 1114 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" 1115 ;; 1116 d30v-*-*) 1117 noconfigdirs="$noconfigdirs ${libgcj}" 1118 ;; 1119 fr30-*-elf*) 1120 noconfigdirs="$noconfigdirs ${libgcj}" 1121 ;; 1122 frv-*-*) 1123 noconfigdirs="$noconfigdirs ${libgcj}" 1124 ;; 1125 h8300*-*-*) 1126 noconfigdirs="$noconfigdirs target-libgloss" 1127 ;; 1128 h8500-*-*) 1129 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c" 1130 ;; 1131 hppa*64*-*-linux* | parisc*64*-*-linux*) 1132 # In this case, it's because the hppa64-linux target is for 1133 # the kernel only at this point and has no libc, and thus no 1134 # headers, crt*.o, etc., all of which are needed by these. 1135 noconfigdirs="$noconfigdirs target-zlib" 1136 ;; 1137 hppa*-*-*elf* | \ 1138 parisc*-*-linux* | hppa*-*-linux* | \ 1139 hppa*-*-lites* | \ 1140 hppa*-*-openbsd* | \ 1141 hppa*64*-*-*) 1142 noconfigdirs="$noconfigdirs ${libgcj}" 1143 # Do configure ld/binutils/gas for this case. 1144 ;; 1145 hppa*-*-*) 1146 # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't 1147 # build on HP-UX 10.20. 1148 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}" 1149 ;; 1150 ia64*-*-elf*) 1151 # No gdb support yet. 1152 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb" 1153 ;; 1154 ia64*-**-hpux*) 1155 # No gdb or ld support yet. 1156 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld" 1157 ;; 1158 i[3456]86-*-coff | i[3456]86-*-elf) 1159 noconfigdirs="$noconfigdirs ${libgcj}" 1160 ;; 1161 i[34567]86-*-freebsd*) 1162 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 1163 ;; 1164 i[3456]86-*-linux*) 1165 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's 1166 # not build java stuff by default. 1167 case "${target}" in 1168 *-*-*libc1*) 1169 noconfigdirs="$noconfigdirs ${libgcj}";; 1170 esac 1171 1172 # This section makes it possible to build newlib natively on linux. 1173 # If we are using a cross compiler then don't configure newlib. 1174 if test x${is_cross_compiler} != xno ; then 1175 noconfigdirs="$noconfigdirs target-newlib" 1176 fi 1177 noconfigdirs="$noconfigdirs target-libgloss" 1178 # If we are not using a cross compiler, do configure newlib. 1179 # Note however, that newlib will only be configured in this situation 1180 # if the --with-newlib option has been given, because otherwise 1181 # 'target-newlib' will appear in skipdirs. 1182 ;; 1183 i[3456]86-*-mingw32*) 1184 target_configdirs="$target_configdirs target-mingw" 1185 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}" 1186 1187 # Can't build gdb for mingw32 if not native. 1188 case "${host}" in 1189 i[3456]86-*-mingw32) ;; # keep gdb tcl tk expect etc. 1190 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv" 1191 ;; 1192 esac 1193 ;; 1194 *-*-cygwin*) 1195 target_configdirs="$target_configdirs target-libtermcap target-winsup" 1196 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}" 1197 # always build newlib. 1198 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` 1199 1200 # Can't build gdb for Cygwin if not native. 1201 case "${host}" in 1202 *-*-cygwin*) ;; # keep gdb tcl tk expect etc. 1203 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv" 1204 ;; 1205 esac 1206 ;; 1207 i[3456]86-*-pe) 1208 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" 1209 ;; 1210 i[3456]86-*-sco3.2v5*) 1211 # The linker does not yet know about weak symbols in COFF, 1212 # and is not configured to handle mixed ELF and COFF. 1213 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}" 1214 ;; 1215 i[3456]86-*-sco*) 1216 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" 1217 ;; 1218 i[3456]86-*-solaris2*) 1219 noconfigdirs="$noconfigdirs target-libgloss" 1220 ;; 1221 i[3456]86-*-sysv4*) 1222 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1223 ;; 1224 i[3456]86-*-beos*) 1225 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" 1226 ;; 1227 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) 1228 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}" 1229 ;; 1230 m68k-*-elf*) 1231 noconfigdirs="$noconfigdirs ${libgcj}" 1232 ;; 1233 m68k-*-coff*) 1234 noconfigdirs="$noconfigdirs ${libgcj}" 1235 ;; 1236 mcore-*-pe*) 1237 # The EPOC C++ environment does not support exceptions or rtti, 1238 # and so building libstdc++-v3 tends not to always work. 1239 noconfigdirs="$noconfigdirs target-libstdc++-v3" 1240 ;; 1241 mmix-*-*) 1242 noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss" 1243 ;; 1244 mn10200-*-*) 1245 noconfigdirs="$noconfigdirs ${libgcj}" 1246 ;; 1247 mn10300-*-*) 1248 noconfigdirs="$noconfigdirs ${libgcj}" 1249 ;; 1250 powerpc-*-aix*) 1251 # copied from rs6000-*-* entry 1252 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" 1253 ;; 1254 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe) 1255 target_configdirs="$target_configdirs target-winsup" 1256 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}" 1257 # always build newlib. 1258 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` 1259 ;; 1260 # This is temporary until we can link against shared libraries 1261 powerpcle-*-solaris*) 1262 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}" 1263 ;; 1264 powerpc-*-beos*) 1265 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" 1266 ;; 1267 powerpc-*-eabi) 1268 noconfigdirs="$noconfigdirs ${libgcj}" 1269 ;; 1270 rs6000-*-lynxos*) 1271 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}" 1272 ;; 1273 rs6000-*-aix*) 1274 noconfigdirs="$noconfigdirs gprof ${libgcj}" 1275 ;; 1276 rs6000-*-*) 1277 noconfigdirs="$noconfigdirs gprof ${libgcj}" 1278 ;; 1279 m68k-apollo-*) 1280 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}" 1281 ;; 1282 mips*-*-irix5*) 1283 # The GNU linker does not support shared libraries. 1284 noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}" 1285 ;; 1286 mips*-*-irix6*) 1287 # Linking libjava exceeds command-line length limits on at least 1288 # IRIX 6.2, but not on IRIX 6.5. 1289 # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham 1290 # <oldham@codesourcery.com> 1291 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" 1292 ;; 1293 mips*-dec-bsd*) 1294 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" 1295 ;; 1296 mips*-*-bsd*) 1297 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" 1298 ;; 1299 mipstx39-*-*) 1300 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips 1301 ;; 1302 mips*-*-linux*) 1303 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 1304 ;; 1305 mips*-*-*) 1306 noconfigdirs="$noconfigdirs gprof ${libgcj}" 1307 ;; 1308 romp-*-*) 1309 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" 1310 ;; 1311 sh-*-*) 1312 case "${host}" in 1313 i[3456]86-*-vsta) ;; # don't add gprof back in 1314 i[3456]86-*-go32*) ;; # don't add gprof back in 1315 i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in 1316 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;; 1317 esac 1318 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1319 ;; 1320 sh64-*-*) 1321 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1322 ;; 1323 sparc-*-elf*) 1324 noconfigdirs="$noconfigdirs ${libgcj}" 1325 ;; 1326 sparc64-*-elf*) 1327 noconfigdirs="$noconfigdirs ${libgcj}" 1328 ;; 1329 sparclite-*-*) 1330 noconfigdirs="$noconfigdirs ${libgcj}" 1331 ;; 1332 sparc-*-sunos4*) 1333 noconfigdirs="$noconfigdirs ${libgcj}" 1334 if test x${is_cross_compiler} != xno ; then 1335 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss" 1336 else 1337 use_gnu_ld=no 1338 fi 1339 ;; 1340 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*) 1341 ;; 1342 v810-*-*) 1343 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}" 1344 ;; 1345 v850-*-*) 1346 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1347 ;; 1348 v850e-*-*) 1349 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1350 ;; 1351 v850ea-*-*) 1352 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 1353 ;; 1354 vax-*-vms) 1355 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}" 1356 ;; 1357 vax-*-*) 1358 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 1359 ;; 1360 ip2k-*-*) 1361 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}" 1362 ;; 1363 *-*-linux*) 1364 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 1365 ;; 1366 *-*-lynxos*) 1367 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 1368 ;; 1369 *-*-*) 1370 noconfigdirs="$noconfigdirs ${libgcj}" 1371 ;; 1372 esac 1373 1374 # If we aren't building newlib, then don't build libgloss, since libgloss 1375 # depends upon some newlib header files. 1376 case "${noconfigdirs}" in 1377 *target-libgloss*) ;; 1378 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;; 1379 esac 1380 1381 # Figure out what language subdirectories are present. 1382 # Look if the user specified --enable-languages="..."; if not, use 1383 # the environment variable $LANGUAGES if defined. $LANGUAGES might 1384 # go away some day. 1385 # NB: embedded tabs in this IF block -- do not untabify 1386 if test x"${enable_languages+set}" != xset; then 1387 if test x"${LANGUAGES+set}" = xset; then 1388 enable_languages="${LANGUAGES}" 1389 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2 1390 else 1391 enable_languages=all 1392 fi 1393 else 1394 if test x"${enable_languages}" = x || 1395 test x"${enable_languages}" = xyes; 1396 then 1397 echo configure.in: --enable-languages needs at least one language argument 1>&2 1398 exit 1 1399 fi 1400 fi 1401 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` 1402 1403 # First scan to see if an enabled language requires some other language. 1404 # We assume that a given config-lang.in will list all the language 1405 # front ends it requires, even if some are required indirectly. 1406 for lang in ${srcdir}/gcc/*/config-lang.in .. 1407 do 1408 case $lang in 1409 ..) ;; 1410 # The odd quoting in the next line works around 1411 # an apparent bug in bash 1.12 on linux. 1412 ${srcdir}/gcc/[*]/config-lang.in) ;; 1413 *) 1414 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` 1415 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` 1416 for other in $this_lang_requires 1417 do 1418 case ,${enable_languages}, in 1419 *,$other,*) ;; 1420 *,all,*) ;; 1421 *,$lang_alias,*) 1422 echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2 1423 enable_languages="$enable_languages,$other" 602 1424 ;; 603 1425 esac 604 withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions" 605 fi 606 fi 607 608 ### break up ${srcdir}/configure.in. 609 case "`grep '^# per\-host:' ${srcdir}/configure.in`" in 610 "") 611 echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2 612 # Check for a directory that's been converted to use autoconf since 613 # it was last configured. 614 if grep AC_OUTPUT ${srcdir}/configure.in >/dev/null ; then 615 echo '***' Hmm, looks like this directory has been autoconfiscated. 1>&2 616 if [ -r ${srcdir}/configure ] ; then 617 echo '***' Running the local configure script. 1>&2 618 case "${cache_file}" in 619 "") cache_file_option= ;; 620 *) cache_file_option="--cache-file=${cache_file}" ;; 621 esac 622 srcdiroption="--srcdir=${srcdir}" 623 case "${build_alias}" in 624 "") buildopt= ;; 625 *) buildopt="--build=${build_alias}" ;; 626 esac 627 eval exec ${config_shell} ${srcdir}/configure ${verbose} \ 628 ${buildopt} --host=${host_alias} --target=${target_alias} \ 629 ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \ 630 ${srcdiroption} ${diroptions} \ 631 ${program_prefixoption} ${program_suffixoption} \ 632 ${program_transform_nameoption} ${site_option} \ 633 ${withoptions} ${withoutoptions} \ 634 ${enableoptions} ${disableoptions} ${floating_pointoption} \ 635 ${cache_file_option} ${removing} ${other_options} ${redirect} 636 else 637 echo '***' There is no configure script present though. 1>&2 638 fi 1426 done 1427 ;; 1428 esac 1429 done 1430 1431 subdirs= 1432 for lang in ${srcdir}/gcc/*/config-lang.in .. 1433 do 1434 case $lang in 1435 ..) ;; 1436 # The odd quoting in the next line works around 1437 # an apparent bug in bash 1.12 on linux. 1438 ${srcdir}/gcc/[*]/config-lang.in) ;; 1439 *) 1440 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` 1441 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` 1442 this_lang_dirs=`sed -n -e 's,^lang_dirs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_dirs=\([^ ]*\).*$,\1,p' $lang` 1443 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` 1444 if test "x$lang_alias" = x 1445 then 1446 echo "$lang doesn't set \$language." 1>&2 1447 exit 1 1448 fi 1449 case ${build_by_default},${enable_languages}, in 1450 *,$lang_alias,*) add_this_lang=yes ;; 1451 no,*) add_this_lang=no ;; 1452 *,all,*) add_this_lang=yes ;; 1453 *) add_this_lang=no ;; 1454 esac 1455 if test x"${add_this_lang}" = xyes; then 1456 eval target_libs='"$target_libs "'\"$this_lang_libs\" 1457 else 1458 eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\" 1459 fi 1460 ;; 1461 esac 1462 done 1463 1464 # Remove the entries in $skipdirs and $noconfigdirs from $configdirs and 1465 # $target_configdirs. 1466 # If we have the source for $noconfigdirs entries, add them to $notsupp. 1467 1468 notsupp="" 1469 for dir in . $skipdirs $noconfigdirs ; do 1470 dirname=`echo $dir | sed -e s/target-//g` 1471 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1472 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"` 1473 if test -r $srcdir/$dirname/configure ; then 1474 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1475 true 1476 else 1477 notsupp="$notsupp $dir" 1478 fi 1479 fi 1480 fi 1481 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1482 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"` 1483 if test -r $srcdir/$dirname/configure ; then 1484 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1485 true 1486 else 1487 notsupp="$notsupp $dir" 1488 fi 1489 fi 1490 fi 1491 done 1492 1493 # Sometimes the tools are distributed with libiberty but with no other 1494 # libraries. In that case, we don't want to build target-libiberty. 1495 if test -n "${target_configdirs}" ; then 1496 others= 1497 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do 1498 if test "$i" != "libiberty" ; then 1499 if test -r $srcdir/$i/configure ; then 1500 others=yes; 1501 break; 1502 fi 1503 fi 1504 done 1505 if test -z "${others}" ; then 1506 target_configdirs= 1507 fi 1508 fi 1509 1510 # Quietly strip out all directories which aren't configurable in this tree. 1511 # This relies on all configurable subdirectories being autoconfiscated, which 1512 # is now the case. 1513 configdirs_all="$configdirs" 1514 configdirs= 1515 for i in ${configdirs_all} ; do 1516 if test -f ${srcdir}/$i/configure ; then 1517 configdirs="${configdirs} $i" 1518 fi 1519 done 1520 target_configdirs_all="$target_configdirs" 1521 target_configdirs= 1522 for i in ${target_configdirs_all} ; do 1523 j=`echo $i | sed -e s/target-//g` 1524 if test -f ${srcdir}/$j/configure ; then 1525 target_configdirs="${target_configdirs} $i" 1526 fi 1527 done 1528 1529 # Produce a warning message for the subdirs we can't configure. 1530 # This isn't especially interesting in the Cygnus tree, but in the individual 1531 # FSF releases, it's important to let people know when their machine isn't 1532 # supported by the one or two programs in a package. 1533 1534 if test -n "${notsupp}" && test -z "${norecursion}" ; then 1535 # If $appdirs is non-empty, at least one of those directories must still 1536 # be configured, or we error out. (E.g., if the gas release supports a 1537 # specified target in some subdirs but not the gas subdir, we shouldn't 1538 # pretend that all is well.) 1539 if test -n "$appdirs" ; then 1540 for dir in $appdirs ; do 1541 if test -r $dir/Makefile.in ; then 1542 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1543 appdirs="" 1544 break 639 1545 fi 640 exit 1 641 ;; 642 *) ;; 1546 if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1547 appdirs="" 1548 break 1549 fi 1550 fi 1551 done 1552 if test -n "$appdirs" ; then 1553 echo "*** This configuration is not supported by this package." 1>&2 1554 exit 1 1555 fi 1556 fi 1557 # Okay, some application will build, or we don't care to check. Still 1558 # notify of subdirs not getting built. 1559 echo "*** This configuration is not supported in the following subdirectories:" 1>&2 1560 echo " ${notsupp}" 1>&2 1561 echo " (Any other directories should still work fine.)" 1>&2 1562 fi 1563 1564 case "$host" in 1565 *msdosdjgpp*) 1566 enable_gdbtk=no ;; 643 1567 esac 644 1568 645 case "`grep '^# per\-target:' ${srcdir}/configure.in`" in 646 "") 647 echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2 648 exit 1 649 ;; 650 *) ;; 1569 copy_dirs= 1570 1571 # Handle --with-headers=XXX. If the value is not "yes", the contents of 1572 # the named directory are copied to $(tooldir)/sys-include. 1573 if test x"${with_headers}" != x ; then 1574 if test x${is_cross_compiler} = xno ; then 1575 echo 1>&2 '***' --with-headers is only supported when cross compiling 1576 exit 1 1577 fi 1578 if test x"${with_headers}" != xyes ; then 1579 case "${exec_prefixoption}" in 1580 "") x=${prefix} ;; 1581 *) x=${exec_prefix} ;; 1582 esac 1583 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" 1584 fi 1585 fi 1586 1587 # Handle --with-libs=XXX. If the value is not "yes", the contents of 1588 # the name directories are copied to $(tooldir)/lib. Multiple directories 1589 # are permitted. 1590 if test x"${with_libs}" != x ; then 1591 if test x${is_cross_compiler} = xno ; then 1592 echo 1>&2 '***' --with-libs is only supported when cross compiling 1593 exit 1 1594 fi 1595 if test x"${with_libs}" != xyes ; then 1596 # Copy the libraries in reverse order, so that files in the first named 1597 # library override files in subsequent libraries. 1598 case "${exec_prefixoption}" in 1599 "") x=${prefix} ;; 1600 *) x=${exec_prefix} ;; 1601 esac 1602 for l in ${with_libs}; do 1603 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" 1604 done 1605 fi 1606 fi 1607 1608 # Handle ${copy_dirs} 1609 set fnord ${copy_dirs} 1610 shift 1611 while test $# != 0 ; do 1612 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then 1613 : 1614 else 1615 echo Copying $1 to $2 1616 1617 # Use the install script to create the directory and all required 1618 # parent directories. 1619 if test -d $2 ; then 1620 : 1621 else 1622 echo >config.temp 1623 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED 1624 fi 1625 1626 # Copy the directory, assuming we have tar. 1627 # FIXME: Should we use B in the second tar? Not all systems support it. 1628 (cd $1; tar -cf - .) | (cd $2; tar -xpf -) 1629 1630 # It is the responsibility of the user to correctly adjust all 1631 # symlinks. If somebody can figure out how to handle them correctly 1632 # here, feel free to add the code. 1633 1634 echo $1 > $2/COPIED 1635 fi 1636 shift; shift 1637 done 1638 1639 # Work in distributions that contain no compiler tools, like Autoconf. 1640 tentative_cc="" 1641 host_makefile_frag=/dev/null 1642 if test -d ${srcdir}/config ; then 1643 case "${host}" in 1644 m68k-hp-hpux*) 1645 # Avoid "too much defining" errors from HPUX compiler. 1646 tentative_cc="cc -Wp,-H256000" 1647 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding. 1648 # If it's HP/UX ar, this should be harmless. 1649 RANLIB="ar ts" 1650 ;; 1651 m68k-apollo-sysv*) 1652 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG" 1653 ;; 1654 m68k-apollo-bsd*) 1655 #None of the Apollo compilers can compile gas or binutils. The preprocessor 1656 # chokes on bfd, the compiler won't let you assign integers to enums, and 1657 # other problems. Defining CC to gcc is a questionable way to say "don't use 1658 # the apollo compiler" (the preferred version of GCC could be called cc, 1659 # or whatever), but I'm not sure leaving CC as cc is any better... 1660 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG 1661 # Used to have BISON=yacc. 1662 tentative_cc=gcc 1663 ;; 1664 m88k-dg-dgux*) 1665 tentative_cc="gcc -Wall -ansi -D__using_DGUX" 1666 ;; 1667 m88k-harris-cxux*) 1668 # Under CX/UX, we want to tell the compiler to use ANSI mode. 1669 tentative_cc="cc -Xa" 1670 host_makefile_frag="config/mh-cxux" 1671 ;; 1672 m88k-motorola-sysv*) 1673 ;; 1674 mips*-dec-ultrix*) 1675 tentative_cc="cc -Wf,-XNg1000" 1676 host_makefile_frag="config/mh-decstation" 1677 ;; 1678 mips*-nec-sysv4*) 1679 # The C compiler on NEC MIPS SVR4 needs bigger tables. 1680 tentative_cc="cc -ZXNd=5000 -ZXNg=1000" 1681 host_makefile_frag="config/mh-necv4" 1682 ;; 1683 mips*-sgi-irix4*) 1684 # Tell compiler to use K&R C. We can't compile under the SGI Ansi 1685 # environment. Also bump switch table size so that cp-parse will 1686 # compile. Bump string length limit so linker builds. 1687 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192" 1688 ;; 1689 mips*-*-sysv4*) 1690 host_makefile_frag="config/mh-sysv4" 1691 ;; 1692 mips*-*-sysv*) 1693 # This is for a MIPS running RISC/os 4.52C. 1694 1695 # This is needed for GDB, but needs to be in the top-level make because 1696 # if a library is compiled with the bsd headers and gets linked with the 1697 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be 1698 # a different size). 1699 # ptrace(2) apparently has problems in the BSD environment. No workaround is 1700 # known except to select the sysv environment. Could we use /proc instead? 1701 # These "sysv environments" and "bsd environments" often end up being a pain. 1702 # 1703 # This is not part of CFLAGS because perhaps not all C compilers have this 1704 # option. 1705 tentative_cc="cc -systype sysv" 1706 ;; 1707 i370-ibm-opened*) 1708 tentative_cc="c89" 1709 ;; 1710 i[3456]86-*-sysv5*) 1711 host_makefile_frag="config/mh-sysv5" 1712 ;; 1713 i[3456]86-*-dgux*) 1714 tentative_cc="gcc -Wall -ansi -D__using_DGUX" 1715 host_makefile_frag="config/mh-dgux386" 1716 ;; 1717 i[3456]86-ncr-sysv4.3*) 1718 # The MetaWare compiler will generate a copyright message unless you 1719 # turn it off by adding the -Hnocopyr flag. 1720 tentative_cc="cc -Hnocopyr" 1721 ;; 1722 i[3456]86-ncr-sysv4*) 1723 # for an NCR 3000 (i486/SVR4) system. 1724 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc. 1725 # This compiler not only emits obnoxious copyright messages every time 1726 # you run it, but it chokes and dies on a whole bunch of GNU source 1727 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc. 1728 tentative_cc="/usr/ccs/ATT/cc" 1729 host_makefile_frag="config/mh-ncr3000" 1730 ;; 1731 i[3456]86-*-sco3.2v5*) 1732 ;; 1733 i[3456]86-*-sco*) 1734 # The native C compiler botches some simple uses of const. Unfortunately, 1735 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h. 1736 tentative_cc="cc -Dconst=" 1737 host_makefile_frag="config/mh-sco" 1738 ;; 1739 i[3456]86-*-udk*) 1740 host_makefile_frag="config/mh-sysv5" 1741 ;; 1742 i[3456]86-*-solaris2*) 1743 host_makefile_frag="config/mh-sysv4" 1744 ;; 1745 i[3456]86-*-msdosdjgpp*) 1746 host_makefile_frag="config/mh-djgpp" 1747 ;; 1748 *-cygwin*) 1749 host_makefile_frag="config/mh-cygwin" 1750 ;; 1751 *-mingw32*) 1752 host_makefile_frag="config/mh-mingw32" 1753 ;; 1754 *-interix*) 1755 host_makefile_frag="config/mh-interix" 1756 ;; 1757 vax-*-ultrix2*) 1758 # The old BSD pcc isn't up to compiling parts of gdb so use gcc 1759 tentative_cc=gcc 1760 ;; 1761 *-*-solaris2*) 1762 host_makefile_frag="config/mh-solaris" 1763 ;; 1764 m68k-sun-sunos*) 1765 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c 1766 # without overflowing the jump tables (-J says to use a 32 bit table) 1767 tentative_cc="cc -J" 1768 ;; 1769 *-hp-hpux*) 1770 tentative_cc="cc -Wp,-H256000" 1771 ;; 1772 *-*-hiux*) 1773 tentative_cc="cc -Wp,-H256000" 1774 ;; 1775 rs6000-*-lynxos*) 1776 # /bin/cc is less than useful for our purposes. Always use GCC 1777 tentative_cc="/usr/cygnus/progressive/bin/gcc" 1778 host_makefile_frag="config/mh-lynxrs6k" 1779 ;; 1780 *-*-lynxos*) 1781 # /bin/cc is less than useful for our purposes. Always use GCC 1782 tentative_cc="/bin/gcc" 1783 ;; 1784 *-*-sysv4*) 1785 host_makefile_frag="config/mh-sysv4" 1786 ;; 651 1787 esac 652 653 case "${TMPDIR}" in 654 "") TMPDIR=/tmp ; export TMPDIR ;; 655 *) ;; 1788 fi 1789 1790 extra_arflags_for_target= 1791 extra_nmflags_for_target= 1792 extra_ranlibflags_for_target= 1793 target_makefile_frag=/dev/null 1794 case "${target}" in 1795 i[3456]86-*-netware*) 1796 target_makefile_frag="config/mt-netware" 1797 ;; 1798 powerpc-*-netware*) 1799 target_makefile_frag="config/mt-netware" 1800 ;; 1801 *-*-linux*) 1802 target_makefile_frag="config/mt-linux" 1803 ;; 1804 *-*-aix4.[3456789]* | *-*-aix[56789].*) 1805 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm 1806 # commands to handle both 32-bit and 64-bit objects. These flags are 1807 # harmless if we're using GNU nm or ar. 1808 extra_arflags_for_target=" -X32_64" 1809 extra_nmflags_for_target=" -B -X32_64" 1810 ;; 1811 *-*-darwin*) 1812 # ranlib from Darwin requires the -c flag to look at common symbols. 1813 extra_ranlibflags_for_target=" -c" 1814 ;; 1815 mips*-*-pe | sh*-*-pe | *arm-wince-pe) 1816 target_makefile_frag="config/mt-wince" 1817 ;; 656 1818 esac 657 1819 658 # keep this filename short for &%*%$*# 14 char file names and 8+3 file names 659 tmpfile=${TMPDIR}/cNf$$ 660 # Note that under many versions of sh a trap handler for 0 will *override* any 661 # exit status you explicitly specify! At this point, the only non-error exit 662 # is at the end of the script; these actions are duplicated there, minus 663 # the "exit 1". Don't use "exit 0" anywhere after this without resetting the 664 # trap handler, or you'll lose. 665 trap "rm -f Makefile.tem ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos; exit 1" 0 1 2 15 666 667 # split ${srcdir}/configure.in into common, per-host, per-target, 668 # and post-target parts. Post-target is optional. 669 sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com 670 sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.hst 671 if grep '^# post-target:' ${srcdir}/configure.in >/dev/null ; then 672 sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt 673 sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos 674 else 675 sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt 676 echo >${tmpfile}.pos 677 fi 678 679 ### do common part of configure.in 680 681 # If the language specific compiler does not exist, but the "gcc" directory does, 682 # we will skip this directory; in this case the sub-directory's common part 683 # of configure.in will create a small shell script "skip-this-dir" containing 684 # commands to completely clean up any temporary or created files. 685 686 . ${tmpfile}.com 687 688 if test -f skip-this-dir; then 689 # Perform the same cleanup as the trap handler, minus the "exit 1" of course, 690 # and reset the trap handler. 691 trap 0 692 rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos 693 # Execute the final clean-up actions 694 ${config_shell} skip-this-dir 695 # and stop configuring this directory. 696 exit 0 697 fi 698 699 # some sanity checks on configure.in 700 case "${srctrigger}" in 701 "") 702 echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in. 1>&2 703 exit 1 704 ;; 705 *) ;; 1820 alphaieee_frag=/dev/null 1821 case $target in 1822 alpha*-*-*) 1823 # This just makes sure to use the -mieee option to build target libs. 1824 # This should probably be set individually by each library. 1825 alphaieee_frag="config/mt-alphaieee" 1826 ;; 706 1827 esac 707 1828 708 case "${build_alias}" in 709 "") 710 if result=`${config_shell} ${configsub} ${host_alias}` ; then 711 build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 712 build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 713 build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 714 build=${build_cpu}-${build_vendor}-${build_os} 715 build_alias=${host_alias} 716 fi 717 ;; 718 *) 719 if result=`${config_shell} ${configsub} ${build_alias}` ; then 720 buildopt="--build=${build_alias}" 721 build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 722 build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 723 build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 724 build=${build_cpu}-${build_vendor}-${build_os} 725 else 726 echo "Unrecognized build system name ${build_alias}." 1>&2 727 exit 1 728 fi 729 ;; 1829 # If --enable-target-optspace always use -Os instead of -O2 to build 1830 # the target libraries, similarly if it is not specified, use -Os 1831 # on selected platforms. 1832 ospace_frag=/dev/null 1833 case "${enable_target_optspace}:${target}" in 1834 yes:*) 1835 ospace_frag="config/mt-ospace" 1836 ;; 1837 :d30v-*) 1838 ospace_frag="config/mt-d30v" 1839 ;; 1840 :m32r-* | :d10v-* | :fr30-*) 1841 ospace_frag="config/mt-ospace" 1842 ;; 1843 no:* | :*) 1844 ;; 1845 *) 1846 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 1847 ;; 730 1848 esac 731 1849 732 if result=`${config_shell} ${configsub} ${host_alias}` ; then 733 true 734 else 735 echo "Unrecognized host system name ${host_alias}." 1>&2 736 exit 1 737 fi 738 host_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 739 host_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 740 host_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 741 host=${host_cpu}-${host_vendor}-${host_os} 742 743 . ${tmpfile}.hst 744 745 if result=`${config_shell} ${configsub} ${target_alias}` ; then 746 true 747 else 748 echo "Unrecognized target system name ${target_alias}." 1>&2 749 exit 1 750 fi 751 target_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 752 target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 753 target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 754 target=${target_cpu}-${target_vendor}-${target_os} 755 756 . ${tmpfile}.tgt 757 758 # Find the source files, if location was not specified. 759 case "${srcdir}" in 760 "") 761 srcdirdefaulted=1 762 srcdir=. 763 if [ ! -r ${srctrigger} ] ; then 764 srcdir=.. 765 fi 766 ;; 767 *) ;; 1850 # Set with_gnu_as and with_gnu_ld as appropriate. 1851 # 1852 # This is done by determining whether or not the appropriate directory 1853 # is available, and by checking whether or not specific configurations 1854 # have requested that this magic not happen. 1855 # 1856 # The command line options always override the explicit settings in 1857 # configure.in, and the settings in configure.in override this magic. 1858 # 1859 # If the default for a toolchain is to use GNU as and ld, and you don't 1860 # want to do that, then you should use the --without-gnu-as and 1861 # --without-gnu-ld options for the configure script. 1862 1863 if test x${use_gnu_as} = x && 1864 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then 1865 with_gnu_as=yes 1866 extra_host_args="$extra_host_args --with-gnu-as" 1867 fi 1868 1869 if test x${use_gnu_ld} = x && 1870 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then 1871 with_gnu_ld=yes 1872 extra_host_args="$extra_host_args --with-gnu-ld" 1873 fi 1874 1875 # If using newlib, add --with-newlib to the extra_host_args so that gcc/configure 1876 # can detect this case. 1877 1878 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then 1879 with_newlib=yes 1880 extra_host_args="$extra_host_args --with-newlib" 1881 fi 1882 1883 1884 # Default to using --with-stabs for certain targets. 1885 if test x${with_stabs} = x ; then 1886 case "${target}" in 1887 mips*-*-irix6*o32) 1888 with_stabs=yes; 1889 extra_host_args="${extra_host_args} --with-stabs" 1890 ;; 1891 mips*-*-irix6*) 1892 ;; 1893 mips*-*-* | alpha*-*-osf*) 1894 with_stabs=yes; 1895 extra_host_args="${extra_host_args} --with-stabs" 1896 ;; 1897 esac 1898 fi 1899 1900 # hpux11 in 64bit mode has libraries in a weird place. Arrange to find 1901 # them automatically. 1902 case "${host}" in 1903 hppa*64*-*-hpux11*) 1904 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" 1905 ;; 768 1906 esac 769 1907 770 if [ ! -r ${srcdir}/${srctrigger} ] ; then 771 case "${srcdirdefaulted}" in 772 "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;; 773 *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;; 774 esac 775 776 echo '***' \(At least ${srctrigger} is missing.\) 1>&2 777 exit 1 1908 # If we aren't going to be using gcc, see if we can extract a definition 1909 # of CC from the fragment. 1910 # Actually, use the 'pre-extracted' version above. 1911 if test -z "${CC}" && test "${build}" = "${host}" ; then 1912 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 1913 found= 1914 for dir in $PATH; do 1915 test -z "$dir" && dir=. 1916 if test -f $dir/gcc; then 1917 found=yes 1918 break 1919 fi 1920 done 1921 IFS="$save_ifs" 1922 if test -z "${found}" && test -n "${tentative_cc}" ; then 1923 CC=$tentative_cc 1924 fi 778 1925 fi 779 1926 … … 781 1928 # using) don't handle "\$" correctly, so don't use it here. 782 1929 tooldir='$(exec_prefix)'/${target_alias} 783 784 if [ "${host_alias}" != "${target_alias}" ] ; then 785 if [ "${program_prefixoption}" = "" ] ; then 786 if [ "${program_suffixoption}" = "" ] ; then 787 if [ "${program_transform_nameoption}" = "" ] ; then 788 program_prefix=${target_alias}- ; 789 fi 790 fi 791 fi 792 fi 793 794 # Merge program_prefix and program_suffix onto program_transform_name. 795 # (program_suffix used to use $, but it's hard to preserve $ through both 796 # make and sh.) 797 if [ "${program_suffix}" != "" ] ; then 798 program_transform_name="-e s,\\\\(.*\\\\),\\\\1${program_suffix}, ${program_transform_name}" 799 fi 800 801 if [ "${program_prefix}" != "" ] ; then 802 program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}" 803 fi 804 805 # If CC and CXX are not set in the environment, and the Makefile 806 # exists, try to extract them from it. This is to handle running 807 # ./config.status by hand. 808 if [ -z "${CC}" ] && [ -r Makefile ]; then 809 sed -n -e ':loop 810 /\\$/ N 811 s/\\\n//g 812 t loop 813 /^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc 814 CC=`tail -1 Makefile.cc` 815 rm -f Makefile.cc 816 fi 817 818 if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then 819 sed -n -e ':loop 820 /\\$/ N 821 s/\\\n//g 822 t loop 823 /^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc 824 CFLAGS=`tail -1 Makefile.cc` 825 rm -f Makefile.cc 826 fi 827 828 if [ -z "${CXX}" ] && [ -r Makefile ]; then 829 sed -n -e ':loop 830 /\\$/ N 831 s/\\\n//g 832 t loop 833 /^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc 834 CXX=`tail -1 Makefile.cc` 835 rm -f Makefile.cc 836 fi 837 838 if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then 839 sed -n -e ':loop 840 /\\$/ N 841 s/\\\n//g 842 t loop 843 /^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc 844 CXXFLAGS=`tail -1 Makefile.cc` 845 rm -f Makefile.cc 846 fi 1930 build_tooldir=${tooldir} 847 1931 848 1932 # Generate a default definition for YACC. This is used if the makefile can't … … 903 1987 done 904 1988 905 if [ "${build}" != "${host}" ]; then1989 if test "${build}" != "${host}" ; then 906 1990 # If we are doing a Canadian Cross, in which the host and build systems 907 1991 # are not the same, we set reasonable default values for the tools. 908 1992 909 tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD"910 tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET"911 tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET HOST_PREFIX"912 tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"913 tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"914 tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"915 tools="${tools} OBJCOPY OBJDUMP"916 917 for var in ${tools}; do918 if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then919 sed -n -e ':loop920 /\\$/ N921 s/\\\n//g922 t loop923 /^'"${var}"'[ ]*=/ s/'"${var}"'[ ]*=[ ]*\(.*\)/\1/p' \924 < Makefile > Makefile.v925 t=`tail -1 Makefile.v`926 if [ -n "${t}" ]; then927 eval "${var}=\${t}"928 fi929 rm -f Makefile.v930 fi931 done932 933 AR=${AR-${host_alias}-ar}934 AR_FOR_TARGET=${AR_FOR_TARGET-${target_alias}-ar}935 AS=${AS-${host_alias}-as}936 AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}937 1993 BISON=${BISON-bison} 938 1994 CC=${CC-${host_alias}-gcc} … … 943 1999 CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc} 944 2000 CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++} 945 DLLTOOL=${DLLTOOL-${host_alias}-dlltool} 946 DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool} 2001 GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj} 947 2002 GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}} 948 HOST_PREFIX=${build_alias}- 949 HOST_PREFIX_1=${build_alias}- 950 LD=${LD-${host_alias}-ld} 951 LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld} 2003 BUILD_PREFIX=${build_alias}- 2004 BUILD_PREFIX_1=${build_alias}- 952 2005 MAKEINFO=${MAKEINFO-makeinfo} 953 NM=${NM-${host_alias}-nm} 954 NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm} 955 RANLIB=${RANLIB-${host_alias}-ranlib} 956 RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib} 957 WINDRES=${WINDRES-${host_alias}-windres} 958 WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres} 959 OBJCOPY=${OBJCOPY-${host_alias}-objcopy} 960 OBJDUMP=${OBJDUMP-${host_alias}-objdump} 961 962 if [ -z "${YACC}" ]; then 2006 2007 if test -z "${YACC}" ; then 963 2008 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 964 2009 for dir in $PATH; do … … 978 2023 done 979 2024 IFS="$save_ifs" 980 if [ -z "${YACC}" ]; then2025 if test -z "${YACC}" ; then 981 2026 YACC="bison -y" 982 2027 fi 983 2028 fi 984 2029 985 if [ -z "${LEX}" ]; then2030 if test -z "${LEX}" ; then 986 2031 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 987 2032 for dir in $PATH; do … … 1000 2045 fi 1001 2046 1002 # Export variables which autoconf might try to set. 1003 export AS 1004 export AR 1005 export CC_FOR_BUILD 1006 export DLLTOOL 1007 export LD 1008 export NM 1009 export RANLIB 1010 export WINDRES 1011 export OBJCOPY 1012 export OBJDUMP 1013 else 2047 else 2048 # Set reasonable default values for some tools even if not Canadian. 2049 # Of course, these are different reasonable default values, originally 2050 # specified directly in the Makefile. 2051 # We don't export, so that autoconf can do its job. 2052 # Note that all these settings are above the fragment inclusion point 2053 # in Makefile.in, so can still be overridden by fragments. 2054 # This is all going to change when we autoconfiscate... 2055 2056 BISON="\$(USUAL_BISON)" 2057 CC_FOR_BUILD="\$(CC)" 2058 GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)" 2059 BUILD_PREFIX= 2060 BUILD_PREFIX_1=loser- 2061 MAKEINFO="\$(USUAL_MAKEINFO)" 2062 LEX="\$(USUAL_LEX)" 2063 YACC="\$(USUAL_YACC)" 2064 1014 2065 # If CC is still not set, try to get gcc. 1015 if [ -z "${CC}" ]; then 2066 cc_prog_is_gcc= 2067 if test -z "${CC}" ; then 1016 2068 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 1017 2069 for dir in $PATH; do … … 1019 2071 if test -f $dir/gcc; then 1020 2072 CC="gcc" 2073 cc_prog_is_gcc=yes 1021 2074 echo 'void f(){}' > conftest.c 1022 2075 if test -z "`${CC} -g -c conftest.c 2>&1`"; then … … 1034 2087 CC=${CC-cc} 1035 2088 else 2089 # Determine if we are using gcc. 2090 cat > conftest.c <<EOF 2091 #ifdef __GNUC__ 2092 yes; 2093 #endif 2094 EOF 2095 if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then 2096 cc_prog_is_gcc=yes 2097 fi 2098 rm -f conftest.c 1036 2099 if test -z "${CFLAGS}"; then 1037 2100 # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC 1038 2101 # is set to a version of gcc. 1039 case "${CC}" in 1040 *gcc) 2102 if test "$cc_prog_is_gcc" = yes; then 1041 2103 echo 'void f(){}' > conftest.c 1042 2104 if test -z "`${CC} -g -c conftest.c 2>&1`"; then … … 1048 2110 fi 1049 2111 rm -f conftest* 1050 ;; 2112 fi 2113 fi 2114 fi 2115 2116 # We must set the default linker to the linker used by gcc for the correct 2117 # operation of libtool. If LD is not defined and we are using gcc, try to 2118 # set the LD default to the ld used by gcc. 2119 if test -z "$LD"; then 2120 if test "$cc_prog_is_gcc" = yes; then 2121 case $build in 2122 *-*-mingw*) 2123 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;; 2124 *) 2125 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;; 2126 esac 2127 case $gcc_prog_ld in 2128 # Accept absolute paths. 2129 [\\/]* | [A-Za-z]:[\\/]*) 2130 LD="$gcc_prog_ld" ;; 1051 2131 esac 1052 2132 fi … … 1058 2138 fi 1059 2139 1060 export CC 1061 export CXX 1062 export CFLAGS 1063 export CXXFLAGS 1064 1065 # FIXME: This should be in configure.in, not configure 1066 case "$host" in 1067 *go32*) 1068 enable_gdbtk=no ;; 1069 *msdosdjgpp*) 1070 enable_gdbtk=no ;; 2140 # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest) 2141 # Set up the list of links to be made. 2142 # ${links} is the list of link names, and ${files} is the list of names to link to. 2143 2144 # Make the links. 2145 configlinks="${links}" 2146 if test -r ./config.status ; then 2147 mv -f ./config.status ./config.back 2148 fi 2149 while test -n "${files}" ; do 2150 # set file to car of files, files to cdr of files 2151 set ${files}; file=$1; shift; files=$* 2152 set ${links}; link=$1; shift; links=$* 2153 2154 if test ! -r ${srcdir}/${file} ; then 2155 if test ! -r ${file} ; then 2156 echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2 2157 echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2 2158 exit 1 2159 else 2160 srcfile=${file} 2161 fi 2162 else 2163 srcfile=${srcdir}/${file} 2164 fi 2165 2166 ${remove} -f ${link} 2167 # Make a symlink if possible, otherwise try a hard link 2168 if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then 2169 true 2170 else 2171 # We need to re-remove the file because Lynx leaves a 2172 # very strange directory there when it fails an NFS symlink. 2173 ${remove} -r -f ${link} 2174 ${hard_link} ${srcfile} ${link} 2175 fi 2176 if test ! -r ${link} ; then 2177 echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2 2178 exit 1 2179 fi 2180 2181 echo "Linked \"${link}\" to \"${srcfile}\"." 2182 done 2183 2184 # Create a .gdbinit file which runs the one in srcdir 2185 # and tells GDB to look there for source files. 2186 2187 if test -r ${srcdir}/.gdbinit ; then 2188 case ${srcdir} in 2189 .) ;; 2190 *) cat > ./.gdbinit <<EOF 2191 # ${NO_EDIT} 2192 dir ${srcdir} 2193 dir . 2194 source ${srcdir}/.gdbinit 2195 EOF 2196 ;; 2197 esac 2198 fi 2199 2200 # Make sure that the compiler is able to generate an executable. If it 2201 # can't, we are probably in trouble. We don't care whether we can run the 2202 # executable--we might be using a cross compiler--we only care whether it 2203 # can be created. At this point the main configure script has set CC. 2204 we_are_ok=no 2205 echo "int main () { return 0; }" > conftest.c 2206 ${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c 2207 if test $? = 0 ; then 2208 if test -s conftest || test -s conftest.exe ; then 2209 we_are_ok=yes 2210 fi 2211 fi 2212 case $we_are_ok in 2213 no) 2214 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed." 2215 echo 1>&2 "*** You must set the environment variable CC to a working compiler." 2216 rm -f conftest* 2217 exit 1 2218 ;; 1071 2219 esac 1072 1073 # FIXME: This should be in configure.in, not configure 2220 rm -f conftest* 2221 2222 # The Solaris /usr/ucb/cc compiler does not appear to work. 2223 case "${host}" in 2224 sparc-sun-solaris2*) 2225 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`" 2226 if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then 2227 could_use= 2228 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin" 2229 if test -d /opt/cygnus/bin ; then 2230 if test "$could_use" = "" ; then 2231 could_use="/opt/cygnus/bin" 2232 else 2233 could_use="$could_use or /opt/cygnus/bin" 2234 fi 2235 fi 2236 if test "$could_use" = "" ; then 2237 echo "Warning: compilation may fail because you're using" 2238 echo "/usr/ucb/cc. You should change your PATH or CC " 2239 echo "variable and rerun configure." 2240 else 2241 echo "Warning: compilation may fail because you're using" 2242 echo "/usr/ucb/cc, when you should use the C compiler from" 2243 echo "$could_use. You should change your" 2244 echo "PATH or CC variable and rerun configure." 2245 fi 2246 fi 2247 ;; 2248 esac 2249 2250 # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the 2251 # binutils tools will find libbfd.so. 2252 case "${enable_shared}" in 2253 no | "") SET_LIB_PATH= ;; 2254 *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;; 2255 esac 2256 2257 case "${host}" in 2258 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; 2259 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; 2260 esac 2261 2262 # Record target_configdirs and the configure arguments for target and 2263 # build configuration in Makefile. 2264 target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` 2265 2266 # This is the final value for target_configdirs. configdirs already 2267 # has its final value. It's time to create some lists of valid targets. 2268 2269 # While at that, we remove Makefiles if we were started for recursive 2270 # configuration, such that the top-level Makefile reconfigures them, 2271 # like we used to do when configure itself was recursive. 2272 2273 all_build_modules= 2274 configure_build_modules= 2275 # Only make build modules if build != host. 2276 # This should be done more generally, but at the moment it doesn't matter. 2277 if test ${host_alias} != ${build_alias} ; then 2278 for module in libiberty ; do 2279 all_build_modules=all-build-${module} 2280 configure_build_modules=configure-build-${module} 2281 if test -z "${no_recursion}" \ 2282 && test -f ${build_subdir}/${module}/Makefile; then 2283 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure" 2284 rm -f ${build_subdir}/${module}/Makefile 2285 fi 2286 done 2287 fi 2288 2289 all_host_modules= 2290 check_host_modules= 2291 install_host_modules= 2292 configure_host_modules= 2293 for module in ${configdirs} ; do 2294 all_host_modules="${all_host_modules} all-${module}" 2295 check_host_modules="${check_host_modules} check-${module}" 2296 install_host_modules="${install_host_modules} install-${module}" 2297 configure_host_modules="${configure_host_modules} configure-${module}" 2298 if test -z "${no_recursion}" \ 2299 && test -f ${module}/Makefile; then 2300 echo 1>&2 "*** removing ${module}/Makefile to force reconfigure" 2301 rm -f ${module}/Makefile 2302 fi 2303 done 2304 install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'` 2305 2306 all_target_modules= 2307 check_target_modules= 2308 install_target_modules= 2309 configure_target_modules= 2310 for module in ${target_configdirs} ; do 2311 all_target_modules="${all_target_modules} all-target-${module}" 2312 check_target_modules="${check_target_modules} check-target-${module}" 2313 install_target_modules="${install_target_modules} install-target-${module}" 2314 configure_target_modules="${configure_target_modules} configure-target-${module}" 2315 if test -z "${no_recursion}" \ 2316 && test -f ${target_subdir}/${module}/Makefile; then 2317 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure" 2318 rm -f ${target_subdir}/${module}/Makefile 2319 fi 2320 done 2321 1074 2322 # Determine whether gdb needs tk/tcl or not. 1075 if [ "$enable_gdbtk" != "no" ]; then 1076 GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" 1077 else 1078 GDB_TK="" 1079 fi 1080 1081 for subdir in . ${subdirs} ; do 1082 1083 # ${subdir} is relative path from . to the directory we're currently 1084 # configuring. 1085 # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed. 1086 invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'` 1087 1088 ### figure out what to do with srcdir 1089 case "${srcdir}" in 1090 ".") # no -srcdir option. We're building in place. 1091 makesrcdir=. ;; 1092 /*) # absolute path 1093 makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'` 1094 ;; 1095 *) # otherwise relative 1096 case "${subdir}" in 1097 .) makesrcdir=${srcdir} ;; 1098 *) makesrcdir=${invsubdir}${srcdir}/${subdir} ;; 1099 esac 1100 ;; 1101 esac 1102 1103 if [ "${subdir}/" != "./" ] ; then 1104 Makefile=${subdir}/Makefile 1105 fi 1106 1107 if [ ! -d ${subdir} ] ; then 1108 if mkdir ${subdir} ; then 1109 true 1110 else 1111 echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2 1112 exit 1 1113 fi 1114 fi 1115 1116 case "${removing}" in 1117 "") 1118 case "${subdir}" in 1119 .) ;; 1120 *) eval echo Building in ${subdir} ${redirect} ;; 1121 esac 1122 1123 # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest) 1124 # Set up the list of links to be made. 1125 # ${links} is the list of link names, and ${files} is the list of names to link to. 1126 1127 # Make the links. 1128 configlinks="${links}" 1129 if [ -r ${subdir}/config.status ] ; then 1130 mv -f ${subdir}/config.status ${subdir}/config.back 1131 fi 1132 while [ -n "${files}" ] ; do 1133 # set file to car of files, files to cdr of files 1134 set ${files}; file=$1; shift; files=$* 1135 set ${links}; link=$1; shift; links=$* 1136 1137 if [ ! -r ${srcdir}/${file} ] ; then 1138 if [ ! -r ${file} ] ; then 1139 1140 echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2 1141 echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2 1142 exit 1 1143 else 1144 srcfile=${file} 1145 fi 1146 else 1147 srcfile=${srcdir}/${file} 1148 fi 1149 1150 ${remove} -f ${link} 1151 # Make a symlink if possible, otherwise try a hard link 1152 if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then 1153 true 1154 else 1155 # We need to re-remove the file because Lynx leaves a 1156 # very strange directory there when it fails an NFS symlink. 1157 ${remove} -r -f ${link} 1158 ${hard_link} ${srcfile} ${link} 1159 fi 1160 if [ ! -r ${link} ] ; then 1161 echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2 1162 exit 1 1163 fi 1164 1165 echo "Linked \"${link}\" to \"${srcfile}\"." 1166 done 1167 1168 # Create a .gdbinit file which runs the one in srcdir 1169 # and tells GDB to look there for source files. 1170 1171 if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then 1172 case ${srcdir} in 1173 .) ;; 1174 *) cat > ${subdir}/.gdbinit <<EOF 1175 # ${NO_EDIT} 1176 dir ${makesrcdir} 1177 dir . 1178 source ${makesrcdir}/.gdbinit 2323 # Use 'maybe' since enable_gdbtk might be true even if tk isn't available 2324 # and in that case we want gdb to be built without tk. Ugh! 2325 # In fact I believe gdb is the *only* package directly dependent on tk, 2326 # so we should be able to put the 'maybe's in unconditionally and 2327 # leave out the maybe dependencies when enable_gdbtk is false. I'm not 2328 # 100% sure that that's safe though. 2329 2330 gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui" 2331 case "$enable_gdbtk" in 2332 no) 2333 GDB_TK="" ;; 2334 yes) 2335 GDB_TK="${gdb_tk}" ;; 2336 *) 2337 # Only add the dependency on gdbtk when GDBtk is part of the gdb 2338 # distro. Eventually someone will fix this and move Insight, nee 2339 # gdbtk to a separate directory. 2340 if test -d ${srcdir}/gdb/gdbtk ; then 2341 GDB_TK="${gdb_tk}" 2342 else 2343 GDB_TK="" 2344 fi 2345 ;; 2346 esac 2347 2348 # Create the 'maybe dependencies'. This uses a temporary file. 2349 rm -f maybedep.tmp 2350 echo '# maybedep.tmp' > maybedep.tmp 2351 for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \ 2352 ${install_host_modules} ${install_target_modules} \ 2353 ${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \ 2354 ; do 2355 echo "maybe-${item}: ${item}" >> maybedep.tmp 2356 done 2357 maybe_dependencies=maybedep.tmp 2358 2359 2360 # Create the serialization dependencies. This uses a temporary file. 2361 2362 # Check whether --enable-serial-configure or --disable-serial-configure was given. 2363 if test "${enable_serial_configure+set}" = set; then 2364 enableval="$enable_serial_configure" 2365 : 2366 fi 2367 2368 2369 # These force 'configure's to be done one at a time, to avoid problems 2370 # with contention over a shared config.cache. 2371 rm -f serdep.tmp 2372 echo '# serdep.tmp' > serdep.tmp 2373 olditem= 2374 test "x${enable_serial_configure}" = xno || 2375 test "x${enable_serial_build_configure}" = xno || 2376 for item in ${build_configdirs} ; do 2377 case ${olditem} in 2378 "") ;; 2379 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;; 2380 esac 2381 olditem=${item} 2382 done 2383 olditem= 2384 test "x${enable_serial_configure}" = xno || 2385 test "x${enable_serial_host_configure}" = xno || 2386 for item in ${configdirs} ; do 2387 case ${olditem} in 2388 "") ;; 2389 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;; 2390 esac 2391 olditem=${item} 2392 done 2393 olditem= 2394 test "x${enable_serial_configure}" = xno || 2395 test "x${enable_serial_target_configure}" = xno || 2396 for item in ${target_configdirs} ; do 2397 case ${olditem} in 2398 "") ;; 2399 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;; 2400 esac 2401 olditem=${item} 2402 done 2403 serialization_dependencies=serdep.tmp 2404 2405 2406 # Base args. Strip norecursion, cache-file, srcdir, host, build, 2407 # target and nonopt. These are the ones we might not want to pass 2408 # down to subconfigures. 2409 baseargs=`echo " ${ac_configure_args} " | \ 2410 sed -e 's/ --no[^ ]* / /' \ 2411 -e 's/ --c[a-z-]*[= ][^ ]* / /' \ 2412 -e 's/ --sr[a-z-]*[= ][^ ]* / /' \ 2413 -e 's/ --ho[a-z-]*[= ][^ ]* / /' \ 2414 -e 's/ --bu[a-z-]*[= ][^ ]* / /' \ 2415 -e 's/ --t[a-z-]*[= ][^ ]* / /' \ 2416 -e 's/ -cache-file[= ][^ ]* / /' \ 2417 -e 's/ -srcdir[= ][^ ]* / /' \ 2418 -e 's/ -host[= ][^ ]* / /' \ 2419 -e 's/ -build[= ][^ ]* / /' \ 2420 -e 's/ -target[= ][^ ]* / /' \ 2421 -e "s/ [^' -][^ ]* / /" \ 2422 -e 's/^ *//;s/ *$//'` 2423 2424 # For the build-side libraries, we just need to pretend we're native, 2425 # and not use the same cache file. Multilibs are neither needed nor 2426 # desired. 2427 build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}" 2428 2429 # For host modules, accept cache file option, or specification as blank. 2430 case "${cache_file}" in 2431 "") # empty 2432 cache_file_option="" ;; 2433 /* | [A-Za-z]:[\\/]* ) # absolute path 2434 cache_file_option="--cache-file=${cache_file}" ;; 2435 *) # relative path 2436 cache_file_option="--cache-file=../${cache_file}" ;; 2437 esac 2438 2439 host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}" 2440 2441 target_configargs=${baseargs} 2442 2443 # Passing a --with-cross-host argument lets the target libraries know 2444 # whether they are being built with a cross-compiler or being built 2445 # native. However, it would be better to use other mechanisms to make the 2446 # sorts of decisions they want to make on this basis. Please consider 2447 # this option to be deprecated. FIXME. 2448 if test x${is_cross_compiler} = xyes ; then 2449 target_configargs="--with-cross-host=${host_alias} ${target_configargs}" 2450 fi 2451 2452 # Default to --enable-multilib. 2453 if test x${enable_multilib} = x ; then 2454 target_configargs="--enable-multilib ${target_configargs}" 2455 fi 2456 2457 # Pass --with-newlib if appropriate. Note that target_configdirs has 2458 # changed from the earlier setting of with_newlib. 2459 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then 2460 target_configargs="--with-newlib ${target_configargs}" 2461 fi 2462 2463 # Pass the appropriate --host, --build, and --cache-file arguments. 2464 target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}" 2465 2466 # provide a proper gxx_include_dir. 2467 # Note, if you change the default, make sure to fix both here and in 2468 # the gcc and libstdc++-v3 subdirectories. 2469 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. 2470 case "${with_gxx_include_dir}" in 2471 yes) 2472 { echo "configure: error: --with-gxx-include-dir=[dir] requires a directory" 1>&2; exit 1; } 2473 ;; 2474 no | "") 2475 case "${enable_version_specific_runtime_libs}" in 2476 yes) gxx_include_dir='${libsubdir}/include/c++' ;; 2477 *) 2478 . ${srcdir}/config.if 2479 gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;; 2480 esac ;; 2481 *) gxx_include_dir=${with_gxx_include_dir} ;; 2482 esac 2483 2484 FLAGS_FOR_TARGET= 2485 case " $target_configdirs " in 2486 *" newlib "*) 2487 case " $target_configargs " in 2488 *" --with-newlib "*) 2489 case "$target" in 2490 *-cygwin*) 2491 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include -isystem $$s/newlib/libc/sys/cygwin -isystem $$s/newlib/libc/sys/cygwin32' ;; 2492 esac 2493 2494 # If we're not building GCC, don't discard standard headers. 2495 if test -d ${srcdir}/gcc; then 2496 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc' 2497 2498 if test "${build}" != "${host}"; then 2499 # On Canadian crosses, CC_FOR_TARGET will have already been set 2500 # by `configure', so we won't have an opportunity to add -Bgcc/ 2501 # to it. This is right: we don't want to search that directory 2502 # for binaries, but we want the header files in there, so add 2503 # them explicitly. 2504 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include' 2505 2506 # Someone might think of using the pre-installed headers on 2507 # Canadian crosses, in case the installed compiler is not fully 2508 # compatible with the compiler being built. In this case, it 2509 # would be better to flag an error than risking having 2510 # incompatible object files being constructed. We can't 2511 # guarantee that an error will be flagged, but let's hope the 2512 # compiler will do it, when presented with incompatible header 2513 # files. 2514 fi 2515 fi 2516 2517 case "${target}-${is_cross_compiler}" in 2518 i[3456]86-*-linux*-no) 2519 # Here host == target, so we don't need to build gcc, 2520 # so we don't want to discard standard headers. 2521 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'` 2522 ;; 2523 *) 2524 # If we're building newlib, use its generic headers last, but search 2525 # for any libc-related directories first (so make it the last -B 2526 # switch). 2527 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include' 2528 ;; 2529 esac 2530 ;; 2531 esac 2532 ;; 2533 esac 2534 2535 # On Canadian crosses, we'll be searching the right directories for 2536 # the previously-installed cross compiler, so don't bother to add 2537 # flags for directories within the install tree of the compiler 2538 # being built; programs in there won't even run. 2539 if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then 2540 # Search for pre-installed headers if nothing else fits. 2541 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include' 2542 fi 2543 2544 if test "x${use_gnu_ld}" = x && 2545 echo " ${configdirs} " | grep " ld " > /dev/null ; then 2546 # Arrange for us to find uninstalled linker scripts. 2547 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld' 2548 fi 2549 2550 if test "x${CC_FOR_TARGET+set}" = xset; then 2551 : 2552 elif test -d ${srcdir}/gcc; then 2553 CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/' 2554 elif test "$host" = "$target"; then 2555 CC_FOR_TARGET='$(CC)' 2556 else 2557 CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"` 2558 fi 2559 CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' 2560 2561 if test "x${GCJ_FOR_TARGET+set}" = xset; then 2562 : 2563 elif test -d ${srcdir}/gcc; then 2564 GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/' 2565 elif test "$host" = "$target"; then 2566 GCJ_FOR_TARGET='gcj' 2567 else 2568 GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"` 2569 fi 2570 GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)' 2571 2572 # Don't use libstdc++-v3's flags to configure/build itself. 2573 libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' 2574 raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' 2575 2576 if test "x${CXX_FOR_TARGET+set}" = xset; then 2577 : 2578 elif test -d ${srcdir}/gcc; then 2579 # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead 2580 # of g++ for linking C++ or Java, because g++ has -shared-libgcc by 2581 # default whereas gcc does not. 2582 # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for 2583 # all other cases. 2584 CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags 2585 RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags 2586 elif test "$host" = "$target"; then 2587 CXX_FOR_TARGET='$(CXX)' 2588 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET} 2589 else 2590 CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"` 2591 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET} 2592 fi 2593 CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' 2594 RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' 2595 2596 qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'` 2597 qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'` 2598 2599 # We want to defer the evaluation of `cmd`s and shell variables in 2600 # CXX_FOR_TARGET when recursing in the top-level Makefile, such as for 2601 # bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single 2602 # quotes, but we still have to duplicate `$'s so that shell variables 2603 # can be expanded by the nested make as shell variables, not as make 2604 # macros. 2605 qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'` 2606 qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'` 2607 2608 # Wrap CC_FOR_TARGET and friends, for certain types of builds. 2609 CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}" 2610 GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}" 2611 CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}" 2612 RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}" 2613 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}" 2614 RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}" 2615 2616 # Makefile fragments. 2617 host_makefile_frag=${srcdir}/${host_makefile_frag} 2618 target_makefile_frag=${srcdir}/${target_makefile_frag} 2619 alphaieee_frag=${srcdir}/${alphaieee_frag} 2620 ospace_frag=${srcdir}/${ospace_frag} 2621 2622 2623 2624 2625 2626 # Miscellanea: directories, flags, etc. 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 # Build module lists & subconfigure args. 2641 2642 2643 2644 2645 2646 # Host module lists & subconfigure args. 2647 2648 2649 2650 2651 2652 2653 2654 2655 # Target module lists & subconfigure args. 2656 2657 2658 2659 2660 2661 2662 2663 2664 # Build tools. 2665 2666 2667 2668 2669 2670 2671 2672 # Host tools. 2673 ncn_tool_prefix= 2674 test -n "$host_alias" && ncn_tool_prefix=$host_alias- 2675 ncn_target_tool_prefix= 2676 test -n "$target_alias" && ncn_target_tool_prefix=$target_alias- 2677 2678 if test -n "$ncn_tool_prefix"; then 2679 # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args. 2680 set dummy ${ncn_tool_prefix}ar; ac_word=$2 2681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2682 echo "configure:2683: checking for $ac_word" >&5 2683 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then 2684 echo $ac_n "(cached) $ac_c" 1>&6 2685 else 2686 if test -n "$AR"; then 2687 ac_cv_prog_AR="$AR" # Let the user override the test. 2688 else 2689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 2690 ac_dummy="$PATH" 2691 for ac_dir in $ac_dummy; do 2692 test -z "$ac_dir" && ac_dir=. 2693 if test -f $ac_dir/$ac_word; then 2694 ac_cv_prog_AR="${ncn_tool_prefix}ar" 2695 break 2696 fi 2697 done 2698 IFS="$ac_save_ifs" 2699 fi 2700 fi 2701 AR="$ac_cv_prog_AR" 2702 if test -n "$AR"; then 2703 echo "$ac_t""$AR" 1>&6 2704 else 2705 echo "$ac_t""no" 1>&6 2706 fi 2707 2708 fi 2709 if test -z "$ac_cv_prog_AR" ; then 2710 if test $build = $host ; then 2711 ncn_cv_AR=$AR 2712 # Extract the first word of "ar", so it can be a program name with args. 2713 set dummy ar; ac_word=$2 2714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2715 echo "configure:2716: checking for $ac_word" >&5 2716 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then 2717 echo $ac_n "(cached) $ac_c" 1>&6 2718 else 2719 if test -n "$ncn_cv_AR"; then 2720 ac_cv_prog_ncn_cv_AR="$ncn_cv_AR" # Let the user override the test. 2721 else 2722 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 2723 ac_dummy="$PATH" 2724 for ac_dir in $ac_dummy; do 2725 test -z "$ac_dir" && ac_dir=. 2726 if test -f $ac_dir/$ac_word; then 2727 ac_cv_prog_ncn_cv_AR="ar" 2728 break 2729 fi 2730 done 2731 IFS="$ac_save_ifs" 2732 test -z "$ac_cv_prog_ncn_cv_AR" && ac_cv_prog_ncn_cv_AR="ar" 2733 fi 2734 fi 2735 ncn_cv_AR="$ac_cv_prog_ncn_cv_AR" 2736 if test -n "$ncn_cv_AR"; then 2737 echo "$ac_t""$ncn_cv_AR" 1>&6 2738 else 2739 echo "$ac_t""no" 1>&6 2740 fi 2741 2742 AR=$ncn_cv_AR 2743 else 2744 AR="${ncn_tool_prefix}ar" 2745 fi 2746 else 2747 AR="$ac_cv_prog_AR" 2748 fi 2749 2750 if test -n "$ncn_tool_prefix"; then 2751 # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args. 2752 set dummy ${ncn_tool_prefix}as; ac_word=$2 2753 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2754 echo "configure:2755: checking for $ac_word" >&5 2755 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then 2756 echo $ac_n "(cached) $ac_c" 1>&6 2757 else 2758 if test -n "$AS"; then 2759 ac_cv_prog_AS="$AS" # Let the user override the test. 2760 else 2761 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 2762 ac_dummy="$PATH" 2763 for ac_dir in $ac_dummy; do 2764 test -z "$ac_dir" && ac_dir=. 2765 if test -f $ac_dir/$ac_word; then 2766 ac_cv_prog_AS="${ncn_tool_prefix}as" 2767 break 2768 fi 2769 done 2770 IFS="$ac_save_ifs" 2771 fi 2772 fi 2773 AS="$ac_cv_prog_AS" 2774 if test -n "$AS"; then 2775 echo "$ac_t""$AS" 1>&6 2776 else 2777 echo "$ac_t""no" 1>&6 2778 fi 2779 2780 fi 2781 if test -z "$ac_cv_prog_AS" ; then 2782 if test $build = $host ; then 2783 ncn_cv_AS=$AS 2784 # Extract the first word of "as", so it can be a program name with args. 2785 set dummy as; ac_word=$2 2786 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2787 echo "configure:2788: checking for $ac_word" >&5 2788 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then 2789 echo $ac_n "(cached) $ac_c" 1>&6 2790 else 2791 if test -n "$ncn_cv_AS"; then 2792 ac_cv_prog_ncn_cv_AS="$ncn_cv_AS" # Let the user override the test. 2793 else 2794 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 2795 ac_dummy="$PATH" 2796 for ac_dir in $ac_dummy; do 2797 test -z "$ac_dir" && ac_dir=. 2798 if test -f $ac_dir/$ac_word; then 2799 ac_cv_prog_ncn_cv_AS="as" 2800 break 2801 fi 2802 done 2803 IFS="$ac_save_ifs" 2804 test -z "$ac_cv_prog_ncn_cv_AS" && ac_cv_prog_ncn_cv_AS="as" 2805 fi 2806 fi 2807 ncn_cv_AS="$ac_cv_prog_ncn_cv_AS" 2808 if test -n "$ncn_cv_AS"; then 2809 echo "$ac_t""$ncn_cv_AS" 1>&6 2810 else 2811 echo "$ac_t""no" 1>&6 2812 fi 2813 2814 AS=$ncn_cv_AS 2815 else 2816 AS="${ncn_tool_prefix}as" 2817 fi 2818 else 2819 AS="$ac_cv_prog_AS" 2820 fi 2821 2822 if test -n "$ncn_tool_prefix"; then 2823 # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args. 2824 set dummy ${ncn_tool_prefix}dlltool; ac_word=$2 2825 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2826 echo "configure:2827: checking for $ac_word" >&5 2827 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then 2828 echo $ac_n "(cached) $ac_c" 1>&6 2829 else 2830 if test -n "$DLLTOOL"; then 2831 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. 2832 else 2833 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 2834 ac_dummy="$PATH" 2835 for ac_dir in $ac_dummy; do 2836 test -z "$ac_dir" && ac_dir=. 2837 if test -f $ac_dir/$ac_word; then 2838 ac_cv_prog_DLLTOOL="${ncn_tool_prefix}dlltool" 2839 break 2840 fi 2841 done 2842 IFS="$ac_save_ifs" 2843 fi 2844 fi 2845 DLLTOOL="$ac_cv_prog_DLLTOOL" 2846 if test -n "$DLLTOOL"; then 2847 echo "$ac_t""$DLLTOOL" 1>&6 2848 else 2849 echo "$ac_t""no" 1>&6 2850 fi 2851 2852 fi 2853 if test -z "$ac_cv_prog_DLLTOOL" ; then 2854 if test $build = $host ; then 2855 ncn_cv_DLLTOOL=$DLLTOOL 2856 # Extract the first word of "dlltool", so it can be a program name with args. 2857 set dummy dlltool; ac_word=$2 2858 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2859 echo "configure:2860: checking for $ac_word" >&5 2860 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then 2861 echo $ac_n "(cached) $ac_c" 1>&6 2862 else 2863 if test -n "$ncn_cv_DLLTOOL"; then 2864 ac_cv_prog_ncn_cv_DLLTOOL="$ncn_cv_DLLTOOL" # Let the user override the test. 2865 else 2866 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 2867 ac_dummy="$PATH" 2868 for ac_dir in $ac_dummy; do 2869 test -z "$ac_dir" && ac_dir=. 2870 if test -f $ac_dir/$ac_word; then 2871 ac_cv_prog_ncn_cv_DLLTOOL="dlltool" 2872 break 2873 fi 2874 done 2875 IFS="$ac_save_ifs" 2876 test -z "$ac_cv_prog_ncn_cv_DLLTOOL" && ac_cv_prog_ncn_cv_DLLTOOL="dlltool" 2877 fi 2878 fi 2879 ncn_cv_DLLTOOL="$ac_cv_prog_ncn_cv_DLLTOOL" 2880 if test -n "$ncn_cv_DLLTOOL"; then 2881 echo "$ac_t""$ncn_cv_DLLTOOL" 1>&6 2882 else 2883 echo "$ac_t""no" 1>&6 2884 fi 2885 2886 DLLTOOL=$ncn_cv_DLLTOOL 2887 else 2888 DLLTOOL="${ncn_tool_prefix}dlltool" 2889 fi 2890 else 2891 DLLTOOL="$ac_cv_prog_DLLTOOL" 2892 fi 2893 2894 if test -n "$ncn_tool_prefix"; then 2895 # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args. 2896 set dummy ${ncn_tool_prefix}ld; ac_word=$2 2897 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2898 echo "configure:2899: checking for $ac_word" >&5 2899 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then 2900 echo $ac_n "(cached) $ac_c" 1>&6 2901 else 2902 if test -n "$LD"; then 2903 ac_cv_prog_LD="$LD" # Let the user override the test. 2904 else 2905 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 2906 ac_dummy="$PATH" 2907 for ac_dir in $ac_dummy; do 2908 test -z "$ac_dir" && ac_dir=. 2909 if test -f $ac_dir/$ac_word; then 2910 ac_cv_prog_LD="${ncn_tool_prefix}ld" 2911 break 2912 fi 2913 done 2914 IFS="$ac_save_ifs" 2915 fi 2916 fi 2917 LD="$ac_cv_prog_LD" 2918 if test -n "$LD"; then 2919 echo "$ac_t""$LD" 1>&6 2920 else 2921 echo "$ac_t""no" 1>&6 2922 fi 2923 2924 fi 2925 if test -z "$ac_cv_prog_LD" ; then 2926 if test $build = $host ; then 2927 ncn_cv_LD=$LD 2928 # Extract the first word of "ld", so it can be a program name with args. 2929 set dummy ld; ac_word=$2 2930 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2931 echo "configure:2932: checking for $ac_word" >&5 2932 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then 2933 echo $ac_n "(cached) $ac_c" 1>&6 2934 else 2935 if test -n "$ncn_cv_LD"; then 2936 ac_cv_prog_ncn_cv_LD="$ncn_cv_LD" # Let the user override the test. 2937 else 2938 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 2939 ac_dummy="$PATH" 2940 for ac_dir in $ac_dummy; do 2941 test -z "$ac_dir" && ac_dir=. 2942 if test -f $ac_dir/$ac_word; then 2943 ac_cv_prog_ncn_cv_LD="ld" 2944 break 2945 fi 2946 done 2947 IFS="$ac_save_ifs" 2948 test -z "$ac_cv_prog_ncn_cv_LD" && ac_cv_prog_ncn_cv_LD="ld" 2949 fi 2950 fi 2951 ncn_cv_LD="$ac_cv_prog_ncn_cv_LD" 2952 if test -n "$ncn_cv_LD"; then 2953 echo "$ac_t""$ncn_cv_LD" 1>&6 2954 else 2955 echo "$ac_t""no" 1>&6 2956 fi 2957 2958 LD=$ncn_cv_LD 2959 else 2960 LD="${ncn_tool_prefix}ld" 2961 fi 2962 else 2963 LD="$ac_cv_prog_LD" 2964 fi 2965 2966 if test -n "$ncn_tool_prefix"; then 2967 # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args. 2968 set dummy ${ncn_tool_prefix}nm; ac_word=$2 2969 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2970 echo "configure:2971: checking for $ac_word" >&5 2971 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then 2972 echo $ac_n "(cached) $ac_c" 1>&6 2973 else 2974 if test -n "$NM"; then 2975 ac_cv_prog_NM="$NM" # Let the user override the test. 2976 else 2977 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 2978 ac_dummy="$PATH" 2979 for ac_dir in $ac_dummy; do 2980 test -z "$ac_dir" && ac_dir=. 2981 if test -f $ac_dir/$ac_word; then 2982 ac_cv_prog_NM="${ncn_tool_prefix}nm" 2983 break 2984 fi 2985 done 2986 IFS="$ac_save_ifs" 2987 fi 2988 fi 2989 NM="$ac_cv_prog_NM" 2990 if test -n "$NM"; then 2991 echo "$ac_t""$NM" 1>&6 2992 else 2993 echo "$ac_t""no" 1>&6 2994 fi 2995 2996 fi 2997 if test -z "$ac_cv_prog_NM" ; then 2998 if test $build = $host ; then 2999 ncn_cv_NM=$NM 3000 # Extract the first word of "nm", so it can be a program name with args. 3001 set dummy nm; ac_word=$2 3002 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3003 echo "configure:3004: checking for $ac_word" >&5 3004 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then 3005 echo $ac_n "(cached) $ac_c" 1>&6 3006 else 3007 if test -n "$ncn_cv_NM"; then 3008 ac_cv_prog_ncn_cv_NM="$ncn_cv_NM" # Let the user override the test. 3009 else 3010 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3011 ac_dummy="$PATH" 3012 for ac_dir in $ac_dummy; do 3013 test -z "$ac_dir" && ac_dir=. 3014 if test -f $ac_dir/$ac_word; then 3015 ac_cv_prog_ncn_cv_NM="nm" 3016 break 3017 fi 3018 done 3019 IFS="$ac_save_ifs" 3020 test -z "$ac_cv_prog_ncn_cv_NM" && ac_cv_prog_ncn_cv_NM="nm" 3021 fi 3022 fi 3023 ncn_cv_NM="$ac_cv_prog_ncn_cv_NM" 3024 if test -n "$ncn_cv_NM"; then 3025 echo "$ac_t""$ncn_cv_NM" 1>&6 3026 else 3027 echo "$ac_t""no" 1>&6 3028 fi 3029 3030 NM=$ncn_cv_NM 3031 else 3032 NM="${ncn_tool_prefix}nm" 3033 fi 3034 else 3035 NM="$ac_cv_prog_NM" 3036 fi 3037 3038 if test -n "$ncn_tool_prefix"; then 3039 # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args. 3040 set dummy ${ncn_tool_prefix}ranlib; ac_word=$2 3041 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3042 echo "configure:3043: checking for $ac_word" >&5 3043 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 3044 echo $ac_n "(cached) $ac_c" 1>&6 3045 else 3046 if test -n "$RANLIB"; then 3047 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 3048 else 3049 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3050 ac_dummy="$PATH" 3051 for ac_dir in $ac_dummy; do 3052 test -z "$ac_dir" && ac_dir=. 3053 if test -f $ac_dir/$ac_word; then 3054 ac_cv_prog_RANLIB="${ncn_tool_prefix}ranlib" 3055 break 3056 fi 3057 done 3058 IFS="$ac_save_ifs" 3059 fi 3060 fi 3061 RANLIB="$ac_cv_prog_RANLIB" 3062 if test -n "$RANLIB"; then 3063 echo "$ac_t""$RANLIB" 1>&6 3064 else 3065 echo "$ac_t""no" 1>&6 3066 fi 3067 3068 fi 3069 if test -z "$ac_cv_prog_RANLIB" ; then 3070 if test $build = $host ; then 3071 ncn_cv_RANLIB=$RANLIB 3072 # Extract the first word of "ranlib", so it can be a program name with args. 3073 set dummy ranlib; ac_word=$2 3074 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3075 echo "configure:3076: checking for $ac_word" >&5 3076 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then 3077 echo $ac_n "(cached) $ac_c" 1>&6 3078 else 3079 if test -n "$ncn_cv_RANLIB"; then 3080 ac_cv_prog_ncn_cv_RANLIB="$ncn_cv_RANLIB" # Let the user override the test. 3081 else 3082 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3083 ac_dummy="$PATH" 3084 for ac_dir in $ac_dummy; do 3085 test -z "$ac_dir" && ac_dir=. 3086 if test -f $ac_dir/$ac_word; then 3087 ac_cv_prog_ncn_cv_RANLIB="ranlib" 3088 break 3089 fi 3090 done 3091 IFS="$ac_save_ifs" 3092 test -z "$ac_cv_prog_ncn_cv_RANLIB" && ac_cv_prog_ncn_cv_RANLIB=":" 3093 fi 3094 fi 3095 ncn_cv_RANLIB="$ac_cv_prog_ncn_cv_RANLIB" 3096 if test -n "$ncn_cv_RANLIB"; then 3097 echo "$ac_t""$ncn_cv_RANLIB" 1>&6 3098 else 3099 echo "$ac_t""no" 1>&6 3100 fi 3101 3102 RANLIB=$ncn_cv_RANLIB 3103 else 3104 RANLIB=":" 3105 fi 3106 else 3107 RANLIB="$ac_cv_prog_RANLIB" 3108 fi 3109 3110 if test -n "$ncn_tool_prefix"; then 3111 # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args. 3112 set dummy ${ncn_tool_prefix}windres; ac_word=$2 3113 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3114 echo "configure:3115: checking for $ac_word" >&5 3115 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then 3116 echo $ac_n "(cached) $ac_c" 1>&6 3117 else 3118 if test -n "$WINDRES"; then 3119 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. 3120 else 3121 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3122 ac_dummy="$PATH" 3123 for ac_dir in $ac_dummy; do 3124 test -z "$ac_dir" && ac_dir=. 3125 if test -f $ac_dir/$ac_word; then 3126 ac_cv_prog_WINDRES="${ncn_tool_prefix}windres" 3127 break 3128 fi 3129 done 3130 IFS="$ac_save_ifs" 3131 fi 3132 fi 3133 WINDRES="$ac_cv_prog_WINDRES" 3134 if test -n "$WINDRES"; then 3135 echo "$ac_t""$WINDRES" 1>&6 3136 else 3137 echo "$ac_t""no" 1>&6 3138 fi 3139 3140 fi 3141 if test -z "$ac_cv_prog_WINDRES" ; then 3142 if test $build = $host ; then 3143 ncn_cv_WINDRES=$WINDRES 3144 # Extract the first word of "windres", so it can be a program name with args. 3145 set dummy windres; ac_word=$2 3146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3147 echo "configure:3148: checking for $ac_word" >&5 3148 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then 3149 echo $ac_n "(cached) $ac_c" 1>&6 3150 else 3151 if test -n "$ncn_cv_WINDRES"; then 3152 ac_cv_prog_ncn_cv_WINDRES="$ncn_cv_WINDRES" # Let the user override the test. 3153 else 3154 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3155 ac_dummy="$PATH" 3156 for ac_dir in $ac_dummy; do 3157 test -z "$ac_dir" && ac_dir=. 3158 if test -f $ac_dir/$ac_word; then 3159 ac_cv_prog_ncn_cv_WINDRES="windres" 3160 break 3161 fi 3162 done 3163 IFS="$ac_save_ifs" 3164 test -z "$ac_cv_prog_ncn_cv_WINDRES" && ac_cv_prog_ncn_cv_WINDRES="windres" 3165 fi 3166 fi 3167 ncn_cv_WINDRES="$ac_cv_prog_ncn_cv_WINDRES" 3168 if test -n "$ncn_cv_WINDRES"; then 3169 echo "$ac_t""$ncn_cv_WINDRES" 1>&6 3170 else 3171 echo "$ac_t""no" 1>&6 3172 fi 3173 3174 WINDRES=$ncn_cv_WINDRES 3175 else 3176 WINDRES="${ncn_tool_prefix}windres" 3177 fi 3178 else 3179 WINDRES="$ac_cv_prog_WINDRES" 3180 fi 3181 3182 if test -n "$ncn_tool_prefix"; then 3183 # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args. 3184 set dummy ${ncn_tool_prefix}objcopy; ac_word=$2 3185 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3186 echo "configure:3187: checking for $ac_word" >&5 3187 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then 3188 echo $ac_n "(cached) $ac_c" 1>&6 3189 else 3190 if test -n "$OBJCOPY"; then 3191 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. 3192 else 3193 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3194 ac_dummy="$PATH" 3195 for ac_dir in $ac_dummy; do 3196 test -z "$ac_dir" && ac_dir=. 3197 if test -f $ac_dir/$ac_word; then 3198 ac_cv_prog_OBJCOPY="${ncn_tool_prefix}objcopy" 3199 break 3200 fi 3201 done 3202 IFS="$ac_save_ifs" 3203 fi 3204 fi 3205 OBJCOPY="$ac_cv_prog_OBJCOPY" 3206 if test -n "$OBJCOPY"; then 3207 echo "$ac_t""$OBJCOPY" 1>&6 3208 else 3209 echo "$ac_t""no" 1>&6 3210 fi 3211 3212 fi 3213 if test -z "$ac_cv_prog_OBJCOPY" ; then 3214 if test $build = $host ; then 3215 ncn_cv_OBJCOPY=$OBJCOPY 3216 # Extract the first word of "objcopy", so it can be a program name with args. 3217 set dummy objcopy; ac_word=$2 3218 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3219 echo "configure:3220: checking for $ac_word" >&5 3220 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then 3221 echo $ac_n "(cached) $ac_c" 1>&6 3222 else 3223 if test -n "$ncn_cv_OBJCOPY"; then 3224 ac_cv_prog_ncn_cv_OBJCOPY="$ncn_cv_OBJCOPY" # Let the user override the test. 3225 else 3226 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3227 ac_dummy="$PATH" 3228 for ac_dir in $ac_dummy; do 3229 test -z "$ac_dir" && ac_dir=. 3230 if test -f $ac_dir/$ac_word; then 3231 ac_cv_prog_ncn_cv_OBJCOPY="objcopy" 3232 break 3233 fi 3234 done 3235 IFS="$ac_save_ifs" 3236 test -z "$ac_cv_prog_ncn_cv_OBJCOPY" && ac_cv_prog_ncn_cv_OBJCOPY="objcopy" 3237 fi 3238 fi 3239 ncn_cv_OBJCOPY="$ac_cv_prog_ncn_cv_OBJCOPY" 3240 if test -n "$ncn_cv_OBJCOPY"; then 3241 echo "$ac_t""$ncn_cv_OBJCOPY" 1>&6 3242 else 3243 echo "$ac_t""no" 1>&6 3244 fi 3245 3246 OBJCOPY=$ncn_cv_OBJCOPY 3247 else 3248 OBJCOPY="${ncn_tool_prefix}objcopy" 3249 fi 3250 else 3251 OBJCOPY="$ac_cv_prog_OBJCOPY" 3252 fi 3253 3254 if test -n "$ncn_tool_prefix"; then 3255 # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args. 3256 set dummy ${ncn_tool_prefix}objdump; ac_word=$2 3257 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3258 echo "configure:3259: checking for $ac_word" >&5 3259 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then 3260 echo $ac_n "(cached) $ac_c" 1>&6 3261 else 3262 if test -n "$OBJDUMP"; then 3263 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. 3264 else 3265 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3266 ac_dummy="$PATH" 3267 for ac_dir in $ac_dummy; do 3268 test -z "$ac_dir" && ac_dir=. 3269 if test -f $ac_dir/$ac_word; then 3270 ac_cv_prog_OBJDUMP="${ncn_tool_prefix}objdump" 3271 break 3272 fi 3273 done 3274 IFS="$ac_save_ifs" 3275 fi 3276 fi 3277 OBJDUMP="$ac_cv_prog_OBJDUMP" 3278 if test -n "$OBJDUMP"; then 3279 echo "$ac_t""$OBJDUMP" 1>&6 3280 else 3281 echo "$ac_t""no" 1>&6 3282 fi 3283 3284 fi 3285 if test -z "$ac_cv_prog_OBJDUMP" ; then 3286 if test $build = $host ; then 3287 ncn_cv_OBJDUMP=$OBJDUMP 3288 # Extract the first word of "objdump", so it can be a program name with args. 3289 set dummy objdump; ac_word=$2 3290 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3291 echo "configure:3292: checking for $ac_word" >&5 3292 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then 3293 echo $ac_n "(cached) $ac_c" 1>&6 3294 else 3295 if test -n "$ncn_cv_OBJDUMP"; then 3296 ac_cv_prog_ncn_cv_OBJDUMP="$ncn_cv_OBJDUMP" # Let the user override the test. 3297 else 3298 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3299 ac_dummy="$PATH" 3300 for ac_dir in $ac_dummy; do 3301 test -z "$ac_dir" && ac_dir=. 3302 if test -f $ac_dir/$ac_word; then 3303 ac_cv_prog_ncn_cv_OBJDUMP="objdump" 3304 break 3305 fi 3306 done 3307 IFS="$ac_save_ifs" 3308 test -z "$ac_cv_prog_ncn_cv_OBJDUMP" && ac_cv_prog_ncn_cv_OBJDUMP="objdump" 3309 fi 3310 fi 3311 ncn_cv_OBJDUMP="$ac_cv_prog_ncn_cv_OBJDUMP" 3312 if test -n "$ncn_cv_OBJDUMP"; then 3313 echo "$ac_t""$ncn_cv_OBJDUMP" 1>&6 3314 else 3315 echo "$ac_t""no" 1>&6 3316 fi 3317 3318 OBJDUMP=$ncn_cv_OBJDUMP 3319 else 3320 OBJDUMP="${ncn_tool_prefix}objdump" 3321 fi 3322 else 3323 OBJDUMP="$ac_cv_prog_OBJDUMP" 3324 fi 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 # Target tools. 3335 if test -n "$ncn_target_tool_prefix"; then 3336 # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args. 3337 set dummy ${ncn_target_tool_prefix}ar; ac_word=$2 3338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3339 echo "configure:3340: checking for $ac_word" >&5 3340 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then 3341 echo $ac_n "(cached) $ac_c" 1>&6 3342 else 3343 if test -n "$AR_FOR_TARGET"; then 3344 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test. 3345 else 3346 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3347 ac_dummy="$PATH" 3348 for ac_dir in $ac_dummy; do 3349 test -z "$ac_dir" && ac_dir=. 3350 if test -f $ac_dir/$ac_word; then 3351 ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}ar" 3352 break 3353 fi 3354 done 3355 IFS="$ac_save_ifs" 3356 fi 3357 fi 3358 AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET" 3359 if test -n "$AR_FOR_TARGET"; then 3360 echo "$ac_t""$AR_FOR_TARGET" 1>&6 3361 else 3362 echo "$ac_t""no" 1>&6 3363 fi 3364 3365 fi 3366 if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then 3367 if test $build = $target ; then 3368 ncn_cv_AR_FOR_TARGET=$AR_FOR_TARGET 3369 # Extract the first word of "ar", so it can be a program name with args. 3370 set dummy ar; ac_word=$2 3371 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3372 echo "configure:3373: checking for $ac_word" >&5 3373 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then 3374 echo $ac_n "(cached) $ac_c" 1>&6 3375 else 3376 if test -n "$ncn_cv_AR_FOR_TARGET"; then 3377 ac_cv_prog_ncn_cv_AR_FOR_TARGET="$ncn_cv_AR_FOR_TARGET" # Let the user override the test. 3378 else 3379 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3380 ac_dummy="$PATH" 3381 for ac_dir in $ac_dummy; do 3382 test -z "$ac_dir" && ac_dir=. 3383 if test -f $ac_dir/$ac_word; then 3384 ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar" 3385 break 3386 fi 3387 done 3388 IFS="$ac_save_ifs" 3389 test -z "$ac_cv_prog_ncn_cv_AR_FOR_TARGET" && ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar" 3390 fi 3391 fi 3392 ncn_cv_AR_FOR_TARGET="$ac_cv_prog_ncn_cv_AR_FOR_TARGET" 3393 if test -n "$ncn_cv_AR_FOR_TARGET"; then 3394 echo "$ac_t""$ncn_cv_AR_FOR_TARGET" 1>&6 3395 else 3396 echo "$ac_t""no" 1>&6 3397 fi 3398 3399 AR_FOR_TARGET=$ncn_cv_AR_FOR_TARGET 3400 else 3401 AR_FOR_TARGET="${ncn_target_tool_prefix}ar" 3402 fi 3403 else 3404 AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET" 3405 fi 3406 3407 if test -n "$ncn_target_tool_prefix"; then 3408 # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args. 3409 set dummy ${ncn_target_tool_prefix}as; ac_word=$2 3410 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3411 echo "configure:3412: checking for $ac_word" >&5 3412 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then 3413 echo $ac_n "(cached) $ac_c" 1>&6 3414 else 3415 if test -n "$AS_FOR_TARGET"; then 3416 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test. 3417 else 3418 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3419 ac_dummy="$PATH" 3420 for ac_dir in $ac_dummy; do 3421 test -z "$ac_dir" && ac_dir=. 3422 if test -f $ac_dir/$ac_word; then 3423 ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}as" 3424 break 3425 fi 3426 done 3427 IFS="$ac_save_ifs" 3428 fi 3429 fi 3430 AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET" 3431 if test -n "$AS_FOR_TARGET"; then 3432 echo "$ac_t""$AS_FOR_TARGET" 1>&6 3433 else 3434 echo "$ac_t""no" 1>&6 3435 fi 3436 3437 fi 3438 if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then 3439 if test $build = $target ; then 3440 ncn_cv_AS_FOR_TARGET=$AS_FOR_TARGET 3441 # Extract the first word of "as", so it can be a program name with args. 3442 set dummy as; ac_word=$2 3443 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3444 echo "configure:3445: checking for $ac_word" >&5 3445 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then 3446 echo $ac_n "(cached) $ac_c" 1>&6 3447 else 3448 if test -n "$ncn_cv_AS_FOR_TARGET"; then 3449 ac_cv_prog_ncn_cv_AS_FOR_TARGET="$ncn_cv_AS_FOR_TARGET" # Let the user override the test. 3450 else 3451 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3452 ac_dummy="$PATH" 3453 for ac_dir in $ac_dummy; do 3454 test -z "$ac_dir" && ac_dir=. 3455 if test -f $ac_dir/$ac_word; then 3456 ac_cv_prog_ncn_cv_AS_FOR_TARGET="as" 3457 break 3458 fi 3459 done 3460 IFS="$ac_save_ifs" 3461 test -z "$ac_cv_prog_ncn_cv_AS_FOR_TARGET" && ac_cv_prog_ncn_cv_AS_FOR_TARGET="as" 3462 fi 3463 fi 3464 ncn_cv_AS_FOR_TARGET="$ac_cv_prog_ncn_cv_AS_FOR_TARGET" 3465 if test -n "$ncn_cv_AS_FOR_TARGET"; then 3466 echo "$ac_t""$ncn_cv_AS_FOR_TARGET" 1>&6 3467 else 3468 echo "$ac_t""no" 1>&6 3469 fi 3470 3471 AS_FOR_TARGET=$ncn_cv_AS_FOR_TARGET 3472 else 3473 AS_FOR_TARGET="${ncn_target_tool_prefix}as" 3474 fi 3475 else 3476 AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET" 3477 fi 3478 3479 if test -n "$ncn_target_tool_prefix"; then 3480 # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args. 3481 set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2 3482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3483 echo "configure:3484: checking for $ac_word" >&5 3484 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then 3485 echo $ac_n "(cached) $ac_c" 1>&6 3486 else 3487 if test -n "$DLLTOOL_FOR_TARGET"; then 3488 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test. 3489 else 3490 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3491 ac_dummy="$PATH" 3492 for ac_dir in $ac_dummy; do 3493 test -z "$ac_dir" && ac_dir=. 3494 if test -f $ac_dir/$ac_word; then 3495 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool" 3496 break 3497 fi 3498 done 3499 IFS="$ac_save_ifs" 3500 fi 3501 fi 3502 DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET" 3503 if test -n "$DLLTOOL_FOR_TARGET"; then 3504 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6 3505 else 3506 echo "$ac_t""no" 1>&6 3507 fi 3508 3509 fi 3510 if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then 3511 if test $build = $target ; then 3512 ncn_cv_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET 3513 # Extract the first word of "dlltool", so it can be a program name with args. 3514 set dummy dlltool; ac_word=$2 3515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3516 echo "configure:3517: checking for $ac_word" >&5 3517 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then 3518 echo $ac_n "(cached) $ac_c" 1>&6 3519 else 3520 if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then 3521 ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="$ncn_cv_DLLTOOL_FOR_TARGET" # Let the user override the test. 3522 else 3523 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3524 ac_dummy="$PATH" 3525 for ac_dir in $ac_dummy; do 3526 test -z "$ac_dir" && ac_dir=. 3527 if test -f $ac_dir/$ac_word; then 3528 ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool" 3529 break 3530 fi 3531 done 3532 IFS="$ac_save_ifs" 3533 test -z "$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET" && ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool" 3534 fi 3535 fi 3536 ncn_cv_DLLTOOL_FOR_TARGET="$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET" 3537 if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then 3538 echo "$ac_t""$ncn_cv_DLLTOOL_FOR_TARGET" 1>&6 3539 else 3540 echo "$ac_t""no" 1>&6 3541 fi 3542 3543 DLLTOOL_FOR_TARGET=$ncn_cv_DLLTOOL_FOR_TARGET 3544 else 3545 DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool" 3546 fi 3547 else 3548 DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET" 3549 fi 3550 3551 if test -n "$ncn_target_tool_prefix"; then 3552 # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args. 3553 set dummy ${ncn_target_tool_prefix}ld; ac_word=$2 3554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3555 echo "configure:3556: checking for $ac_word" >&5 3556 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then 3557 echo $ac_n "(cached) $ac_c" 1>&6 3558 else 3559 if test -n "$LD_FOR_TARGET"; then 3560 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test. 3561 else 3562 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3563 ac_dummy="$PATH" 3564 for ac_dir in $ac_dummy; do 3565 test -z "$ac_dir" && ac_dir=. 3566 if test -f $ac_dir/$ac_word; then 3567 ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}ld" 3568 break 3569 fi 3570 done 3571 IFS="$ac_save_ifs" 3572 fi 3573 fi 3574 LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET" 3575 if test -n "$LD_FOR_TARGET"; then 3576 echo "$ac_t""$LD_FOR_TARGET" 1>&6 3577 else 3578 echo "$ac_t""no" 1>&6 3579 fi 3580 3581 fi 3582 if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then 3583 if test $build = $target ; then 3584 ncn_cv_LD_FOR_TARGET=$LD_FOR_TARGET 3585 # Extract the first word of "ld", so it can be a program name with args. 3586 set dummy ld; ac_word=$2 3587 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3588 echo "configure:3589: checking for $ac_word" >&5 3589 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then 3590 echo $ac_n "(cached) $ac_c" 1>&6 3591 else 3592 if test -n "$ncn_cv_LD_FOR_TARGET"; then 3593 ac_cv_prog_ncn_cv_LD_FOR_TARGET="$ncn_cv_LD_FOR_TARGET" # Let the user override the test. 3594 else 3595 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3596 ac_dummy="$PATH" 3597 for ac_dir in $ac_dummy; do 3598 test -z "$ac_dir" && ac_dir=. 3599 if test -f $ac_dir/$ac_word; then 3600 ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld" 3601 break 3602 fi 3603 done 3604 IFS="$ac_save_ifs" 3605 test -z "$ac_cv_prog_ncn_cv_LD_FOR_TARGET" && ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld" 3606 fi 3607 fi 3608 ncn_cv_LD_FOR_TARGET="$ac_cv_prog_ncn_cv_LD_FOR_TARGET" 3609 if test -n "$ncn_cv_LD_FOR_TARGET"; then 3610 echo "$ac_t""$ncn_cv_LD_FOR_TARGET" 1>&6 3611 else 3612 echo "$ac_t""no" 1>&6 3613 fi 3614 3615 LD_FOR_TARGET=$ncn_cv_LD_FOR_TARGET 3616 else 3617 LD_FOR_TARGET="${ncn_target_tool_prefix}ld" 3618 fi 3619 else 3620 LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET" 3621 fi 3622 3623 if test -n "$ncn_target_tool_prefix"; then 3624 # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args. 3625 set dummy ${ncn_target_tool_prefix}nm; ac_word=$2 3626 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3627 echo "configure:3628: checking for $ac_word" >&5 3628 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then 3629 echo $ac_n "(cached) $ac_c" 1>&6 3630 else 3631 if test -n "$NM_FOR_TARGET"; then 3632 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test. 3633 else 3634 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3635 ac_dummy="$PATH" 3636 for ac_dir in $ac_dummy; do 3637 test -z "$ac_dir" && ac_dir=. 3638 if test -f $ac_dir/$ac_word; then 3639 ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}nm" 3640 break 3641 fi 3642 done 3643 IFS="$ac_save_ifs" 3644 fi 3645 fi 3646 NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET" 3647 if test -n "$NM_FOR_TARGET"; then 3648 echo "$ac_t""$NM_FOR_TARGET" 1>&6 3649 else 3650 echo "$ac_t""no" 1>&6 3651 fi 3652 3653 fi 3654 if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then 3655 if test $build = $target ; then 3656 ncn_cv_NM_FOR_TARGET=$NM_FOR_TARGET 3657 # Extract the first word of "nm", so it can be a program name with args. 3658 set dummy nm; ac_word=$2 3659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3660 echo "configure:3661: checking for $ac_word" >&5 3661 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then 3662 echo $ac_n "(cached) $ac_c" 1>&6 3663 else 3664 if test -n "$ncn_cv_NM_FOR_TARGET"; then 3665 ac_cv_prog_ncn_cv_NM_FOR_TARGET="$ncn_cv_NM_FOR_TARGET" # Let the user override the test. 3666 else 3667 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3668 ac_dummy="$PATH" 3669 for ac_dir in $ac_dummy; do 3670 test -z "$ac_dir" && ac_dir=. 3671 if test -f $ac_dir/$ac_word; then 3672 ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm" 3673 break 3674 fi 3675 done 3676 IFS="$ac_save_ifs" 3677 test -z "$ac_cv_prog_ncn_cv_NM_FOR_TARGET" && ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm" 3678 fi 3679 fi 3680 ncn_cv_NM_FOR_TARGET="$ac_cv_prog_ncn_cv_NM_FOR_TARGET" 3681 if test -n "$ncn_cv_NM_FOR_TARGET"; then 3682 echo "$ac_t""$ncn_cv_NM_FOR_TARGET" 1>&6 3683 else 3684 echo "$ac_t""no" 1>&6 3685 fi 3686 3687 NM_FOR_TARGET=$ncn_cv_NM_FOR_TARGET 3688 else 3689 NM_FOR_TARGET="${ncn_target_tool_prefix}nm" 3690 fi 3691 else 3692 NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET" 3693 fi 3694 3695 if test -n "$ncn_target_tool_prefix"; then 3696 # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args. 3697 set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2 3698 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3699 echo "configure:3700: checking for $ac_word" >&5 3700 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then 3701 echo $ac_n "(cached) $ac_c" 1>&6 3702 else 3703 if test -n "$RANLIB_FOR_TARGET"; then 3704 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test. 3705 else 3706 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3707 ac_dummy="$PATH" 3708 for ac_dir in $ac_dummy; do 3709 test -z "$ac_dir" && ac_dir=. 3710 if test -f $ac_dir/$ac_word; then 3711 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}ranlib" 3712 break 3713 fi 3714 done 3715 IFS="$ac_save_ifs" 3716 fi 3717 fi 3718 RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET" 3719 if test -n "$RANLIB_FOR_TARGET"; then 3720 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6 3721 else 3722 echo "$ac_t""no" 1>&6 3723 fi 3724 3725 fi 3726 if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then 3727 if test $build = $target ; then 3728 ncn_cv_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET 3729 # Extract the first word of "ranlib", so it can be a program name with args. 3730 set dummy ranlib; ac_word=$2 3731 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3732 echo "configure:3733: checking for $ac_word" >&5 3733 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then 3734 echo $ac_n "(cached) $ac_c" 1>&6 3735 else 3736 if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then 3737 ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="$ncn_cv_RANLIB_FOR_TARGET" # Let the user override the test. 3738 else 3739 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3740 ac_dummy="$PATH" 3741 for ac_dir in $ac_dummy; do 3742 test -z "$ac_dir" && ac_dir=. 3743 if test -f $ac_dir/$ac_word; then 3744 ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="ranlib" 3745 break 3746 fi 3747 done 3748 IFS="$ac_save_ifs" 3749 test -z "$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET" && ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET=":" 3750 fi 3751 fi 3752 ncn_cv_RANLIB_FOR_TARGET="$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET" 3753 if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then 3754 echo "$ac_t""$ncn_cv_RANLIB_FOR_TARGET" 1>&6 3755 else 3756 echo "$ac_t""no" 1>&6 3757 fi 3758 3759 RANLIB_FOR_TARGET=$ncn_cv_RANLIB_FOR_TARGET 3760 else 3761 RANLIB_FOR_TARGET=":" 3762 fi 3763 else 3764 RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET" 3765 fi 3766 3767 if test -n "$ncn_target_tool_prefix"; then 3768 # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args. 3769 set dummy ${ncn_target_tool_prefix}windres; ac_word=$2 3770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3771 echo "configure:3772: checking for $ac_word" >&5 3772 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then 3773 echo $ac_n "(cached) $ac_c" 1>&6 3774 else 3775 if test -n "$WINDRES_FOR_TARGET"; then 3776 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test. 3777 else 3778 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3779 ac_dummy="$PATH" 3780 for ac_dir in $ac_dummy; do 3781 test -z "$ac_dir" && ac_dir=. 3782 if test -f $ac_dir/$ac_word; then 3783 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres" 3784 break 3785 fi 3786 done 3787 IFS="$ac_save_ifs" 3788 fi 3789 fi 3790 WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET" 3791 if test -n "$WINDRES_FOR_TARGET"; then 3792 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6 3793 else 3794 echo "$ac_t""no" 1>&6 3795 fi 3796 3797 fi 3798 if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then 3799 if test $build = $target ; then 3800 ncn_cv_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET 3801 # Extract the first word of "windres", so it can be a program name with args. 3802 set dummy windres; ac_word=$2 3803 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 3804 echo "configure:3805: checking for $ac_word" >&5 3805 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then 3806 echo $ac_n "(cached) $ac_c" 1>&6 3807 else 3808 if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then 3809 ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="$ncn_cv_WINDRES_FOR_TARGET" # Let the user override the test. 3810 else 3811 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 3812 ac_dummy="$PATH" 3813 for ac_dir in $ac_dummy; do 3814 test -z "$ac_dir" && ac_dir=. 3815 if test -f $ac_dir/$ac_word; then 3816 ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres" 3817 break 3818 fi 3819 done 3820 IFS="$ac_save_ifs" 3821 test -z "$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET" && ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres" 3822 fi 3823 fi 3824 ncn_cv_WINDRES_FOR_TARGET="$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET" 3825 if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then 3826 echo "$ac_t""$ncn_cv_WINDRES_FOR_TARGET" 1>&6 3827 else 3828 echo "$ac_t""no" 1>&6 3829 fi 3830 3831 WINDRES_FOR_TARGET=$ncn_cv_WINDRES_FOR_TARGET 3832 else 3833 WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres" 3834 fi 3835 else 3836 WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET" 3837 fi 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 # Fix up target tools. 3850 if test "x${build}" = "x${host}" ; then 3851 # In this case, the newly built tools can and should be used, 3852 # so we override the results of the autoconf tests. 3853 # This should really only happen when the tools are actually being built, 3854 # but that's a further refinement. The new build scheme, where 3855 # tools are built into a structure paralleling where they're installed, 3856 # should also eliminate all of this cleanly. 3857 AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)" 3858 AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)" 3859 DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)" 3860 LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)" 3861 NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)" 3862 RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)" 3863 WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)" 3864 fi 3865 # Certain tools may need extra flags. 3866 AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target} 3867 RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target} 3868 NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target} 3869 3870 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 3871 echo "configure:3872: checking whether to enable maintainer-specific portions of Makefiles" >&5 3872 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. 3873 if test "${enable_maintainer_mode+set}" = set; then 3874 enableval="$enable_maintainer_mode" 3875 USE_MAINTAINER_MODE=$enableval 3876 else 3877 USE_MAINTAINER_MODE=no 3878 fi 3879 3880 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 3881 3882 3883 if test "$USE_MAINTAINER_MODE" = yes; then 3884 MAINTAINER_MODE_TRUE= 3885 MAINTAINER_MODE_FALSE='#' 3886 else 3887 MAINTAINER_MODE_TRUE='#' 3888 MAINTAINER_MODE_FALSE= 3889 fi 3890 MAINT=$MAINTAINER_MODE_TRUE 3891 3892 trap '' 1 2 15 3893 cat > confcache <<\EOF 3894 # This file is a shell script that caches the results of configure 3895 # tests run on this system so they can be shared between configure 3896 # scripts and configure runs. It is not useful on other systems. 3897 # If it contains results you don't want to keep, you may remove or edit it. 3898 # 3899 # By default, configure uses ./config.cache as the cache file, 3900 # creating it if it does not exist already. You can give configure 3901 # the --cache-file=FILE option to use a different cache file; that is 3902 # what configure does when it calls configure scripts in 3903 # subdirectories, so they share the cache. 3904 # Giving --cache-file=/dev/null disables caching, for debugging configure. 3905 # config.status only pays attention to the cache file if you give it the 3906 # --recheck option to rerun configure. 3907 # 1179 3908 EOF 1180 ;; 1181 esac 1182 fi 1183 1184 # Install a makefile, and make it set VPATH 1185 # if necessary so that the sources are found. 1186 # Also change its value of srcdir. 1187 # NOTE: Makefile generation constitutes the majority of the time in configure. Hence, this section has 1188 # been somewhat optimized and is perhaps a bit twisty. 1189 1190 # code is order so as to try to sed the smallest input files we know. 1191 # so do these separately because I don't trust the order of sed -e expressions. 1192 1193 # the five makefile fragments MUST end up in the resulting Makefile in this order: 1194 # package macros, target, host, site, and package rules. 1195 1196 if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then 1197 1198 # Conditionalize the makefile for this package from "Makefile.in" (or whatever it's called) into Makefile.tem. 1199 rm -f ${subdir}/${Makefile}.tem 1200 case "${package_makefile_rules_frag}" in 1201 "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;; 1202 *) 1203 if [ ! -f ${package_makefile_rules_frag} ] ; then 1204 package_makefile_rules_frag=${srcdir}/${package_makefile_rules_frag} 1205 fi 1206 if [ -f ${package_makefile_rules_frag} ] ; then 1207 sed -e "/^####/ r ${package_makefile_rules_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem 1208 else 1209 echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2 1210 echo '***' is missing in ${PWD=`pwd`}. 1>&2 1211 cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem 1212 fi 1213 esac 1214 # working copy now in ${Makefile}.tem 1215 1216 # Conditionalize for this site. 1217 rm -f ${Makefile} 1218 case "${site}" in 1219 "") mv ${subdir}/Makefile.tem ${Makefile} ;; 1220 *) 1221 site_makefile_frag=${srcdir}/config/ms-${site} 1222 1223 if [ -f ${site_makefile_frag} ] ; then 1224 sed -e "/^####/ r ${site_makefile_frag}" ${subdir}/Makefile.tem \ 1225 > ${Makefile} 1226 else 1227 mv ${subdir}/Makefile.tem ${Makefile} 1228 site_makefile_frag= 1229 fi 1230 ;; 1231 esac 1232 # working copy now in ${Makefile} 1233 1234 # Conditionalize the makefile for this host. 1235 rm -f ${subdir}/Makefile.tem 1236 case "${host_makefile_frag}" in 1237 "") mv ${Makefile} ${subdir}/Makefile.tem ;; 1238 *) 1239 if [ ! -f ${host_makefile_frag} ] ; then 1240 host_makefile_frag=${srcdir}/${host_makefile_frag} 1241 fi 1242 if [ -f ${host_makefile_frag} ] ; then 1243 sed -e "/^####/ r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem 1244 else 1245 echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2 1246 echo '***' is missing in ${PWD=`pwd`}. 1>&2 1247 mv ${Makefile} ${subdir}/Makefile.tem 1248 fi 1249 esac 1250 # working copy now in ${subdir)/Makefile.tem 1251 1252 # Conditionalize the makefile for this target. 1253 rm -f ${Makefile} 1254 case "${target_makefile_frag}" in 1255 "") mv ${subdir}/Makefile.tem ${Makefile} ;; 1256 *) 1257 if [ ! -f ${target_makefile_frag} ] ; then 1258 target_makefile_frag=${srcdir}/${target_makefile_frag} 1259 fi 1260 if [ -f ${target_makefile_frag} ] ; then 1261 sed -e "/^####/ r ${target_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile} 1262 else 1263 mv ${subdir}/Makefile.tem ${Makefile} 1264 target_makefile_frag= 1265 fi 1266 ;; 1267 esac 1268 # working copy now in ${Makefile} 1269 1270 # Emit the default values of this package's macros. 1271 rm -f ${subdir}/Makefile.tem 1272 case "${package_makefile_frag}" in 1273 "") mv ${Makefile} ${subdir}/Makefile.tem ;; 1274 *) 1275 if [ ! -f ${package_makefile_frag} ] ; then 1276 package_makefile_frag=${srcdir}/${package_makefile_frag} 1277 fi 1278 if [ -f ${package_makefile_frag} ] ; then 1279 sed -e "/^####/ r ${package_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem 1280 else 1281 echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2 1282 echo '***' is missing in ${PWD=`pwd`}. 1>&2 1283 mv ${Makefile} ${subdir}/Makefile.tem 1284 fi 1285 esac 1286 # real copy now in ${subdir}/Makefile.tem 1287 1288 # prepend warning about editting, and a bunch of variables. 1289 rm -f ${Makefile} 1290 cat > ${Makefile} <<EOF 1291 # ${NO_EDIT} 1292 VPATH = ${makesrcdir} 1293 links = ${configlinks} 1294 host_alias = ${host_alias} 1295 host_cpu = ${host_cpu} 1296 host_vendor = ${host_vendor} 1297 host_os = ${host_os} 1298 host_canonical = ${host_cpu}-${host_vendor}-${host_os} 1299 target_alias = ${target_alias} 1300 target_cpu = ${target_cpu} 1301 target_vendor = ${target_vendor} 1302 target_os = ${target_os} 1303 target_canonical = ${target_cpu}-${target_vendor}-${target_os} 3909 # The following way of writing the cache mishandles newlines in values, 3910 # but we know of no workaround that is simple, portable, and efficient. 3911 # So, don't put newlines in cache variables' values. 3912 # Ultrix sh set writes to stderr and can't be redirected directly, 3913 # and sets the high bit in the cache file unless we assign to the vars. 3914 (set) 2>&1 | 3915 case `(ac_space=' '; set | grep ac_space) 2>&1` in 3916 *ac_space=\ *) 3917 # `set' does not quote correctly, so add quotes (double-quote substitution 3918 # turns \\\\ into \\, and sed turns \\ into \). 3919 sed -n \ 3920 -e "s/'/'\\\\''/g" \ 3921 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" 3922 ;; 3923 *) 3924 # `set' quotes correctly as required by POSIX, so do not add quotes. 3925 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' 3926 ;; 3927 esac >> confcache 3928 if cmp -s $cache_file confcache; then 3929 : 3930 else 3931 if test -w $cache_file; then 3932 echo "updating cache $cache_file" 3933 cat confcache > $cache_file 3934 else 3935 echo "not updating unwritable cache $cache_file" 3936 fi 3937 fi 3938 rm -f confcache 3939 3940 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 3941 3942 test "x$prefix" = xNONE && prefix=$ac_default_prefix 3943 # Let make expand exec_prefix. 3944 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 3945 3946 # Any assignment to VPATH causes Sun make to only execute 3947 # the first set of double-colon rules, so remove it if not needed. 3948 # If there is a colon in the path, we need to keep it. 3949 if test "x$srcdir" = x.; then 3950 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' 3951 fi 3952 3953 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 3954 3955 # Transform confdefs.h into DEFS. 3956 # Protect against shell expansion while executing Makefile rules. 3957 # Protect against Makefile macro expansion. 3958 cat > conftest.defs <<\EOF 3959 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g 3960 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g 3961 s%\[%\\&%g 3962 s%\]%\\&%g 3963 s%\$%$$%g 1304 3964 EOF 1305 case "${build}" in 1306 "") ;; 1307 *) cat >> ${Makefile} << EOF 1308 build_alias = ${build_alias} 1309 build_cpu = ${build_cpu} 1310 build_vendor = ${build_vendor} 1311 build_os = ${build_os} 1312 build_canonical = ${build_cpu}-${build_vendor}-${build_os} 3965 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` 3966 rm -f conftest.defs 3967 3968 3969 # Without the "./", some shells look in PATH for config.status. 3970 : ${CONFIG_STATUS=./config.status} 3971 3972 echo creating $CONFIG_STATUS 3973 rm -f $CONFIG_STATUS 3974 cat > $CONFIG_STATUS <<EOF 3975 #! /bin/sh 3976 # Generated automatically by configure. 3977 # Run this file to recreate the current configuration. 3978 # This directory was configured as follows, 3979 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3980 # 3981 # $0 $ac_configure_args 3982 # 3983 # Compiler output produced by configure, useful for debugging 3984 # configure, is in ./config.log if it exists. 3985 3986 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" 3987 for ac_option 3988 do 3989 case "\$ac_option" in 3990 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 3991 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" 3992 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; 3993 -version | --version | --versio | --versi | --vers | --ver | --ve | --v) 3994 echo "$CONFIG_STATUS generated by autoconf version 2.13" 3995 exit 0 ;; 3996 -help | --help | --hel | --he | --h) 3997 echo "\$ac_cs_usage"; exit 0 ;; 3998 *) echo "\$ac_cs_usage"; exit 1 ;; 3999 esac 4000 done 4001 4002 ac_given_srcdir=$srcdir 4003 4004 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 1313 4005 EOF 1314 esac 1315 1316 case "${package_makefile_frag}" in 1317 "") ;; 1318 /*) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;; 1319 *) echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;; 1320 esac 1321 1322 case "${target_makefile_frag}" in 1323 "") ;; 1324 /*) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;; 1325 *) echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;; 1326 esac 1327 1328 case "${host_makefile_frag}" in 1329 "") ;; 1330 /*) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;; 1331 *) echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;; 1332 esac 1333 1334 if [ "${site_makefile_frag}" != "" ] ; then 1335 echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile} 1336 fi 1337 1338 # record if we want to build shared libs. 1339 if test -z "${enable_shared}"; then 1340 echo enable_shared = no >> ${Makefile} 1341 else 1342 echo enable_shared = ${enable_shared} >> ${Makefile} 1343 fi 1344 # record if we want to rumtime library stuff installed in libsubdir. 1345 if test -z "${enable_version_specific_runtime_libs}"; then 1346 echo enable_version_specific_runtime_libs = no >> ${Makefile} 1347 else 1348 echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile} 1349 fi 1350 1351 # Emit a macro which describes the file containing gcc's 1352 # version number. 1353 echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile} 1354 # And emit a macro defining gcc's version number. 1355 echo gcc_version = ${gcc_version} >> ${Makefile} 1356 1357 # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS, 1358 # remove any form feeds. 1359 if [ -z "${subdirs}" ]; then 1360 rm -f ${subdir}/Makefile.tm2 1361 sed -e "s:^SUBDIRS[ ]*=.*$:SUBDIRS = ${configdirs}:" \ 1362 -e "s:^NONSUBDIRS[ ]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \ 1363 ${subdir}/Makefile.tem > ${subdir}/Makefile.tm2 1364 rm -f ${subdir}/Makefile.tem 1365 mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem 1366 fi 1367 sed -e "s|^prefix[ ]*=.*$|prefix = ${prefix}|" \ 1368 -e "s|^exec_prefix[ ]*=.*$|exec_prefix = ${exec_prefix}|" \ 1369 -e "s|^bindir[ ]*=.*$|bindir = ${bindir}|" \ 1370 -e "s|^sbindir[ ]*=.*$|sbindir = ${sbindir}|" \ 1371 -e "s|^libexecdir[ ]*=.*$|libexecdir = ${libexecdir}|" \ 1372 -e "s|^datadir[ ]*=.*$|datadir = ${datadir}|" \ 1373 -e "s|^sysconfdir[ ]*=.*$|sysconfdir = ${sysconfdir}|" \ 1374 -e "s|^sharedstatedir[ ]*=.*$|sharedstatedir = ${sharedstatedir}|" \ 1375 -e "s|^localstatedir[ ]*=.*$|localstatedir = ${localstatedir}|" \ 1376 -e "s|^libdir[ ]*=.*$|libdir = ${libdir}|" \ 1377 -e "s|^includedir[ ]*=.*$|includedir = ${includedir}|" \ 1378 -e "s|^oldincludedir[ ]*=.*$|oldincludedir = ${oldincludedir}|" \ 1379 -e "s|^infodir[ ]*=.*$|infodir = ${infodir}|" \ 1380 -e "s|^mandir[ ]*=.*$|mandir = ${mandir}|" \ 1381 -e "/^CC[ ]*=/{ 1382 :loop1 1383 /\\\\$/ N 1384 s/\\\\\\n//g 1385 t loop1 1386 s%^CC[ ]*=.*$%CC = ${CC}% 1387 }" \ 1388 -e "/^CXX[ ]*=/{ 1389 :loop2 1390 /\\\\$/ N 1391 s/\\\\\\n//g 1392 t loop2 1393 s%^CXX[ ]*=.*$%CXX = ${CXX}% 1394 }" \ 1395 -e "/^CFLAGS[ ]*=/{ 1396 :loop3 1397 /\\\\$/ N 1398 s/\\\\\\n//g 1399 t loop3 1400 s%^CFLAGS[ ]*=.*$%CFLAGS = ${CFLAGS}% 1401 }" \ 1402 -e "/^CXXFLAGS[ ]*=/{ 1403 :loop4 1404 /\\\\$/ N 1405 s/\\\\\\n//g 1406 t loop4 1407 s%^CXXFLAGS[ ]*=.*$%CXXFLAGS = ${CXXFLAGS}% 1408 }" \ 1409 -e "s|^SHELL[ ]*=.*$|SHELL = ${config_shell}|" \ 1410 -e "s|^srcdir[ ]*=.*$|srcdir = ${makesrcdir}|" \ 1411 -e "s/ 1412 //" \ 1413 -e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \ 1414 -e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \ 1415 -e "s:^program_transform_name[ ]*=.*$:program_transform_name = ${program_transform_name}:" \ 1416 -e "s|^tooldir[ ]*=.*$|tooldir = ${tooldir}|" \ 1417 -e "s|^build_tooldir[ ]*=.*$|build_tooldir = ${tooldir}|" \ 1418 -e "s:^DEFAULT_YACC[ ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \ 1419 -e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \ 1420 -e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \ 1421 ${subdir}/Makefile.tem >> ${Makefile} 1422 1423 sed -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem 1424 mv -f ${Makefile}.tem ${Makefile} 1425 1426 # If this is a Canadian Cross, preset the values of many more 1427 # tools. 1428 if [ "${build}" != "${host}" ]; then 1429 for var in ${tools}; do 1430 eval val=\$${var} 1431 sed -e "/^${var}[ ]*=/{ 1432 :loop1 1433 /\\\\$/ N 1434 /\\\\$/ b loop1 1435 s/\\\\\\n//g 1436 s%^${var}[ ]*=.*$%${var} = ${val}% 1437 }" ${Makefile} > ${Makefile}.tem 1438 mv -f ${Makefile}.tem ${Makefile} 1439 done 1440 fi 1441 1442 # final copy now in ${Makefile} 1443 1444 else 1445 echo "No Makefile.in found in ${srcdir}/${subdir}, unable to configure" 1>&2 1446 fi 1447 1448 rm -f ${subdir}/Makefile.tem 1449 1450 case "${host_makefile_frag}" in 1451 "") using= ;; 1452 *) using="and \"${host_makefile_frag}\"" ;; 1453 esac 1454 1455 case "${target_makefile_frag}" in 1456 "") ;; 1457 *) using="${using} and \"${target_makefile_frag}\"" ;; 1458 esac 1459 1460 case "${site_makefile_frag}" in 1461 "") ;; 1462 *) using="${using} and \"${site_makefile_frag}\"" ;; 1463 esac 1464 1465 newusing=`echo "${using}" | sed 's/and/using/'` 1466 using=${newusing} 1467 echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using} 1468 1469 . ${tmpfile}.pos 1470 1471 # describe the chosen configuration in config.status. 1472 # Make that file a shellscript which will reestablish 1473 # the same configuration. Used in Makefiles to rebuild 1474 # Makefiles. 1475 1476 case "${norecursion}" in 1477 "") arguments="${arguments} --norecursion" ;; 1478 *) ;; 1479 esac 1480 1481 if [ ${subdir} = . ] ; then 1482 echo "#!/bin/sh 1483 # ${NO_EDIT} 1484 # This directory was configured as follows: 1485 ${progname}" ${arguments} " 1486 # ${using}" > ${subdir}/config.new 1487 else 1488 echo "#!/bin/sh 1489 # ${NO_EDIT} 1490 # This directory was configured as follows: 1491 cd ${invsubdir} 1492 ${progname}" ${arguments} " 1493 # ${using}" > ${subdir}/config.new 1494 fi 1495 chmod a+x ${subdir}/config.new 1496 if [ -r ${subdir}/config.back ] ; then 1497 mv -f ${subdir}/config.back ${subdir}/config.status 1498 fi 1499 ${config_shell} ${moveifchange} ${subdir}/config.new ${subdir}/config.status 1500 ;; 1501 1502 *) rm -f ${Makefile} ${subdir}/config.status ${links} ;; 1503 esac 4006 cat >> $CONFIG_STATUS <<EOF 4007 4008 # Protect against being on the right side of a sed subst in config.status. 4009 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; 4010 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF 4011 $ac_vpsub 4012 $extrasub 4013 s%@SHELL@%$SHELL%g 4014 s%@CFLAGS@%$CFLAGS%g 4015 s%@CPPFLAGS@%$CPPFLAGS%g 4016 s%@CXXFLAGS@%$CXXFLAGS%g 4017 s%@FFLAGS@%$FFLAGS%g 4018 s%@DEFS@%$DEFS%g 4019 s%@LDFLAGS@%$LDFLAGS%g 4020 s%@LIBS@%$LIBS%g 4021 s%@exec_prefix@%$exec_prefix%g 4022 s%@prefix@%$prefix%g 4023 s%@program_transform_name@%$program_transform_name%g 4024 s%@bindir@%$bindir%g 4025 s%@sbindir@%$sbindir%g 4026 s%@libexecdir@%$libexecdir%g 4027 s%@datadir@%$datadir%g 4028 s%@sysconfdir@%$sysconfdir%g 4029 s%@sharedstatedir@%$sharedstatedir%g 4030 s%@localstatedir@%$localstatedir%g 4031 s%@libdir@%$libdir%g 4032 s%@includedir@%$includedir%g 4033 s%@oldincludedir@%$oldincludedir%g 4034 s%@infodir@%$infodir%g 4035 s%@mandir@%$mandir%g 4036 s%@host@%$host%g 4037 s%@host_alias@%$host_alias%g 4038 s%@host_cpu@%$host_cpu%g 4039 s%@host_vendor@%$host_vendor%g 4040 s%@host_os@%$host_os%g 4041 s%@target@%$target%g 4042 s%@target_alias@%$target_alias%g 4043 s%@target_cpu@%$target_cpu%g 4044 s%@target_vendor@%$target_vendor%g 4045 s%@target_os@%$target_os%g 4046 s%@build@%$build%g 4047 s%@build_alias@%$build_alias%g 4048 s%@build_cpu@%$build_cpu%g 4049 s%@build_vendor@%$build_vendor%g 4050 s%@build_os@%$build_os%g 4051 s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g 4052 /@maybe_dependencies@/r $maybe_dependencies 4053 s%@maybe_dependencies@%%g 4054 /@serialization_dependencies@/r $serialization_dependencies 4055 s%@serialization_dependencies@%%g 4056 /@host_makefile_frag@/r $host_makefile_frag 4057 s%@host_makefile_frag@%%g 4058 /@target_makefile_frag@/r $target_makefile_frag 4059 s%@target_makefile_frag@%%g 4060 /@alphaieee_frag@/r $alphaieee_frag 4061 s%@alphaieee_frag@%%g 4062 /@ospace_frag@/r $ospace_frag 4063 s%@ospace_frag@%%g 4064 s%@SET_LIB_PATH@%$SET_LIB_PATH%g 4065 s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g 4066 s%@BUILD_PREFIX@%$BUILD_PREFIX%g 4067 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g 4068 s%@configlinks@%$configlinks%g 4069 s%@gcc_version_trigger@%$gcc_version_trigger%g 4070 s%@gcc_version@%$gcc_version%g 4071 s%@tooldir@%$tooldir%g 4072 s%@build_tooldir@%$build_tooldir%g 4073 s%@GDB_TK@%$GDB_TK%g 4074 s%@gxx_include_dir@%$gxx_include_dir%g 4075 s%@libstdcxx_incdir@%$libstdcxx_incdir%g 4076 s%@build_subdir@%$build_subdir%g 4077 s%@build_configargs@%$build_configargs%g 4078 s%@configure_build_modules@%$configure_build_modules%g 4079 s%@all_build_modules@%$all_build_modules%g 4080 s%@host_configargs@%$host_configargs%g 4081 s%@configdirs@%$configdirs%g 4082 s%@configure_host_modules@%$configure_host_modules%g 4083 s%@all_host_modules@%$all_host_modules%g 4084 s%@check_host_modules@%$check_host_modules%g 4085 s%@install_host_modules@%$install_host_modules%g 4086 s%@install_host_modules_nogcc@%$install_host_modules_nogcc%g 4087 s%@target_subdir@%$target_subdir%g 4088 s%@target_configargs@%$target_configargs%g 4089 s%@target_configdirs@%$target_configdirs%g 4090 s%@configure_target_modules@%$configure_target_modules%g 4091 s%@all_target_modules@%$all_target_modules%g 4092 s%@check_target_modules@%$check_target_modules%g 4093 s%@install_target_modules@%$install_target_modules%g 4094 s%@BISON@%$BISON%g 4095 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g 4096 s%@LEX@%$LEX%g 4097 s%@MAKEINFO@%$MAKEINFO%g 4098 s%@YACC@%$YACC%g 4099 s%@config_shell@%$config_shell%g 4100 s%@AR@%$AR%g 4101 s%@ncn_cv_AR@%$ncn_cv_AR%g 4102 s%@AS@%$AS%g 4103 s%@ncn_cv_AS@%$ncn_cv_AS%g 4104 s%@DLLTOOL@%$DLLTOOL%g 4105 s%@ncn_cv_DLLTOOL@%$ncn_cv_DLLTOOL%g 4106 s%@LD@%$LD%g 4107 s%@ncn_cv_LD@%$ncn_cv_LD%g 4108 s%@NM@%$NM%g 4109 s%@ncn_cv_NM@%$ncn_cv_NM%g 4110 s%@RANLIB@%$RANLIB%g 4111 s%@ncn_cv_RANLIB@%$ncn_cv_RANLIB%g 4112 s%@WINDRES@%$WINDRES%g 4113 s%@ncn_cv_WINDRES@%$ncn_cv_WINDRES%g 4114 s%@OBJCOPY@%$OBJCOPY%g 4115 s%@ncn_cv_OBJCOPY@%$ncn_cv_OBJCOPY%g 4116 s%@OBJDUMP@%$OBJDUMP%g 4117 s%@ncn_cv_OBJDUMP@%$ncn_cv_OBJDUMP%g 4118 s%@CC@%$CC%g 4119 s%@CXX@%$CXX%g 4120 s%@DEFAULT_YACC@%$DEFAULT_YACC%g 4121 s%@DEFAULT_LEX@%$DEFAULT_LEX%g 4122 s%@DEFAULT_M4@%$DEFAULT_M4%g 4123 s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g 4124 s%@ncn_cv_AR_FOR_TARGET@%$ncn_cv_AR_FOR_TARGET%g 4125 s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g 4126 s%@ncn_cv_AS_FOR_TARGET@%$ncn_cv_AS_FOR_TARGET%g 4127 s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g 4128 s%@ncn_cv_DLLTOOL_FOR_TARGET@%$ncn_cv_DLLTOOL_FOR_TARGET%g 4129 s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g 4130 s%@ncn_cv_LD_FOR_TARGET@%$ncn_cv_LD_FOR_TARGET%g 4131 s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g 4132 s%@ncn_cv_NM_FOR_TARGET@%$ncn_cv_NM_FOR_TARGET%g 4133 s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g 4134 s%@ncn_cv_RANLIB_FOR_TARGET@%$ncn_cv_RANLIB_FOR_TARGET%g 4135 s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g 4136 s%@ncn_cv_WINDRES_FOR_TARGET@%$ncn_cv_WINDRES_FOR_TARGET%g 4137 s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g 4138 s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g 4139 s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g 4140 s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g 4141 s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g 4142 s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g 4143 s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g 4144 s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g 4145 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g 4146 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g 4147 s%@MAINT@%$MAINT%g 4148 4149 CEOF 4150 EOF 4151 4152 cat >> $CONFIG_STATUS <<\EOF 4153 4154 # Split the substitutions into bite-sized pieces for seds with 4155 # small command number limits, like on Digital OSF/1 and HP-UX. 4156 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. 4157 ac_file=1 # Number of current file. 4158 ac_beg=1 # First line for current file. 4159 ac_end=$ac_max_sed_cmds # Line after last line for current file. 4160 ac_more_lines=: 4161 ac_sed_cmds="" 4162 while $ac_more_lines; do 4163 if test $ac_beg -gt 1; then 4164 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file 4165 else 4166 sed "${ac_end}q" conftest.subs > conftest.s$ac_file 4167 fi 4168 if test ! -s conftest.s$ac_file; then 4169 ac_more_lines=false 4170 rm -f conftest.s$ac_file 4171 else 4172 if test -z "$ac_sed_cmds"; then 4173 ac_sed_cmds="sed -f conftest.s$ac_file" 4174 else 4175 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" 4176 fi 4177 ac_file=`expr $ac_file + 1` 4178 ac_beg=$ac_end 4179 ac_end=`expr $ac_end + $ac_max_sed_cmds` 4180 fi 1504 4181 done 1505 1506 # If there are subdirectories, then recur. 1507 if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then 1508 for configdir in ${configdirs} ${extraconfigdirs} ; do 1509 1510 # If configdir contains ',' it is 1511 # srcdir,builddir,target_alias 1512 # These come from extraconfigdirs. 1513 case ${configdir} in 1514 *,*) 1515 eval `echo ${configdir} | sed -e 's/\([^,]*\),\([^,]*\),\(.*\)/cfg_dir=\1 bld_dir=\2 tgt_alias=\3/'` 1516 ;; 1517 *) 1518 cfg_dir=${configdir} 1519 bld_dir=${configdir} 1520 tgt_alias=${target_alias} 1521 ;; 1522 esac 1523 1524 if [ -d ${srcdir}/${cfg_dir} ] ; then 1525 eval echo Configuring ${configdir}... ${redirect} 1526 case "${srcdir}" in 1527 ".") ;; 1528 *) 1529 if [ ! -d ./${bld_dir} ] ; then 1530 if mkdir ./${bld_dir} ; then 1531 true 1532 else 1533 echo '***' "${progname}: could not make ${PWD=`pwd`}/${bld_dir}" 1>&2 1534 exit 1 1535 fi 1536 fi 1537 ;; 1538 esac 1539 1540 POPDIR=${PWD=`pwd`} 1541 cd ${bld_dir} 1542 1543 ### figure out what to do with srcdir 1544 case "${srcdir}" in 1545 ".") newsrcdir=${srcdir} ;; # no -srcdir option. We're building in place. 1546 /*) # absolute path 1547 newsrcdir=${srcdir}/${cfg_dir} 1548 srcdiroption="--srcdir=${newsrcdir}" 1549 ;; 1550 ?:*) # absolute path on win32 1551 newsrcdir=${srcdir}/${cfg_dir} 1552 srcdiroption="--srcdir=${newsrcdir}" 1553 ;; 1554 *) # otherwise relative 1555 newsrcdir=../${srcdir}/${cfg_dir} 1556 srcdiroption="--srcdir=${newsrcdir}" 1557 ;; 1558 esac 1559 1560 # Handle --cache-file=../XXX 1561 case "${cache_file}" in 1562 "") # empty 1563 ;; 1564 /*) # absolute path 1565 cache_file_option="--cache-file=${cache_file}" 1566 ;; 1567 ?:*) # absolute path on win32 1568 cache_file_option="--cache-file=${cache_file}" 1569 ;; 1570 *) # relative path 1571 cache_file_option="--cache-file=../${cache_file}" 1572 ;; 1573 esac 1574 1575 ### check for guested configure, otherwise fix possibly relative progname 1576 if [ -f ${newsrcdir}/configure ] ; then 1577 recprog=${newsrcdir}/configure 1578 elif [ -f ${newsrcdir}/configure.in ] ; then 1579 case "${progname}" in 1580 /*) recprog=${progname} ;; 1581 ?:*) recprog=${progname} ;; 1582 *) recprog=../${progname} ;; 1583 esac 1584 else 1585 eval echo No configuration information in ${cfg_dir} ${redirect} 1586 recprog= 1587 fi 1588 1589 ### The recursion line is here. 1590 if [ ! -z "${recprog}" ] ; then 1591 if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${tgt_alias} \ 1592 ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \ 1593 ${srcdiroption} ${diroptions} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then 1594 true 1595 else 1596 echo Configure in `pwd` failed, exiting. 1>&2 1597 exit 1 1598 fi 1599 fi 1600 1601 cd ${POPDIR} 1602 fi 1603 done 1604 fi 1605 1606 # Perform the same cleanup as the trap handler, minus the "exit 1" of course, 1607 # and reset the trap handler. 1608 rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos 1609 trap 0 4182 if test -z "$ac_sed_cmds"; then 4183 ac_sed_cmds=cat 4184 fi 4185 EOF 4186 4187 cat >> $CONFIG_STATUS <<EOF 4188 4189 CONFIG_FILES=\${CONFIG_FILES-"Makefile"} 4190 EOF 4191 cat >> $CONFIG_STATUS <<\EOF 4192 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then 4193 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 4194 case "$ac_file" in 4195 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` 4196 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 4197 *) ac_file_in="${ac_file}.in" ;; 4198 esac 4199 4200 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. 4201 4202 # Remove last slash and all that follows it. Not all systems have dirname. 4203 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` 4204 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 4205 # The file is in a subdirectory. 4206 test ! -d "$ac_dir" && mkdir "$ac_dir" 4207 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" 4208 # A "../" for each directory in $ac_dir_suffix. 4209 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` 4210 else 4211 ac_dir_suffix= ac_dots= 4212 fi 4213 4214 case "$ac_given_srcdir" in 4215 .) srcdir=. 4216 if test -z "$ac_dots"; then top_srcdir=. 4217 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; 4218 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; 4219 *) # Relative path. 4220 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" 4221 top_srcdir="$ac_dots$ac_given_srcdir" ;; 4222 esac 4223 4224 4225 echo creating "$ac_file" 4226 rm -f "$ac_file" 4227 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." 4228 case "$ac_file" in 4229 *Makefile*) ac_comsub="1i\\ 4230 # $configure_input" ;; 4231 *) ac_comsub= ;; 4232 esac 4233 4234 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` 4235 sed -e "$ac_comsub 4236 s%@configure_input@%$configure_input%g 4237 s%@srcdir@%$srcdir%g 4238 s%@top_srcdir@%$top_srcdir%g 4239 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file 4240 fi; done 4241 rm -f conftest.s* 4242 4243 EOF 4244 cat >> $CONFIG_STATUS <<EOF 4245 4246 EOF 4247 cat >> $CONFIG_STATUS <<\EOF 1610 4248 1611 4249 exit 0 1612 1613 # 1614 # Local Variables: 1615 # fill-column: 131 1616 # End: 1617 # 1618 1619 # end of configure 4250 EOF 4251 chmod +x $CONFIG_STATUS 4252 rm -fr confdefs* $ac_clean_files 4253 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 4254 -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/configure.in ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 1 #! /bin/bash 2 ############################################################################## 3 4 ## This file is a shell script fragment that supplies the information 5 ## necessary to tailor a template configure script into the configure 6 ## script appropriate for this directory. For more information, check 7 ## any existing configure script. 8 9 ## Be warned, there are two types of configure.in files. There are those 10 ## used by Autoconf, which are macros which are expanded into a configure 11 ## script by autoconf. The other sort, of which this is one, is executed 12 ## by Cygnus configure. 13 14 ## For more information on these two systems, check out the documentation 15 ## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi). 16 17 # Copyright (C) 1992-99, 2000 Free Software Foundation, Inc. 1 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2 # 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 18 3 # 19 4 # This file is free software; you can redistribute it and/or modify it … … 32 17 33 18 ############################################################################## 19 ### WARNING: this file contains embedded tabs. Do not run untabify on this file. 20 21 AC_INIT(move-if-change) 22 AC_PREREQ(2.13) 23 AC_CANONICAL_SYSTEM 24 AC_ARG_PROGRAM 25 26 sinclude(config/acx.m4) 27 28 ### we might need to use some other shell than /bin/sh for running subshells 29 ### If we are on Windows, search for the shell. This will permit people 30 ### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure 31 ### without also having to set CONFIG_SHELL. This code will work when 32 ### using bash, which sets OSTYPE. 33 case "${OSTYPE}" in 34 *win32*) 35 if test x${CONFIG_SHELL} = x ; then 36 if test ! -f /bin/sh ; then 37 if test x${SHELL} != x && test -f ${SHELL} ; then 38 CONFIG_SHELL=${SHELL} 39 export CONFIG_SHELL 40 else 41 for prog in sh sh.exe bash bash.exe; do 42 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 43 for dir in $PATH; do 44 test -z "$dir" && dir=. 45 if test -f $dir/$prog; then 46 CONFIG_SHELL=$dir/$prog 47 export CONFIG_SHELL 48 break 49 fi 50 done 51 IFS="$save_ifs" 52 test -n "${CONFIG_SHELL}" && break 53 done 54 fi 55 fi 56 fi 57 ;; 58 esac 59 60 config_shell=${CONFIG_SHELL-/bin/sh} 61 62 progname=$0 63 # if PWD already has a value, it is probably wrong. 64 if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi 65 66 # Export original configure arguments for use by sub-configures. 67 TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@" 68 AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS) 69 70 moveifchange=${srcdir}/move-if-change 71 72 # Set srcdir to "." if that's what it is. 73 # This is important for multilib support. 74 pwd=`${PWDCMD-pwd}` 75 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` 76 if test "${pwd}" = "${srcpwd}" ; then 77 srcdir=. 78 fi 79 80 topsrcdir=$srcpwd 81 82 extra_host_args= 83 # Define the trigger file to make sure configure will re-run whenever 84 # the gcc version number changes. 85 if test "${with_gcc_version_trigger+set}" = set ; then 86 gcc_version_trigger="$with_gcc_version_trigger" 87 gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'` 88 else 89 # If gcc's sources are available, define the trigger file. 90 if test -f ${topsrcdir}/gcc/version.c ; then 91 gcc_version_trigger=${topsrcdir}/gcc/version.c 92 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'` 93 case "$ac_configure_args" in 94 *--with-gcc-version-trigger=$gcc_version_trigger* ) 95 ;; 96 * ) 97 # Add to all subconfigure arguments: build, host, and target. 98 ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger" 99 ;; 100 esac 101 fi 102 fi 34 103 35 104 ### To add a new directory to the tree, first choose whether it is a target 36 105 ### or a host dependent tool. Then put it into the appropriate list 37 ### (library or tools, host or target), doing a dependency sort. For 38 ### example, gdb requires that byacc (or bison) be built first, so it is in 39 ### the ${host_tools} list after byacc and bison. 40 106 ### (library or tools, host or target), doing a dependency sort. 107 108 # Subdirs will be configured in the order listed in build_configdirs, 109 # configdirs, or target_configdirs; see the serialization section below. 110 111 # Dependency sorting is only needed when *configuration* must be done in 112 # a particular order. In all cases a dependency should be specified in 113 # the Makefile, whether or not it's implicitly specified here. 114 115 # Double entries in build_configdirs, configdirs, or target_configdirs may 116 # cause circular dependencies and break everything horribly. 41 117 42 118 # these libraries are used by various programs built for the host environment 43 119 # 44 host_libs="intl mmalloc libiberty opcodes bfd readline gash db tcl tk tcl8.1 tk8.1 tclX itcl tix libgui" 45 46 if [ "${enable_gdbgui}" = "yes" ] ; then 47 host_libs="${host_libs} libgui" 48 fi 49 50 # Set up configure/Makefile variables if libstdc++-v3 is to be built. 51 if [ "${enable_libstdcxx_v3}" = "yes" ] && test -d $srcdir/libstdc++-v3; then 52 libstdcxx_version="target-libstdc++-v3" 53 # Don't use libstdc++-v3's flags to configure/build itself. 54 libstdcxx_flags='`case $$dir in libstdc++-v3) ;; *) cat $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/libstdc++.INC 2>/dev/null || : ;; esac` -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs' 55 else 56 libstdcxx_version="target-libio target-libstdc++" 57 libstdcxx_flags='-isystem $$s/libstdc++ -isystem $$s/libstdc++/std -isystem $$s/libstdc++/stl -isystem $$s/libio/ -isystem $$s/libio/stdio -L$$r/$(TARGET_SUBDIR)/libstdc++' 58 fi 120 host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib" 59 121 60 122 # these tools are built for the host environment 61 123 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to 62 124 # know that we are building the simulator. 63 host_tools="byacc flex bison binutils ld gas gcc cgen sid sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip" 125 # binutils, gas and ld appear in that order because it makes sense to run 126 # "make check" in that particular order. 127 host_tools="byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar" 128 129 # libgcj represents the runtime libraries only used by gcj. 130 libgcj="target-libffi \ 131 target-boehm-gc \ 132 target-zlib \ 133 target-qthreads \ 134 target-libjava" 64 135 65 136 # these libraries are built for the target environment, and are built after … … 69 140 target-libgloss \ 70 141 target-newlib \ 71 ${libstdcxx_version}\142 target-libstdc++-v3 \ 72 143 target-libf2c \ 73 target-libchill \ 74 target-libffi \ 75 target-libjava \ 76 target-zlib \ 77 target-boehm-gc \ 78 target-qthreads \ 144 ${libgcj} \ 79 145 target-libobjc" 80 146 … … 86 152 # candidates for the "native_only" list which follows 87 153 # 88 target_tools="target-examples target-groff target-gperf "154 target_tools="target-examples target-groff target-gperf target-rda" 89 155 90 156 ################################################################################ 91 92 ## These two lists are of directories that are to be removed from the93 ## ${configdirs} list for either cross-compilations or for native-94 ## compilations. For example, it doesn't make that much sense to95 ## cross-compile Emacs, nor is it terribly useful to compile target-libiberty in96 ## a native environment.97 98 # directories to be built in the native environment only99 #100 # This must be a single line because of the way it is searched by grep in101 # the code below.102 native_only="autoconf automake libtool cvssrc emacs emacs19 fileutils find gawk gettext grep gzip hello indent ispell m4 rcs recode sed shellutils tar textutils gash uudecode wdiff gprof target-groff guile perl apache inet time ash bash bzip2 prms snavigator gnuserv target-gperf"103 104 # directories to be built in a cross environment only105 #106 cross_only="target-libgloss target-newlib target-cygmon target-opcodes target-libstub"107 157 108 158 ## All tools belong in one of the four categories, and are assigned above … … 117 167 ################################################################################ 118 168 119 srctrigger=move-if-change120 169 srcname="gnu development package" 121 170 … … 123 172 appdirs="" 124 173 125 # per-host: 126 127 # Work in distributions that contain no compiler tools, like Autoconf. 128 if [ -d ${srcdir}/config ]; then 129 case "${host}" in 130 m68k-hp-hpux*) 131 host_makefile_frag="${host_makefile_frag} config/mh-hp300" 132 ;; 133 m68k-apollo-sysv*) 134 host_makefile_frag="${host_makefile_frag} config/mh-apollo68" 135 ;; 136 m68k-apollo-bsd*) 137 host_makefile_frag="${host_makefile_frag} config/mh-a68bsd" 138 ;; 139 m88k-dg-dgux*) 140 host_makefile_frag="${host_makefile_frag} config/mh-dgux" 141 ;; 142 m88k-harris-cxux*) 143 host_makefile_frag="${host_makefile_frag} config/mh-cxux" 144 ;; 145 m88k-motorola-sysv*) 146 host_makefile_frag="${host_makefile_frag} config/mh-delta88" 147 ;; 148 mips*-dec-ultrix*) 149 host_makefile_frag="${host_makefile_frag} config/mh-decstation" 150 ;; 151 mips*-nec-sysv4*) 152 host_makefile_frag="${host_makefile_frag} config/mh-necv4" 153 ;; 154 mips*-sgi-irix6*) 155 host_makefile_frag="${host_makefile_frag} config/mh-irix6" 156 ;; 157 mips*-sgi-irix5*) 158 host_makefile_frag="${host_makefile_frag} config/mh-irix5" 159 ;; 160 mips*-sgi-irix4*) 161 host_makefile_frag="${host_makefile_frag} config/mh-irix4" 162 ;; 163 mips*-sgi-irix3*) 164 host_makefile_frag="${host_makefile_frag} config/mh-sysv" 165 ;; 166 mips*-*-sysv4*) 167 host_makefile_frag="${host_makefile_frag} config/mh-sysv4" 168 ;; 169 mips*-*-sysv*) 170 host_makefile_frag="${host_makefile_frag} config/mh-riscos" 171 ;; 172 i370-ibm-opened*) 173 host_makefile_frag="${host_makefile_frag} config/mh-openedition" 174 ;; 175 i[3456]86-*-sysv5*) 176 host_makefile_frag="${host_makefile_frag} config/mh-sysv5" 177 ;; 178 i[3456]86-*-dgux*) 179 host_makefile_frag="${host_makefile_frag} config/mh-dgux386" 180 ;; 181 i[3456]86-ncr-sysv4.3*) 182 host_makefile_frag="${host_makefile_frag} config/mh-ncrsvr43" 183 ;; 184 i[3456]86-ncr-sysv4*) 185 host_makefile_frag="${host_makefile_frag} config/mh-ncr3000" 186 ;; 187 i[3456]86-*-sco3.2v5*) 188 host_makefile_frag="${host_makefile_frag} config/mh-sysv" 189 ;; 190 i[3456]86-*-sco*) 191 host_makefile_frag="${host_makefile_frag} config/mh-sco" 192 ;; 193 i[3456]86-*-udk*) 194 host_makefile_frag="${host_makefile_frag} config/mh-sysv5" 195 ;; 196 i[3456]86-*-isc*) 197 host_makefile_frag="${host_makefile_frag} config/mh-sysv" 198 ;; 199 i[3456]86-*-solaris2*) 200 host_makefile_frag="${host_makefile_frag} config/mh-sysv4" 201 ;; 202 i[3456]86-*-aix*) 203 host_makefile_frag="${host_makefile_frag} config/mh-aix386" 204 ;; 205 i[3456]86-*-msdosdjgpp*) 206 host_makefile_frag="${host_makefile_frag} config/mh-djgpp" 207 ;; 208 *-cygwin*) 209 host_makefile_frag="${host_makefile_frag} config/mh-cygwin" 210 ;; 211 *-mingw32*) 212 host_makefile_frag="${host_makefile_frag} config/mh-mingw32" 213 ;; 214 *-interix*) 215 host_makefile_frag="${host_makefile_frag} config/mh-interix" 216 ;; 217 *-windows*) 218 host_makefile_frag="${host_makefile_frag} config/mh-windows" 219 ;; 220 vax-*-ultrix2*) 221 host_makefile_frag="${host_makefile_frag} config/mh-vaxult2" 222 ;; 223 *-*-solaris2*) 224 host_makefile_frag="${host_makefile_frag} config/mh-solaris" 225 ;; 226 m68k-sun-sunos*) 227 host_makefile_frag="${host_makefile_frag} config/mh-sun3" 228 ;; 229 *-hp-hpux[78]*) 230 host_makefile_frag="${host_makefile_frag} config/mh-hpux8" 231 ;; 232 *-hp-hpux*) 233 host_makefile_frag="${host_makefile_frag} config/mh-hpux" 234 ;; 235 *-*-hiux*) 236 host_makefile_frag="${host_makefile_frag} config/mh-hpux" 237 ;; 238 rs6000-*-lynxos*) 239 host_makefile_frag="${host_makefile_frag} config/mh-lynxrs6k" 240 ;; 241 *-*-lynxos*) 242 host_makefile_frag="${host_makefile_frag} config/mh-lynxos" 243 ;; 244 *-*-sysv4*) 245 host_makefile_frag="${host_makefile_frag} config/mh-sysv4" 246 ;; 247 *-*-sysv*) 248 host_makefile_frag="${host_makefile_frag} config/mh-sysv" 249 ;; 250 esac 251 fi 252 253 # If we aren't going to be using gcc, see if we can extract a definition 254 # of CC from the fragment. 255 if [ -z "${CC}" ] && [ "${build}" = "${host}" ]; then 256 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 257 found= 258 for dir in $PATH; do 259 test -z "$dir" && dir=. 260 if test -f $dir/gcc; then 261 found=yes 262 break 263 fi 264 done 265 IFS="$save_ifs" 266 if [ -z "${found}" ] && [ -n "${host_makefile_frag}" ] && [ -f "${srcdir}/${host_makefile_frag}" ]; then 267 xx=`sed -n -e 's/^[ ]*CC[ ]*=[ ]*\(.*\)$/\1/p' < ${srcdir}/${host_makefile_frag}` 268 if [ -n "${xx}" ] ; then 269 CC=$xx 270 fi 271 fi 272 fi 273 274 # We default to --with-shared on platforms where -fpic is meaningless. 275 # Well, we don't yet, but we will. 276 if false && [ "${host}" = "${target}" ] && [ x${enable_shared} = x ]; then 277 case "${target}" in 278 alpha*-dec-osf*) enable_shared=yes ;; 279 alpha*-*-linux*) enable_shared=yes ;; 280 mips-sgi-irix5*) enable_shared=yes ;; 281 *) enable_shared=no ;; 282 esac 283 fi 284 285 case "${enable_shared}" in 286 yes) shared=yes ;; 287 no) shared=no ;; 288 "") shared=no ;; 289 *) shared=yes ;; 290 esac 291 292 if [ x${shared} = xyes ]; then 293 case "${host}" in 294 alpha*-*-linux*) 295 host_makefile_frag="${host_makefile_frag} config/mh-elfalphapic" 296 ;; 297 arm*-*-*) 298 host_makefile_frag="${host_makefile_frag} config/mh-armpic" 299 ;; 300 hppa*-*-*) 301 host_makefile_frag="${host_makefile_frag} config/mh-papic" 302 ;; 303 i[3456]86-*-cygwin*) 304 # We don't want -fPIC on Cygwin. 305 ;; 306 i[3456]86-*-*) 307 host_makefile_frag="${host_makefile_frag} config/mh-x86pic" 308 ;; 309 i370-*-*) 310 host_makefile_frag="${host_makefile_frag} config/mh-i370pic" 311 ;; 312 ia64-*-*) 313 host_makefile_frag="${host_makefile_frag} config/mh-ia64pic" 314 ;; 315 sparc64-*-*) 316 host_makefile_frag="${host_makefile_frag} config/mh-sparcpic" 317 ;; 318 powerpc*-*-aix*) 319 # We don't want -fPIC on AIX. 320 ;; 321 powerpc*-*-*) 322 host_makefile_frag="${host_makefile_frag} config/mh-ppcpic" 323 ;; 324 *-*-*) 325 if test -f ${srcdir}/config/mh-${host_cpu}pic; then 326 host_makefile_frag="${host_makefile_frag} config/mh-${host_cpu}pic" 327 fi 328 ;; 329 esac 330 fi 331 332 rm -f mh-frag 333 if [ -n "${host_makefile_frag}" ] ; then 334 for f in ${host_makefile_frag} 335 do 336 cat ${srcdir}/$f >> mh-frag 337 done 338 host_makefile_frag=mh-frag 339 fi 340 341 # per-target: 342 343 case "${target}" in 344 v810*) 345 target_makefile_frag="${target_makefile_frag} config/mt-v810" 346 ;; 347 i[3456]86-*-netware*) 348 target_makefile_frag="${target_makefile_frag} config/mt-netware" 349 ;; 350 powerpc-*-netware*) 351 target_makefile_frag="${target_makefile_frag} config/mt-netware" 352 ;; 353 *-*-linux-gnu*) 354 target_makefile_frag="${target_makefile_frag} config/mt-linux" 355 ;; 356 *-*-aix4.[3456789]* | *-*-aix[56789].*) 357 target_makefile_frag="${target_makefile_frag} config/mt-aix43" 358 ;; 359 mips*-*-pe | sh*-*-pe | *arm-wince-pe) 360 target_makefile_frag="${target_makefile_frag} config/mt-wince" 361 ;; 362 esac 363 364 # If --enable-target-optspace always use -Os instead of -O2 to build 365 # the target libraries, similarly if it is not specified, use -Os 366 # on selected platforms. 367 case "${enable_target_optspace}:${target}" in 368 yes:*) 369 target_makefile_frag="${target_makefile_frag} config/mt-ospace" 370 ;; 371 :d30v-*) 372 target_makefile_frag="${target_makefile_frag} config/mt-d30v" 373 ;; 374 :m32r-* | :d10v-* | :fr30-*) 375 target_makefile_frag="${target_makefile_frag} config/mt-ospace" 376 ;; 377 no:* | :*) 378 ;; 379 *) 380 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 381 ;; 382 esac 383 384 skipdirs= 385 gasdir=gas 386 use_gnu_ld= 387 use_gnu_as= 388 389 # some tools are so dependent upon X11 that if we're not building with X, 390 # it's not even worth trying to configure, much less build, that tool. 391 392 case ${with_x} in 393 yes | "") # the default value for this tree is that X11 is available 394 ;; 395 no) 396 skipdirs="${skipdirs} tk libgui gash" 397 ;; 398 *) 399 echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 400 ;; 401 esac 402 403 # Some tools are only suitable for building in a "native" situation. 404 # Those are added when we have a host==target configuration. For cross 405 # toolchains, we add some directories that should only be useful in a 406 # cross-compiler. 407 174 # Define is_cross_compiler to save on calls to 'test'. 408 175 is_cross_compiler= 409 410 if [ x"${host}" = x"${target}" ] ; then 411 # when doing a native toolchain, don't build the targets 412 # that are in the 'cross only' list 413 skipdirs="${skipdirs} ${cross_only}" 414 is_cross_compiler=no 176 if test x"${host}" = x"${target}" ; then 177 is_cross_compiler=no 415 178 else 416 # similarly, don't build the targets in the 'native only' 417 # list when building a cross compiler 418 skipdirs="${skipdirs} ${native_only}" 419 is_cross_compiler=yes 179 is_cross_compiler=yes 420 180 fi 421 181 … … 424 184 target_subdir=${target_alias} 425 185 426 if [ ! -d ${target_subdir} ]; then186 if test ! -d ${target_subdir} ; then 427 187 if mkdir ${target_subdir} ; then true 428 188 else 429 echo "'*** could not make ${PWD=` pwd`}/${target_subdir}" 1>&2189 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2 430 190 exit 1 431 191 fi 432 192 fi 433 193 434 copy_dirs= 435 436 # Handle --with-headers=XXX. The contents of the named directory are 437 # copied to $(tooldir)/sys-include. 438 if [ x"${with_headers}" != x ]; then 439 if [ x${is_cross_compiler} = xno ]; then 440 echo 1>&2 '***' --with-headers is only supported when cross compiling 441 exit 1 442 fi 443 case "${exec_prefixoption}" in 444 "") x=${prefix} ;; 445 *) x=${exec_prefix} ;; 446 esac 447 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" 448 fi 449 450 # Handle --with-libs=XXX. Multiple directories are permitted. The 451 # contents are copied to $(tooldir)/lib. 452 if [ x"${with_libs}" != x ]; then 453 if [ x${is_cross_compiler} = xno ]; then 454 echo 1>&2 '***' --with-libs is only supported when cross compiling 455 exit 1 456 fi 457 # Copy the libraries in reverse order, so that files in the first named 458 # library override files in subsequent libraries. 459 case "${exec_prefixoption}" in 460 "") x=${prefix} ;; 461 *) x=${exec_prefix} ;; 462 esac 463 for l in ${with_libs}; do 464 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" 465 done 466 fi 194 build_prefix=build- 195 build_subdir=${build_prefix}${build_alias} 196 197 if test x"${build_alias}" != x"${host}" ; then 198 if test ! -d ${build_subdir} ; then 199 if mkdir ${build_subdir} ; then true 200 else 201 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2 202 exit 1 203 fi 204 fi 205 fi 206 207 # Skipdirs are removed silently. 208 skipdirs= 209 # Noconfigdirs are removed loudly. 210 noconfigdirs="" 211 212 use_gnu_ld= 213 # Make sure we don't let GNU ld be added if we didn't want it. 214 if test x$with_gnu_ld = xno ; then 215 use_gnu_ld=no 216 noconfigdirs="$noconfigdirs ld" 217 fi 218 219 use_gnu_as= 220 # Make sure we don't let GNU as be added if we didn't want it. 221 if test x$with_gnu_as = xno ; then 222 use_gnu_as=no 223 noconfigdirs="$noconfigdirs gas" 224 fi 225 226 # some tools are so dependent upon X11 that if we're not building with X, 227 # it's not even worth trying to configure, much less build, that tool. 228 229 case ${with_x} in 230 yes | "") ;; # the default value for this tree is that X11 is available 231 no) 232 skipdirs="${skipdirs} tk tix itcl libgui" 233 # We won't be able to build gdbtk without X. 234 enable_gdbtk=no 235 ;; 236 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;; 237 esac 238 239 # Some tools are only suitable for building in a "native" situation. 240 # Remove these if host!=target. 241 native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf" 242 243 # Similarly, some are only suitable for cross toolchains. 244 # Remove these if host=target. 245 cross_only="target-libgloss target-newlib target-opcodes" 246 247 case $is_cross_compiler in 248 no) skipdirs="${skipdirs} ${cross_only}" ;; 249 yes) skipdirs="${skipdirs} ${native_only}" ;; 250 esac 467 251 468 252 # If both --with-headers and --with-libs are specified, default to 469 253 # --without-newlib. 470 if [ x"${with_headers}" != x ] && [ x"${with_libs}" != x ]; then471 if [ x"${with_newlib}" = x ]; then254 if test x"${with_headers}" != x && test x"${with_libs}" != x ; then 255 if test x"${with_newlib}" = x ; then 472 256 with_newlib=no 473 257 fi … … 475 259 476 260 # Recognize --with-newlib/--without-newlib. 477 if [ x${with_newlib} = xno ]; then 478 skipdirs="${skipdirs} target-newlib" 479 elif [ x${with_newlib} = xyes ]; then 480 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` 481 fi 482 483 # Default to using --with-stabs for certain targets. 484 if [ x${with_stabs} = x ]; then 485 case "${target}" in 486 mips*-*-irix6*) 487 ;; 488 mips*-*-* | alpha*-*-osf*) 489 with_stabs=yes; 490 withoptions="${withoptions} --with-stabs" 491 ;; 492 esac 493 fi 494 495 # Handle ${copy_dirs} 496 set fnord ${copy_dirs} 497 shift 498 while [ $# != 0 ]; do 499 if [ -f $2/COPIED ] && [ x"`cat $2/COPIED`" = x"$1" ]; then 500 : 501 else 502 echo Copying $1 to $2 503 504 # Use the install script to create the directory and all required 505 # parent directories. 506 if [ -d $2 ]; then 507 : 508 else 509 echo >config.temp 510 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED 511 fi 512 513 # Copy the directory, assuming we have tar. 514 # FIXME: Should we use B in the second tar? Not all systems support it. 515 (cd $1; tar -cf - .) | (cd $2; tar -xpf -) 516 517 # It is the responsibility of the user to correctly adjust all 518 # symlinks. If somebody can figure out how to handle them correctly 519 # here, feel free to add the code. 520 521 echo $1 > $2/COPIED 522 fi 523 shift; shift 524 done 261 case ${with_newlib} in 262 no) skipdirs="${skipdirs} target-newlib" ;; 263 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;; 264 esac 525 265 526 266 # Configure extra directories which are host specific 527 267 528 268 case "${host}" in 529 i[3456]86-*-go32*) 530 configdirs="$configdirs dosrel" ;; 531 i[3456]86-*-mingw32*) 532 configdirs="$configdirs dosrel" ;; 533 *-cygwin*) 534 configdirs="$configdirs libtermcap dosrel" ;; 269 *-cygwin*) 270 configdirs="$configdirs libtermcap" ;; 535 271 esac 536 272 … … 539 275 # exist yet. 540 276 541 noconfigdirs=""542 543 277 case "${host}" in 544 i[3456]86-*-vsta) 545 noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext" 546 ;; 547 i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*) 548 noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext libffi" 549 ;; 550 i[3456]86-*-mingw32*) 551 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv" 552 noconfigdirs="expect dejagnu cvs autoconf automake send-pr rcs guile perl texinfo apache inet libtool" 553 ;; 554 i[3456]86-*-beos*) 555 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb" 556 ;; 278 hppa*64*-*-*) 279 noconfigdirs="$noconfigdirs byacc" 280 ;; 281 i[[3456]]86-*-vsta) 282 noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext" 283 ;; 284 i[[3456]]86-*-go32* | i[[3456]]86-*-msdosdjgpp*) 285 noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi" 286 ;; 287 i[[3456]]86-*-mingw32*) 288 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv" 289 noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool" 290 ;; 291 i[[3456]]86-*-beos*) 292 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb" 293 ;; 557 294 *-*-cygwin*) 558 noconfigdirs="autoconf automake send-pr rcs guile perl texinfo apache inet"295 noconfigdirs="autoconf automake send-pr rcs guile perl" 559 296 ;; 560 297 *-*-netbsd*) … … 562 299 ;; 563 300 ppc*-*-pe) 564 noconfigdirs="patch diff make tk tcl expect dejagnu cvssrc autoconf automake texinfo bison send-pr gprof rcs guile perl apache inet itcl tix db snavigatorgnuserv"301 noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv" 565 302 ;; 566 303 powerpc-*-beos*) 567 304 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline" 568 305 ;; 569 esac 570 306 *-*-darwin*) 307 noconfigdirs="$noconfigdirs tk itcl tix libgui" 308 ;; 309 esac 310 311 # Save it here so that, even in case of --enable-libgcj, if the Java 312 # front-end isn't enabled, we still get libgcj disabled. 313 libgcj_saved=$libgcj 314 case $enable_libgcj in 315 yes) 316 # If we reset it here, it won't get added to noconfigdirs in the 317 # target-specific build rules, so it will be forcibly enabled 318 # (unless the Java language itself isn't enabled). 319 libgcj= 320 ;; 321 no) 322 # Make sure we get it printed in the list of not supported target libs. 323 noconfigdirs="$noconfigdirs ${libgcj}" 324 ;; 325 esac 571 326 572 327 case "${target}" in 328 *-*-chorusos) 329 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 330 ;; 331 *-*-darwin*) 332 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof" 333 noconfigdirs="$noconfigdirs target-libobjc ${libgcj}" 334 ;; 335 *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*) 336 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 337 ;; 338 *-*-kaos*) 339 # Remove unsupported stuff on all kaOS configurations. 340 skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx" 341 skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf" 342 skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib" 343 noconfigdirs="$noconfigdirs target-libgloss" 344 ;; 345 *-*-netbsd*) 346 # Skip some stuff on all NetBSD configurations. 347 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss" 348 349 # Skip some stuff that's unsupported on some NetBSD configurations. 350 case "${target}" in 351 i*86-*-netbsdelf*) ;; 352 arm*-*-netbsdelf*) ;; 353 *) 354 noconfigdirs="$noconfigdirs ${libgcj}" 355 ;; 356 esac 357 ;; 573 358 *-*-netware) 574 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss target-libffi"359 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}" 575 360 ;; 576 361 *-*-rtems*) 577 noconfigdirs="$noconfigdirs target-libgloss target-libffi" 362 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 363 case ${target} in 364 h8300*-*-* | h8500-*-*) 365 noconfigdirs="$noconfigdirs target-libf2c" 366 ;; 367 *) ;; 368 esac 578 369 ;; 579 370 *-*-vxworks*) 580 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"371 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 581 372 ;; 582 373 alpha*-dec-osf*) 583 # ld works, but does not support shared libraries. emacs doesn't584 # work.newlib is not 64 bit ready. I'm not sure about fileutils.374 # ld works, but does not support shared libraries. 375 # newlib is not 64 bit ready. I'm not sure about fileutils. 585 376 # gas doesn't generate exception information. 586 noconfigdirs="$noconfigdirs gas ld emacsfileutils target-newlib target-libgloss"377 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss" 587 378 ;; 588 379 alpha*-*-*vms*) 589 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss target-libffi" 380 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}" 381 ;; 382 alpha*-*-linux*) 383 # newlib is not 64 bit ready 384 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 385 ;; 386 alpha*-*-freebsd*) 387 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 590 388 ;; 591 389 alpha*-*-*) 592 390 # newlib is not 64 bit ready 593 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 594 ;; 391 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 392 ;; 393 sh-*-linux*) 394 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" 395 ;; 595 396 sh*-*-pe|mips*-*-pe|*arm-wince-pe) 596 noconfigdirs="$noconfigdirs target-libjava target-libffi target-zlib"597 noconfigdirs="$noconfigdirs target- boehm-gc target-qthreads target-examples"397 noconfigdirs="$noconfigdirs ${libgcj}" 398 noconfigdirs="$noconfigdirs target-examples" 598 399 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr" 599 400 noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim" 600 401 noconfigdirs="$noconfigdirs expect dejagnu" 601 402 # the C++ libraries don't build on top of CE's C libraries 602 noconfigdirs="$noconfigdirs ${libstdcxx_version}"603 skipdirs="$skipdirs target-newlib"403 noconfigdirs="$noconfigdirs target-libstdc++-v3" 404 noconfigdirs="$noconfigdirs target-newlib" 604 405 case "${host}" in 605 406 *-*-cygwin*) ;; # keep gdb and readline 606 *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}"407 *) noconfigdirs="$noconfigdirs gdb readline" 607 408 ;; 608 409 esac 609 410 ;; 610 411 arc-*-*) 611 noconfigdirs="$noconfigdirs target-libgloss target-libffi" 412 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 413 ;; 414 arm-*-coff | strongarm-*-coff | xscale-*-coff) 415 noconfigdirs="$noconfigdirs ${libgcj}" 416 ;; 417 arm-*-elf* | strongarm-*-elf* | xscale-*-elf*) 418 noconfigdirs="$noconfigdirs target-libffi target-qthreads" 612 419 ;; 613 420 arm-*-pe*) 421 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 422 ;; 423 arm-*-oabi*) 424 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 425 ;; 426 thumb-*-coff) 427 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 428 ;; 429 thumb-*-elf) 430 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 431 ;; 432 thumb-*-oabi) 433 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 434 ;; 435 thumb-*-pe) 436 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 437 ;; 438 arm-*-riscix*) 439 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}" 440 ;; 441 avr-*-*) 442 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}" 443 ;; 444 c4x-*-* | tic4x-*-*) 445 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" 446 ;; 447 c54x*-*-* | tic54x-*-*) 448 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib" 449 ;; 450 cris-*-*) 451 noconfigdirs="$noconfigdirs ${libgcj}" 452 ;; 453 d10v-*-*) 454 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" 455 ;; 456 d30v-*-*) 457 noconfigdirs="$noconfigdirs ${libgcj}" 458 ;; 459 fr30-*-elf*) 460 noconfigdirs="$noconfigdirs ${libgcj}" 461 ;; 462 frv-*-*) 463 noconfigdirs="$noconfigdirs ${libgcj}" 464 ;; 465 h8300*-*-*) 614 466 noconfigdirs="$noconfigdirs target-libgloss" 615 467 ;; 616 arm-*-coff*)617 noconfigdirs="$noconfigdirs target-libgloss"618 if [ x${is_cross_compiler} != xno ] ; then619 target_configdirs="${target_configdirs} target-bsp target-cygmon"620 fi621 ;;622 arm-*-elf*)623 noconfigdirs="$noconfigdirs target-libgloss"624 if [ x${is_cross_compiler} != xno ] ; then625 target_configdirs="${target_configdirs} target-bsp target-cygmon"626 fi627 ;;628 arm-*-oabi*)629 noconfigdirs="$noconfigdirs target-libgloss target-libffi"630 ;;631 thumb-*-coff)632 noconfigdirs="$noconfigdirs target-libgloss target-libffi"633 ;;634 thumb-*-elf)635 noconfigdirs="$noconfigdirs target-libgloss target-libffi"636 ;;637 thumb-*-oabi)638 noconfigdirs="$noconfigdirs target-libgloss target-libffi"639 ;;640 strongarm-*-elf)641 noconfigdirs="$noconfigdirs target-libgloss target-libffi"642 if [ x${is_cross_compiler} != xno ] ; then643 target_configdirs="${target_configdirs} target-bsp target-cygmon"644 fi645 ;;646 strongarm-*-coff)647 noconfigdirs="$noconfigdirs target-libgloss target-libffi"648 if [ x${is_cross_compiler} != xno ] ; then649 target_configdirs="${target_configdirs} target-bsp target-cygmon"650 fi651 ;;652 xscale-*-elf)653 noconfigdirs="$noconfigdirs target-libgloss target-libffi"654 if [ x${is_cross_compiler} != xno ] ; then655 target_configdirs="${target_configdirs} target-bsp target-cygmon"656 fi657 ;;658 xscale-*-coff)659 noconfigdirs="$noconfigdirs target-libgloss target-libffi"660 if [ x${is_cross_compiler} != xno ] ; then661 target_configdirs="${target_configdirs} target-bsp target-cygmon"662 fi663 ;;664 thumb-*-pe)665 noconfigdirs="$noconfigdirs target-libgloss target-libffi"666 ;;667 arm-*-riscix*)668 noconfigdirs="$noconfigdirs ld target-libgloss target-libffi"669 ;;670 c4x-*-*)671 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"672 ;;673 c54x*-*-* | tic54x-*-*)674 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi gcc gdb newlib"675 ;;676 d10v-*-*)677 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"678 ;;679 d30v-*-*)680 ;;681 fr30-*-elf*)682 if [ x${is_cross_compiler} != xno ] ; then683 target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"684 fi685 ;;686 h8300*-*-* | \687 468 h8500-*-*) 688 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi" 469 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c" 470 ;; 471 hppa*64*-*-linux* | parisc*64*-*-linux*) 472 # In this case, it's because the hppa64-linux target is for 473 # the kernel only at this point and has no libc, and thus no 474 # headers, crt*.o, etc., all of which are needed by these. 475 noconfigdirs="$noconfigdirs target-zlib" 689 476 ;; 690 477 hppa*-*-*elf* | \ 691 hppa*-*-linux-gnu* | \478 parisc*-*-linux* | hppa*-*-linux* | \ 692 479 hppa*-*-lites* | \ 480 hppa*-*-openbsd* | \ 693 481 hppa*64*-*-*) 482 noconfigdirs="$noconfigdirs ${libgcj}" 694 483 # Do configure ld/binutils/gas for this case. 695 484 ;; 696 485 hppa*-*-*) 697 # HP's C compiler doesn't handle Emacs correctly (but on BSD and Mach 698 # cc is gcc, and on any system a user should be able to link cc to 699 # whatever they want. FIXME, emacs emacs19). 700 case "${CC}" in 701 "" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;; 702 *) ;; 703 esac 704 noconfigdirs="$noconfigdirs ld shellutils" 486 # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't 487 # build on HP-UX 10.20. 488 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}" 705 489 ;; 706 490 ia64*-*-elf*) … … 708 492 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb" 709 493 ;; 710 i[3456]86-*-coff | i[3456]86-*-elf) 711 if [ x${is_cross_compiler} != xno ] ; then 712 target_configdirs="${target_configdirs} target-libstub target-cygmon" 494 ia64*-**-hpux*) 495 # No gdb or ld support yet. 496 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld" 497 ;; 498 i[[3456]]86-*-coff | i[[3456]]86-*-elf) 499 noconfigdirs="$noconfigdirs ${libgcj}" 500 ;; 501 i[[34567]]86-*-freebsd*) 502 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 503 ;; 504 i[[3456]]86-*-linux*) 505 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's 506 # not build java stuff by default. 507 case "${target}" in 508 *-*-*libc1*) 509 noconfigdirs="$noconfigdirs ${libgcj}";; 510 esac 511 512 # This section makes it possible to build newlib natively on linux. 513 # If we are using a cross compiler then don't configure newlib. 514 if test x${is_cross_compiler} != xno ; then 515 noconfigdirs="$noconfigdirs target-newlib" 713 516 fi 714 ;; 715 i[3456]86-*-go32* | i[3456]-*-msdosdjgpp*) 716 # but don't build gdb 717 noconfigdirs="$noconfigdirs gdb ${libstdcxx_version} target-libffi" 718 ;; 719 i[3456]86-*-mingw32*) 517 noconfigdirs="$noconfigdirs target-libgloss" 518 # If we are not using a cross compiler, do configure newlib. 519 # Note however, that newlib will only be configured in this situation 520 # if the --with-newlib option has been given, because otherwise 521 # 'target-newlib' will appear in skipdirs. 522 ;; 523 i[[3456]]86-*-mingw32*) 720 524 target_configdirs="$target_configdirs target-mingw" 721 noconfigdirs="$noconfigdirs expect target-libgloss target-libffi"525 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}" 722 526 723 527 # Can't build gdb for mingw32 if not native. 724 528 case "${host}" in 725 i[ 3456]86-*-mingw32) ;; # keep gdb tcl tk expect etc.726 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix db snavigatorgnuserv"529 i[[3456]]86-*-mingw32) ;; # keep gdb tcl tk expect etc. 530 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv" 727 531 ;; 728 532 esac … … 730 534 *-*-cygwin*) 731 535 target_configdirs="$target_configdirs target-libtermcap target-winsup" 732 noconfigdirs="$noconfigdirs target-gperf target-libgloss target-libffi"536 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}" 733 537 # always build newlib. 734 538 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` … … 737 541 case "${host}" in 738 542 *-*-cygwin*) ;; # keep gdb tcl tk expect etc. 739 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui db snavigatorgnuserv"543 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv" 740 544 ;; 741 545 esac 742 546 ;; 743 i[ 3456]86-*-pe)744 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"745 ;; 746 i[ 3456]86-*-sco3.2v5*)547 i[[3456]]86-*-pe) 548 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}" 549 ;; 550 i[[3456]]86-*-sco3.2v5*) 747 551 # The linker does not yet know about weak symbols in COFF, 748 552 # and is not configured to handle mixed ELF and COFF. 749 noconfigdirs="$noconfigdirs ld target-libgloss target-libffi"750 ;; 751 i[ 3456]86-*-sco*)752 noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"753 ;; 754 i[ 3456]86-*-solaris2*)553 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}" 554 ;; 555 i[[3456]]86-*-sco*) 556 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" 557 ;; 558 i[[3456]]86-*-solaris2*) 755 559 noconfigdirs="$noconfigdirs target-libgloss" 756 560 ;; 757 i[3456]86-*-sysv4*) 758 # The SYSV4 C compiler doesn't handle Emacs correctly 759 case "${CC}" in 760 "" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;; 761 *) ;; 762 esac 763 # but that's okay since emacs doesn't work anyway 764 noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss target-libffi" 765 ;; 766 i[3456]86-*-beos*) 767 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss" 768 ;; 769 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) 770 noconfigdirs="$noconfigdirs target-libiberty target-librx target-libg++ target-libstdc++ target-libio target-libf2c target-libchill target-zlib target-libobjc" 771 ;; 772 m68k-*-elf*) 773 if [ x${is_cross_compiler} != xno ] ; then 774 target_configdirs="${target_configdirs} target-bsp target-cygmon" 775 fi 561 i[[3456]]86-*-sysv4*) 562 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 563 ;; 564 i[[3456]]86-*-beos*) 565 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" 566 ;; 567 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) 568 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}" 569 ;; 570 m68k-*-elf*) 571 noconfigdirs="$noconfigdirs ${libgcj}" 776 572 ;; 777 573 m68k-*-coff*) 778 if [ x${is_cross_compiler} != xno ] ; then 779 target_configdirs="${target_configdirs} target-bsp target-cygmon" 780 fi 574 noconfigdirs="$noconfigdirs ${libgcj}" 575 ;; 576 mcore-*-pe*) 577 # The EPOC C++ environment does not support exceptions or rtti, 578 # and so building libstdc++-v3 tends not to always work. 579 noconfigdirs="$noconfigdirs target-libstdc++-v3" 580 ;; 581 mmix-*-*) 582 noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss" 781 583 ;; 782 584 mn10200-*-*) 783 noconfigdirs="$noconfigdirs target-libffi" 784 if [ x${is_cross_compiler} != xno ] ; then 785 target_configdirs="${target_configdirs} target-libstub target-cygmon" 786 fi 585 noconfigdirs="$noconfigdirs ${libgcj}" 787 586 ;; 788 587 mn10300-*-*) 789 noconfigdirs="$noconfigdirs target-libffi" 790 if [ x${is_cross_compiler} != xno ] ; then 791 target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" 792 fi 588 noconfigdirs="$noconfigdirs ${libgcj}" 793 589 ;; 794 590 powerpc-*-aix*) 795 591 # copied from rs6000-*-* entry 796 # The configure and build of ld are currently disabled because 797 # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least) 798 # The symptom is that GDBtk 4.18 fails at startup with a segfault 799 # if linked by GNU ld, but not if linked by the native ld. 800 noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss target-libffi ld" 801 use_gnu_ld=no 592 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" 802 593 ;; 803 594 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe) 804 595 target_configdirs="$target_configdirs target-winsup" 805 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv target-libffi"596 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}" 806 597 # always build newlib. 807 598 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` … … 809 600 # This is temporary until we can link against shared libraries 810 601 powerpcle-*-solaris*) 811 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv target-libffi"602 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}" 812 603 ;; 813 604 powerpc-*-beos*) 814 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss "605 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" 815 606 ;; 816 607 powerpc-*-eabi) 817 if [ x${is_cross_compiler} != xno ] ; then 818 target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" 819 fi 608 noconfigdirs="$noconfigdirs ${libgcj}" 820 609 ;; 821 610 rs6000-*-lynxos*) 822 # The CVS server code doesn't work on the RS/6000 823 noconfigdirs="$noconfigdirs target-newlib gprof cvssrc target-libffi" 611 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}" 824 612 ;; 825 613 rs6000-*-aix*) 826 # The configure and build of ld are currently disabled because 827 # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least) 828 # The symptom is that GDBtk 4.18 fails at startup with a segfault 829 # if linked by GNU ld, but not if linked by the native ld. 830 noconfigdirs="$noconfigdirs gprof target-libffi ld" 831 use_gnu_ld=no 614 noconfigdirs="$noconfigdirs gprof ${libgcj}" 832 615 ;; 833 616 rs6000-*-*) 834 noconfigdirs="$noconfigdirs gprof target-libffi"617 noconfigdirs="$noconfigdirs gprof ${libgcj}" 835 618 ;; 836 619 m68k-apollo-*) 837 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss target-libffi"620 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}" 838 621 ;; 839 622 mips*-*-irix5*) 840 623 # The GNU linker does not support shared libraries. 841 # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work) 842 noconfigdirs="$noconfigdirs ld gprof emacs target-libgloss" 624 noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}" 843 625 ;; 844 626 mips*-*-irix6*) 845 # The GNU assembler does not support IRIX 6. 846 # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work) 847 noconfigdirs="$noconfigdirs gas gprof emacs target-libgloss" 627 # Linking libjava exceeds command-line length limits on at least 628 # IRIX 6.2, but not on IRIX 6.5. 629 # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham 630 # <oldham@codesourcery.com> 631 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" 848 632 ;; 849 633 mips*-dec-bsd*) 850 noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"634 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" 851 635 ;; 852 636 mips*-*-bsd*) 853 noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"637 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}" 854 638 ;; 855 639 mipstx39-*-*) 856 noconfigdirs="$noconfigdirs gprof target-libffi" # same as generic mips 857 target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" 858 ;; 640 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips 641 ;; 642 mips*-*-linux*) 643 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 644 ;; 859 645 mips*-*-*) 860 noconfigdirs="$noconfigdirs gprof target-libffi"646 noconfigdirs="$noconfigdirs gprof ${libgcj}" 861 647 ;; 862 648 romp-*-*) 863 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss target-libffi"649 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" 864 650 ;; 865 651 sh-*-*) 866 652 case "${host}" in 867 i[ 3456]86-*-vsta) ;; # don't add gprof back in868 i[ 3456]86-*-go32*) ;; # don't add gprof back in869 i[ 3456]86-*-msdosdjgpp*) ;; # don't add gprof back in653 i[[3456]]86-*-vsta) ;; # don't add gprof back in 654 i[[3456]]86-*-go32*) ;; # don't add gprof back in 655 i[[3456]]86-*-msdosdjgpp*) ;; # don't add gprof back in 870 656 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;; 871 657 esac 872 noconfigdirs="$noconfigdirs target-libgloss target-libffi" 658 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 659 ;; 660 sh64-*-*) 661 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 873 662 ;; 874 663 sparc-*-elf*) 875 if [ x${is_cross_compiler} != xno ] ; then 876 target_configdirs="${target_configdirs} target-libstub target-cygmon" 877 fi 664 noconfigdirs="$noconfigdirs ${libgcj}" 878 665 ;; 879 666 sparc64-*-elf*) 880 if [ x${is_cross_compiler} != xno ] ; then 881 target_configdirs="${target_configdirs} target-libstub target-cygmon" 882 fi 883 noconfigdirs="target-libffi" 667 noconfigdirs="$noconfigdirs ${libgcj}" 884 668 ;; 885 669 sparclite-*-*) 886 if [ x${is_cross_compiler} != xno ] ; then 887 target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" 888 fi 889 noconfigdirs="target-libffi" 670 noconfigdirs="$noconfigdirs ${libgcj}" 890 671 ;; 891 672 sparc-*-sunos4*) 892 if [ x${is_cross_compiler} != xno ] ; then 893 noconfigdirs="$noconfigdirs gdb gdbtest target-newlib target-libgloss" 673 noconfigdirs="$noconfigdirs ${libgcj}" 674 if test x${is_cross_compiler} != xno ; then 675 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss" 894 676 else 895 677 use_gnu_ld=no 896 678 fi 897 679 ;; 680 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*) 681 ;; 898 682 v810-*-*) 899 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss target-libffi"683 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}" 900 684 ;; 901 685 v850-*-*) 902 noconfigdirs="$noconfigdirs target-libgloss target-libffi"686 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 903 687 ;; 904 688 v850e-*-*) 905 noconfigdirs="$noconfigdirs target-libgloss target-libffi"689 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 906 690 ;; 907 691 v850ea-*-*) 908 noconfigdirs="$noconfigdirs target-libgloss target-libffi"692 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" 909 693 ;; 910 694 vax-*-vms) 911 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss target-libffi"695 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}" 912 696 ;; 913 697 vax-*-*) 914 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi" 698 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 699 ;; 700 ip2k-*-*) 701 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}" 702 ;; 703 *-*-linux*) 704 noconfigdirs="$noconfigdirs target-newlib target-libgloss" 915 705 ;; 916 706 *-*-lynxos*) 917 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"707 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" 918 708 ;; 919 *-*-macos* | \ 920 *-*-mpw*) 921 # Macs want a resource compiler. 922 configdirs="$configdirs grez" 923 noconfigdirs="target-libffi" 924 ;; 709 *-*-*) 710 noconfigdirs="$noconfigdirs ${libgcj}" 711 ;; 925 712 esac 926 713 … … 932 719 esac 933 720 934 # Make sure we don't let GNU ld be added if we didn't want it.935 if [ x$with_gnu_ld = xno ]; then936 use_gnu_ld=no937 noconfigdirs="$noconfigdirs ld"938 fi939 940 # Make sure we don't let GNU as be added if we didn't want it.941 if [ x$with_gnu_as = xno ]; then942 use_gnu_as=no943 noconfigdirs="$noconfigdirs gas"944 fi945 946 721 # Figure out what language subdirectories are present. 947 722 # Look if the user specified --enable-languages="..."; if not, use 948 723 # the environment variable $LANGUAGES if defined. $LANGUAGES might 949 724 # go away some day. 725 # NB: embedded tabs in this IF block -- do not untabify 950 726 if test x"${enable_languages+set}" != xset; then 951 if test x"${LANGUAGES+set}" = xset; then 952 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`" 953 else 954 enable_languages=all 955 fi 727 if test x"${LANGUAGES+set}" = xset; then 728 enable_languages="${LANGUAGES}" 729 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2 730 else 731 enable_languages=all 732 fi 956 733 else 957 if test x"${enable_languages}" = x; then 958 echo configure.in: --enable-languages needs at least one argument 1>&2 959 exit 1 960 fi 961 fi 734 if test x"${enable_languages}" = x || 735 test x"${enable_languages}" = xyes; 736 then 737 echo configure.in: --enable-languages needs at least one language argument 1>&2 738 exit 1 739 fi 740 fi 741 enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'` 742 743 # First scan to see if an enabled language requires some other language. 744 # We assume that a given config-lang.in will list all the language 745 # front ends it requires, even if some are required indirectly. 746 for lang in ${srcdir}/gcc/*/config-lang.in .. 747 do 748 case $lang in 749 ..) ;; 750 # The odd quoting in the next line works around 751 # an apparent bug in bash 1.12 on linux. 752 ${srcdir}/gcc/[[*]]/config-lang.in) ;; 753 *) 754 lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^ ]]*\).*$,\1,p' $lang` 755 this_lang_requires=`sed -n -e 's,^lang_requires=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_requires=\([[^ ]]*\).*$,\1,p' $lang` 756 for other in $this_lang_requires 757 do 758 case ,${enable_languages}, in 759 *,$other,*) ;; 760 *,all,*) ;; 761 *,$lang_alias,*) 762 echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2 763 enable_languages="$enable_languages,$other" 764 ;; 765 esac 766 done 767 ;; 768 esac 769 done 770 962 771 subdirs= 963 772 for lang in ${srcdir}/gcc/*/config-lang.in .. 964 773 do 965 case $lang in 966 ..) ;; 967 # The odd quoting in the next line works around 968 # an apparent bug in bash 1.12 on linux. 969 ${srcdir}/gcc/[*]/config-lang.in) ;; 970 *) 971 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` 972 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` 973 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` 974 if test "x$lang_alias" = x 975 then 976 echo "$lang doesn't set \$language." 1>&2 977 exit 1 978 fi 979 case ${build_by_default},${enable_languages}, in 980 *,$lang_alias,*) add_this_lang=yes ;; 981 no,*) add_this_lang=no ;; 982 *,all,*) add_this_lang=yes ;; 983 *) add_this_lang=no ;; 984 esac 985 if test x"${add_this_lang}" = xyes; then 986 eval target_libs='"$target_libs "'\"$this_lang_libs\" 987 else 988 eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs\" 989 fi 990 ;; 991 esac 774 case $lang in 775 ..) ;; 776 # The odd quoting in the next line works around 777 # an apparent bug in bash 1.12 on linux. 778 ${srcdir}/gcc/[[*]]/config-lang.in) ;; 779 *) 780 lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^ ]]*\).*$,\1,p' $lang` 781 this_lang_libs=`sed -n -e 's,^target_libs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^target_libs=\([[^ ]]*\).*$,\1,p' $lang` 782 this_lang_dirs=`sed -n -e 's,^lang_dirs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_dirs=\([[^ ]]*\).*$,\1,p' $lang` 783 build_by_default=`sed -n -e 's,^build_by_default=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^build_by_default=\([[^ ]]*\).*$,\1,p' $lang` 784 if test "x$lang_alias" = x 785 then 786 echo "$lang doesn't set \$language." 1>&2 787 exit 1 788 fi 789 case ${build_by_default},${enable_languages}, in 790 *,$lang_alias,*) add_this_lang=yes ;; 791 no,*) add_this_lang=no ;; 792 *,all,*) add_this_lang=yes ;; 793 *) add_this_lang=no ;; 794 esac 795 if test x"${add_this_lang}" = xyes; then 796 eval target_libs='"$target_libs "'\"$this_lang_libs\" 797 else 798 eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\" 799 fi 800 ;; 801 esac 992 802 done 993 994 803 995 804 # Remove the entries in $skipdirs and $noconfigdirs from $configdirs and … … 1000 809 for dir in . $skipdirs $noconfigdirs ; do 1001 810 dirname=`echo $dir | sed -e s/target-//g` 1002 if [ $dir != . ]&& echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then811 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1003 812 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"` 1004 if [ -r $srcdir/$dirname/configure ] \ 1005 || [ -r $srcdir/$dirname/configure.in ]; then 813 if test -r $srcdir/$dirname/configure ; then 1006 814 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1007 815 true … … 1011 819 fi 1012 820 fi 1013 if [ $dir != . ]&& echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then821 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1014 822 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"` 1015 if [ -r $srcdir/$dirname/configure ] \ 1016 || [ -r $srcdir/$dirname/configure.in ]; then 823 if test -r $srcdir/$dirname/configure ; then 1017 824 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1018 825 true … … 1026 833 # Sometimes the tools are distributed with libiberty but with no other 1027 834 # libraries. In that case, we don't want to build target-libiberty. 1028 if [ -n "${target_configdirs}" ]; then835 if test -n "${target_configdirs}" ; then 1029 836 others= 1030 837 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do 1031 if [ "$i" != "libiberty" ]; then1032 if [ -r $srcdir/$i/configure ] || [ -r $srcdir/$i/configure.in ]; then838 if test "$i" != "libiberty" ; then 839 if test -r $srcdir/$i/configure ; then 1033 840 others=yes; 1034 841 break; … … 1036 843 fi 1037 844 done 1038 if [ -z "${others}" ]; then845 if test -z "${others}" ; then 1039 846 target_configdirs= 1040 847 fi 1041 848 fi 1042 849 1043 # Deconfigure all subdirectories, in case we are changing the 1044 # configuration from one where a subdirectory is supported to one where it 1045 # is not. 1046 if [ -z "${norecursion}" ] && [ -n "${configdirs}" ]; then 1047 for i in `echo ${configdirs} | sed -e s/target-//g` ; do 1048 rm -f $i/Makefile 1049 done 1050 fi 1051 if [ -z "${norecursion}" ] && [ -n "${target_configdirs}" ]; then 1052 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do 1053 rm -f ${target_subdir}/$i/Makefile 1054 done 1055 fi 850 # Quietly strip out all directories which aren't configurable in this tree. 851 # This relies on all configurable subdirectories being autoconfiscated, which 852 # is now the case. 853 configdirs_all="$configdirs" 854 configdirs= 855 for i in ${configdirs_all} ; do 856 if test -f ${srcdir}/$i/configure ; then 857 configdirs="${configdirs} $i" 858 fi 859 done 860 target_configdirs_all="$target_configdirs" 861 target_configdirs= 862 for i in ${target_configdirs_all} ; do 863 j=`echo $i | sed -e s/target-//g` 864 if test -f ${srcdir}/$j/configure ; then 865 target_configdirs="${target_configdirs} $i" 866 fi 867 done 1056 868 1057 869 # Produce a warning message for the subdirs we can't configure. … … 1060 872 # supported by the one or two programs in a package. 1061 873 1062 if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then874 if test -n "${notsupp}" && test -z "${norecursion}" ; then 1063 875 # If $appdirs is non-empty, at least one of those directories must still 1064 876 # be configured, or we error out. (E.g., if the gas release supports a 1065 877 # specified target in some subdirs but not the gas subdir, we shouldn't 1066 878 # pretend that all is well.) 1067 if [ -n "$appdirs" ]; then879 if test -n "$appdirs" ; then 1068 880 for dir in $appdirs ; do 1069 if [ -r $dir/Makefile.in ]; then881 if test -r $dir/Makefile.in ; then 1070 882 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then 1071 883 appdirs="" … … 1078 890 fi 1079 891 done 1080 if [ -n "$appdirs" ]; then892 if test -n "$appdirs" ; then 1081 893 echo "*** This configuration is not supported by this package." 1>&2 1082 894 exit 1 … … 1089 901 echo " (Any other directories should still work fine.)" 1>&2 1090 902 fi 903 904 case "$host" in 905 *msdosdjgpp*) 906 enable_gdbtk=no ;; 907 esac 908 909 copy_dirs= 910 911 # Handle --with-headers=XXX. If the value is not "yes", the contents of 912 # the named directory are copied to $(tooldir)/sys-include. 913 if test x"${with_headers}" != x ; then 914 if test x${is_cross_compiler} = xno ; then 915 echo 1>&2 '***' --with-headers is only supported when cross compiling 916 exit 1 917 fi 918 if test x"${with_headers}" != xyes ; then 919 case "${exec_prefixoption}" in 920 "") x=${prefix} ;; 921 *) x=${exec_prefix} ;; 922 esac 923 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" 924 fi 925 fi 926 927 # Handle --with-libs=XXX. If the value is not "yes", the contents of 928 # the name directories are copied to $(tooldir)/lib. Multiple directories 929 # are permitted. 930 if test x"${with_libs}" != x ; then 931 if test x${is_cross_compiler} = xno ; then 932 echo 1>&2 '***' --with-libs is only supported when cross compiling 933 exit 1 934 fi 935 if test x"${with_libs}" != xyes ; then 936 # Copy the libraries in reverse order, so that files in the first named 937 # library override files in subsequent libraries. 938 case "${exec_prefixoption}" in 939 "") x=${prefix} ;; 940 *) x=${exec_prefix} ;; 941 esac 942 for l in ${with_libs}; do 943 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" 944 done 945 fi 946 fi 947 948 # Handle ${copy_dirs} 949 set fnord ${copy_dirs} 950 shift 951 while test $# != 0 ; do 952 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then 953 : 954 else 955 echo Copying $1 to $2 956 957 # Use the install script to create the directory and all required 958 # parent directories. 959 if test -d $2 ; then 960 : 961 else 962 echo >config.temp 963 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED 964 fi 965 966 # Copy the directory, assuming we have tar. 967 # FIXME: Should we use B in the second tar? Not all systems support it. 968 (cd $1; tar -cf - .) | (cd $2; tar -xpf -) 969 970 # It is the responsibility of the user to correctly adjust all 971 # symlinks. If somebody can figure out how to handle them correctly 972 # here, feel free to add the code. 973 974 echo $1 > $2/COPIED 975 fi 976 shift; shift 977 done 978 979 # Work in distributions that contain no compiler tools, like Autoconf. 980 tentative_cc="" 981 host_makefile_frag=/dev/null 982 if test -d ${srcdir}/config ; then 983 case "${host}" in 984 m68k-hp-hpux*) 985 # Avoid "too much defining" errors from HPUX compiler. 986 tentative_cc="cc -Wp,-H256000" 987 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding. 988 # If it's HP/UX ar, this should be harmless. 989 RANLIB="ar ts" 990 ;; 991 m68k-apollo-sysv*) 992 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG" 993 ;; 994 m68k-apollo-bsd*) 995 #None of the Apollo compilers can compile gas or binutils. The preprocessor 996 # chokes on bfd, the compiler won't let you assign integers to enums, and 997 # other problems. Defining CC to gcc is a questionable way to say "don't use 998 # the apollo compiler" (the preferred version of GCC could be called cc, 999 # or whatever), but I'm not sure leaving CC as cc is any better... 1000 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG 1001 # Used to have BISON=yacc. 1002 tentative_cc=gcc 1003 ;; 1004 m88k-dg-dgux*) 1005 tentative_cc="gcc -Wall -ansi -D__using_DGUX" 1006 ;; 1007 m88k-harris-cxux*) 1008 # Under CX/UX, we want to tell the compiler to use ANSI mode. 1009 tentative_cc="cc -Xa" 1010 host_makefile_frag="config/mh-cxux" 1011 ;; 1012 m88k-motorola-sysv*) 1013 ;; 1014 mips*-dec-ultrix*) 1015 tentative_cc="cc -Wf,-XNg1000" 1016 host_makefile_frag="config/mh-decstation" 1017 ;; 1018 mips*-nec-sysv4*) 1019 # The C compiler on NEC MIPS SVR4 needs bigger tables. 1020 tentative_cc="cc -ZXNd=5000 -ZXNg=1000" 1021 host_makefile_frag="config/mh-necv4" 1022 ;; 1023 mips*-sgi-irix4*) 1024 # Tell compiler to use K&R C. We can't compile under the SGI Ansi 1025 # environment. Also bump switch table size so that cp-parse will 1026 # compile. Bump string length limit so linker builds. 1027 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192" 1028 ;; 1029 mips*-*-sysv4*) 1030 host_makefile_frag="config/mh-sysv4" 1031 ;; 1032 mips*-*-sysv*) 1033 # This is for a MIPS running RISC/os 4.52C. 1034 1035 # This is needed for GDB, but needs to be in the top-level make because 1036 # if a library is compiled with the bsd headers and gets linked with the 1037 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be 1038 # a different size). 1039 # ptrace(2) apparently has problems in the BSD environment. No workaround is 1040 # known except to select the sysv environment. Could we use /proc instead? 1041 # These "sysv environments" and "bsd environments" often end up being a pain. 1042 # 1043 # This is not part of CFLAGS because perhaps not all C compilers have this 1044 # option. 1045 tentative_cc="cc -systype sysv" 1046 ;; 1047 i370-ibm-opened*) 1048 tentative_cc="c89" 1049 ;; 1050 i[[3456]]86-*-sysv5*) 1051 host_makefile_frag="config/mh-sysv5" 1052 ;; 1053 i[[3456]]86-*-dgux*) 1054 tentative_cc="gcc -Wall -ansi -D__using_DGUX" 1055 host_makefile_frag="config/mh-dgux386" 1056 ;; 1057 i[[3456]]86-ncr-sysv4.3*) 1058 # The MetaWare compiler will generate a copyright message unless you 1059 # turn it off by adding the -Hnocopyr flag. 1060 tentative_cc="cc -Hnocopyr" 1061 ;; 1062 i[[3456]]86-ncr-sysv4*) 1063 # for an NCR 3000 (i486/SVR4) system. 1064 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc. 1065 # This compiler not only emits obnoxious copyright messages every time 1066 # you run it, but it chokes and dies on a whole bunch of GNU source 1067 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc. 1068 tentative_cc="/usr/ccs/ATT/cc" 1069 host_makefile_frag="config/mh-ncr3000" 1070 ;; 1071 i[[3456]]86-*-sco3.2v5*) 1072 ;; 1073 i[[3456]]86-*-sco*) 1074 # The native C compiler botches some simple uses of const. Unfortunately, 1075 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h. 1076 tentative_cc="cc -Dconst=" 1077 host_makefile_frag="config/mh-sco" 1078 ;; 1079 i[[3456]]86-*-udk*) 1080 host_makefile_frag="config/mh-sysv5" 1081 ;; 1082 i[[3456]]86-*-solaris2*) 1083 host_makefile_frag="config/mh-sysv4" 1084 ;; 1085 i[[3456]]86-*-msdosdjgpp*) 1086 host_makefile_frag="config/mh-djgpp" 1087 ;; 1088 *-cygwin*) 1089 host_makefile_frag="config/mh-cygwin" 1090 ;; 1091 *-mingw32*) 1092 host_makefile_frag="config/mh-mingw32" 1093 ;; 1094 *-interix*) 1095 host_makefile_frag="config/mh-interix" 1096 ;; 1097 vax-*-ultrix2*) 1098 # The old BSD pcc isn't up to compiling parts of gdb so use gcc 1099 tentative_cc=gcc 1100 ;; 1101 *-*-solaris2*) 1102 host_makefile_frag="config/mh-solaris" 1103 ;; 1104 m68k-sun-sunos*) 1105 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c 1106 # without overflowing the jump tables (-J says to use a 32 bit table) 1107 tentative_cc="cc -J" 1108 ;; 1109 *-hp-hpux*) 1110 tentative_cc="cc -Wp,-H256000" 1111 ;; 1112 *-*-hiux*) 1113 tentative_cc="cc -Wp,-H256000" 1114 ;; 1115 rs6000-*-lynxos*) 1116 # /bin/cc is less than useful for our purposes. Always use GCC 1117 tentative_cc="/usr/cygnus/progressive/bin/gcc" 1118 host_makefile_frag="config/mh-lynxrs6k" 1119 ;; 1120 *-*-lynxos*) 1121 # /bin/cc is less than useful for our purposes. Always use GCC 1122 tentative_cc="/bin/gcc" 1123 ;; 1124 *-*-sysv4*) 1125 host_makefile_frag="config/mh-sysv4" 1126 ;; 1127 esac 1128 fi 1129 1130 extra_arflags_for_target= 1131 extra_nmflags_for_target= 1132 extra_ranlibflags_for_target= 1133 target_makefile_frag=/dev/null 1134 case "${target}" in 1135 i[[3456]]86-*-netware*) 1136 target_makefile_frag="config/mt-netware" 1137 ;; 1138 powerpc-*-netware*) 1139 target_makefile_frag="config/mt-netware" 1140 ;; 1141 *-*-linux*) 1142 target_makefile_frag="config/mt-linux" 1143 ;; 1144 *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*) 1145 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm 1146 # commands to handle both 32-bit and 64-bit objects. These flags are 1147 # harmless if we're using GNU nm or ar. 1148 extra_arflags_for_target=" -X32_64" 1149 extra_nmflags_for_target=" -B -X32_64" 1150 ;; 1151 *-*-darwin*) 1152 # ranlib from Darwin requires the -c flag to look at common symbols. 1153 extra_ranlibflags_for_target=" -c" 1154 ;; 1155 mips*-*-pe | sh*-*-pe | *arm-wince-pe) 1156 target_makefile_frag="config/mt-wince" 1157 ;; 1158 esac 1159 1160 alphaieee_frag=/dev/null 1161 case $target in 1162 alpha*-*-*) 1163 # This just makes sure to use the -mieee option to build target libs. 1164 # This should probably be set individually by each library. 1165 alphaieee_frag="config/mt-alphaieee" 1166 ;; 1167 esac 1168 1169 # If --enable-target-optspace always use -Os instead of -O2 to build 1170 # the target libraries, similarly if it is not specified, use -Os 1171 # on selected platforms. 1172 ospace_frag=/dev/null 1173 case "${enable_target_optspace}:${target}" in 1174 yes:*) 1175 ospace_frag="config/mt-ospace" 1176 ;; 1177 :d30v-*) 1178 ospace_frag="config/mt-d30v" 1179 ;; 1180 :m32r-* | :d10v-* | :fr30-*) 1181 ospace_frag="config/mt-ospace" 1182 ;; 1183 no:* | :*) 1184 ;; 1185 *) 1186 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 1187 ;; 1188 esac 1091 1189 1092 1190 # Set with_gnu_as and with_gnu_ld as appropriate. … … 1103 1201 # --without-gnu-ld options for the configure script. 1104 1202 1105 if [ x${use_gnu_as} = x ] ; then 1106 if [ x${with_gnu_as} != xno ] && echo " ${configdirs} " | grep " ${gasdir} " > /dev/null 2>&1 && [ -d ${srcdir}/${gasdir} ] ; then 1107 with_gnu_as=yes 1108 withoptions="$withoptions --with-gnu-as" 1109 fi 1110 fi 1111 1112 if [ x${use_gnu_ld} = x ] ; then 1113 if [ x${with_gnu_ld} != xno ] && echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 && [ -d ${srcdir}/ld ] ; then 1114 with_gnu_ld=yes 1115 withoptions="$withoptions --with-gnu-ld" 1116 fi 1117 fi 1118 1119 # If using newlib, add --with-newlib to the withoptions so that gcc/configure 1203 if test x${use_gnu_as} = x && 1204 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then 1205 with_gnu_as=yes 1206 extra_host_args="$extra_host_args --with-gnu-as" 1207 fi 1208 1209 if test x${use_gnu_ld} = x && 1210 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then 1211 with_gnu_ld=yes 1212 extra_host_args="$extra_host_args --with-gnu-ld" 1213 fi 1214 1215 # If using newlib, add --with-newlib to the extra_host_args so that gcc/configure 1120 1216 # can detect this case. 1121 1217 1122 if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ]; then1218 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then 1123 1219 with_newlib=yes 1124 withoptions="$withoptions --with-newlib" 1125 fi 1126 1127 if [ x${shared} = xyes ]; then 1220 extra_host_args="$extra_host_args --with-newlib" 1221 fi 1222 1223 1224 # Default to using --with-stabs for certain targets. 1225 if test x${with_stabs} = x ; then 1128 1226 case "${target}" in 1129 hppa*) 1130 target_makefile_frag="${target_makefile_frag} config/mt-papic" 1131 ;; 1132 i[3456]86-*) 1133 target_makefile_frag="${target_makefile_frag} config/mt-x86pic" 1134 ;; 1135 ia64-*) 1136 target_makefile_frag="${target_makefile_frag} config/mt-ia64pic" 1137 ;; 1138 powerpc*-*-aix*) 1139 # We don't want -fPIC on AIX. 1140 ;; 1141 powerpc*-*) 1142 target_makefile_frag="${target_makefile_frag} config/mt-ppcpic" 1143 ;; 1144 alpha*-*-linux*) 1145 target_makefile_frag="${target_makefile_frag} config/mt-elfalphapic" 1146 ;; 1147 *) 1148 if test -f ${srcdir}/config/mt-${target_cpu}pic; then 1149 target_makefile_frag="${target_makefile_frag} config/mt-${target_cpu}pic" 1227 mips*-*-irix6*o32) 1228 with_stabs=yes; 1229 extra_host_args="${extra_host_args} --with-stabs" 1230 ;; 1231 mips*-*-irix6*) 1232 ;; 1233 mips*-*-* | alpha*-*-osf*) 1234 with_stabs=yes; 1235 extra_host_args="${extra_host_args} --with-stabs" 1236 ;; 1237 esac 1238 fi 1239 1240 # hpux11 in 64bit mode has libraries in a weird place. Arrange to find 1241 # them automatically. 1242 case "${host}" in 1243 hppa*64*-*-hpux11*) 1244 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" 1245 ;; 1246 esac 1247 1248 # If we aren't going to be using gcc, see if we can extract a definition 1249 # of CC from the fragment. 1250 # Actually, use the 'pre-extracted' version above. 1251 if test -z "${CC}" && test "${build}" = "${host}" ; then 1252 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 1253 found= 1254 for dir in $PATH; do 1255 test -z "$dir" && dir=. 1256 if test -f $dir/gcc; then 1257 found=yes 1258 break 1259 fi 1260 done 1261 IFS="$save_ifs" 1262 if test -z "${found}" && test -n "${tentative_cc}" ; then 1263 CC=$tentative_cc 1264 fi 1265 fi 1266 1267 # Some systems (e.g., one of the i386-aix systems the gas testers are 1268 # using) don't handle "\$" correctly, so don't use it here. 1269 tooldir='$(exec_prefix)'/${target_alias} 1270 build_tooldir=${tooldir} 1271 1272 # Generate a default definition for YACC. This is used if the makefile can't 1273 # locate bison or byacc in objdir. 1274 1275 for prog in 'bison -y' byacc yacc 1276 do 1277 set dummy $prog; tmp=$2 1278 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 1279 for dir in $PATH; do 1280 test -z "$dir" && dir=. 1281 if test -f $dir/$tmp; then 1282 DEFAULT_YACC="$prog" 1283 break 1284 fi 1285 done 1286 IFS="$save_ifs" 1287 1288 test -n "$DEFAULT_YACC" && break 1289 done 1290 1291 # Generate a default definition for M4. This is used if the makefile can't 1292 # locate m4 in objdir. 1293 1294 for prog in gm4 gnum4 m4 1295 do 1296 set dummy $prog; tmp=$2 1297 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 1298 for dir in $PATH; do 1299 test -z "$dir" && dir=. 1300 if test -f $dir/$tmp; then 1301 DEFAULT_M4="$prog" 1302 break 1303 fi 1304 done 1305 IFS="$save_ifs" 1306 1307 test -n "$DEFAULT_M4" && break 1308 done 1309 1310 # Generate a default definition for LEX. This is used if the makefile can't 1311 # locate flex in objdir. 1312 1313 for prog in flex lex 1314 do 1315 set dummy $prog; tmp=$2 1316 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 1317 for dir in $PATH; do 1318 test -z "$dir" && dir=. 1319 if test -f $dir/$tmp; then 1320 DEFAULT_LEX="$prog" 1321 break 1322 fi 1323 done 1324 IFS="$save_ifs" 1325 1326 test -n "$DEFAULT_LEX" && break 1327 done 1328 1329 if test "${build}" != "${host}" ; then 1330 # If we are doing a Canadian Cross, in which the host and build systems 1331 # are not the same, we set reasonable default values for the tools. 1332 1333 BISON=${BISON-bison} 1334 CC=${CC-${host_alias}-gcc} 1335 CFLAGS=${CFLAGS-"-g -O2"} 1336 CXX=${CXX-${host_alias}-c++} 1337 CXXFLAGS=${CXXFLAGS-"-g -O2"} 1338 CC_FOR_BUILD=${CC_FOR_BUILD-gcc} 1339 CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc} 1340 CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++} 1341 GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj} 1342 GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}} 1343 BUILD_PREFIX=${build_alias}- 1344 BUILD_PREFIX_1=${build_alias}- 1345 MAKEINFO=${MAKEINFO-makeinfo} 1346 1347 if test -z "${YACC}" ; then 1348 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 1349 for dir in $PATH; do 1350 test -z "$dir" && dir=. 1351 if test -f $dir/bison; then 1352 YACC="bison -y" 1353 break 1150 1354 fi 1151 ;; 1355 if test -f $dir/byacc; then 1356 YACC=byacc 1357 break 1358 fi 1359 if test -f $dir/yacc; then 1360 YACC=yacc 1361 break 1362 fi 1363 done 1364 IFS="$save_ifs" 1365 if test -z "${YACC}" ; then 1366 YACC="bison -y" 1367 fi 1368 fi 1369 1370 if test -z "${LEX}" ; then 1371 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 1372 for dir in $PATH; do 1373 test -z "$dir" && dir=. 1374 if test -f $dir/flex; then 1375 LEX=flex 1376 break 1377 fi 1378 if test -f $dir/lex; then 1379 LEX=lex 1380 break 1381 fi 1382 done 1383 IFS="$save_ifs" 1384 LEX=${LEX-flex} 1385 fi 1386 1387 else 1388 # Set reasonable default values for some tools even if not Canadian. 1389 # Of course, these are different reasonable default values, originally 1390 # specified directly in the Makefile. 1391 # We don't export, so that autoconf can do its job. 1392 # Note that all these settings are above the fragment inclusion point 1393 # in Makefile.in, so can still be overridden by fragments. 1394 # This is all going to change when we autoconfiscate... 1395 1396 BISON="\$(USUAL_BISON)" 1397 CC_FOR_BUILD="\$(CC)" 1398 GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)" 1399 BUILD_PREFIX= 1400 BUILD_PREFIX_1=loser- 1401 MAKEINFO="\$(USUAL_MAKEINFO)" 1402 LEX="\$(USUAL_LEX)" 1403 YACC="\$(USUAL_YACC)" 1404 1405 # If CC is still not set, try to get gcc. 1406 cc_prog_is_gcc= 1407 if test -z "${CC}" ; then 1408 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" 1409 for dir in $PATH; do 1410 test -z "$dir" && dir=. 1411 if test -f $dir/gcc; then 1412 CC="gcc" 1413 cc_prog_is_gcc=yes 1414 echo 'void f(){}' > conftest.c 1415 if test -z "`${CC} -g -c conftest.c 2>&1`"; then 1416 CFLAGS=${CFLAGS-"-g -O2"} 1417 CXXFLAGS=${CXXFLAGS-"-g -O2"} 1418 else 1419 CFLAGS=${CFLAGS-"-O2"} 1420 CXXFLAGS=${CXXFLAGS-"-O2"} 1421 fi 1422 rm -f conftest* 1423 break 1424 fi 1425 done 1426 IFS="$save_ifs" 1427 CC=${CC-cc} 1428 else 1429 # Determine if we are using gcc. 1430 cat > conftest.c <<EOF 1431 #ifdef __GNUC__ 1432 yes; 1433 #endif 1434 EOF 1435 if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then 1436 cc_prog_is_gcc=yes 1437 fi 1438 rm -f conftest.c 1439 if test -z "${CFLAGS}"; then 1440 # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC 1441 # is set to a version of gcc. 1442 if test "$cc_prog_is_gcc" = yes; then 1443 echo 'void f(){}' > conftest.c 1444 if test -z "`${CC} -g -c conftest.c 2>&1`"; then 1445 CFLAGS=${CFLAGS-"-g -O2"} 1446 CXXFLAGS=${CXXFLAGS-"-g -O2"} 1447 else 1448 CFLAGS=${CFLAGS-"-O2"} 1449 CXXFLAGS=${CXXFLAGS-"-O2"} 1450 fi 1451 rm -f conftest* 1452 fi 1453 fi 1454 fi 1455 1456 # We must set the default linker to the linker used by gcc for the correct 1457 # operation of libtool. If LD is not defined and we are using gcc, try to 1458 # set the LD default to the ld used by gcc. 1459 if test -z "$LD"; then 1460 if test "$cc_prog_is_gcc" = yes; then 1461 case $build in 1462 *-*-mingw*) 1463 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;; 1464 *) 1465 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;; 1466 esac 1467 case $gcc_prog_ld in 1468 # Accept absolute paths. 1469 [[\\/]* | [A-Za-z]:[\\/]*)] 1470 LD="$gcc_prog_ld" ;; 1471 esac 1472 fi 1473 fi 1474 1475 CXX=${CXX-"c++"} 1476 CFLAGS=${CFLAGS-"-g"} 1477 CXXFLAGS=${CXXFLAGS-"-g -O2"} 1478 fi 1479 1480 # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest) 1481 # Set up the list of links to be made. 1482 # ${links} is the list of link names, and ${files} is the list of names to link to. 1483 1484 # Make the links. 1485 configlinks="${links}" 1486 if test -r ./config.status ; then 1487 mv -f ./config.status ./config.back 1488 fi 1489 while test -n "${files}" ; do 1490 # set file to car of files, files to cdr of files 1491 set ${files}; file=$1; shift; files=$* 1492 set ${links}; link=$1; shift; links=$* 1493 1494 if test ! -r ${srcdir}/${file} ; then 1495 if test ! -r ${file} ; then 1496 echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2 1497 echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2 1498 exit 1 1499 else 1500 srcfile=${file} 1501 fi 1502 else 1503 srcfile=${srcdir}/${file} 1504 fi 1505 1506 ${remove} -f ${link} 1507 # Make a symlink if possible, otherwise try a hard link 1508 if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then 1509 true 1510 else 1511 # We need to re-remove the file because Lynx leaves a 1512 # very strange directory there when it fails an NFS symlink. 1513 ${remove} -r -f ${link} 1514 ${hard_link} ${srcfile} ${link} 1515 fi 1516 if test ! -r ${link} ; then 1517 echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2 1518 exit 1 1519 fi 1520 1521 echo "Linked \"${link}\" to \"${srcfile}\"." 1522 done 1523 1524 # Create a .gdbinit file which runs the one in srcdir 1525 # and tells GDB to look there for source files. 1526 1527 if test -r ${srcdir}/.gdbinit ; then 1528 case ${srcdir} in 1529 .) ;; 1530 *) cat > ./.gdbinit <<EOF 1531 # ${NO_EDIT} 1532 dir ${srcdir} 1533 dir . 1534 source ${srcdir}/.gdbinit 1535 EOF 1536 ;; 1152 1537 esac 1153 1538 fi 1154 1155 rm -f mt-frag1156 if [ -n "${target_makefile_frag}" ] ; then1157 for f in ${target_makefile_frag}1158 do1159 cat ${srcdir}/$f >> mt-frag1160 done1161 target_makefile_frag=mt-frag1162 fi1163 1164 # post-target:1165 1539 1166 1540 # Make sure that the compiler is able to generate an executable. If it … … 1168 1542 # executable--we might be using a cross compiler--we only care whether it 1169 1543 # can be created. At this point the main configure script has set CC. 1544 we_are_ok=no 1170 1545 echo "int main () { return 0; }" > conftest.c 1171 1546 ${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c 1172 if [ $? = 0 ] && [ -s conftest -o -s conftest.exe ]; then 1173 : 1174 else 1175 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed." 1176 echo 1>&2 "*** You must set the environment variable CC to a working compiler." 1177 rm -f conftest* 1178 exit 1 1179 fi 1547 if test $? = 0 ; then 1548 if test -s conftest || test -s conftest.exe ; then 1549 we_are_ok=yes 1550 fi 1551 fi 1552 case $we_are_ok in 1553 no) 1554 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed." 1555 echo 1>&2 "*** You must set the environment variable CC to a working compiler." 1556 rm -f conftest* 1557 exit 1 1558 ;; 1559 esac 1180 1560 rm -f conftest* 1181 1561 … … 1184 1564 sparc-sun-solaris2*) 1185 1565 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`" 1186 if [ "`/usr/bin/which $CCBASE`" = "/usr/ucb/cc" ]; then1566 if test "`type $CCBASE | sed 's/^[[^/]]*//'`" = "/usr/ucb/cc" ; then 1187 1567 could_use= 1188 [ -d /opt/SUNWspro/bin ]&& could_use="/opt/SUNWspro/bin"1189 if [ -d /opt/cygnus/bin ]; then1190 if [ "$could_use" = "" ]; then1568 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin" 1569 if test -d /opt/cygnus/bin ; then 1570 if test "$could_use" = "" ; then 1191 1571 could_use="/opt/cygnus/bin" 1192 1572 else … … 1194 1574 fi 1195 1575 fi 1196 if [ "$could_use" = "" ]; then1576 if test "$could_use" = "" ; then 1197 1577 echo "Warning: compilation may fail because you're using" 1198 1578 echo "/usr/ucb/cc. You should change your PATH or CC " … … 1210 1590 # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the 1211 1591 # binutils tools will find libbfd.so. 1212 if [ "${shared}" = "yes" ]; then 1213 sed -e 's/^SET_LIB_PATH[ ]*=.*$/SET_LIB_PATH = $(REALLY_SET_LIB_PATH)/' \ 1214 Makefile > Makefile.tem 1215 rm -f Makefile 1216 mv -f Makefile.tem Makefile 1217 1218 case "${host}" in 1219 *-*-hpux*) 1220 sed -e 's/^RPATH_ENVVAR[ ]*=.*$/RPATH_ENVVAR = SHLIB_PATH/' \ 1221 Makefile > Makefile.tem 1222 rm -f Makefile 1223 mv -f Makefile.tem Makefile 1224 ;; 1592 case "${enable_shared}" in 1593 no | "") SET_LIB_PATH= ;; 1594 *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;; 1595 esac 1596 1597 case "${host}" in 1598 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; 1599 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; 1600 esac 1601 1602 # Record target_configdirs and the configure arguments for target and 1603 # build configuration in Makefile. 1604 target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` 1605 1606 # This is the final value for target_configdirs. configdirs already 1607 # has its final value. It's time to create some lists of valid targets. 1608 1609 # While at that, we remove Makefiles if we were started for recursive 1610 # configuration, such that the top-level Makefile reconfigures them, 1611 # like we used to do when configure itself was recursive. 1612 1613 all_build_modules= 1614 configure_build_modules= 1615 # Only make build modules if build != host. 1616 # This should be done more generally, but at the moment it doesn't matter. 1617 if test ${host_alias} != ${build_alias} ; then 1618 for module in libiberty ; do 1619 all_build_modules=all-build-${module} 1620 configure_build_modules=configure-build-${module} 1621 if test -z "${no_recursion}" \ 1622 && test -f ${build_subdir}/${module}/Makefile; then 1623 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure" 1624 rm -f ${build_subdir}/${module}/Makefile 1625 fi 1626 done 1627 fi 1628 1629 all_host_modules= 1630 check_host_modules= 1631 install_host_modules= 1632 configure_host_modules= 1633 for module in ${configdirs} ; do 1634 all_host_modules="${all_host_modules} all-${module}" 1635 check_host_modules="${check_host_modules} check-${module}" 1636 install_host_modules="${install_host_modules} install-${module}" 1637 configure_host_modules="${configure_host_modules} configure-${module}" 1638 if test -z "${no_recursion}" \ 1639 && test -f ${module}/Makefile; then 1640 echo 1>&2 "*** removing ${module}/Makefile to force reconfigure" 1641 rm -f ${module}/Makefile 1642 fi 1643 done 1644 install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'` 1645 1646 all_target_modules= 1647 check_target_modules= 1648 install_target_modules= 1649 configure_target_modules= 1650 for module in ${target_configdirs} ; do 1651 all_target_modules="${all_target_modules} all-target-${module}" 1652 check_target_modules="${check_target_modules} check-target-${module}" 1653 install_target_modules="${install_target_modules} install-target-${module}" 1654 configure_target_modules="${configure_target_modules} configure-target-${module}" 1655 if test -z "${no_recursion}" \ 1656 && test -f ${target_subdir}/${module}/Makefile; then 1657 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure" 1658 rm -f ${target_subdir}/${module}/Makefile 1659 fi 1660 done 1661 1662 # Determine whether gdb needs tk/tcl or not. 1663 # Use 'maybe' since enable_gdbtk might be true even if tk isn't available 1664 # and in that case we want gdb to be built without tk. Ugh! 1665 # In fact I believe gdb is the *only* package directly dependent on tk, 1666 # so we should be able to put the 'maybe's in unconditionally and 1667 # leave out the maybe dependencies when enable_gdbtk is false. I'm not 1668 # 100% sure that that's safe though. 1669 1670 gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui" 1671 case "$enable_gdbtk" in 1672 no) 1673 GDB_TK="" ;; 1674 yes) 1675 GDB_TK="${gdb_tk}" ;; 1676 *) 1677 # Only add the dependency on gdbtk when GDBtk is part of the gdb 1678 # distro. Eventually someone will fix this and move Insight, nee 1679 # gdbtk to a separate directory. 1680 if test -d ${srcdir}/gdb/gdbtk ; then 1681 GDB_TK="${gdb_tk}" 1682 else 1683 GDB_TK="" 1684 fi 1685 ;; 1686 esac 1687 1688 # Create the 'maybe dependencies'. This uses a temporary file. 1689 rm -f maybedep.tmp 1690 echo '# maybedep.tmp' > maybedep.tmp 1691 for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \ 1692 ${install_host_modules} ${install_target_modules} \ 1693 ${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \ 1694 ; do 1695 echo "maybe-${item}: ${item}" >> maybedep.tmp 1696 done 1697 maybe_dependencies=maybedep.tmp 1698 AC_SUBST_FILE(maybe_dependencies) 1699 1700 # Create the serialization dependencies. This uses a temporary file. 1701 1702 AC_ARG_ENABLE([serial-configure], 1703 [ --disable-serial-[{host,target,build}-]configure 1704 Don't force sequential configuration of 1705 sub-packages for the host, target or build 1706 machine, or of any sub-packages at all]) 1707 1708 # These force 'configure's to be done one at a time, to avoid problems 1709 # with contention over a shared config.cache. 1710 rm -f serdep.tmp 1711 echo '# serdep.tmp' > serdep.tmp 1712 olditem= 1713 test "x${enable_serial_configure}" = xno || 1714 test "x${enable_serial_build_configure}" = xno || 1715 for item in ${build_configdirs} ; do 1716 case ${olditem} in 1717 "") ;; 1718 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;; 1225 1719 esac 1226 fi 1227 1228 # Record target_configdirs and the configure arguments in Makefile. 1229 target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` 1230 targargs=`echo "${arguments}" | \ 1231 sed -e 's/--no[^ ]*//' \ 1232 -e 's/--cache[a-z-]*=[^ ]*//' \ 1233 -e 's/--ho[a-z-]*=[^ ]*//' \ 1234 -e 's/--bu[a-z-]*=[^ ]*//' \ 1235 -e 's/--ta[a-z-]*=[^ ]*//'` 1720 olditem=${item} 1721 done 1722 olditem= 1723 test "x${enable_serial_configure}" = xno || 1724 test "x${enable_serial_host_configure}" = xno || 1725 for item in ${configdirs} ; do 1726 case ${olditem} in 1727 "") ;; 1728 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;; 1729 esac 1730 olditem=${item} 1731 done 1732 olditem= 1733 test "x${enable_serial_configure}" = xno || 1734 test "x${enable_serial_target_configure}" = xno || 1735 for item in ${target_configdirs} ; do 1736 case ${olditem} in 1737 "") ;; 1738 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;; 1739 esac 1740 olditem=${item} 1741 done 1742 serialization_dependencies=serdep.tmp 1743 AC_SUBST_FILE(serialization_dependencies) 1744 1745 # Base args. Strip norecursion, cache-file, srcdir, host, build, 1746 # target and nonopt. These are the ones we might not want to pass 1747 # down to subconfigures. 1748 baseargs=`echo " ${ac_configure_args} " | \ 1749 sed -e 's/ --no[[^ ]]* / /' \ 1750 -e 's/ --c[[a-z-]]*[[= ]][[^ ]]* / /' \ 1751 -e 's/ --sr[[a-z-]]*[[= ]][[^ ]]* / /' \ 1752 -e 's/ --ho[[a-z-]]*[[= ]][[^ ]]* / /' \ 1753 -e 's/ --bu[[a-z-]]*[[= ]][[^ ]]* / /' \ 1754 -e 's/ --t[[a-z-]]*[[= ]][[^ ]]* / /' \ 1755 -e 's/ -cache-file[[= ]][[^ ]]* / /' \ 1756 -e 's/ -srcdir[[= ]][[^ ]]* / /' \ 1757 -e 's/ -host[[= ]][[^ ]]* / /' \ 1758 -e 's/ -build[[= ]][[^ ]]* / /' \ 1759 -e 's/ -target[[= ]][[^ ]]* / /' \ 1760 -e "s/ [[^' -][^ ]*] / /" \ 1761 -e 's/^ *//;s/ *$//'` 1762 1763 # For the build-side libraries, we just need to pretend we're native, 1764 # and not use the same cache file. Multilibs are neither needed nor 1765 # desired. 1766 build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}" 1767 1768 # For host modules, accept cache file option, or specification as blank. 1769 case "${cache_file}" in 1770 "") # empty 1771 cache_file_option="" ;; 1772 /* | [[A-Za-z]]:[[\\/]]* ) # absolute path 1773 cache_file_option="--cache-file=${cache_file}" ;; 1774 *) # relative path 1775 cache_file_option="--cache-file=../${cache_file}" ;; 1776 esac 1777 1778 host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}" 1779 1780 target_configargs=${baseargs} 1236 1781 1237 1782 # Passing a --with-cross-host argument lets the target libraries know … … 1240 1785 # sorts of decisions they want to make on this basis. Please consider 1241 1786 # this option to be deprecated. FIXME. 1242 if [ x${is_cross_compiler} = xyes ]; then1243 targ args="--with-cross-host=${host_alias} ${targargs}"1787 if test x${is_cross_compiler} = xyes ; then 1788 target_configargs="--with-cross-host=${host_alias} ${target_configargs}" 1244 1789 fi 1245 1790 1246 1791 # Default to --enable-multilib. 1247 if [ x${enable_multilib} = x ]; then1248 targ args="--enable-multilib ${targargs}"1792 if test x${enable_multilib} = x ; then 1793 target_configargs="--enable-multilib ${target_configargs}" 1249 1794 fi 1250 1795 1251 1796 # Pass --with-newlib if appropriate. Note that target_configdirs has 1252 1797 # changed from the earlier setting of with_newlib. 1253 if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then 1254 targargs="--with-newlib ${targargs}" 1255 fi 1798 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then 1799 target_configargs="--with-newlib ${target_configargs}" 1800 fi 1801 1802 # Pass the appropriate --host, --build, and --cache-file arguments. 1803 target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}" 1256 1804 1257 1805 # provide a proper gxx_include_dir. 1258 1806 # Note, if you change the default, make sure to fix both here and in 1259 # the gcc , libio, and libstdc++subdirectories.1807 # the gcc and libstdc++-v3 subdirectories. 1260 1808 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. 1261 gxx_include_dir= 1262 if test -n "${with_gxx_include_dir}"; then 1263 case "${with_gxx_include_dir}" in 1264 yes ) 1265 echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2 1266 exit 1 1267 ;; 1268 no ) 1269 ;; 1270 * ) 1271 gxx_include_dir=${with_gxx_include_dir} 1272 ;; 1273 esac 1274 fi 1275 if test x${gxx_include_dir} = x; then 1276 if test x${enable_version_specific_runtime_libs} = xyes; then 1277 gxx_include_dir='${libsubdir}/include/g++' 1278 else 1279 . ${topsrcdir}/config.if 1280 gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface} 1281 fi 1282 else 1283 gxx_include_dir=${gxx_include_dir} 1284 fi 1809 case "${with_gxx_include_dir}" in 1810 yes) 1811 AC_MSG_ERROR([--with-gxx-include-dir=[[dir]] requires a directory]) 1812 ;; 1813 no | "") 1814 case "${enable_version_specific_runtime_libs}" in 1815 yes) gxx_include_dir='${libsubdir}/include/c++' ;; 1816 *) 1817 . ${srcdir}/config.if 1818 gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;; 1819 esac ;; 1820 *) gxx_include_dir=${with_gxx_include_dir} ;; 1821 esac 1285 1822 1286 1823 FLAGS_FOR_TARGET= 1287 case " $skipdirs " in 1288 *" target-newlib "*) ;; 1289 *) 1824 case " $target_configdirs " in 1825 *" newlib "*) 1826 case " $target_configargs " in 1827 *" --with-newlib "*) 1290 1828 case "$target" in 1291 1829 *-cygwin*) … … 1294 1832 1295 1833 # If we're not building GCC, don't discard standard headers. 1296 if test -d ${ topsrcdir}/gcc; then1834 if test -d ${srcdir}/gcc; then 1297 1835 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc' 1298 1836 … … 1316 1854 fi 1317 1855 1318 # If we're building newlib, use its generic headers last, but search 1319 # for any libc-related directories first (so make it the last -B 1320 # switch). 1321 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include' 1856 case "${target}-${is_cross_compiler}" in 1857 i[[3456]]86-*-linux*-no) 1858 # Here host == target, so we don't need to build gcc, 1859 # so we don't want to discard standard headers. 1860 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'` 1861 ;; 1862 *) 1863 # If we're building newlib, use its generic headers last, but search 1864 # for any libc-related directories first (so make it the last -B 1865 # switch). 1866 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include' 1867 ;; 1868 esac 1322 1869 ;; 1870 esac 1871 ;; 1323 1872 esac 1324 1873 … … 1327 1876 # flags for directories within the install tree of the compiler 1328 1877 # being built; programs in there won't even run. 1329 if test "${build}" = "${host}" && test -d ${ topsrcdir}/gcc; then1878 if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then 1330 1879 # Search for pre-installed headers if nothing else fits. 1331 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include' 1332 fi 1333 1334 if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno && 1335 echo " ${configdirs} " | grep " ld " > /dev/null && 1336 test -d ${srcdir}/ld; then 1880 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include' 1881 fi 1882 1883 if test "x${use_gnu_ld}" = x && 1884 echo " ${configdirs} " | grep " ld " > /dev/null ; then 1337 1885 # Arrange for us to find uninstalled linker scripts. 1338 1886 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld' … … 1341 1889 if test "x${CC_FOR_TARGET+set}" = xset; then 1342 1890 : 1343 elif test -d ${ topsrcdir}/gcc; then1891 elif test -d ${srcdir}/gcc; then 1344 1892 CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/' 1345 1893 elif test "$host" = "$target"; then 1346 1894 CC_FOR_TARGET='$(CC)' 1347 1895 else 1348 CC_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}` 1349 fi 1350 # On Canadian crosses, configure reads CC_FOR_TARGET from Makefile, 1351 # if Makefile exists. Prevent $(FLAGS_FOR_TARGET) from being duplicated. 1352 case $CC_FOR_TARGET in 1353 *' $(FLAGS_FOR_TARGET)') ;; 1354 *) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; 1355 esac 1356 1357 if test "x${CHILL_FOR_TARGET+set}" = xset; then 1896 CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"` 1897 fi 1898 CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' 1899 1900 if test "x${GCJ_FOR_TARGET+set}" = xset; then 1358 1901 : 1359 elif test -d ${ topsrcdir}/gcc; then1360 CHILL_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/'1902 elif test -d ${srcdir}/gcc; then 1903 GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/' 1361 1904 elif test "$host" = "$target"; then 1362 CHILL_FOR_TARGET='$(CC)'1905 GCJ_FOR_TARGET='gcj' 1363 1906 else 1364 CHILL_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}` 1365 fi 1366 case $CHILL_FOR_TARGET in 1367 *' $(FLAGS_FOR_TARGET)') ;; 1368 *) CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; 1369 esac 1907 GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"` 1908 fi 1909 GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)' 1910 1911 # Don't use libstdc++-v3's flags to configure/build itself. 1912 libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' 1913 raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' 1370 1914 1371 1915 if test "x${CXX_FOR_TARGET+set}" = xset; then 1372 1916 : 1373 elif test -d ${topsrcdir}/gcc; then 1917 elif test -d ${srcdir}/gcc; then 1918 # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead 1919 # of g++ for linking C++ or Java, because g++ has -shared-libgcc by 1920 # default whereas gcc does not. 1921 # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for 1922 # all other cases. 1374 1923 CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags 1924 RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags 1375 1925 elif test "$host" = "$target"; then 1376 1926 CXX_FOR_TARGET='$(CXX)' 1927 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET} 1377 1928 else 1378 CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}` 1379 fi 1380 case $CXX_FOR_TARGET in 1381 *' $(FLAGS_FOR_TARGET)') ;; 1382 *) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; 1383 esac 1384 qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,&,\\\&,g'` 1385 1386 targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}" 1387 sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \ 1388 -e "s%^CONFIG_ARGUMENTS[ ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \ 1389 -e "s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%" \ 1390 -e "s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \ 1391 -e "s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \ 1392 -e "s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%" \ 1393 -e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \ 1394 -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \ 1395 Makefile > Makefile.tem 1396 rm -f Makefile 1397 mv -f Makefile.tem Makefile 1398 1399 # 1400 # Local Variables: 1401 # fill-column: 131 1402 # End: 1403 # 1929 CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"` 1930 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET} 1931 fi 1932 CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' 1933 RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' 1934 1935 qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'` 1936 qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'` 1937 1938 # We want to defer the evaluation of `cmd`s and shell variables in 1939 # CXX_FOR_TARGET when recursing in the top-level Makefile, such as for 1940 # bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single 1941 # quotes, but we still have to duplicate `$'s so that shell variables 1942 # can be expanded by the nested make as shell variables, not as make 1943 # macros. 1944 qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'` 1945 qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'` 1946 1947 # Wrap CC_FOR_TARGET and friends, for certain types of builds. 1948 CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}" 1949 GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}" 1950 CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}" 1951 RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}" 1952 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}" 1953 RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}" 1954 1955 # Makefile fragments. 1956 host_makefile_frag=${srcdir}/${host_makefile_frag} 1957 target_makefile_frag=${srcdir}/${target_makefile_frag} 1958 alphaieee_frag=${srcdir}/${alphaieee_frag} 1959 ospace_frag=${srcdir}/${ospace_frag} 1960 AC_SUBST_FILE(host_makefile_frag) 1961 AC_SUBST_FILE(target_makefile_frag) 1962 AC_SUBST_FILE(alphaieee_frag) 1963 AC_SUBST_FILE(ospace_frag) 1964 1965 # Miscellanea: directories, flags, etc. 1966 AC_SUBST(SET_LIB_PATH) 1967 AC_SUBST(RPATH_ENVVAR) 1968 AC_SUBST(BUILD_PREFIX) 1969 AC_SUBST(BUILD_PREFIX_1) 1970 AC_SUBST(configlinks) 1971 AC_SUBST(gcc_version_trigger) 1972 AC_SUBST(gcc_version) 1973 AC_SUBST(tooldir) 1974 AC_SUBST(build_tooldir) 1975 AC_SUBST(GDB_TK) 1976 AC_SUBST(gxx_include_dir) 1977 AC_SUBST(libstdcxx_incdir) 1978 1979 # Build module lists & subconfigure args. 1980 AC_SUBST(build_subdir) 1981 AC_SUBST(build_configargs) 1982 AC_SUBST(configure_build_modules) 1983 AC_SUBST(all_build_modules) 1984 1985 # Host module lists & subconfigure args. 1986 AC_SUBST(host_configargs) 1987 AC_SUBST(configdirs) 1988 AC_SUBST(configure_host_modules) 1989 AC_SUBST(all_host_modules) 1990 AC_SUBST(check_host_modules) 1991 AC_SUBST(install_host_modules) 1992 AC_SUBST(install_host_modules_nogcc) 1993 1994 # Target module lists & subconfigure args. 1995 AC_SUBST(target_subdir) 1996 AC_SUBST(target_configargs) 1997 AC_SUBST(target_configdirs) 1998 AC_SUBST(configure_target_modules) 1999 AC_SUBST(all_target_modules) 2000 AC_SUBST(check_target_modules) 2001 AC_SUBST(install_target_modules) 2002 2003 # Build tools. 2004 AC_SUBST(BISON) 2005 AC_SUBST(CC_FOR_BUILD) 2006 AC_SUBST(LEX) 2007 AC_SUBST(MAKEINFO) 2008 AC_SUBST(YACC) 2009 AC_SUBST(config_shell) 2010 2011 # Host tools. 2012 NCN_STRICT_CHECK_TOOL(AR, ar) 2013 NCN_STRICT_CHECK_TOOL(AS, as) 2014 NCN_STRICT_CHECK_TOOL(DLLTOOL, dlltool) 2015 NCN_STRICT_CHECK_TOOL(LD, ld) 2016 NCN_STRICT_CHECK_TOOL(NM, nm) 2017 NCN_STRICT_CHECK_TOOL(RANLIB, ranlib, :) 2018 NCN_STRICT_CHECK_TOOL(WINDRES, windres) 2019 NCN_STRICT_CHECK_TOOL(OBJCOPY, objcopy) 2020 NCN_STRICT_CHECK_TOOL(OBJDUMP, objdump) 2021 AC_SUBST(CC) 2022 AC_SUBST(CXX) 2023 AC_SUBST(CFLAGS) 2024 AC_SUBST(CXXFLAGS) 2025 AC_SUBST(DEFAULT_YACC) 2026 AC_SUBST(DEFAULT_LEX) 2027 AC_SUBST(DEFAULT_M4) 2028 2029 # Target tools. 2030 NCN_STRICT_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar) 2031 NCN_STRICT_CHECK_TARGET_TOOL(AS_FOR_TARGET, as) 2032 NCN_STRICT_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool) 2033 NCN_STRICT_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld) 2034 NCN_STRICT_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm) 2035 NCN_STRICT_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :) 2036 NCN_STRICT_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres) 2037 2038 AC_SUBST(GCC_FOR_TARGET) 2039 AC_SUBST(FLAGS_FOR_TARGET) 2040 AC_SUBST(CC_FOR_TARGET) 2041 AC_SUBST(GCJ_FOR_TARGET) 2042 AC_SUBST(CXX_FOR_TARGET) 2043 AC_SUBST(RAW_CXX_FOR_TARGET) 2044 AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE) 2045 AC_SUBST(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE) 2046 2047 # Fix up target tools. 2048 if test "x${build}" = "x${host}" ; then 2049 # In this case, the newly built tools can and should be used, 2050 # so we override the results of the autoconf tests. 2051 # This should really only happen when the tools are actually being built, 2052 # but that's a further refinement. The new build scheme, where 2053 # tools are built into a structure paralleling where they're installed, 2054 # should also eliminate all of this cleanly. 2055 AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)" 2056 AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)" 2057 DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)" 2058 LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)" 2059 NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)" 2060 RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)" 2061 WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)" 2062 fi 2063 # Certain tools may need extra flags. 2064 AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target} 2065 RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target} 2066 NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target} 2067 2068 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 2069 AC_ARG_ENABLE(maintainer-mode, 2070 [ --enable-maintainer-mode enable make rules and dependencies not useful 2071 (and sometimes confusing) to the casual installer], 2072 USE_MAINTAINER_MODE=$enableval, 2073 USE_MAINTAINER_MODE=no) 2074 AC_MSG_RESULT($USE_MAINTAINER_MODE) 2075 AC_SUBST(MAINTAINER_MODE_TRUE) 2076 AC_SUBST(MAINTAINER_MODE_FALSE) 2077 if test "$USE_MAINTAINER_MODE" = yes; then 2078 MAINTAINER_MODE_TRUE= 2079 MAINTAINER_MODE_FALSE='#' 2080 else 2081 MAINTAINER_MODE_TRUE='#' 2082 MAINTAINER_MODE_FALSE= 2083 fi 2084 MAINT=$MAINTAINER_MODE_TRUE 2085 AC_SUBST(MAINT)dnl 2086 2087 AC_OUTPUT(Makefile) -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/gettext.m4 ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 257 257 dnl Generate list of files to be processed by xgettext which will 258 258 dnl be included in po/Makefile. But only do this if the po directory 259 dnl exists in srcdir .260 if test - d $srcdir/po; then259 dnl exists in srcdir and contains POTFILES.in. 260 if test -f $srcdir/po/POTFILES.in; then 261 261 test -d po || mkdir po 262 262 if test "x$srcdir" != "x."; then -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/libtool.m4 ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 23 23 ## the same distribution terms that you use for the rest of that program. 24 24 25 # serial 45 AC_PROG_LIBTOOL 26 AC_DEFUN(AC_PROG_LIBTOOL,[AC_REQUIRE([_AC_PROG_LIBTOOL]) 25 # serial 46 AC_PROG_LIBTOOL 26 AC_DEFUN([AC_PROG_LIBTOOL], 27 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 27 28 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 28 29 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. … … 51 52 ])])])])])]) 52 53 53 AC_DEFUN( _AC_PROG_LIBTOOL,54 AC_DEFUN([_AC_PROG_LIBTOOL], 54 55 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 55 56 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl … … 85 86 ]) 86 87 87 AC_DEFUN( AC_LIBTOOL_SETUP,88 AC_DEFUN([AC_LIBTOOL_SETUP], 88 89 [AC_PREREQ(2.13)dnl 89 90 AC_REQUIRE([AC_ENABLE_SHARED])dnl … … 104 105 105 106 # Only perform the check for file, if the check method requires it 106 case "$deplibs_check_method"in107 case $deplibs_check_method in 107 108 file_magic*) 108 109 if test "$file_magic_cmd" = '$MAGIC_CMD'; then … … 120 121 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" 121 122 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" 122 test "$ ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"123 test "$ ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"123 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc" 124 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" 124 125 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], 125 126 [libtool_flags="$libtool_flags --enable-dlopen"]) … … 139 140 # Some flags need to be propagated to the compiler or linker for good 140 141 # libtool support. 141 case "$host"in142 case $host in 142 143 *-*-irix6*) 143 144 # Find out which ABI we are using. 144 145 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 145 146 if AC_TRY_EVAL(ac_compile); then 146 case "`/usr/bin/file conftest.o`" in 147 if test "$lt_cv_prog_gnu_ld" = yes; then 148 case `/usr/bin/file conftest.$ac_objext` in 149 *32-bit*) 150 LD="${LD-ld} -melf32bsmip" 151 ;; 152 *N32*) 153 LD="${LD-ld} -melf32bmipn32" 154 ;; 155 *64-bit*) 156 LD="${LD-ld} -melf64bmip" 157 ;; 158 esac 159 else 160 case `/usr/bin/file conftest.$ac_objext` in 147 161 *32-bit*) 148 162 LD="${LD-ld} -32" … … 153 167 *64-bit*) 154 168 LD="${LD-ld} -64" 169 ;; 170 esac 171 fi 172 fi 173 rm -rf conftest* 174 ;; 175 176 ia64-*-hpux*) 177 # Find out which ABI we are using. 178 echo 'int i;' > conftest.$ac_ext 179 if AC_TRY_EVAL(ac_compile); then 180 case "`/usr/bin/file conftest.o`" in 181 *ELF-32*) 182 HPUX_IA64_MODE="32" 183 ;; 184 *ELF-64*) 185 HPUX_IA64_MODE="64" 155 186 ;; 156 187 esac … … 188 219 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) 189 220 190 case "$host/$CC"in221 case $host/$CC in 191 222 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) 192 223 # old mingw systems require "-dll" to link a DLL, while more recent ones … … 208 239 209 240 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support 210 AC_DEFUN( AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])241 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) 211 242 212 243 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's 213 AC_DEFUN( AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])244 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) 214 245 215 246 # AC_ENABLE_SHARED - implement the --enable-shared flag … … 217 248 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 218 249 # `yes'. 219 AC_DEFUN( AC_ENABLE_SHARED, [dnl220 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl250 AC_DEFUN([AC_ENABLE_SHARED], 251 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 221 252 AC_ARG_ENABLE(shared, 222 253 changequote(<<, >>)dnl … … 224 255 changequote([, ])dnl 225 256 [p=${PACKAGE-default} 226 case "$enableval"in257 case $enableval in 227 258 yes) enable_shared=yes ;; 228 259 no) enable_shared=no ;; … … 243 274 244 275 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared 245 AC_DEFUN( AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl276 AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 246 277 AC_ENABLE_SHARED(no)]) 247 278 … … 250 281 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 251 282 # `yes'. 252 AC_DEFUN( AC_ENABLE_STATIC, [dnl253 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl283 AC_DEFUN([AC_ENABLE_STATIC], 284 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 254 285 AC_ARG_ENABLE(static, 255 286 changequote(<<, >>)dnl … … 257 288 changequote([, ])dnl 258 289 [p=${PACKAGE-default} 259 case "$enableval"in290 case $enableval in 260 291 yes) enable_static=yes ;; 261 292 no) enable_static=no ;; … … 276 307 277 308 # AC_DISABLE_STATIC - set the default static flag to --disable-static 278 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 309 AC_DEFUN([AC_DISABLE_STATIC], 310 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 279 311 AC_ENABLE_STATIC(no)]) 280 312 … … 284 316 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 285 317 # `yes'. 286 AC_DEFUN( AC_ENABLE_FAST_INSTALL, [dnl287 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl318 AC_DEFUN([AC_ENABLE_FAST_INSTALL], 319 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 288 320 AC_ARG_ENABLE(fast-install, 289 321 changequote(<<, >>)dnl … … 291 323 changequote([, ])dnl 292 324 [p=${PACKAGE-default} 293 case "$enableval"in325 case $enableval in 294 326 yes) enable_fast_install=yes ;; 295 327 no) enable_fast_install=no ;; … … 310 342 311 343 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install 312 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 344 AC_DEFUN([AC_DISABLE_FAST_INSTALL], 345 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 313 346 AC_ENABLE_FAST_INSTALL(no)]) 314 347 … … 317 350 # Where MODE is either `yes' or `no'. If omitted, it defaults to 318 351 # `both'. 319 AC_DEFUN(AC_LIBTOOL_PICMODE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 352 AC_DEFUN([AC_LIBTOOL_PICMODE], 353 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 320 354 pic_mode=ifelse($#,1,$1,default)]) 321 355 322 356 323 357 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library 324 AC_DEFUN( AC_PATH_TOOL_PREFIX,358 AC_DEFUN([AC_PATH_TOOL_PREFIX], 325 359 [AC_MSG_CHECKING([for $1]) 326 360 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 327 [case "$MAGIC_CMD"in361 [case $MAGIC_CMD in 328 362 /*) 329 363 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. … … 344 378 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 345 379 if test -n "$file_magic_test_file"; then 346 case "$deplibs_check_method"in380 case $deplibs_check_method in 347 381 "file_magic "*) 348 382 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" … … 384 418 385 419 # AC_PATH_MAGIC - find a file program which can recognise a shared library 386 AC_DEFUN( AC_PATH_MAGIC,420 AC_DEFUN([AC_PATH_MAGIC], 387 421 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl 388 422 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) … … 398 432 399 433 # AC_PROG_LD - find the path to the GNU or non-GNU linker 400 AC_DEFUN( AC_PROG_LD,434 AC_DEFUN([AC_PROG_LD], 401 435 [AC_ARG_WITH(gnu-ld, 402 436 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], … … 406 440 AC_REQUIRE([AC_CANONICAL_BUILD])dnl 407 441 ac_prog=ld 408 if test "$ ac_cv_prog_gcc" = yes; then442 if test "$GCC" = yes; then 409 443 # Check if gcc -print-prog-name=ld gives a path. 410 444 AC_MSG_CHECKING([for ld used by GCC]) … … 416 450 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 417 451 esac 418 case "$ac_prog"in452 case $ac_prog in 419 453 # Accept absolute paths. 420 changequote(,)dnl 421 [\\/]* | [A-Za-z]:[\\/]*) 422 re_direlt='/[^/][^/]*/\.\./' 423 changequote([,])dnl 454 [[\\/]* | [A-Za-z]:[\\/]*)] 455 re_direlt=['/[^/][^/]*/\.\./'] 424 456 # Canonicalize the path of ld 425 457 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` … … 443 475 AC_MSG_CHECKING([for non-GNU ld]) 444 476 fi 445 AC_CACHE_VAL( ac_cv_path_LD,477 AC_CACHE_VAL(lt_cv_path_LD, 446 478 [if test -z "$LD"; then 447 479 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" … … 449 481 test -z "$ac_dir" && ac_dir=. 450 482 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 451 ac_cv_path_LD="$ac_dir/$ac_prog"483 lt_cv_path_LD="$ac_dir/$ac_prog" 452 484 # Check to see if the program is GNU ld. I'd rather use --version, 453 485 # but apparently some GNU ld's only accept -v. 454 486 # Break only if it was the GNU/non-GNU ld that we prefer. 455 if "$ ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then487 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then 456 488 test "$with_gnu_ld" != no && break 457 489 else … … 462 494 IFS="$ac_save_ifs" 463 495 else 464 ac_cv_path_LD="$LD" # Let the user override the test with a path.496 lt_cv_path_LD="$LD" # Let the user override the test with a path. 465 497 fi]) 466 LD="$ ac_cv_path_LD"498 LD="$lt_cv_path_LD" 467 499 if test -n "$LD"; then 468 500 AC_MSG_RESULT($LD) … … 474 506 ]) 475 507 476 AC_DEFUN( AC_PROG_LD_GNU,477 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,508 AC_DEFUN([AC_PROG_LD_GNU], 509 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 478 510 [# I'd rather use --version here, but apparently some GNU ld's only accept -v. 479 511 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then 480 ac_cv_prog_gnu_ld=yes512 lt_cv_prog_gnu_ld=yes 481 513 else 482 ac_cv_prog_gnu_ld=no514 lt_cv_prog_gnu_ld=no 483 515 fi]) 484 with_gnu_ld=$ ac_cv_prog_gnu_ld516 with_gnu_ld=$lt_cv_prog_gnu_ld 485 517 ]) 486 518 487 519 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker 488 520 # -- PORTME Some linkers may need a different reload flag. 489 AC_DEFUN( AC_PROG_LD_RELOAD_FLAG,521 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 490 522 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, 491 523 [lt_cv_ld_reload_flag='-r']) … … 496 528 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies 497 529 # -- PORTME fill in with the dynamic library characteristics 498 AC_DEFUN( AC_DEPLIBS_CHECK_METHOD,530 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 499 531 [AC_CACHE_CHECK([how to recognise dependant libraries], 500 532 lt_cv_deplibs_check_method, … … 513 545 # whether `pass_all' will *always* work, you probably want this one. 514 546 515 case "$host_os"in516 aix 4*)547 case $host_os in 548 aix*) 517 549 lt_cv_deplibs_check_method=pass_all 518 550 ;; … … 523 555 524 556 bsdi4*) 525 changequote(,)dnl 526 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' 527 changequote([, ])dnl 557 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'] 528 558 lt_cv_file_magic_cmd='/usr/bin/file -L' 529 559 lt_cv_file_magic_test_file=/shlib/libc.so … … 535 565 ;; 536 566 567 darwin* | rhapsody*) 568 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' 569 lt_cv_file_magic_cmd='/usr/bin/file -L' 570 case "$host_os" in 571 rhapsody* | darwin1.[012]) 572 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System' 573 ;; 574 *) # Darwin 1.3 on 575 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' 576 ;; 577 esac 578 ;; 579 537 580 freebsd* ) 538 581 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 539 case "$host_cpu"in582 case $host_cpu in 540 583 i*86 ) 541 584 # Not sure whether the presence of OpenBSD here was a mistake. 542 585 # Let's accept both of them until this is cleared up. 543 changequote(,)dnl 544 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' 545 changequote([, ])dnl 586 lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'] 546 587 lt_cv_file_magic_cmd=/usr/bin/file 547 588 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` … … 557 598 ;; 558 599 559 hpux10.20*) 560 # TODO: Does this work for hpux-11 too? 561 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' 562 lt_cv_file_magic_cmd=/usr/bin/file 563 lt_cv_file_magic_test_file=/usr/lib/libc.sl 600 hpux10.20*|hpux11*) 601 case $host_cpu in 602 hppa*) 603 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'] 604 lt_cv_file_magic_cmd=/usr/bin/file 605 lt_cv_file_magic_test_file=/usr/lib/libc.sl 606 ;; 607 ia64*) 608 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'] 609 lt_cv_file_magic_cmd=/usr/bin/file 610 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 611 ;; 612 esac 564 613 ;; 565 614 566 615 irix5* | irix6*) 567 case "$host_os"in616 case $host_os in 568 617 irix5*) 569 618 # this will be overridden with pass_all, but let us keep it just in case … … 571 620 ;; 572 621 *) 573 case "$LD"in622 case $LD in 574 623 *-32|*"-32 ") libmagic=32-bit;; 575 624 *-n32|*"-n32 ") libmagic=N32;; … … 578 627 esac 579 628 # this will be overridden with pass_all, but let us keep it just in case 580 changequote(,)dnl 581 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" 582 changequote([, ])dnl 629 lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"] 583 630 ;; 584 631 esac … … 589 636 # This must be Linux ELF. 590 637 linux-gnu*) 591 case "$host_cpu"in592 alpha* | i*86 | powerpc* | sparc* | ia64* )638 case $host_cpu in 639 alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* ) 593 640 lt_cv_deplibs_check_method=pass_all ;; 594 641 *) 595 642 # glibc up to 2.1.1 does not perform some relocations on ARM 596 changequote(,)dnl 597 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; 598 changequote([, ])dnl 643 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;; 599 644 esac 600 645 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` … … 602 647 603 648 netbsd*) 604 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then : 649 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 650 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] 605 651 else 606 changequote(,)dnl 607 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' 608 changequote([, ])dnl 609 lt_cv_file_magic_cmd='/usr/bin/file -L' 610 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 652 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'] 611 653 fi 654 ;; 655 656 newsos6) 657 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'] 658 lt_cv_file_magic_cmd=/usr/bin/file 659 lt_cv_file_magic_test_file=/usr/lib/libnls.so 612 660 ;; 613 661 … … 628 676 ;; 629 677 678 [sysv5uw[78]* | sysv4*uw2*)] 679 lt_cv_deplibs_check_method=pass_all 680 ;; 681 630 682 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 631 case "$host_vendor"in683 case $host_vendor in 632 684 ncr) 633 685 lt_cv_deplibs_check_method=pass_all 634 686 ;; 635 687 motorola) 636 changequote(,)dnl 637 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' 638 changequote([, ])dnl 688 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'] 639 689 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 640 690 ;; … … 649 699 650 700 # AC_PROG_NM - find the path to a BSD-compatible name lister 651 AC_DEFUN( AC_PROG_NM,701 AC_DEFUN([AC_PROG_NM], 652 702 [AC_MSG_CHECKING([for BSD-compatible nm]) 653 AC_CACHE_VAL( ac_cv_path_NM,703 AC_CACHE_VAL(lt_cv_path_NM, 654 704 [if test -n "$NM"; then 655 705 # Let the user override the test. 656 ac_cv_path_NM="$NM"706 lt_cv_path_NM="$NM" 657 707 else 658 708 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" … … 666 716 # Tru64's nm complains that /dev/null is an invalid object file 667 717 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then 668 ac_cv_path_NM="$tmp_nm -B"718 lt_cv_path_NM="$tmp_nm -B" 669 719 break 670 720 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then 671 ac_cv_path_NM="$tmp_nm -p"721 lt_cv_path_NM="$tmp_nm -p" 672 722 break 673 723 else 674 ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but724 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 675 725 continue # so that we can try to find one that supports BSD flags 676 726 fi … … 678 728 done 679 729 IFS="$ac_save_ifs" 680 test -z "$ ac_cv_path_NM" && ac_cv_path_NM=nm730 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 681 731 fi]) 682 NM="$ ac_cv_path_NM"732 NM="$lt_cv_path_NM" 683 733 AC_MSG_RESULT([$NM]) 684 734 ]) 685 735 686 736 # AC_CHECK_LIBM - check for math library 687 AC_DEFUN( AC_CHECK_LIBM,737 AC_DEFUN([AC_CHECK_LIBM], 688 738 [AC_REQUIRE([AC_CANONICAL_HOST])dnl 689 739 LIBM= 690 case "$host"in740 case $host in 691 741 *-*-beos* | *-*-cygwin* | *-*-pw32*) 692 742 # These system don't have libm … … 712 762 # flat and you're not using automake, define top_builddir and 713 763 # top_srcdir appropriately in the Makefiles. 714 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 715 case "$enable_ltdl_convenience" in 764 AC_DEFUN([AC_LIBLTDL_CONVENIENCE], 765 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 766 case $enable_ltdl_convenience in 716 767 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 717 768 "") enable_ltdl_convenience=yes … … 733 784 # top_srcdir appropriately in the Makefiles. 734 785 # In the future, this macro may have to be called after AC_PROG_LIBTOOL. 735 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 786 AC_DEFUN([AC_LIBLTDL_INSTALLABLE], 787 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 736 788 AC_CHECK_LIB(ltdl, main, 737 789 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], … … 761 813 762 814 # AC_LIBTOOL_CXX - enable support for C++ libraries 763 AC_DEFUN( AC_LIBTOOL_CXX,[AC_REQUIRE([_AC_LIBTOOL_CXX])])764 AC_DEFUN(_AC_LIBTOOL_CXX, 765 [AC_REQUIRE([AC_PROG_LIBTOOL]) 766 AC_REQUIRE([AC_PROG_CXX])815 AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])]) 816 817 AC_DEFUN([_AC_LIBTOOL_CXX], 818 [AC_REQUIRE([AC_PROG_CXX]) 767 819 AC_REQUIRE([AC_PROG_CXXCPP]) 768 820 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh" … … 772 824 dnl is set to the C++ compiler. 773 825 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \ 774 MAGIC_CMD="$MAGIC_CMD" LD FLAGS="$LDFLAGS" LIBS="$LIBS" \826 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ 775 827 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ 776 828 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ … … 790 842 791 843 # AC_LIBTOOL_GCJ - enable support for GCJ libraries 792 AC_DEFUN(AC_LIBTOOL_GCJ,[AC_REQUIRE([_AC_LIBTOOL_GCJ])]) 793 AC_DEFUN(_AC_LIBTOOL_GCJ, 844 AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])]) 845 846 AC_DEFUN([_AC_LIBTOOL_GCJ], 794 847 [AC_REQUIRE([AC_PROG_LIBTOOL]) 795 848 AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], … … 805 858 dnl is set to the C++ compiler. 806 859 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \ 807 MAGIC_CMD="$MAGIC_CMD" LD FLAGS="$LDFLAGS" LIBS="$LIBS" \860 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ 808 861 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ 809 862 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ … … 823 876 824 877 dnl old names 825 AC_DEFUN( AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl826 AC_DEFUN( AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl827 AC_DEFUN( AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl828 AC_DEFUN( AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl829 AC_DEFUN( AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl830 AC_DEFUN( AM_PROG_LD, [indir([AC_PROG_LD])])dnl831 AC_DEFUN( AM_PROG_NM, [indir([AC_PROG_NM])])dnl878 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 879 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 880 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 881 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 882 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 883 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 884 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 832 885 833 886 dnl This is just to silence aclocal about the macro not being used 834 887 ifelse([AC_DISABLE_FAST_INSTALL])dnl 835 888 836 AC_DEFUN([LT_AC_PROG_GCJ], [837 889 AC_DEFUN([LT_AC_PROG_GCJ], 890 [AC_CHECK_TOOL(GCJ, gcj, no) 838 891 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 839 892 AC_SUBST(GCJFLAGS) -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/ltcf-c.sh ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 3 3 # ltcf-c.sh - Create a C compiler specific configuration 4 4 # 5 # Copyright (C) 1996-2000 Free Software Foundation, Inc.5 # Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc. 6 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 7 7 # … … 39 39 40 40 ## Linker Characteristics 41 case "$host_os"in41 case $host_os in 42 42 cygwin* | mingw*) 43 43 # FIXME: the MSVC++ port hasn't been tested in a loooong time … … 57 57 58 58 # See if GNU ld supports shared libraries. 59 case "$host_os" in 60 aix3* | aix4*) 61 # On AIX, the GNU linker is very broken 62 ld_shlibs=no 63 cat <<EOF 1>&2 59 case $host_os in 60 aix3* | aix4* | aix5*) 61 # On AIX/PPC, the GNU linker is very broken 62 if test "$host_cpu" != ia64; then 63 ld_shlibs=no 64 cat <<EOF 1>&2 64 65 65 66 *** Warning: the GNU linker, at least up to release 2.9.1, is reported … … 70 71 71 72 EOF 73 fi 72 74 ;; 73 75 … … 107 109 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~ 108 110 test -f $output_objdir/impgen.exe || (cd $output_objdir && \ 109 if test "x$ HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \111 if test "x$BUILD_CC" != "x" ; then $BUILD_CC -o impgen impgen.c ; \ 110 112 else $CC -o impgen impgen.c ; fi)~ 111 $output_objdir/impgen $dir/$so name> $output_objdir/$soname-def'113 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' 112 114 113 115 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' … … 118 120 dll_entry=__cygwin_dll_entry@12 119 121 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ 120 case "$host_os"in122 case $host_os in 121 123 mingw*) 122 124 # mingw values … … 149 151 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' 150 152 153 # If the export-symbols file already is a .def file (1st line 154 # is EXPORTS), use it as is. 151 155 # If DATA tags from a recent dlltool are present, honour them! 152 archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~ 153 _lt_hint=1; 154 cat $export_symbols | while read symbol; do 155 set dummy \$symbol; 156 case \$# in 157 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; 158 *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; 159 esac; 160 _lt_hint=`expr 1 + \$_lt_hint`; 161 done~ 156 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then 157 cp $export_symbols $output_objdir/$soname-def; 158 else 159 echo EXPORTS > $output_objdir/$soname-def; 160 _lt_hint=1; 161 cat $export_symbols | while read symbol; do 162 set dummy \$symbol; 163 case \[$]# in 164 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; 165 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; 166 esac; 167 _lt_hint=`expr 1 + \$_lt_hint`; 168 done; 169 fi~ 162 170 '"$ltdll_cmds"' 163 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $ lib'$ltdll_obj'$libobjs $deplibs $compiler_flags~171 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ 164 172 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ 165 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~ 166 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ 167 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags' 173 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ 174 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ 175 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' 176 ;; 177 178 darwin* | rhapsody*) 179 allow_undefined_flag='-undefined suppress' 180 archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`' 181 # We need to add '_' to the symbols in $export_symbols first 182 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' 183 hardcode_direct=yes 184 hardcode_shlibpath_var=no 185 whole_archive_flag_spec='-all_load $convenience' 168 186 ;; 169 187 … … 173 191 wlarc= 174 192 else 175 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'176 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'193 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 194 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 177 195 fi 178 196 ;; … … 237 255 else 238 256 # PORTME fill in a description of your system's linker (not GNU ld) 239 case "$host_os"in257 case $host_os in 240 258 aix3*) 241 259 allow_undefined_flag=unsupported … … 252 270 ;; 253 271 254 aix4* )255 hardcode_ libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'272 aix4* | aix5*) 273 hardcode_direct=yes 256 274 hardcode_libdir_separator=':' 275 link_all_deplibs=yes 276 # When large executables or shared objects are built, AIX ld can 277 # have problems creating the table of contents. If linking a library 278 # or program results in "error TOC overflow" add -mminimal-toc to 279 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 280 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 257 281 if test "$with_gcc" = yes; then 258 collect2name=`${CC} -print-prog-name=collect2` 259 if test -f "$collect2name" && \ 260 strings "$collect2name" | grep resolve_lib_name >/dev/null 261 then 262 # We have reworked collect2 263 hardcode_direct=yes 282 case $host_os in aix4.[012]|aix4.[012].*) 283 # We only want to do this on AIX 4.2 and lower, the check 284 # below for broken collect2 doesn't work under 4.3+ 285 collect2name=`${CC} -print-prog-name=collect2` 286 if test -f "$collect2name" && \ 287 strings "$collect2name" | grep resolve_lib_name >/dev/null 288 then 289 # We have reworked collect2 290 hardcode_direct=yes 291 else 292 # We have old collect2 293 hardcode_direct=unsupported 294 # It fails to find uninstalled libraries when the uninstalled 295 # path is not listed in the libpath. Setting hardcode_minus_L 296 # to unsupported forces relinking 297 hardcode_minus_L=yes 298 hardcode_libdir_flag_spec='-L$libdir' 299 hardcode_libdir_separator= 300 fi 301 esac 302 shared_flag='-shared' 303 else 304 # not using gcc 305 if test "$host_cpu" = ia64; then 306 shared_flag='${wl}-G' 264 307 else 265 # We have old collect2 266 hardcode_direct=unsupported 267 # It fails to find uninstalled libraries when the uninstalled 268 # path is not listed in the libpath. Setting hardcode_minus_L 269 # to unsupported forces relinking 270 hardcode_minus_L=yes 271 hardcode_libdir_flag_spec='-L$libdir' 272 hardcode_libdir_separator= 308 shared_flag='${wl}-bM:SRE' 273 309 fi 274 shared_flag='-shared' 275 else 276 shared_flag='${wl}-bM:SRE' 277 hardcode_direct=yes 278 fi 279 allow_undefined_flag=' ${wl}-berok' 280 archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' 281 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' 282 case "$host_os" in aix4.[01]|aix4.[01].*) 283 # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on 284 always_export_symbols=yes ;; 285 esac 286 ;; 310 fi 311 312 if test "$host_cpu" = ia64; then 313 # On IA64, the linker does run time linking by default, so we don't 314 # have to do anything special. 315 aix_use_runtimelinking=no 316 if test $with_gnu_ld = no; then 317 exp_sym_flag='-Bexport' 318 no_entry_flag="" 319 fi 320 else 321 # Test if we are trying to use run time linking, or normal AIX style linking. 322 # If -brtl is somewhere in LDFLAGS, we need to do run time linking. 323 aix_use_runtimelinking=no 324 for ld_flag in $LDFLAGS; do 325 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then 326 aix_use_runtimelinking=yes 327 break 328 fi 329 done 330 exp_sym_flag='-bexport' 331 no_entry_flag='-bnoentry' 332 fi 333 # -bexpall does not export symbols beginning with underscore (_) 334 always_export_symbols=yes 335 if test "$aix_use_runtimelinking" = yes; then 336 # Warning - without using the other run time loading flags (-brtl), -berok will 337 # link without error, but may produce a broken library. 338 allow_undefined_flag=' ${wl}-berok' 339 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' 340 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 341 else 342 if test "$host_cpu" = ia64; then 343 if test $with_gnu_ld = no; then 344 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' 345 allow_undefined_flag="-z nodefs" 346 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 347 fi 348 else 349 allow_undefined_flag=' ${wl}-berok' 350 # -bexpall does not export symbols beginning with underscore (_) 351 always_export_symbols=yes 352 # Exported symbols can be pulled into shared objects from archives 353 whole_archive_flag_spec=' ' 354 build_libtool_need_lc=yes 355 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' 356 # This is similar to how AIX traditionally builds it's shared libraries. 357 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 358 fi 359 fi 360 ;; 287 361 288 362 amigaos*) … … 309 383 # FIXME: Should let the user specify the lib program. 310 384 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' 311 fix_srcfile_path='`cygpath -w $srcfile`'385 fix_srcfile_path='`cygpath -w "$srcfile"`' 312 386 ;; 313 387 … … 344 418 345 419 hpux9* | hpux10* | hpux11*) 346 case "$host_os" in 347 hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; 348 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; 420 case "$host_cpu" in 421 ia64*) 422 hardcode_direct=no 423 hardcode_shlibpath_var=no 424 archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' 425 hardcode_libdir_flag_spec='-L$libdir' ;; 426 *) 427 if test $with_gcc = yes; then 428 case "$host_os" in 429 hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; 430 *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; 431 esac 432 else 433 case $host_os in 434 hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; 435 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; 436 esac 437 fi 438 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' 439 hardcode_libdir_separator=: 440 hardcode_minus_L=yes # Not in the search PATH, but as the default 441 # location of the library. 442 ;; 349 443 esac 350 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'351 hardcode_libdir_separator=:352 hardcode_direct=yes353 hardcode_minus_L=yes # Not in the search PATH, but as the default354 # location of the library.355 444 export_dynamic_flag_spec='${wl}-E' 445 hardcode_direct=yes 356 446 ;; 357 447 … … 373 463 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 374 464 fi 375 hardcode_libdir_flag_spec='${wl}-R$libdir' 376 hardcode_direct=yes 465 hardcode_libdir_flag_spec='-R$libdir' 466 hardcode_direct=yes 467 hardcode_shlibpath_var=no 468 ;; 469 470 newsos6) 471 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' 472 hardcode_direct=yes 473 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 474 hardcode_libdir_separator=: 377 475 hardcode_shlibpath_var=no 378 476 ;; … … 409 507 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 410 508 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 509 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 411 510 else 412 511 allow_undefined_flag=' -expect_unresolved \*' 413 512 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 414 fi 415 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 513 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ 514 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' 515 516 # cc supports -rpath directly 517 hardcode_libdir_flag_spec='-rpath $libdir' 518 fi 416 519 hardcode_libdir_separator=: 417 520 ;; … … 425 528 426 529 solaris*) 427 no_undefined_flag=' -z text' 428 # $CC -shared without GNU ld will not create a library from C++ 429 # object files and a static libstdc++, better avoid it by now 430 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 431 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 432 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 530 no_undefined_flag=' -z defs' 531 if test "$with_gcc" = yes; then 532 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 533 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 534 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 535 else 536 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 537 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 538 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 539 fi 433 540 hardcode_libdir_flag_spec='-R$libdir' 434 541 hardcode_shlibpath_var=no 435 case "$host_os"in542 case $host_os in 436 543 solaris2.[0-5] | solaris2.[0-5].*) ;; 437 544 *) # Supported since Solaris 2.6 (maybe 2.5.1?) … … 505 612 ;; 506 613 507 unixware7*) 508 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 614 sysv5uw7* | unixware7*) 615 no_undefined_flag='${wl}-z ${wl}text' 616 if test "$GCC" = yes; then 617 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 618 else 619 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 620 fi 509 621 runpath_var='LD_RUN_PATH' 510 622 hardcode_shlibpath_var=no … … 532 644 ac_cv_prog_cc_static='-static' 533 645 534 case "$host_os" in 535 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) 536 # PIC is the default for these OSes. 537 ;; 646 case $host_os in 538 647 aix*) 539 # Below there is a dirty hack to force normal static linking with -ldl 540 # The problem is because libdl dynamically linked with both libc and 541 # libC (AIX C++ library), which obviously doesn't included in libraries 542 # list by gcc. This cause undefined symbols with -static flags. 543 # This hack allows C programs to be linked with "-static -ldl", but 544 # we not sure about C++ programs. 545 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" 546 ;; 547 cygwin* | mingw* | os2*) 548 # This hack is so that the source file can tell whether it is being 549 # built for inclusion in a dll (and should export symbols for example). 550 ac_cv_prog_cc_pic='-DDLL_EXPORT' 648 # All AIX code is PIC. 649 if test "$host_cpu" = ia64; then 650 # AIX 5 now supports IA64 processor 651 lt_cv_prog_cc_static='-Bstatic' 652 else 653 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' 654 fi 551 655 ;; 552 656 amigaos*) … … 556 660 ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' 557 661 ;; 662 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) 663 # PIC is the default for these OSes. 664 ;; 665 cygwin* | mingw* | os2*) 666 # This hack is so that the source file can tell whether it is being 667 # built for inclusion in a dll (and should export symbols for example). 668 ac_cv_prog_cc_pic='-DDLL_EXPORT' 669 ;; 670 darwin* | rhapsody*) 671 # PIC is the default on this platform 672 # Common symbols not allowed in MH_DYLIB files 673 lt_cv_prog_cc_pic='-fno-common' 674 ;; 675 *djgpp*) 676 # DJGPP does not support shared libraries at all 677 ac_cv_prog_cc_pic= 678 ;; 558 679 sysv4*MP*) 559 680 if test -d /usr/nec; then … … 567 688 else 568 689 # PORTME Check for PIC flags for the system compiler. 569 case "$host_os"in570 aix 3* | aix4*)690 case $host_os in 691 aix*) 571 692 # All AIX code is PIC. 572 ac_cv_prog_cc_static= '-bnso -bI:/lib/syscalls.exp'693 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" 573 694 ;; 574 695 … … 592 713 ;; 593 714 715 newsos6) 716 ac_cv_prog_cc_pic='-KPIC' 717 ac_cv_prog_cc_static='-Bstatic' 718 ;; 719 594 720 osf3* | osf4* | osf5*) 595 721 # All OSF/1 code is PIC. … … 639 765 esac 640 766 fi 641 ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC" 767 case "$host_os" in 768 # Platforms which do not suport PIC and -DPIC is meaningless 769 # on them: 770 *djgpp*) 771 ac_cv_prog_cc_pic= 772 ;; 773 *) 774 ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC" 775 ;; 776 esac 642 777 fi 643 778 644 779 need_lc=yes 645 780 if test "$enable_shared" = yes && test "$with_gcc" = yes; then 646 case "$archive_cmds"in781 case $archive_cmds in 647 782 *'~'*) 648 783 # FIXME: we may have to deal with multi-command sequences. … … 664 799 soname=conftest 665 800 lib=conftest 666 libobjs=conftest. o801 libobjs=conftest.$objext 667 802 deplibs= 668 803 wl=$ac_cv_prog_cc_wl -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/ltcf-cxx.sh ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 3 3 # ltcf-cxx.sh - Create a C++ compiler specific configuration 4 4 # 5 # Copyright (C) 1996-1999, 2000Free Software Foundation, Inc.5 # Copyright (C) 1996-1999, 2000, 2001, 2003 Free Software Foundation, Inc. 6 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 7 7 # … … 69 69 70 70 # Check if GNU C++ uses GNU ld as the underlying linker, since the 71 # archiving commands below assume that GNU ld is being used. 72 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \ 73 egrep 'GNU ld' > /dev/null; then 74 with_gnu_ld=yes 75 71 # archiving commands below assume that GNU ld is being used. The 72 # assumption here is that the linker is going to be the same as that 73 # used by the C compiler. For the purposes of GCC, this is ok, but 74 # if someone uses g++ along with a non-GNU C compiler that doesn't 75 # use GNU ld, we may lose. This is ok for the toolchain tree, since 76 # the only users of ltcf-cxx.sh are libstdc++-v3 and libjava, 77 # anyway, and those use both gcc and g++, so the settings are bound 78 # to be the same. 79 80 if test "$with_gnu_ld" = yes; then 76 81 archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 77 82 archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' … … 93 98 fi 94 99 else 95 with_gnu_ld=no96 100 wlarc= 97 101 … … 107 111 # what "hidden" libraries, object files and flags are used when 108 112 # linking a shared library. 109 output_verbose_link_cmd s='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'113 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 110 114 111 115 else 112 116 with_gcc=no 113 with_gnu_ld=no114 117 wlarc= 115 118 fi 116 119 117 # In general, the C++ compiler should always link C++ objects.118 case $target in119 *aix3* | *aix4*)120 # AIX just has to be different, doesn't it? :-\121 LD=makeC++SharedLib_r122 LDFLAGS="$LDFLAGS -p 0"123 ;;124 *)125 LD="$CC"126 LDFLAGS="$LDFLAGS"127 ;;128 esac129 130 131 120 # PORTME: fill in a description of your system's C++ link characteristics 132 case "$host_os"in121 case $host_os in 133 122 aix3*) 134 123 # FIXME: insert proper C++ library support 135 124 ld_shlibs=no 136 125 ;; 137 aix4*) 138 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 139 # -bexpall does not export symbols beginning with underscore (_) 126 aix4* | aix5*) 127 archive_cmds='' 128 hardcode_direct=yes 129 hardcode_libdir_separator=':' 130 link_all_deplibs=yes 131 # When large executables or shared objects are built, AIX ld can 132 # have problems creating the table of contents. If linking a library 133 # or program results in "error TOC overflow" add -mminimal-toc to 134 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 135 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 136 if test "$with_gcc" = yes; then 137 case $host_os in aix4.[012]|aix4.[012].*) 138 # We only want to do this on AIX 4.2 and lower, the check 139 # below for broken collect2 doesn't work under 4.3+ 140 collect2name=`${CC} -print-prog-name=collect2` 141 if test -f "$collect2name" && \ 142 strings "$collect2name" | grep resolve_lib_name >/dev/null 143 then 144 # We have reworked collect2 145 hardcode_direct=yes 146 else 147 # We have old collect2 148 hardcode_direct=unsupported 149 # It fails to find uninstalled libraries when the uninstalled 150 # path is not listed in the libpath. Setting hardcode_minus_L 151 # to unsupported forces relinking 152 hardcode_minus_L=yes 153 hardcode_libdir_flag_spec='-L$libdir' 154 hardcode_libdir_separator= 155 fi 156 esac 157 shared_flag='-shared' 158 else 159 # not using gcc 160 if test "$host_cpu" = ia64; then 161 shared_flag='${wl}-G' 162 else 163 shared_flag='${wl}-bM:SRE' 164 fi 165 fi 166 167 if test "$host_cpu" = ia64; then 168 # On IA64, the linker does run time linking by default, so we don't 169 # have to do anything special. 170 aix_use_runtimelinking=no 171 if test $with_gnu_ld = no; then 172 exp_sym_flag='-Bexport' 173 no_entry_flag="" 174 fi 175 else 176 # Test if we are trying to use run time linking, or normal AIX style linking. 177 # If -brtl is somewhere in LDFLAGS, we need to do run time linking. 178 aix_use_runtimelinking=no 179 for ld_flag in $LDFLAGS; do 180 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then 181 aix_use_runtimelinking=yes 182 break 183 fi 184 done 185 exp_sym_flag='-bexport' 186 no_entry_flag='-bnoentry' 187 fi 188 # It seems that -bexpall does not export symbols beginning with 189 # underscore (_), so it is better to generate a list of symbols to export. 140 190 always_export_symbols=yes 141 # Exported symbols can be pulled into shared objects from archives 142 whole_archive_flag_spec=' ' 143 build_libtool_need_lc=yes 191 if test "$aix_use_runtimelinking" = yes; then 192 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' 193 allow_undefined_flag=' -Wl,-G' 194 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}-brtl \${wl}$exp_sym_flag:\$export_symbols" 195 else 196 if test "$host_cpu" = ia64; then 197 if test $with_gnu_ld = no; then 198 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' 199 allow_undefined_flag="-z nodefs" 200 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 201 fi 202 else 203 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' 204 # Warning - without using the other run time loading flags, -berok will 205 # link without error, but may produce a broken library. 206 no_undefined_flag=' ${wl}-bnoerok' 207 allow_undefined_flag=' ${wl}-berok' 208 # -bexpall does not export symbols beginning with underscore (_) 209 always_export_symbols=yes 210 # Exported symbols can be pulled into shared objects from archives 211 whole_archive_flag_spec=' ' 212 build_libtool_need_lc=yes 213 # This is similar to how AIX traditionally builds it's shared libraries. 214 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 215 fi 216 fi 144 217 ;; 145 218 chorus*) 146 case "$cc_basename"in219 case $cc_basename in 147 220 *) 148 221 # FIXME: insert proper C++ library support 149 222 ld_shlibs=no 150 223 ;; 151 esac 224 esac 152 225 ;; 153 226 dgux*) 154 case "$cc_basename"in227 case $cc_basename in 155 228 ec++) 156 229 # FIXME: insert proper C++ library support … … 168 241 esac 169 242 ;; 243 freebsd[12]*) 244 # C++ shared libraries reported to be fairly broken before switch to ELF 245 ld_shlibs=no 246 ;; 170 247 freebsd*) 171 # FreeBSD uses GNU C++ and GNU ld 172 # FIXME: insert proper C++ library support 173 ld_shlibs=no 248 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 249 # conventions 250 ld_shlibs=yes 251 ;; 252 gnu*) 174 253 ;; 175 254 hpux*) 176 case "$cc_basename" in 255 if test $with_gnu_ld = no; then 256 case "$host_cpu" in 257 ia64*) 258 hardcode_libdir_flag_spec='-L$libdir' 259 hardcode_shlibpath_var=no ;; 260 *) 261 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ;; 262 esac 263 hardcode_direct=yes 264 hardcode_libdir_separator=: 265 export_dynamic_flag_spec='${wl}-E' 266 fi 267 hardcode_minus_L=yes # Not in the search PATH, but as the default 268 # location of the library. 269 270 case $cc_basename in 177 271 CC) 178 272 # FIXME: insert proper C++ library support … … 180 274 ;; 181 275 aCC) 182 case "$host_os"in276 case $host_os in 183 277 hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; 184 278 *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; 185 279 esac 186 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'187 hardcode_libdir_separator=:188 hardcode_direct=yes189 hardcode_minus_L=yes # Not in the search PATH, but as the default190 # location of the library.191 export_dynamic_flag_spec='${wl}-E'192 193 280 # Commands to make compiler produce verbose output that lists 194 281 # what "hidden" libraries, object files and flags are used when … … 199 286 # from the output so that they don't get included in the library 200 287 # dependencies. 201 output_verbose_link_cmd s='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'288 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 202 289 ;; 203 290 *) 204 # FIXME: insert proper C++ library support 205 ld_shlibs=no 291 if test $with_gcc = yes; then 292 if test $with_gnu_ld = no; then 293 case "$host_os" in 294 hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; 295 *) 296 case "$host_cpu" in 297 ia64*) 298 archive_cmds='$LD -b +h $soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' ;; 299 *) 300 archive_cmds='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; 301 esac 302 ;; 303 esac 304 fi 305 else 306 # FIXME: insert proper C++ library support 307 ld_shlibs=no 308 fi 206 309 ;; 207 310 esac 208 311 ;; 209 312 irix5* | irix6*) 210 case "$cc_basename"in313 case $cc_basename in 211 314 CC) 212 315 # SGI C++ … … 222 325 if test "$with_gcc" = yes; then 223 326 if test "$with_gnu_ld" = no; then 224 archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'327 archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 225 328 else 226 archive_cmds='$ LD -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'329 archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib' 227 330 fi 228 331 fi … … 234 337 ;; 235 338 linux*) 236 case "$cc_basename"in339 case $cc_basename in 237 340 KCC) 238 341 # Kuck and Associates, Inc. (KAI) C++ Compiler … … 252 355 # from the output so that they don't get included in the library 253 356 # dependencies. 254 output_verbose_link_cmd s='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'357 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 255 358 256 359 hardcode_libdir_flag_spec='${wl}--rpath,$libdir' … … 278 381 # from the output so that they don't get included in the library 279 382 # dependencies. 280 output_verbose_link_cmd s='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'383 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 281 384 ;; 282 385 esac … … 291 394 ;; 292 395 mvs*) 293 case "$cc_basename"in396 case $cc_basename in 294 397 cxx) 295 398 # FIXME: insert proper C++ library support … … 300 403 ld_shlibs=no 301 404 ;; 302 esac 405 esac 303 406 ;; 304 407 netbsd*) … … 306 409 ;; 307 410 osf3*) 308 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then 309 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 310 archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 311 312 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 313 hardcode_libdir_separator=: 314 315 # Commands to make compiler produce verbose output that lists 316 # what "hidden" libraries, object files and flags are used when 317 # linking a shared library. 318 output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 319 fi 320 321 case "$cc_basename" in 411 case $cc_basename in 322 412 KCC) 323 413 # Kuck and Associates, Inc. (KAI) C++ Compiler … … 356 446 # from the output so that they don't get included in the library 357 447 # dependencies. 358 output_verbose_link_cmd s='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'448 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 359 449 ;; 360 450 *) 361 # FIXME: insert proper C++ library support 362 ld_shlibs=no 451 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then 452 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 453 archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 454 455 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 456 hardcode_libdir_separator=: 457 458 # Commands to make compiler produce verbose output that lists 459 # what "hidden" libraries, object files and flags are used when 460 # linking a shared library. 461 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 462 else 463 # FIXME: insert proper C++ library support 464 ld_shlibs=no 465 fi 363 466 ;; 364 467 esac 365 468 ;; 366 469 osf4* | osf5*) 367 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then 368 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 369 archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 370 371 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 372 hardcode_libdir_separator=: 373 374 # Commands to make compiler produce verbose output that lists 375 # what "hidden" libraries, object files and flags are used when 376 # linking a shared library. 377 output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 378 fi 379 380 case "$cc_basename" in 470 case $cc_basename in 381 471 KCC) 382 472 # Kuck and Associates, Inc. (KAI) C++ Compiler … … 400 490 ;; 401 491 cxx) 402 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 403 archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 404 405 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 492 allow_undefined_flag=' -expect_unresolved \*' 493 archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 494 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~ 495 echo "-hidden">> $lib.exp~ 496 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ 497 $rm $lib.exp' 498 499 hardcode_libdir_flag_spec='-rpath $libdir' 406 500 hardcode_libdir_separator=: 407 501 … … 414 508 # from the output so that they don't get included in the library 415 509 # dependencies. 416 output_verbose_link_cmd s='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'510 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 417 511 ;; 418 512 *) 419 # FIXME: insert proper C++ library support 420 ld_shlibs=no 513 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then 514 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' 515 archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 516 517 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 518 hardcode_libdir_separator=: 519 520 # Commands to make compiler produce verbose output that lists 521 # what "hidden" libraries, object files and flags are used when 522 # linking a shared library. 523 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 524 else 525 # FIXME: insert proper C++ library support 526 ld_shlibs=no 527 fi 421 528 ;; 422 529 esac … … 427 534 ;; 428 535 sco*) 429 case "$cc_basename"in536 case $cc_basename in 430 537 CC) 431 538 # FIXME: insert proper C++ library support … … 439 546 ;; 440 547 sunos4*) 441 case "$cc_basename"in548 case $cc_basename in 442 549 CC) 443 550 # Sun C++ 4.x … … 457 564 ;; 458 565 solaris*) 459 case "$cc_basename"in566 case $cc_basename in 460 567 CC) 461 568 # Sun C++ 4.2, 5.x and Centerline C++ 462 no_undefined_flag=' -z text'569 no_undefined_flag=' -zdefs' 463 570 archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 464 571 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ … … 467 574 hardcode_libdir_flag_spec='-R$libdir' 468 575 hardcode_shlibpath_var=no 469 case "$host_os"in576 case $host_os in 470 577 solaris2.[0-5] | solaris2.[0-5].*) ;; 471 578 *) … … 487 594 # from the output so that they don't get included in the library 488 595 # dependencies. 489 output_verbose_link_cmd s='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'596 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 490 597 491 598 # Archives containing C++ object files must be created using … … 505 612 # GNU C++ compiler with Solaris linker 506 613 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then 614 no_undefined_flag=' ${wl}-z ${wl}defs' 507 615 if $CC --version | egrep -v '^2\.7' > /dev/null; then 508 archive_cmds='$ LD -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'616 archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 509 617 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 510 $ LD -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'618 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 511 619 512 620 # Commands to make compiler produce verbose output that lists 513 621 # what "hidden" libraries, object files and flags are used when 514 622 # linking a shared library. 515 output_verbose_link_cmd s="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""623 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" 516 624 else 517 625 # g++ 2.7 appears to require `-G' NOT `-shared' on this 518 626 # platform. 519 archive_cmds='$ LD -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'627 archive_cmds='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 520 628 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 521 $ LD -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'629 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 522 630 523 631 # Commands to make compiler produce verbose output that lists 524 632 # what "hidden" libraries, object files and flags are used when 525 633 # linking a shared library. 526 output_verbose_link_cmd s="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""634 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" 527 635 fi 528 636 … … 530 638 fi 531 639 ;; 532 esac 640 esac 533 641 ;; 534 642 tandem*) 535 case "$cc_basename"in643 case $cc_basename in 536 644 NCC) 537 645 # NonStop-UX NCC 3.20 … … 543 651 ld_shlibs=no 544 652 ;; 545 esac 653 esac 546 654 ;; 547 655 unixware*) … … 571 679 ac_cv_prog_cc_can_build_shared=$can_build_shared 572 680 573 # It is not enough to reset these cached values, they must be unset. 574 unset ac_cv_prog_cc_pic_works 575 unset ac_cv_prog_cc_static_works 681 ac_cv_prog_cc_pic_works= 682 ac_cv_prog_cc_static_works= 576 683 577 684 if test "$with_gcc" = yes; then … … 579 686 ac_cv_prog_cc_static='-static' 580 687 581 case "$host_os" in 582 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) 583 # PIC is the default for these OSes. 584 ;; 688 case $host_os in 585 689 aix*) 586 # Below there is a dirty hack to force normal static linking with -ldl 587 # The problem is because libdl dynamically linked with both libc and 588 # libC (AIX C++ library), which obviously doesn't included in libraries 589 # list by gcc. This cause undefined symbols with -static flags. 590 # This hack allows C programs to be linked with "-static -ldl", but 591 # we not sure about C++ programs. 592 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" 593 ;; 594 cygwin* | mingw* | os2*) 595 # This hack is so that the source file can tell whether it is being 596 # built for inclusion in a dll (and should export symbols for example). 597 ac_cv_prog_cc_pic='-DDLL_EXPORT' 690 # All AIX code is PIC. 691 if test "$host_cpu" = ia64; then 692 # AIX 5 now supports IA64 processor 693 lt_cv_prog_cc_static='-Bstatic' 694 else 695 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' 696 fi 598 697 ;; 599 698 amigaos*) … … 603 702 ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' 604 703 ;; 704 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) 705 # PIC is the default for these OSes. 706 ;; 707 cygwin* | mingw* | os2*) 708 # This hack is so that the source file can tell whether it is being 709 # built for inclusion in a dll (and should export symbols for example). 710 ac_cv_prog_cc_pic='-DDLL_EXPORT' 711 ;; 712 darwin* | rhapsody*) 713 # PIC is the default on this platform 714 # Common symbols not allowed in MH_DYLIB files 715 lt_cv_prog_cc_pic='-fno-common' 716 ;; 717 *djgpp*) 718 # DJGPP does not support shared libraries at all 719 ac_cv_prog_cc_pic= 720 ;; 605 721 sysv4*MP*) 606 722 if test -d /usr/nec; then … … 613 729 esac 614 730 else 615 case "$host_os"in616 aix4* )731 case $host_os in 732 aix4* | aix5*) 617 733 # All AIX code is PIC. 734 if test "$host_cpu" = ia64; then 735 # AIX 5 now supports IA64 processor 736 lt_cv_prog_cc_static='-Bstatic' 737 else 738 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' 739 fi 618 740 ;; 619 741 chorus*) 620 case "$cc_basename"in742 case $cc_basename in 621 743 cxch68) 622 744 # Green Hills C++ Compiler 623 745 # ac_cv_prog_cc_static="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 624 746 ;; 625 esac 747 esac 626 748 ;; 627 749 dgux*) 628 case "$cc_basename"in750 case $cc_basename in 629 751 ec++) 630 752 ac_cv_prog_cc_pic='-KPIC' … … 641 763 # FreeBSD uses GNU C++ 642 764 ;; 765 gnu*) 766 ;; 643 767 hpux9* | hpux10* | hpux11*) 644 case "$cc_basename"in768 case $cc_basename in 645 769 CC) 646 770 ac_cv_prog_cc_wl='-Wl,' … … 658 782 ;; 659 783 irix5* | irix6*) 660 case "$cc_basename"in784 case $cc_basename in 661 785 CC) 662 786 ac_cv_prog_cc_wl='-Wl,' … … 669 793 ;; 670 794 linux*) 671 case "$cc_basename"in795 case $cc_basename in 672 796 KCC) 673 797 # KAI C++ Compiler … … 691 815 ;; 692 816 mvs*) 693 case "$cc_basename"in817 case $cc_basename in 694 818 cxx) 695 819 ac_cv_prog_cc_pic='-W c,exportall' … … 697 821 *) 698 822 ;; 699 esac 823 esac 700 824 ;; 701 825 netbsd*) 702 826 ;; 703 827 osf3* | osf4* | osf5*) 704 case "$cc_basename"in828 case $cc_basename in 705 829 KCC) 706 830 ac_cv_prog_cc_wl='--backend -Wl,' … … 725 849 ;; 726 850 sco*) 727 case "$cc_basename"in851 case $cc_basename in 728 852 CC) 729 853 ac_cv_prog_cc_pic='-fPIC' … … 734 858 ;; 735 859 solaris*) 736 case "$cc_basename"in860 case $cc_basename in 737 861 CC) 738 862 # Sun C++ 4.2, 5.x and Centerline C++ … … 747 871 *) 748 872 ;; 749 esac 873 esac 750 874 ;; 751 875 sunos4*) 752 case "$cc_basename"in876 case $cc_basename in 753 877 CC) 754 878 # Sun C++ 4.x … … 765 889 ;; 766 890 tandem*) 767 case "$cc_basename"in891 case $cc_basename in 768 892 NCC) 769 893 # NonStop-UX NCC 3.20 … … 772 896 *) 773 897 ;; 774 esac 898 esac 775 899 ;; 776 900 unixware*) … … 783 907 esac 784 908 fi 785 ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC" 909 910 case "$host_os" in 911 # Platforms which do not suport PIC and -DPIC is meaningless 912 # on them: 913 *djgpp*) 914 ac_cv_prog_cc_pic= 915 ;; 916 *) 917 ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC" 918 ;; 919 esac 786 920 787 921 … … 799 933 800 934 801 if eval $ac_compile2>&5; then935 if (eval $ac_compile) 2>&5; then 802 936 # Parse the compiler output and extract the necessary 803 937 # objects, libraries and library flags. … … 807 941 pre_test_object_deps_done=no 808 942 809 for p in `eval $output_verbose_link_cmd s`; do943 for p in `eval $output_verbose_link_cmd`; do 810 944 811 945 case $p in -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/ltcf-gcj.sh ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 3 3 # ltcf-gcj.sh - Create a GCJ compiler specific configuration 4 4 # 5 # Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.5 # Copyright (C) 1996-1999, 2000, 2001, 2003 Free Software Foundation, Inc. 6 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 7 7 # … … 42 42 43 43 ## Linker Characteristics 44 case "$host_os"in44 case $host_os in 45 45 cygwin* | mingw*) 46 46 # FIXME: the MSVC++ port hasn't been tested in a loooong time … … 60 60 61 61 # See if GNU ld supports shared libraries. 62 case "$host_os" in 63 aix3* | aix4*) 64 # On AIX, the GNU linker is very broken 65 ld_shlibs=no 66 cat <<EOF 1>&2 62 case $host_os in 63 aix3* | aix4* | aix5*) 64 # On AIX/PPC, the GNU linker is very broken 65 if test "$host_cpu" != ia64; then 66 ld_shlibs=no 67 cat <<EOF 1>&2 67 68 68 69 *** Warning: the GNU linker, at least up to release 2.9.1, is reported … … 73 74 74 75 EOF 76 fi 75 77 ;; 76 78 … … 110 112 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~ 111 113 test -f $output_objdir/impgen.exe || (cd $output_objdir && \ 112 if test "x$ HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \114 if test "x$BUILD_CC" != "x" ; then $BUILD_CC -o impgen impgen.c ; \ 113 115 else $CC -o impgen impgen.c ; fi)~ 114 $output_objdir/impgen $dir/$so name> $output_objdir/$soname-def'116 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' 115 117 116 118 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' … … 121 123 dll_entry=__cygwin_dll_entry@12 122 124 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ 123 case "$host_os"in125 case $host_os in 124 126 mingw*) 125 127 # mingw values … … 152 154 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' 153 155 156 # If the export-symbols file already is a .def file (1st line 157 # is EXPORTS), use it as is. 154 158 # If DATA tags from a recent dlltool are present, honour them! 155 archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~ 156 _lt_hint=1; 157 cat $export_symbols | while read symbol; do 158 set dummy \$symbol; 159 case \$# in 160 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; 161 *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; 162 esac; 163 _lt_hint=`expr 1 + \$_lt_hint`; 164 done~ 159 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then 160 cp $export_symbols $output_objdir/$soname-def; 161 else 162 echo EXPORTS > $output_objdir/$soname-def; 163 _lt_hint=1; 164 cat $export_symbols | while read symbol; do 165 set dummy \$symbol; 166 case \[$]# in 167 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; 168 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; 169 esac; 170 _lt_hint=`expr 1 + \$_lt_hint`; 171 done; 172 fi~ 165 173 '"$ltdll_cmds"' 166 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_ gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib'$ltdll_obj'$libobjs $deplibs $compiler_flags~174 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ 167 175 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ 168 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_ gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib'$ltdll_obj'$libobjs $deplibs $compiler_flags~169 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp ~170 $CC $output_objdir/$soname-exp '$lt_cv_ gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib'$ltdll_obj'$libobjs $deplibs $compiler_flags'176 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ 177 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ 178 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' 171 179 ;; 172 180 … … 176 184 wlarc= 177 185 else 178 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'179 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'186 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 187 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 180 188 fi 181 189 ;; … … 240 248 else 241 249 # PORTME fill in a description of your system's linker (not GNU ld) 242 case "$host_os"in250 case $host_os in 243 251 aix3*) 244 252 allow_undefined_flag=unsupported … … 255 263 ;; 256 264 257 aix4* )258 hardcode_ libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'265 aix4* | aix5*) 266 hardcode_direct=yes 259 267 hardcode_libdir_separator=':' 268 link_all_deplibs=yes 269 # When large executables or shared objects are built, AIX ld can 270 # have problems creating the table of contents. If linking a library 271 # or program results in "error TOC overflow" add -mminimal-toc to 272 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 273 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 260 274 if test "$with_gcc" = yes; then 261 collect2name=`${CC} -print-prog-name=collect2` 262 if test -f "$collect2name" && \ 263 strings "$collect2name" | grep resolve_lib_name >/dev/null 264 then 265 # We have reworked collect2 266 hardcode_direct=yes 275 case $host_os in aix4.[012]|aix4.[012].*) 276 # We only want to do this on AIX 4.2 and lower, the check 277 # below for broken collect2 doesn't work under 4.3+ 278 collect2name=`${CC} -print-prog-name=collect2` 279 if test -f "$collect2name" && \ 280 strings "$collect2name" | grep resolve_lib_name >/dev/null 281 then 282 # We have reworked collect2 283 hardcode_direct=yes 284 else 285 # We have old collect2 286 hardcode_direct=unsupported 287 # It fails to find uninstalled libraries when the uninstalled 288 # path is not listed in the libpath. Setting hardcode_minus_L 289 # to unsupported forces relinking 290 hardcode_minus_L=yes 291 hardcode_libdir_flag_spec='-L$libdir' 292 hardcode_libdir_separator= 293 fi 294 esac 295 shared_flag='-shared' 296 else 297 # not using gcc 298 if test "$host_cpu" = ia64; then 299 shared_flag='${wl}-G' 267 300 else 268 # We have old collect2 269 hardcode_direct=unsupported 270 # It fails to find uninstalled libraries when the uninstalled 271 # path is not listed in the libpath. Setting hardcode_minus_L 272 # to unsupported forces relinking 273 hardcode_minus_L=yes 274 hardcode_libdir_flag_spec='-L$libdir' 275 hardcode_libdir_separator= 301 shared_flag='${wl}-bM:SRE' 276 302 fi 277 shared_flag='-shared' 278 else 279 shared_flag='${wl}-bM:SRE' 280 hardcode_direct=yes 281 fi 282 allow_undefined_flag=' ${wl}-berok' 283 archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' 284 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' 285 case "$host_os" in aix4.[01]|aix4.[01].*) 286 # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on 287 always_export_symbols=yes ;; 288 esac 289 ;; 303 fi 304 305 if test "$host_cpu" = ia64; then 306 # On IA64, the linker does run time linking by default, so we don't 307 # have to do anything special. 308 aix_use_runtimelinking=no 309 if test $with_gnu_ld = no; then 310 exp_sym_flag='-Bexport' 311 no_entry_flag="" 312 fi 313 else 314 # Test if we are trying to use run time linking, or normal AIX style linking. 315 # If -brtl is somewhere in LDFLAGS, we need to do run time linking. 316 aix_use_runtimelinking=no 317 for ld_flag in $LDFLAGS; do 318 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then 319 aix_use_runtimelinking=yes 320 break 321 fi 322 done 323 exp_sym_flag='-bexport' 324 no_entry_flag='-bnoentry' 325 fi 326 # -bexpall does not export symbols beginning with underscore (_) 327 always_export_symbols=yes 328 if test "$aix_use_runtimelinking" = yes; then 329 # Warning - without using the other run time loading flags (-brtl), -berok will 330 # link without error, but may produce a broken library. 331 allow_undefined_flag=' ${wl}-berok' 332 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' 333 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 334 else 335 if test "$host_cpu" = ia64; then 336 if test $with_gnu_ld = no; then 337 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' 338 allow_undefined_flag="-z nodefs" 339 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 340 fi 341 else 342 allow_undefined_flag=' ${wl}-berok' 343 # -bexpall does not export symbols beginning with underscore (_) 344 always_export_symbols=yes 345 # Exported symbols can be pulled into shared objects from archives 346 whole_archive_flag_spec=' ' 347 build_libtool_need_lc=yes 348 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' 349 # This is similar to how AIX traditionally builds it's shared libraries. 350 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 351 fi 352 fi 353 ;; 290 354 291 355 amigaos*) … … 312 376 # FIXME: Should let the user specify the lib program. 313 377 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' 314 fix_srcfile_path='`cygpath -w $srcfile`'378 fix_srcfile_path='`cygpath -w "$srcfile"`' 315 379 ;; 316 380 … … 347 411 348 412 hpux9* | hpux10* | hpux11*) 349 case "$host_os"in413 case $host_os in 350 414 hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; 351 415 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; … … 374 438 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 375 439 else 376 archive_cmds='$LD -shared - o $lib $libobjs $deplibs $linker_flags' # ELF440 archive_cmds='$LD -shared -nodefaultlibs -o $lib $libobjs $deplibs $linker_flags' # ELF 377 441 fi 378 442 hardcode_libdir_flag_spec='${wl}-R$libdir' … … 428 492 429 493 solaris*) 430 no_undefined_flag=' -z text' 431 # $CC -shared without GNU ld will not create a library from C++ 432 # object files and a static libstdc++, better avoid it by now 433 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 494 no_undefined_flag=' ${wl}-z ${wl}defs' 495 archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 434 496 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 435 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 436 hardcode_libdir_flag_spec='-R$libdir' 437 hardcode_shlibpath_var=no 438 case "$host_os" in 497 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 498 499 # Commands to make compiler produce verbose output that lists 500 # what "hidden" libraries, object files and flags are used when 501 # linking a shared library. 502 output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" 503 504 hardcode_libdir_flag_spec='${wl}-R $wl$libdir' 505 hardcode_shlibpath_var=no 506 case $host_os in 439 507 solaris2.[0-5] | solaris2.[0-5].*) ;; 440 508 *) # Supported since Solaris 2.6 (maybe 2.5.1?) 441 whole_archive_flag_spec=' -z allextract$convenience -zdefaultextract' ;;509 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; 442 510 esac 443 511 link_all_deplibs=yes … … 508 576 ;; 509 577 510 unixware7*) 511 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 578 sysv5uw7* | unixware7*) 579 no_undefined_flag='${wl}-z ${wl}text' 580 if test "$GCC" = yes; then 581 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 582 else 583 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 584 fi 512 585 runpath_var='LD_RUN_PATH' 513 586 hardcode_shlibpath_var=no … … 534 607 ac_cv_prog_cc_static='-static' 535 608 536 case "$host_os"in609 case $host_os in 537 610 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) 538 611 # PIC is the default for these OSes. … … 547 620 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" 548 621 ;; 622 *djgpp*) 623 # DJGPP does not suppot shared libraries at all 624 ac_cv_prog_cc_pic= 625 ;; 549 626 cygwin* | mingw* | os2*) 550 627 # This hack is so that the source file can tell whether it is being … … 570 647 # GCJ did not exist at the time GCC didn't implicitly link libc in. 571 648 need_lc=no 649 650 # All existing releases of GCJ support `-c -o'. 651 lt_cv_compiler_c_o=yes -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/ltconfig ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 2 2 3 3 # ltconfig - Create a system-specific libtool. 4 # Copyright (C) 1996-2000 Free Software Foundation, Inc. 4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 5 # Free Software Foundation, Inc. 5 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 6 7 # … … 181 182 PROGRAM=ltconfig 182 183 PACKAGE=libtool 183 VERSION=1.4a 184 TIMESTAMP=" (1.641.2. 122 2000/09/30 05:27:52)"184 VERSION=1.4a-GCC3.0 185 TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)" 185 186 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 186 187 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' … … 217 218 libext=a 218 219 cache_file= 220 max_cmd_len= 219 221 220 222 ## Dependencies to place before and after the object being linked: … … 295 297 for option 296 298 do 297 case "$option"in299 case $option in 298 300 -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 299 301 *) optarg= ;; … … 307 309 fi 308 310 309 case "$option"in311 case $option in 310 312 --help) cat <<EOM 311 313 Usage: $progname [OPTION]... LTMAIN [HOST] … … 423 425 if test -n "$tagname"; then 424 426 # Check whether tagname contains only valid characters 425 case "$tagname" in 426 *[!-_A-Za-z0-9,/]*) 427 case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in 428 "") ;; 429 *) 427 430 echo "$progname: invalid tag name: $tagname" 1>&2 428 431 exit 1 … … 453 456 for arg 454 457 do 455 case "$arg"in458 case $arg in 456 459 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) 457 460 ltconfig_args="$ltconfig_args '$arg'" ;; … … 536 539 537 540 host_alias=$host 538 case "$host_alias"in541 case $host_alias in 539 542 "") 540 543 # Force config.guess to use the C compiler. … … 564 567 565 568 build_alias=$build 566 case "$build_alias"in569 case $build_alias in 567 570 NONE) 568 571 case $nonopt in … … 599 602 600 603 # Transform linux* to *-*-linux-gnu*, to support old configure scripts. 601 case "$host_os"in604 case $host_os in 602 605 linux-gnu*) ;; 603 606 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` 604 607 esac 605 608 606 case "$host_os"in609 case $host_os in 607 610 aix3*) 608 611 # AIX sometimes has problems with the GCC collect2 program. For some … … 673 676 # the associated values are set (in the cache) correctly too. 674 677 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 675 echo "$progname:67 5:checking for $compiler option to produce PIC" 1>&5678 echo "$progname:678:checking for $compiler option to produce PIC" 1>&5 676 679 677 680 if test -z "$ac_cv_prog_cc_pic"; then … … 682 685 # Check to make sure the pic_flag actually works. 683 686 echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6 684 echo "$progname:68 4:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5687 echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5 685 688 if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \ 686 689 test "X${ac_cv_prog_cc_pic_works}" != X; then … … 692 695 save_CFLAGS="$CFLAGS" 693 696 CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC" 694 if { (eval echo $progname:69 4: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then697 if { (eval echo $progname:697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then 695 698 # Append any warnings to the config.log. 696 699 cat conftest.err 1>&5 697 700 698 case "$host_os"in701 case $host_os in 699 702 hpux9* | hpux10* | hpux11*) 700 703 # On HP-UX, both CC and GCC only warn that PIC is supported... then … … 744 747 745 748 echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6 746 echo "$progname:74 6: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5749 echo "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5 747 750 if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \ 748 751 test "X${ac_cv_prog_cc_static_works}" != X; then … … 753 756 save_LDFLAGS="$LDFLAGS" 754 757 LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static" 755 if { (eval echo $progname:75 5: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then758 if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 756 759 ac_cv_prog_cc_static_works=yes 757 760 else … … 774 777 can_build_shared="$ac_cv_prog_cc_can_build_shared" 775 778 779 # find the maximum length of command line arguments 780 echo "$progname:780: finding the maximum length of command line arguments" 1>&5 781 echo $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6 782 if test "${lt_cv_sys_max_cmd_len+set}" = set; then 783 echo $ac_n "(cached) $ac_c" 1>&6 784 else 785 i=0 786 testring="ABCD" 787 # If test is not a shell built-in, we'll probably end up computing a 788 # maximum length that is only half of the actual maximum length, but 789 # we can't tell. 790 while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \ 791 = "XX$testring" && 792 new_result=`expr "X$testring" : ".*" 2>&1` && 793 lt_cv_sys_max_cmd_len=$new_result && 794 test $i != 17 # 1/2 MB should be enough 795 do 796 i=`expr $i + 1` 797 testring=$testring$testring 798 done 799 testring= 800 # add a significant safety factor because C++ compilers can tack on massive amounts 801 # of additional arguments before passing them to the linker. 1/4 should be good. 802 len=`expr $lt_cv_sys_max_cmd_len \/ 4` 803 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len` 804 fi 805 echo "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5 806 echo "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6 807 808 if test -n $lt_cv_sys_max_cmd_len ; then 809 max_cmd_len=$lt_cv_sys_max_cmd_len 810 else 811 max_cmd_len=none 812 fi 813 776 814 # Check to see if options -o and -c are simultaneously supported by compiler 777 815 echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6 778 $rm -r conftest 2>/dev/null 779 mkdir conftest 780 cd conftest 781 $rm conftest* 782 echo $lt_simple_compile_test_code > conftest.$ac_ext 783 mkdir out 784 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers 785 # that will create temporary files in the current directory regardless of 786 # the output directory. Thus, making CWD read-only will cause this test 787 # to fail, enabling locking or at least warning the user not to do parallel 788 # builds. 789 chmod -w . 790 save_CFLAGS="$CFLAGS" 791 CFLAGS="$CFLAGS -o out/conftest2.$objext" 792 echo "$progname:792: checking if $compiler supports -c -o file.$objext" >&5 793 if { (eval echo $progname:793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then 794 795 # The compiler can only warn and ignore the option if not recognized 796 # So say no if there are warnings 797 if test -s out/conftest.err; then 798 echo "$ac_t"no 1>&6 799 compiler_c_o=no 800 else 801 echo "$ac_t"yes 1>&6 802 compiler_c_o=yes 803 fi 804 else 805 # Append any errors to the config.log. 806 cat out/conftest.err 1>&5 807 compiler_c_o=no 808 echo "$ac_t"no 1>&6 809 fi 810 CFLAGS="$save_CFLAGS" 811 chmod u+w . 812 $rm conftest* out/* 813 rmdir out 814 cd .. 815 rmdir conftest 816 $rm -r conftest 2>/dev/null 816 if test "${lt_cv_compiler_c_o+set}" = set; then 817 echo $ac_n "(cached) $ac_c" 1>&6 818 else 819 $rm -r conftest 2>/dev/null 820 mkdir conftest 821 cd conftest 822 $rm conftest* 823 echo $lt_simple_compile_test_code > conftest.$ac_ext 824 mkdir out 825 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers 826 # that will create temporary files in the current directory regardless of 827 # the output directory. Thus, making CWD read-only will cause this test 828 # to fail, enabling locking or at least warning the user not to do parallel 829 # builds. 830 chmod -w . 831 save_CFLAGS="$CFLAGS" 832 CFLAGS="$CFLAGS -o out/conftest2.$objext" 833 echo "$progname:833: checking if $compiler supports -c -o file.$objext" >&5 834 if { (eval echo $progname:834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then 835 836 # The compiler can only warn and ignore the option if not recognized 837 # So say no if there are warnings 838 if test -s out/conftest.err; then 839 lt_cv_compiler_c_o=no 840 else 841 lt_cv_compiler_c_o=yes 842 fi 843 else 844 # Append any errors to the config.log. 845 cat out/conftest.err 1>&5 846 lt_cv_compiler_c_o=no 847 fi 848 CFLAGS="$save_CFLAGS" 849 chmod u+w . 850 $rm conftest* out/* 851 rmdir out 852 cd .. 853 rmdir conftest 854 $rm -r conftest 2>/dev/null 855 fi 856 compiler_c_o=$lt_cv_compiler_c_o 857 echo "${ac_t}$compiler_c_o" 1>&6 817 858 818 859 # Check to see if we can do hard links to lock some files if needed … … 844 885 save_CFLAGS="$CFLAGS" 845 886 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" 846 echo "$progname:8 46: checking if $compiler supports -fno-rtti -fno-exceptions" >&5847 if { (eval echo $progname:8 47: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then887 echo "$progname:887: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 888 if { (eval echo $progname:888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then 848 889 849 890 # The compiler can only warn and ignore the option if not recognized … … 914 955 fi 915 956 957 case $reload_flag in 958 "" | " "*) ;; 959 *) reload_flag=" $reload_flag" ;; 960 esac 916 961 reload_cmds='$LD$reload_flag -o $output$reload_objs' 917 962 test -z "$deplibs_check_method" && deplibs_check_method=unknown … … 933 978 934 979 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 935 case "$host_os"in980 case $host_os in 936 981 aix3*) 937 982 version_type=linux … … 939 984 shlibpath_var=LIBPATH 940 985 941 # AIX has no versioning support, so we append a major version to the name.986 # AIX 3 has no versioning support, so we append a major version to the name. 942 987 soname_spec='${libname}${release}.so$major' 943 988 ;; 944 989 945 aix4* )990 aix4* | aix5*) 946 991 version_type=linux 947 # AIX has no versioning support, so currently we can not hardcode correct 948 # soname into executable. Probably we can add versioning support to 949 # collect2, so additional links can be useful in future. 950 # We preserve .a as extension for shared libraries though AIX4.2 951 # and later linker supports .so 952 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' 953 shlibpath_var=LIBPATH 992 if test "$host_cpu" = ia64; then 993 # AIX 5 supports IA64 994 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 995 shlibpath_var=LD_LIBRARY_PATH 996 else 997 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 998 # soname into executable. Probably we can add versioning support to 999 # collect2, so additional links can be useful in future. 1000 # We preserve .a as extension for shared libraries though AIX4.2 1001 # and later linker supports .so 1002 if test "$aix_use_runtimelinking" = yes; then 1003 # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of 1004 # lib<name>.a to let people know that these are not typical AIX shared libraries. 1005 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 1006 else 1007 # We preserve .a as extension for shared libraries though AIX4.2 1008 # and later when we are not doing run time linking. 1009 library_names_spec='${libname}${release}.a $libname.a' 1010 soname_spec='${libname}${release}.so$major' 1011 fi 1012 # If we're using GNU nm, then we don't want the "-C" option. 1013 # -C means demangle to AIX nm, but means don't demangle with GNU nm 1014 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then 1015 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' 1016 else 1017 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' 1018 fi 1019 shlibpath_var=LIBPATH 1020 deplibs_check_method=pass_all 1021 case $host_os in 1022 aix4 | aix4.[01] | aix4.[01].*) 1023 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 1024 echo ' yes ' 1025 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 1026 : 1027 else 1028 # With GCC up to 2.95.x, collect2 would create an import file 1029 # for dependence libraries. The import file would start with 1030 # the line `#! .'. This would cause the generated library to 1031 # depend on `.', always an invalid library. This was fixed in 1032 # development snapshots of GCC prior to 3.0. 1033 can_build_shared=no 1034 fi 1035 ;; 1036 esac 1037 fi 954 1038 ;; 955 1039 … … 988 1072 need_version=no 989 1073 need_lib_prefix=no 990 if test "$with_gcc" = yes; then 1074 case $with_gcc,$host_os in 1075 yes,cygwin*) 1076 library_names_spec='$libname.dll.a' 1077 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll' 1078 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i; echo \$dlname'\''`~ 1079 dldir=$destdir/`dirname \$dlpath`~ 1080 test -d \$dldir || mkdir -p \$dldir~ 1081 $install_prog .libs/$dlname \$dldir/$dlname' 1082 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ 1083 dlpath=$dir/\$dldll; $rm \$dlpath' 1084 ;; 1085 yes,mingw*) 991 1086 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' 992 else 1087 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` 1088 ;; 1089 yes,pw32*) 1090 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' 1091 ;; 1092 *) 993 1093 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' 994 fi 1094 ;; 1095 esac 995 1096 dynamic_linker='Win32 ld.exe' 996 1097 # FIXME: first we should search . and the directory the executable is in … … 1000 1101 ;; 1001 1102 1103 darwin* | rhapsody*) 1104 dynamic_linker="$host_os dyld" 1105 version_type=darwin 1106 need_lib_prefix=no 1107 need_version=no 1108 library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`' 1109 soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`' 1110 shlibpath_overrides_runpath=yes 1111 shlibpath_var=DYLD_LIBRARY_PATH 1112 ;; 1113 1002 1114 freebsd1*) 1003 1115 dynamic_linker=no … … 1007 1119 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 1008 1120 version_type=freebsd-$objformat 1009 case "$version_type"in1121 case $version_type in 1010 1122 freebsd-elf*) 1011 1123 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' 1012 1124 need_version=no 1125 need_lc=no 1013 1126 need_lib_prefix=no 1014 1127 ;; … … 1019 1132 esac 1020 1133 shlibpath_var=LD_LIBRARY_PATH 1021 case "$host_os"in1134 case $host_os in 1022 1135 freebsd2*) 1023 1136 shlibpath_overrides_runpath=yes … … 1043 1156 # Give a soname corresponding to the major version so that dld.sl refuses to 1044 1157 # link against other versions. 1045 dynamic_linker="$host_os dld.sl"1046 1158 version_type=sunos 1047 1159 need_lib_prefix=no 1048 1160 need_version=no 1049 shlibpath_var=SHLIB_PATH 1050 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1051 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' 1052 soname_spec='${libname}${release}.sl$major' 1161 case "$host_cpu" in 1162 ia64*) 1163 dynamic_linker="$host_os dld.so" 1164 shlibpath_var=LD_LIBRARY_PATH 1165 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 1166 soname_spec='${libname}${release}.so$major' 1167 shlibpath_var=LD_LIBRARY_PATH 1168 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 1169 if test "X$HPUX_IA64_MODE" = X32; then 1170 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32/usr/local/lib" 1171 else 1172 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 1173 fi 1174 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 1175 ;; 1176 *) 1177 dynamic_linker="$host_os dld.sl" 1178 shlibpath_var=SHLIB_PATH 1179 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 1180 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' 1181 soname_spec='${libname}${release}.sl$major' 1182 ;; 1183 esac 1053 1184 # HP-UX runs *really* slowly unless shared libraries are mode 555. 1054 1185 postinstall_cmds='chmod 555 $lib' … … 1056 1187 1057 1188 irix5* | irix6*) 1189 if test "$with_gnu_ld" = yes; then 1190 version_type=linux 1191 else 1192 version_type=irix 1193 fi 1058 1194 version_type=irix 1059 1195 need_lib_prefix=no … … 1061 1197 soname_spec='${libname}${release}.so$major' 1062 1198 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' 1063 case "$host_os"in1199 case $host_os in 1064 1200 irix5*) 1065 1201 libsuff= shlibsuff= 1066 1202 ;; 1067 1203 *) 1068 case "$LD" in # libtool.m4 will add one of these switches to LD 1069 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; 1070 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; 1071 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; 1204 case $LD in # libtool.m4 will add one of these switches to LD 1205 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 1206 libsuff= shlibsuff= libmagic=32-bit;; 1207 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 1208 libsuff=32 shlibsuff=N32 libmagic=N32;; 1209 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 1210 libsuff=64 shlibsuff=64 libmagic=64-bit;; 1072 1211 *) libsuff= shlibsuff= libmagic=never-match;; 1073 1212 esac … … 1110 1249 1111 1250 netbsd*) 1251 need_lib_prefix=no 1252 need_version=no 1112 1253 version_type=sunos 1113 1254 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then … … 1123 1264 shlibpath_overrides_runpath=yes 1124 1265 hardcode_into_libs=yes 1266 ;; 1267 1268 newsos6) 1269 version_type=linux 1270 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 1271 shlibpath_var=LD_LIBRARY_PATH 1272 shlibpath_overrides_runpath=yes 1125 1273 ;; 1126 1274 … … 1191 1339 soname_spec='${libname}${release}.so$major' 1192 1340 shlibpath_var=LD_LIBRARY_PATH 1193 case "$host_vendor"in1341 case $host_vendor in 1194 1342 motorola) 1195 1343 need_lib_prefix=no … … 1252 1400 1253 1401 # Define system-specific variables. 1254 case "$host_os"in1402 case $host_os in 1255 1403 aix*) 1256 1404 symcode='[BCDT]' … … 1260 1408 ;; 1261 1409 hpux*) # Its linker distinguishes data from code symbols 1262 global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^ ..* \(.*\)$/extern char \1;/p'"1410 global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 1263 1411 ;; 1264 1412 irix*) … … 1273 1421 esac 1274 1422 1275 # Handle CRLF in mingw too chain1423 # Handle CRLF in mingw tool chain 1276 1424 opt_cr= 1277 case "$host_os"in1425 case $host_os in 1278 1426 mingw*) 1279 1427 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp … … 1290 1438 1291 1439 # Write the raw and C identifiers. 1292 global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"1440 global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" 1293 1441 1294 1442 # Check to see that the pipe works correctly. … … 1304 1452 } 1305 1453 #endif 1306 main(){nm_test_var='a';nm_test_func();return(0);}1454 int main(){nm_test_var='a';nm_test_func();return(0);} 1307 1455 EOF 1308 1456 1309 echo "$progname:1 309: checking if global_symbol_pipe works" >&51310 if { (eval echo $progname:1 310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then1457 echo "$progname:1431: checking if global_symbol_pipe works" >&5 1458 if { (eval echo $progname:1432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then 1311 1459 # Now try to grab the symbols. 1312 1460 nlist=conftest.nm 1313 if { echo "$progname:1 313: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then1461 if { echo "$progname:1435: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then 1314 1462 1315 1463 # Try sorting and uniquifying the output. … … 1348 1496 { 1349 1497 EOF 1350 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/'< "$nlist" >> conftest.$ac_ext1498 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext 1351 1499 cat <<\EOF >> conftest.$ac_ext 1352 1500 {0, (lt_ptr_t) 0} … … 1363 1511 LIBS="conftstm.$objext" 1364 1512 CFLAGS="$CFLAGS$no_builtin_flag" 1365 if { (eval echo $progname:1 365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1513 if { (eval echo $progname:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 1366 1514 pipe_works=yes 1367 1515 else … … 1407 1555 # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in 1408 1556 # configure.in, otherwise build static only libraries. 1409 case "$host_os"in1557 case $host_os in 1410 1558 cygwin* | mingw* | pw32* | os2*) 1411 1559 if test x$can_build_shared = xyes; then … … 1421 1569 # On AIX, shared libraries and static libraries use the same namespace, and 1422 1570 # are all built from PIC. 1423 case "$host_os"in1571 case $host_os in 1424 1572 aix3*) 1425 1573 test "$enable_shared" = yes && enable_static=no … … 1467 1615 lt_cv_dlopen=no lt_cv_dlopen_libs= 1468 1616 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 1469 echo "$progname:1 469: checking for dlopen in -ldl" >&51617 echo "$progname:1591: checking for dlopen in -ldl" >&5 1470 1618 if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then 1471 1619 echo $ac_n "(cached) $ac_c" 1>&6 … … 1474 1622 LIBS="-ldl $LIBS" 1475 1623 cat > conftest.$ac_ext <<EOF 1476 #line 1 476"ltconfig"1624 #line 1598 "ltconfig" 1477 1625 /* Override any gcc2 internal prototype to avoid an error. */ 1478 1626 /* We use char because int might match the return type of a gcc2 … … 1487 1635 ; return 0; } 1488 1636 EOF 1489 if { (eval echo $progname:1 489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1637 if { (eval echo $progname:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1490 1638 rm -rf conftest* 1491 1639 ac_cv_lib_dl_dlopen=yes … … 1506 1654 echo "$ac_t""no" 1>&6 1507 1655 echo $ac_n "checking for dlopen""... $ac_c" 1>&6 1508 echo "$progname:1 508: checking for dlopen" >&51656 echo "$progname:1630: checking for dlopen" >&5 1509 1657 if test "X${ac_cv_func_dlopen+set}" = Xset; then 1510 1658 echo $ac_n "(cached) $ac_c" 1>&6 1511 1659 else 1512 1660 cat > conftest.$ac_ext <<EOF 1513 #line 1 513"ltconfig"1661 #line 1635 "ltconfig" 1514 1662 /* System header to define __stub macros and hopefully few prototypes, 1515 1663 which can conflict with char dlopen(); below. */ … … 1536 1684 ; return 0; } 1537 1685 EOF 1538 if { (eval echo $progname:1 538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1686 if { (eval echo $progname:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1539 1687 rm -rf conftest* 1540 1688 ac_cv_func_dlopen=yes … … 1553 1701 echo "$ac_t""no" 1>&6 1554 1702 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 1555 echo "$progname:1 555: checking for dlopen in -lsvld" >&51703 echo "$progname:1677: checking for dlopen in -lsvld" >&5 1556 1704 if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then 1557 1705 echo $ac_n "(cached) $ac_c" 1>&6 … … 1560 1708 LIBS="-lsvld $LIBS" 1561 1709 cat > conftest.$ac_ext <<EOF 1562 #line 1 562"ltconfig"1710 #line 1684 "ltconfig" 1563 1711 /* Override any gcc2 internal prototype to avoid an error. */ 1564 1712 /* We use char because int might match the return type of a gcc2 … … 1573 1721 ; return 0; } 1574 1722 EOF 1575 if { (eval echo $progname:1 575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1723 if { (eval echo $progname:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1576 1724 rm -rf conftest* 1577 1725 ac_cv_lib_svld_dlopen=yes … … 1592 1740 echo "$ac_t""no" 1>&6 1593 1741 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 1594 echo "$progname:1 594: checking for dld_link in -ldld" >&51742 echo "$progname:1716: checking for dld_link in -ldld" >&5 1595 1743 if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then 1596 1744 echo $ac_n "(cached) $ac_c" 1>&6 … … 1599 1747 LIBS="-ldld $LIBS" 1600 1748 cat > conftest.$ac_ext <<EOF 1601 #line 1 601"ltconfig"1749 #line 1723 "ltconfig" 1602 1750 /* Override any gcc2 internal prototype to avoid an error. */ 1603 1751 /* We use char because int might match the return type of a gcc2 … … 1612 1760 ; return 0; } 1613 1761 EOF 1614 if { (eval echo $progname:1 614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1762 if { (eval echo $progname:1736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1615 1763 rm -rf conftest* 1616 1764 ac_cv_lib_dld_dld_link=yes … … 1631 1779 echo "$ac_t""no" 1>&6 1632 1780 echo $ac_n "checking for shl_load""... $ac_c" 1>&6 1633 echo "$progname:1 633: checking for shl_load" >&51781 echo "$progname:1755: checking for shl_load" >&5 1634 1782 if test "X${ac_cv_func_shl_load+set}" = Xset; then 1635 1783 echo $ac_n "(cached) $ac_c" 1>&6 1636 1784 else 1637 1785 cat > conftest.$ac_ext <<EOF 1638 #line 1 638"ltconfig"1786 #line 1760 "ltconfig" 1639 1787 /* System header to define __stub macros and hopefully few prototypes, 1640 1788 which can conflict with char shl_load(); below. */ … … 1661 1809 ; return 0; } 1662 1810 EOF 1663 if { (eval echo $progname:1 663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1811 if { (eval echo $progname:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1664 1812 rm -rf conftest* 1665 1813 ac_cv_func_shl_load=yes … … 1679 1827 echo "$ac_t""no" 1>&6 1680 1828 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 1681 echo "$progname:1 681: checking for shl_load in -ldld" >&51829 echo "$progname:1803: checking for shl_load in -ldld" >&5 1682 1830 if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then 1683 1831 echo $ac_n "(cached) $ac_c" 1>&6 … … 1686 1834 LIBS="-ldld $LIBS" 1687 1835 cat > conftest.$ac_ext <<EOF 1688 #line 1 688"ltconfig"1836 #line 1810 "ltconfig" 1689 1837 #include "confdefs.h" 1690 1838 /* Override any gcc2 internal prototype to avoid an error. */ … … 1700 1848 ; return 0; } 1701 1849 EOF 1702 if { (eval echo $progname:1 702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1850 if { (eval echo $progname:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1703 1851 rm -rf conftest* 1704 1852 ac_cv_lib_dld_shl_load=yes … … 1742 1890 fi 1743 1891 1744 case "$lt_cv_dlopen"in1892 case $lt_cv_dlopen in 1745 1893 dlopen) 1746 1894 for ac_hdr in dlfcn.h; do 1747 1895 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1748 1896 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1749 echo "$progname:1 749: checking for $ac_hdr" >&51897 echo "$progname:1871: checking for $ac_hdr" >&5 1750 1898 if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then 1751 1899 echo $ac_n "(cached) $ac_c" 1>&6 1752 1900 else 1753 1901 cat > conftest.$ac_ext <<EOF 1754 #line 1 754"ltconfig"1902 #line 1876 "ltconfig" 1755 1903 #include <$ac_hdr> 1756 1904 int fnord = 0; … … 1758 1906 EOF 1759 1907 ac_try="$ac_compile >/dev/null 2>conftest.out" 1760 { (eval echo $progname:1 760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1908 { (eval echo $progname:1882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1761 1909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1762 1910 if test -z "$ac_err"; then … … 1786 1934 1787 1935 echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 1788 echo "$progname:1 788: checking whether a program can dlopen itself" >&51936 echo "$progname:1910: checking whether a program can dlopen itself" >&5 1789 1937 if test "X${lt_cv_dlopen_self+set}" = Xset; then 1790 1938 echo $ac_n "(cached) $ac_c" 1>&6 … … 1794 1942 else 1795 1943 cat > conftest.$ac_ext <<EOF 1796 #line 1 796"ltconfig"1944 #line 1918 "ltconfig" 1797 1945 1798 1946 #if HAVE_DLFCN_H … … 1834 1982 #endif 1835 1983 1836 fnord() { int i=42;} 1837 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); 1984 void fnord() { int i=42; } 1985 int main() { 1986 void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); 1838 1987 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); 1839 1988 if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 1840 1989 1841 1990 EOF 1842 if { (eval echo $progname:1 842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null1991 if { (eval echo $progname:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null 1843 1992 then 1844 1993 lt_cv_dlopen_self=yes … … 1859 2008 LDFLAGS="$LDFLAGS $link_static_flag" 1860 2009 echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 1861 echo "$progname:1 861: checking whether a statically linked program can dlopen itself" >&52010 echo "$progname:1984: checking whether a statically linked program can dlopen itself" >&5 1862 2011 if test "X${lt_cv_dlopen_self_static+set}" = Xset; then 1863 2012 echo $ac_n "(cached) $ac_c" 1>&6 … … 1867 2016 else 1868 2017 cat > conftest.$ac_ext <<EOF 1869 #line 1 869"ltconfig"2018 #line 1992 "ltconfig" 1870 2019 1871 2020 #if HAVE_DLFCN_H … … 1907 2056 #endif 1908 2057 1909 fnord() { int i=42;} 1910 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); 2058 void fnord() { int i=42; } 2059 int main() { 2060 void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); 1911 2061 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); 1912 2062 if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 1913 2063 1914 2064 EOF 1915 if { (eval echo $progname: 1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null2065 if { (eval echo $progname:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null 1916 2066 then 1917 2067 lt_cv_dlopen_self_static=yes … … 1932 2082 esac 1933 2083 1934 case "$lt_cv_dlopen_self"in2084 case $lt_cv_dlopen_self in 1935 2085 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1936 2086 *) enable_dlopen_self=unknown ;; 1937 2087 esac 1938 2088 1939 case "$lt_cv_dlopen_self_static"in2089 case $lt_cv_dlopen_self_static in 1940 2090 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1941 2091 *) enable_dlopen_self_static=unknown ;; … … 1954 2104 1955 2105 # Only quote variables if we're using ltmain.sh. 1956 case "$ltmain"in2106 case $ltmain in 1957 2107 *.sh) 1958 2108 # Now quote all the things that may contain metacharacters. … … 1979 2129 compiler_c_o need_locks exclude_expsyms include_expsyms; do 1980 2130 1981 case "$var"in2131 case $var in 1982 2132 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ 1983 2133 old_postinstall_cmds | old_postuninstall_cmds | \ … … 1995 2145 done 1996 2146 1997 case "$ltecho"in2147 case $ltecho in 1998 2148 *'\$0 --fallback-echo"') 1999 2149 ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` … … 2184 2334 pic_mode=$pic_mode 2185 2335 2336 # What is the maximum length of a command? 2337 max_cmd_len=$max_cmd_len 2338 2186 2339 # Does compiler simultaneously support -c and -o options? 2187 2340 compiler_c_o=$compiler_c_o … … 2372 2525 fi 2373 2526 2374 case "$ltmain"in2527 case $ltmain in 2375 2528 *.sh) 2376 2529 echo >> "$ofile" 2377 2530 if test -z "$tagname"; then 2378 case "$host_os"in2531 case $host_os in 2379 2532 aix3*) 2380 2533 cat <<\EOF >> "$ofile" … … 2390 2543 ;; 2391 2544 esac 2392 case "$host"in2545 case $host in 2393 2546 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 2394 2547 cat <<'EOF' >> "$ofile" … … 2506 2659 # 2507 2660 # dll = open(filename, O_RDONLY|O_BINARY); 2508 # if ( !dll)2661 # if (dll < 1) 2509 2662 # return 1; 2510 2663 # -
Property cvs2svn:cvs-rev
changed from
-
TabularUnified branches/GNU/src/binutils/ltmain.sh ¶
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r604 r605 2 2 # NOTE: Changing this file will not affect anything until you rerun ltconfig. 3 3 # 4 # Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc. 4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 5 # Free Software Foundation, Inc. 5 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 6 7 # … … 55 56 PROGRAM=ltmain.sh 56 57 PACKAGE=libtool 57 VERSION=1.4a 58 TIMESTAMP=" (1.641.2. 122 2000/09/30 05:27:52)"58 VERSION=1.4a-GCC3.0 59 TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)" 59 60 60 61 default_mode= … … 107 108 lo2o="s/\\.lo\$/.${objext}/" 108 109 o2lo="s/\\.${objext}\$/.lo/" 110 taglist= 109 111 110 112 # Parse our command line options once, thoroughly. … … 114 116 shift 115 117 116 case "$arg"in118 case $arg in 117 119 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; 118 120 *) optarg= ;; … … 121 123 # If the previous option needs an argument, assign it. 122 124 if test -n "$prev"; then 123 case "$prev"in125 case $prev in 124 126 execute_dlfiles) 125 e val "$prev=\"\$$prev \$arg\""127 execute_dlfiles="$execute_dlfiles $arg" 126 128 ;; 127 129 tag) … … 129 131 130 132 # Check whether tagname contains only valid characters 131 case "$tagname"in133 case $tagname in 132 134 *[!-_A-Za-z0-9,/]*) 133 135 echo "$progname: invalid tag name: $tagname" 1>&2 … … 136 138 esac 137 139 138 if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then 139 taglist="$taglist $tagname" 140 # Evaluate the configuration. 141 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" 142 else 143 echo "$progname: ignoring unknown tag $tagname" 1>&2 144 fi 140 case $tagname in 141 CC) 142 # Don't test for the "default" C tag, as we know, it's there, but 143 # not specially marked. 144 taglist="$taglist $tagname" 145 ;; 146 *) 147 if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then 148 taglist="$taglist $tagname" 149 # Evaluate the configuration. 150 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" 151 else 152 echo "$progname: ignoring unknown tag $tagname" 1>&2 153 fi 154 ;; 155 esac 145 156 ;; 146 157 *) … … 155 166 156 167 # Have we seen a non-optional argument yet? 157 case "$arg"in168 case $arg in 158 169 --help) 159 170 show_help=yes … … 238 249 fi 239 250 251 # If this variable is set in any of the actions, the command in it 252 # will be execed at the end. This prevents here-documents from being 253 # left over by shells. 254 exec_cmd= 255 240 256 if test -z "$show_help"; then 241 257 242 258 # Infer the operation mode. 243 259 if test -z "$mode"; then 244 case "$nonopt"in260 case $nonopt in 245 261 *cc | *++ | gcc* | *-gcc*) 246 262 mode=link 247 263 for arg 248 264 do 249 case "$arg"in265 case $arg in 250 266 -c) 251 267 mode=compile … … 292 308 293 309 # These modes are in order of execution frequency so that they run quickly. 294 case "$mode"in310 case $mode in 295 311 # libtool compile mode 296 312 compile) … … 306 322 for arg 307 323 do 308 case "$prev"in324 case $prev in 309 325 "") ;; 310 326 xcompiler) … … 313 329 lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 314 330 315 case "$arg"in331 case $arg in 316 332 # Double-quote args containing other shell metacharacters. 317 333 # Many Bourne shells cannot handle close brackets correctly … … 333 349 334 350 # Accept any command-line options. 335 case "$arg"in351 case $arg in 336 352 -o) 337 353 if test "$user_target" != "no"; then … … 372 388 # Many Bourne shells cannot handle close brackets correctly 373 389 # in scan sets, so we specify it separately. 374 case "$arg"in390 case $arg in 375 391 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 376 392 arg="\"$arg\"" … … 392 408 esac 393 409 394 case "$user_target"in410 case $user_target in 395 411 next) 396 412 # The next one is the -o target name … … 420 436 # Many Bourne shells cannot handle close brackets correctly 421 437 # in scan sets, so we specify it separately. 422 case "$lastarg"in438 case $lastarg in 423 439 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 424 440 lastarg="\"$lastarg\"" … … 434 450 done 435 451 436 case "$user_target"in452 case $user_target in 437 453 set) 438 454 ;; … … 450 466 # If the user specifies -o file.o, it is replaced with file.lo 451 467 xform='[cCFSfmso]' 452 case "$libobj"in468 case $libobj in 453 469 *.ada) xform=ada ;; 454 470 *.adb) xform=adb ;; … … 467 483 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` 468 484 469 case "$libobj"in485 case $libobj in 470 486 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; 471 487 *) … … 545 561 546 562 # On Cygwin there's no "real" PIC flag so we must build both object types 547 case "$host_os"in563 case $host_os in 548 564 cygwin* | mingw* | pw32* | os2*) 549 565 pic_mode=default … … 778 794 link | relink) 779 795 modename="$modename: link" 780 case "$host"in796 case $host in 781 797 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 782 798 # It is impossible to link a dll without this setting, and … … 844 860 for arg 845 861 do 846 case "$arg"in862 case $arg in 847 863 -all-static | -static) 848 864 if test "X$arg" = "X-all-static"; then … … 874 890 base_compile="$base_compile $arg" 875 891 shift 876 case "$arg"in892 case $arg in 877 893 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 878 894 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test … … 884 900 # If the previous option needs an argument, assign it. 885 901 if test -n "$prev"; then 886 case "$prev"in902 case $prev in 887 903 output) 888 904 compile_command="$compile_command @OUTPUT@" … … 891 907 esac 892 908 893 case "$prev"in909 case $prev in 894 910 dlfiles|dlprefiles) 895 911 if test "$preload" = no; then … … 899 915 preload=yes 900 916 fi 901 case "$arg"in917 case $arg in 902 918 *.la | *.lo) ;; # We handle these cases below. 903 919 force) … … 951 967 continue 952 968 ;; 969 objectlist) 970 if test -f "$arg"; then 971 save_arg=$arg 972 moreargs= 973 for fil in `cat $save_arg` 974 do 975 # moreargs="$moreargs $fil" 976 arg=$fil 977 # A libtool-controlled object. 978 979 # Check to see that this really is a libtool object. 980 if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 981 pic_object= 982 non_pic_object= 983 984 # Read the .lo file 985 # If there is no directory component, then add one. 986 case $arg in 987 */* | *\\*) . $arg ;; 988 *) . ./$arg ;; 989 esac 990 991 if test -z "$pic_object" || \ 992 test -z "$non_pic_object" || 993 test "$pic_object" = none && \ 994 test "$non_pic_object" = none; then 995 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 996 exit 1 997 fi 998 999 # Extract subdirectory from the argument. 1000 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1001 if test "X$xdir" = "X$arg"; then 1002 xdir= 1003 else 1004 xdir="$xdir/" 1005 fi 1006 1007 if test "$pic_object" != none; then 1008 # Prepend the subdirectory the object is found in. 1009 pic_object="$xdir$pic_object" 1010 1011 if test "$prev" = dlfiles; then 1012 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 1013 dlfiles="$dlfiles $pic_object" 1014 prev= 1015 continue 1016 else 1017 # If libtool objects are unsupported, then we need to preload. 1018 prev=dlprefiles 1019 fi 1020 fi 1021 1022 # CHECK ME: I think I busted this. -Ossama 1023 if test "$prev" = dlprefiles; then 1024 # Preload the old-style object. 1025 dlprefiles="$dlprefiles $pic_object" 1026 prev= 1027 fi 1028 1029 # A PIC object. 1030 libobjs="$libobjs $pic_object" 1031 arg="$pic_object" 1032 fi 1033 1034 # Non-PIC object. 1035 if test "$non_pic_object" != none; then 1036 # Prepend the subdirectory the object is found in. 1037 non_pic_object="$xdir$non_pic_object" 1038 1039 # A standard non-PIC object 1040 non_pic_objects="$non_pic_objects $non_pic_object" 1041 if test -z "$pic_object" || test "$pic_object" = none ; then 1042 arg="$non_pic_object" 1043 fi 1044 fi 1045 else 1046 # Only an error if not doing a dry-run. 1047 if test -z "$run"; then 1048 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1049 exit 1 1050 else 1051 # Dry-run case. 1052 1053 # Extract subdirectory from the argument. 1054 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1055 if test "X$xdir" = "X$arg"; then 1056 xdir= 1057 else 1058 xdir="$xdir/" 1059 fi 1060 1061 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` 1062 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` 1063 libobjs="$libobjs $pic_object" 1064 non_pic_objects="$non_pic_objects $non_pic_object" 1065 fi 1066 fi 1067 done 1068 else 1069 $echo "$modename: link input file \`$save_arg' does not exist" 1070 exit 1 1071 fi 1072 arg=$save_arg 1073 prev= 1074 continue 1075 ;; 953 1076 rpath | xrpath) 954 1077 # We need an absolute path. 955 case "$arg"in1078 case $arg in 956 1079 [\\/]* | [A-Za-z]:[\\/]*) ;; 957 1080 *) … … 995 1118 ;; 996 1119 esac 997 fi 1120 fi # test -n $prev 998 1121 999 1122 prevarg="$arg" 1000 1123 1001 case "$arg"in1124 case $arg in 1002 1125 -all-static) 1003 1126 if test -n "$link_static_flag"; then … … 1036 1159 -export-symbols | -export-symbols-regex) 1037 1160 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 1038 $echo "$modename: not more than one -exported-symbols argument allowed"1161 $echo "$modename: more than one -exported-symbols argument is not allowed" 1039 1162 exit 1 1040 1163 fi … … 1058 1181 continue 1059 1182 ;; 1060 1183 1061 1184 -L*) 1062 1185 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` 1063 1186 # We need an absolute path. 1064 case "$dir"in1187 case $dir in 1065 1188 [\\/]* | [A-Za-z]:[\\/]*) ;; 1066 1189 *) … … 1080 1203 ;; 1081 1204 esac 1082 case "$host"in1205 case $host in 1083 1206 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1084 case ":$dllsearchpath:"in1207 case :$dllsearchpath: in 1085 1208 *":$dir:"*) ;; 1086 1209 *) dllsearchpath="$dllsearchpath:$dir";; … … 1092 1215 1093 1216 -l*) 1094 if test " $arg" = "-lc"; then1095 case "$host"in1096 *-*-cygwin* | *-*- mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)1097 # These systems don't actually have clibrary (as such)1217 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then 1218 case $host in 1219 *-*-cygwin* | *-*-pw32* | *-*-beos*) 1220 # These systems don't actually have a C or math library (as such) 1098 1221 continue 1099 1222 ;; 1100 esac 1101 elif test "$arg" = "-lm"; then 1102 case "$host" in 1103 *-*-cygwin* | *-*-pw32* | *-*-beos*) 1104 # These systems don't actually have math library (as such) 1105 continue 1223 *-*-mingw* | *-*-os2*) 1224 # These systems don't actually have a C library (as such) 1225 test "X$arg" = "X-lc" && continue 1106 1226 ;; 1107 1227 esac … … 1122 1242 1123 1243 -no-install) 1124 case "$host"in1244 case $host in 1125 1245 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1126 1246 # The PATH hackery in wrapper scripts is required on Windows … … 1130 1250 fast_install=no 1131 1251 ;; 1132 *-*-rhapsody*) 1133 # rhapsody is a little odd... 1134 deplibs="$deplibs -framework System" 1135 ;; 1136 *) 1137 no_install=yes 1138 ;; 1252 *) no_install=yes ;; 1139 1253 esac 1140 1254 continue … … 1146 1260 ;; 1147 1261 1262 -objectlist) 1263 prev=objectlist 1264 continue 1265 ;; 1266 1148 1267 -o) prev=output ;; 1149 1268 … … 1166 1285 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` 1167 1286 # We need an absolute path. 1168 case "$dir"in1287 case $dir in 1169 1288 [\\/]* | [A-Za-z]:[\\/]*) ;; 1170 1289 *) … … 1181 1300 1182 1301 -static) 1183 1302 # The effects of -static are defined in a previous loop. 1184 1303 # We used to do the same as -all-static on platforms that 1185 1304 # didn't have a PIC flag, but the assumption that the effects … … 1205 1324 for flag in $args; do 1206 1325 IFS="$save_ifs" 1207 case "$flag"in1326 case $flag in 1208 1327 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1209 1328 flag="\"$flag\"" … … 1223 1342 for flag in $args; do 1224 1343 IFS="$save_ifs" 1225 case "$flag"in1344 case $flag in 1226 1345 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1227 1346 flag="\"$flag\"" … … 1251 1370 # to be aesthetically quoted because they are evaled later. 1252 1371 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1253 case "$arg"in1372 case $arg in 1254 1373 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1255 1374 arg="\"$arg\"" … … 1273 1392 # Read the .lo file 1274 1393 # If there is no directory component, then add one. 1275 case "$arg"in1394 case $arg in 1276 1395 */* | *\\*) . $arg ;; 1277 1396 *) . ./$arg ;; … … 1385 1504 # to be aesthetically quoted because they are evaled later. 1386 1505 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1387 case "$arg"in1506 case $arg in 1388 1507 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1389 1508 arg="\"$arg\"" … … 1391 1510 esac 1392 1511 ;; 1393 esac 1512 esac # arg 1394 1513 1395 1514 # Now actually substitute the argument into the commands. … … 1398 1517 finalize_command="$finalize_command $arg" 1399 1518 fi 1400 done 1519 done # argument parsing loop 1401 1520 1402 1521 if test -n "$prev"; then … … 1456 1575 fi 1457 1576 1458 oldlibs=1459 1577 # calculate the name of the file, without its directory 1460 1578 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` … … 1487 1605 1488 1606 # Determine the type of output 1489 case "$output"in1607 case $output in 1490 1608 "") 1491 1609 $echo "$modename: you must specify an output file" 1>&2 … … 1512 1630 if test $linkmode = lib; then 1513 1631 libs="$predeps $libs $compiler_lib_search_path $postdeps" 1632 1633 # Compute libraries that are listed more than once in $predeps 1634 # $postdeps and mark them as special (i.e., whose duplicates are 1635 # not to be eliminated). 1636 pre_post_deps= 1637 for pre_post_dep in $predeps $postdeps; do 1638 case "$pre_post_deps " in 1639 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; 1640 esac 1641 pre_post_deps="$pre_post_deps $pre_post_dep" 1642 done 1643 pre_post_deps= 1514 1644 fi 1515 1645 … … 1518 1648 newlib_search_path= 1519 1649 need_relink=no # whether we're linking any uninstalled libtool libraries 1520 uninst_deplibs= # uninstalled libtool libraries1521 uninst_path= # paths that contain uninstalled libtool libraries1650 notinst_deplibs= # not-installed libtool libraries 1651 notinst_path= # paths that contain not-installed libtool libraries 1522 1652 case $linkmode in 1523 1653 lib) 1524 1654 passes="conv link" 1525 1655 for file in $dlfiles $dlprefiles; do 1526 case "$file"in1656 case $file in 1527 1657 *.la) ;; 1528 1658 *) … … 1541 1671 passes="conv scan dlopen dlpreopen link" 1542 1672 ;; 1543 *) 1673 *) passes="conv" 1544 1674 ;; 1545 1675 esac 1546 1676 for pass in $passes; do 1547 if test "$linkmode,$pass" = "lib,link" ||1548 test "$linkmode,$pass" = "prog,scan"; then1549 libs="$deplibs"1550 deplibs=1551 fi1552 1677 if test $linkmode = prog; then 1678 # Determine which files to process 1553 1679 case $pass in 1554 dlopen) libs="$dlfiles" ;; 1680 dlopen) 1681 libs="$dlfiles" 1682 save_deplibs="$deplibs" # Collect dlpreopened libraries 1683 deplibs= 1684 ;; 1555 1685 dlpreopen) libs="$dlprefiles" ;; 1556 1686 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; 1557 1687 esac 1558 1688 fi 1559 if test $pass = dlopen; then1560 # Collect dlpreopened libraries1561 save_deplibs="$deplibs"1562 deplibs=1563 fi1564 1689 for deplib in $libs; do 1565 1690 lib= 1566 1691 found=no 1567 case "$deplib"in1692 case $deplib in 1568 1693 -l*) 1569 if test $linkmode != lib && test $linkmode != prog; then1570 $echo "$modename: warning: \`-l' is ignored for archives/objects " 1>&21694 if test $linkmode = oldlib && test $linkmode = obj; then 1695 $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 1571 1696 continue 1572 1697 fi … … 1585 1710 done 1586 1711 if test "$found" != yes; then 1712 # deplib doesn't seem to be a libtool library 1587 1713 if test "$linkmode,$pass" = "prog,link"; then 1588 1714 compile_deplibs="$deplib $compile_deplibs" … … 1594 1720 continue 1595 1721 fi 1596 ;; 1722 ;; # -l 1597 1723 -L*) 1598 1724 case $linkmode in … … 1617 1743 ;; 1618 1744 *) 1619 $echo "$modename: warning: \`-L' is ignored for archives/objects " 1>&21745 $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 1620 1746 ;; 1621 esac 1747 esac # linkmode 1622 1748 continue 1623 ;; 1749 ;; # -L 1624 1750 -R*) 1625 1751 if test $pass = link; then … … 1665 1791 continue 1666 1792 ;; 1667 esac 1668 ;; 1793 esac # linkmode 1794 ;; # *.$libext 1669 1795 *.lo | *.$objext) 1670 if test $pass = conv; then 1671 deplibs="$deplib $deplibs" 1672 elif test $linkmode = prog; then 1673 if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 1674 # If there is no dlopen support or we're linking statically, 1675 # we need to preload. 1676 newdlprefiles="$newdlprefiles $deplib" 1677 compile_deplibs="$deplib $compile_deplibs" 1678 finalize_deplibs="$deplib $finalize_deplibs" 1679 else 1680 newdlfiles="$newdlfiles $deplib" 1681 fi 1796 if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 1797 # If there is no dlopen support or we're linking statically, 1798 # we need to preload. 1799 newdlprefiles="$newdlprefiles $deplib" 1800 compile_deplibs="$deplib $compile_deplibs" 1801 finalize_deplibs="$deplib $finalize_deplibs" 1802 else 1803 newdlfiles="$newdlfiles $deplib" 1682 1804 fi 1683 1805 continue … … 1687 1809 continue 1688 1810 ;; 1689 esac 1811 esac # case $deplib 1690 1812 if test $found = yes || test -f "$lib"; then : 1691 1813 else … … 1715 1837 1716 1838 # Read the .la file 1717 case "$lib"in1839 case $lib in 1718 1840 */* | *\\*) . $lib ;; 1719 1841 *) . ./$lib ;; … … 1722 1844 if test "$linkmode,$pass" = "lib,link" || 1723 1845 test "$linkmode,$pass" = "prog,scan" || 1724 { test $linkmode != prog && test $linkmode != lib; }; then 1846 { test $linkmode = oldlib && test $linkmode = obj; }; then 1847 # Add dl[pre]opened files of deplib 1725 1848 test -n "$dlopen" && dlfiles="$dlfiles $dlopen" 1726 1849 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" … … 1728 1851 1729 1852 if test $pass = conv; then 1730 # only check for convenience libraries1853 # Only check for convenience libraries 1731 1854 deplibs="$lib $deplibs" 1732 1855 if test -z "$libdir"; then … … 1751 1874 fi 1752 1875 continue 1753 fi 1876 fi # $pass = conv 1754 1877 1755 1878 # Get the name of the library we link against. … … 1770 1893 fi 1771 1894 if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 1772 # If there is no dlname, no dlopen support or we're linking statically,1773 # we need to preload.1895 # If there is no dlname, no dlopen support or we're linking 1896 # statically, we need to preload. 1774 1897 dlprefiles="$dlprefiles $lib" 1775 1898 else … … 1777 1900 fi 1778 1901 continue 1779 fi 1902 fi # $pass = dlopen 1780 1903 1781 1904 # We need an absolute path. 1782 case "$ladir"in1905 case $ladir in 1783 1906 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; 1784 1907 *) … … 1808 1931 absdir="$abs_ladir/$objdir" 1809 1932 # Remove this search path later 1810 uninst_path="$uninst_path $abs_ladir"1811 fi 1933 notinst_path="$notinst_path $abs_ladir" 1934 fi # $installed = yes 1812 1935 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 1813 1936 … … 1828 1951 newdlprefiles="$newdlprefiles $dir/$linklib" 1829 1952 fi 1830 fi 1953 fi # $pass = dlpreopen 1831 1954 1832 1955 if test -z "$libdir"; then 1833 # link the convenience library1956 # Link the convenience library 1834 1957 if test $linkmode = lib; then 1835 1958 deplibs="$dir/$old_library $deplibs" … … 1838 1961 finalize_deplibs="$dir/$old_library $finalize_deplibs" 1839 1962 else 1840 deplibs="$lib $deplibs" # used for prog,scan pass1963 deplibs="$lib $deplibs" 1841 1964 fi 1842 1965 continue … … 1855 1978 tmp_libs= 1856 1979 for deplib in $dependency_libs; do 1857 case "$deplib"in1980 case $deplib in 1858 1981 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 1859 1982 esac … … 1870 1993 esac 1871 1994 tmp_libs="$tmp_libs $deplib" 1872 done 1995 done # for deplib 1873 1996 continue 1874 fi 1875 1876 if test "$linkmode,$pass" = "prog,link"; then 1877 if test -n "$library_names" && 1878 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 1879 # We need to hardcode the library path 1880 if test -n "$shlibpath_var"; then 1881 # Make sure the rpath contains only unique directories. 1882 case "$temp_rpath " in 1883 *" $dir "*) ;; 1884 *" $absdir "*) ;; 1885 *) temp_rpath="$temp_rpath $dir" ;; 1886 esac 1887 fi 1888 1889 # Hardcode the library path. 1890 # Skip directories that are in the system default run-time 1891 # search path. 1892 case " $sys_lib_dlsearch_path " in 1893 *" $absdir "*) ;; 1894 *) 1895 case "$compile_rpath " in 1896 *" $absdir "*) ;; 1897 *) compile_rpath="$compile_rpath $absdir" 1898 esac 1899 ;; 1900 esac 1901 1902 case " $sys_lib_dlsearch_path " in 1903 *" $libdir "*) ;; 1904 *) 1905 case "$finalize_rpath " in 1906 *" $libdir "*) ;; 1907 *) finalize_rpath="$finalize_rpath $libdir" 1908 esac 1909 ;; 1910 esac 1911 fi 1912 1913 if test "$alldeplibs" = yes && 1914 { test "$deplibs_check_method" = pass_all || 1915 { test "$build_libtool_libs" = yes && 1916 test -n "$library_names"; }; }; then 1917 # We only need to search for static libraries 1918 continue 1919 fi 1920 fi 1997 fi # $linkmode = prog... 1921 1998 1922 1999 link_static=no # Whether the deplib will be linked statically 1923 2000 if test -n "$library_names" && 1924 2001 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 1925 if test "$installed" = no; then 1926 uninst_deplibs="$uninst_deplibs $lib" 1927 need_relink=yes 1928 fi 1929 # This is a shared library 1930 if test $linkmode = lib && 1931 test $hardcode_into_libs = yes; then 2002 # Link against this shared library 2003 2004 if test "$linkmode,$pass" = "prog,link" || 2005 { test $linkmode = lib && test $hardcode_into_libs = yes; }; then 1932 2006 # Hardcode the library path. 1933 2007 # Skip directories that are in the system default run-time … … 1951 2025 ;; 1952 2026 esac 2027 if test $linkmode = prog; then 2028 # We need to hardcode the library path 2029 if test -n "$shlibpath_var"; then 2030 # Make sure the rpath contains only unique directories. 2031 case "$temp_rpath " in 2032 *" $dir "*) ;; 2033 *" $absdir "*) ;; 2034 *) temp_rpath="$temp_rpath $dir" ;; 2035 esac 2036 fi 2037 fi 2038 fi # $linkmode,$pass = prog,link... 2039 2040 if test "$alldeplibs" = yes && 2041 { test "$deplibs_check_method" = pass_all || 2042 { test "$build_libtool_libs" = yes && 2043 test -n "$library_names"; }; }; then 2044 # We only need to search for static libraries 2045 continue 2046 fi 2047 2048 if test "$installed" = no; then 2049 notinst_deplibs="$notinst_deplibs $lib" 2050 need_relink=yes 1953 2051 fi 1954 2052 … … 1959 2057 shift; shift 1960 2058 libname=`eval \\$echo \"$libname_spec\"` 1961 if test -n "$soname_spec"; then 2059 # use dlname if we got it. it's perfectly good, no? 2060 if test -n "$dlname"; then 2061 soname="$dlname" 2062 elif test -n "$soname_spec"; then 2063 # bleh windows 2064 case $host in 2065 *cygwin*) 2066 major=`expr $current - $age` 2067 versuffix="-$major" 2068 ;; 2069 esac 1962 2070 eval soname=\"$soname_spec\" 1963 2071 else … … 1966 2074 1967 2075 # Make a new name for the extract_expsyms_cmds to use 2076 soroot="$soname" 2077 soname=`echo $soroot | sed -e 's/^.*\///'` 1968 2078 newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" 1969 2079 … … 1997 2107 dir=$output_objdir 1998 2108 linklib=$newlib 1999 fi 2109 fi # test -n $old_archive_from_expsyms_cmds 2000 2110 2001 2111 if test $linkmode = prog || test "$mode" != relink; then … … 2004 2114 add= 2005 2115 lib_linked=yes 2006 case "$hardcode_action"in2116 case $hardcode_action in 2007 2117 immediate | unsupported) 2008 2118 if test "$hardcode_direct" = no; then 2009 2119 add="$dir/$linklib" 2010 2120 elif test "$hardcode_minus_L" = no; then 2011 case "$host"in2121 case $host in 2012 2122 *-*-sunos*) add_shlibpath="$dir" ;; 2013 2123 esac … … 2043 2153 2044 2154 if test -n "$add_shlibpath"; then 2045 case ":$compile_shlibpath:"in2155 case :$compile_shlibpath: in 2046 2156 *":$add_shlibpath:"*) ;; 2047 2157 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; … … 2057 2167 test "$hardcode_minus_L" != yes && \ 2058 2168 test "$hardcode_shlibpath_var" = yes; then 2059 case ":$finalize_shlibpath:"in2169 case :$finalize_shlibpath: in 2060 2170 *":$libdir:"*) ;; 2061 2171 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; … … 2076 2186 add="-l$name" 2077 2187 elif test "$hardcode_shlibpath_var" = yes; then 2078 case ":$finalize_shlibpath:"in2188 case :$finalize_shlibpath: in 2079 2189 *":$libdir:"*) ;; 2080 2190 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; … … 2096 2206 fi 2097 2207 elif test $linkmode = prog; then 2208 if test "$alldeplibs" = yes && 2209 { test "$deplibs_check_method" = pass_all || 2210 { test "$build_libtool_libs" = yes && 2211 test -n "$library_names"; }; }; then 2212 # We only need to search for static libraries 2213 continue 2214 fi 2215 2216 # Try to link the static library 2098 2217 # Here we assume that one of hardcode_direct or hardcode_minus_L 2099 2218 # is not unsupported. This is valid on all known static and … … 2112 2231 # We're trying link a shared library against a static one 2113 2232 # but the system doesn't support it. 2233 2114 2234 # Just print a warning and add the library to dependency_libs so 2115 2235 # that the program can be linked against the static library. … … 2119 2239 echo "*** you link to this library. But I can only do this if you have a" 2120 2240 echo "*** shared version of the library, which you do not appear to have." 2241 if test "$module" = yes; then 2242 echo "*** Therefore, libtool will create a static module, that should work " 2243 echo "*** as long as the dlopening application is linked with the -dlopen flag." 2244 if test -z "$global_symbol_pipe"; then 2245 echo 2246 echo "*** However, this would only work if libtool was able to extract symbol" 2247 echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 2248 echo "*** not find such a program. So, this module is probably useless." 2249 echo "*** \`nm' from GNU binutils and a full rebuild may help." 2250 fi 2251 if test "$build_old_libs" = no; then 2252 build_libtool_libs=module 2253 build_old_libs=yes 2254 else 2255 build_libtool_libs=no 2256 fi 2257 fi 2121 2258 else 2122 2259 convenience="$convenience $dir/$old_library" … … 2125 2262 link_static=yes 2126 2263 fi 2127 fi 2264 fi # link shared/static library? 2128 2265 2129 2266 if test $linkmode = lib; then … … 2134 2271 temp_deplibs= 2135 2272 for libdir in $dependency_libs; do 2136 case "$libdir"in2273 case $libdir in 2137 2274 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` 2138 2275 case " $xrpath " in … … 2162 2299 # Add the search paths of all dependency libraries 2163 2300 for deplib in $dependency_libs; do 2164 case "$deplib"in2301 case $deplib in 2165 2302 -L*) path="$deplib" ;; 2166 2303 *.la) … … 2168 2305 test "X$dir" = "X$deplib" && dir="." 2169 2306 # We need an absolute path. 2170 case "$dir"in2307 case $dir in 2171 2308 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; 2172 2309 *) … … 2199 2336 esac 2200 2337 done 2201 fi 2202 fi 2203 done 2204 dependency_libs="$newdependency_libs" 2338 fi # link_all_deplibs != no 2339 fi # linkmode = lib 2340 done # for deplib in $libs 2205 2341 if test $pass = dlpreopen; then 2206 2342 # Link the dlpreopened libraries before other libraries … … 2210 2346 fi 2211 2347 if test $pass != dlopen; then 2348 test $pass != scan && dependency_libs="$newdependency_libs" 2212 2349 if test $pass != conv; then 2213 2350 # Make sure lib_search_path contains only unique directories. … … 2228 2365 fi 2229 2366 for var in $vars dependency_libs; do 2230 # Make sure that $var contains only unique libraries 2231 # and add them in reverse order 2367 # Add libraries to $var in reverse order 2232 2368 eval tmp_libs=\"\$$var\" 2233 2369 new_libs= 2234 2370 for deplib in $tmp_libs; do 2235 case "$deplib"in2371 case $deplib in 2236 2372 -L*) new_libs="$deplib $new_libs" ;; 2237 2373 *) … … 2250 2386 tmp_libs= 2251 2387 for deplib in $new_libs; do 2252 case "$deplib"in2388 case $deplib in 2253 2389 -L*) 2254 2390 case " $tmp_libs " in … … 2261 2397 done 2262 2398 eval $var=\"$tmp_libs\" 2263 done 2264 fi 2265 done 2399 done # for var 2400 fi 2401 if test "$pass" = "conv" && 2402 { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then 2403 libs="$deplibs" # reset libs 2404 deplibs= 2405 fi 2406 done # for pass 2266 2407 if test $linkmode = prog; then 2267 2408 dlfiles="$newdlfiles" … … 2271 2412 case $linkmode in 2272 2413 oldlib) 2273 if test -n "$deplibs"; then2274 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&22275 fi2276 2277 2414 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 2278 2415 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 … … 2307 2444 lib) 2308 2445 # Make sure we only generate libraries of the form `libNAME.la'. 2309 case "$outputname"in2446 case $outputname in 2310 2447 lib*) 2311 2448 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` … … 2387 2524 2388 2525 # Check that each of the things are valid numbers. 2389 case "$current"in2390 0 | [1-9] | [1-9][0-9] *) ;;2526 case $current in 2527 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 2391 2528 *) 2392 2529 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 … … 2396 2533 esac 2397 2534 2398 case "$revision"in2399 0 | [1-9] | [1-9][0-9] *) ;;2535 case $revision in 2536 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 2400 2537 *) 2401 2538 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 … … 2405 2542 esac 2406 2543 2407 case "$age"in2408 0 | [1-9] | [1-9][0-9] *) ;;2544 case $age in 2545 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 2409 2546 *) 2410 2547 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 … … 2424 2561 versuffix= 2425 2562 verstring= 2426 case "$version_type"in2563 case $version_type in 2427 2564 none) ;; 2565 2566 darwin) 2567 # Like Linux, but with the current version available in 2568 # verstring for coding it into the library header 2569 major=.`expr $current - $age` 2570 versuffix="$major.$age.$revision" 2571 # Darwin ld doesn't like 0 for these options... 2572 minor_current=`expr $current + 1` 2573 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" 2574 ;; 2575 2576 freebsd-aout) 2577 major=".$current" 2578 versuffix=".$current.$revision"; 2579 ;; 2580 2581 freebsd-elf) 2582 major=".$current" 2583 versuffix=".$current"; 2584 ;; 2428 2585 2429 2586 irix) … … 2469 2626 major=".$current" 2470 2627 versuffix=".$current.$revision" 2471 ;;2472 2473 freebsd-aout)2474 major=".$current"2475 versuffix=".$current.$revision";2476 ;;2477 2478 freebsd-elf)2479 major=".$current"2480 versuffix=".$current";2481 2628 ;; 2482 2629 … … 2532 2679 tempremovelist=`echo "$output_objdir/*"` 2533 2680 for p in $tempremovelist; do 2534 case "$p"in2681 case $p in 2535 2682 *.$objext) 2536 2683 ;; … … 2556 2703 2557 2704 # Eliminate all temporary directories. 2558 for path in $ uninst_path; do2705 for path in $notinst_path; do 2559 2706 lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` 2560 2707 deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` … … 2599 2746 if test "$build_libtool_libs" = yes; then 2600 2747 if test -n "$rpath"; then 2601 case "$host"in2748 case $host in 2602 2749 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) 2603 2750 # these systems don't actually have a c library (as such)! 2604 2751 ;; 2752 *-*-rhapsody* | *-*-darwin1.[012]) 2753 # Rhapsody C library is in the System framework 2754 deplibs="$deplibs -framework System" 2755 ;; 2756 *-*-netbsd*) 2757 # Don't link with libc until the a.out ld.so is fixed. 2758 ;; 2605 2759 *) 2606 2607 2608 2609 2760 # Add libc to deplibs on all other systems if necessary. 2761 if test $build_libtool_need_lc = "yes"; then 2762 deplibs="$deplibs -lc" 2763 fi 2610 2764 ;; 2611 2765 esac … … 2626 2780 newdeplibs= 2627 2781 droppeddeps=no 2628 case "$deplibs_check_method"in2782 case $deplibs_check_method in 2629 2783 pass_all) 2630 2784 # Don't check for shared/static. Everything works. … … 2651 2805 name="`expr $i : '-l\(.*\)'`" 2652 2806 # If $name is empty we are operating on a -L argument. 2653 if test "$name" != ""; then2807 if test -n "$name" && test "$name" != "0"; then 2654 2808 libname=`eval \\$echo \"$libname_spec\"` 2655 2809 deplib_matches=`eval \\$echo \"$library_names_spec\"` … … 2676 2830 name="`expr $i : '-l\(.*\)'`" 2677 2831 # If $name is empty we are operating on a -L argument. 2678 if test "$name" != ""; then2832 if test -n "$name" && test "$name" != "0"; then 2679 2833 $rm conftest 2680 2834 $LTCC -o conftest conftest.c $i … … 2716 2870 name="`expr $a_deplib : '-l\(.*\)'`" 2717 2871 # If $name is empty we are operating on a -L argument. 2718 if test "$name" != ""; then2872 if test -n "$name" && test "$name" != "0"; then 2719 2873 libname=`eval \\$echo \"$libname_spec\"` 2720 2874 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do … … 2734 2888 while test -h "$potlib" 2>/dev/null; do 2735 2889 potliblink=`ls -ld $potlib | sed 's/.* -> //'` 2736 case "$potliblink"in2890 case $potliblink in 2737 2891 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; 2738 2892 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; … … 2747 2901 fi 2748 2902 done 2903 done 2904 if test -n "$a_deplib" ; then 2905 droppeddeps=yes 2906 echo 2907 echo "*** Warning: This library needs some functionality provided by $a_deplib." 2908 echo "*** I have the capability to make that library automatically link in when" 2909 echo "*** you link to this library. But I can only do this if you have a" 2910 echo "*** shared version of the library, which you do not appear to have." 2911 fi 2912 else 2913 # Add a -L argument. 2914 newdeplibs="$newdeplibs $a_deplib" 2915 fi 2916 done # Gone through all deplibs. 2917 ;; 2918 match_pattern*) 2919 set dummy $deplibs_check_method 2920 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 2921 for a_deplib in $deplibs; do 2922 name="`expr $a_deplib : '-l\(.*\)'`" 2923 # If $name is empty we are operating on a -L argument. 2924 if test -n "$name" && test "$name" != "0"; then 2925 libname=`eval \\$echo \"$libname_spec\"` 2926 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 2927 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 2928 for potent_lib in $potential_libs; do 2929 if eval echo \"$potent_lib\" 2>/dev/null \ 2930 | sed 10q \ 2931 | egrep "$match_pattern_regex" > /dev/null; then 2932 newdeplibs="$newdeplibs $a_deplib" 2933 a_deplib="" 2934 break 2 2935 fi 2936 done 2749 2937 done 2750 2938 if test -n "$a_deplib" ; then … … 2784 2972 name=$name_save 2785 2973 2974 case $host in 2975 *-*-rhapsody* | *-*-darwin1.[012]) 2976 # On Rhapsody replace the C library is the System framework 2977 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` 2978 ;; 2979 esac 2980 2786 2981 if test "$droppeddeps" = yes; then 2787 2982 if test "$module" = yes; then … … 2809 3004 echo "*** automatically added whenever a program is linked with this library" 2810 3005 echo "*** or is declared to -dlopen it." 3006 3007 if test $allow_undefined = no; then 3008 echo 3009 echo "*** Since this library must not contain undefined symbols," 3010 echo "*** because either the platform does not support them or" 3011 echo "*** it was explicitly requested with -no-undefined," 3012 echo "*** libtool will only create a static version of it." 3013 if test "$build_old_libs" = no; then 3014 oldlibs="$output_objdir/$libname.$libext" 3015 build_libtool_libs=module 3016 build_old_libs=yes 3017 else 3018 build_libtool_libs=no 3019 fi 3020 fi 2811 3021 fi 2812 3022 fi … … 2835 3045 else 2836 3046 # Just accumulate the unique libdirs. 2837 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator"in3047 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in 2838 3048 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 2839 3049 ;; … … 2888 3098 soname="$realname" 2889 3099 fi 3100 test -z "$dlname" && dlname=$soname 2890 3101 2891 3102 lib="$output_objdir/$realname" … … 2944 3155 if test -n "$convenience"; then 2945 3156 if test -n "$whole_archive_flag_spec"; then 3157 save_libobjs=$libobjs 2946 3158 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 2947 3159 else … … 2959 3171 for xlib in $convenience; do 2960 3172 # Extract the objects. 2961 case "$xlib"in3173 case $xlib in 2962 3174 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 2963 3175 *) xabs=`pwd`"/$xlib" ;; … … 2998 3210 eval cmds=\"$archive_cmds\" 2999 3211 fi 3000 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' 3001 for cmd in $cmds; do 3002 IFS="$save_ifs" 3003 $show "$cmd" 3004 $run eval "$cmd" || exit $? 3005 done 3006 IFS="$save_ifs" 3212 if len=`expr "X$cmds" : ".*"` && 3213 test $len -le $max_cmd_len; then 3214 : 3215 else 3216 # The command line is too long to link in one step, link piecewise. 3217 $echo "creating reloadable object files..." 3218 3219 # Save the value of $output and $libobjs because we want to 3220 # use them later. If we have whole_archive_flag_spec, we 3221 # want to use save_libobjs as it was before 3222 # whole_archive_flag_spec was expanded, because we can't 3223 # assume the linker understands whole_archive_flag_spec. 3224 # This may have to be revisited, in case too many 3225 # convenience libraries get linked in and end up exceeding 3226 # the spec. 3227 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then 3228 save_libobjs=$libobjs 3229 fi 3230 save_output=$output 3231 3232 # Clear the reloadable object creation command queue and 3233 # initialize k to one. 3234 test_cmds= 3235 concat_cmds= 3236 objlist= 3237 delfiles= 3238 last_robj= 3239 k=1 3240 output=$output_objdir/$save_output-${k}.$objext 3241 # Loop over the list of objects to be linked. 3242 for obj in $save_libobjs 3243 do 3244 eval test_cmds=\"$reload_cmds $objlist $last_robj\" 3245 if test "X$objlist" = X || 3246 { len=`expr "X$test_cmds" : ".*"` && 3247 test $len -le $max_cmd_len; }; then 3248 objlist="$objlist $obj" 3249 else 3250 # The command $test_cmds is almost too long, add a 3251 # command to the queue. 3252 if test $k -eq 1 ; then 3253 # The first file doesn't have a previous command to add. 3254 eval concat_cmds=\"$reload_cmds $objlist $last_robj\" 3255 else 3256 # All subsequent reloadable object files will link in 3257 # the last one created. 3258 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" 3259 fi 3260 last_robj=$output_objdir/$save_output-${k}.$objext 3261 k=`expr $k + 1` 3262 output=$output_objdir/$save_output-${k}.$objext 3263 objlist=$obj 3264 len=1 3265 fi 3266 done 3267 # Handle the remaining objects by creating one last 3268 # reloadable object file. All subsequent reloadable object 3269 # files will link in the last one created. 3270 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 3271 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" 3272 3273 # Set up a command to remove the reloadale object files 3274 # after they are used. 3275 i=0 3276 while test $i -lt $k 3277 do 3278 i=`expr $i + 1` 3279 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" 3280 done 3281 3282 $echo "creating a temporary reloadable object file: $output" 3283 3284 # Loop through the commands generated above and execute them. 3285 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' 3286 for cmd in $concat_cmds; do 3287 IFS="$save_ifs" 3288 $show "$cmd" 3289 $run eval "$cmd" || exit $? 3290 done 3291 IFS="$save_ifs" 3292 3293 libobjs=$output 3294 # Restore the value of output. 3295 output=$save_output 3296 3297 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then 3298 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 3299 fi 3300 # Expand the library linking commands again to reset the 3301 # value of $libobjs for piecewise linking. 3302 3303 # Do each of the archive commands. 3304 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 3305 eval cmds=\"$archive_expsym_cmds\" 3306 else 3307 eval cmds=\"$archive_cmds\" 3308 fi 3309 3310 # Append the command to remove the reloadable object files 3311 # to the just-reset $cmds. 3312 eval cmds=\"\$cmds~$rm $delfiles\" 3313 fi 3314 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' 3315 for cmd in $cmds; do 3316 IFS="$save_ifs" 3317 $show "$cmd" 3318 $run eval "$cmd" || exit $? 3319 done 3320 IFS="$save_ifs" 3007 3321 3008 3322 # Restore the uninstalled library and exit … … 3053 3367 fi 3054 3368 3055 case "$output"in3369 case $output in 3056 3370 *.lo) 3057 3371 if test -n "$objs$old_deplibs"; then … … 3098 3412 for xlib in $convenience; do 3099 3413 # Extract the objects. 3100 case "$xlib"in3414 case $xlib in 3101 3415 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3102 3416 *) xabs=`pwd`"/$xlib" ;; … … 3194 3508 3195 3509 prog) 3510 case $host in 3511 *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; 3512 esac 3196 3513 if test -n "$vinfo"; then 3197 3514 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 … … 3208 3525 fi 3209 3526 fi 3527 3528 case $host in 3529 *-*-rhapsody* | *-*-darwin1.[012]) 3530 # On Rhapsody replace the C library is the System framework 3531 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 3532 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 3533 ;; 3534 esac 3210 3535 3211 3536 compile_command="$compile_command $compile_deplibs" … … 3233 3558 else 3234 3559 # Just accumulate the unique libdirs. 3235 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator"in3560 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in 3236 3561 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 3237 3562 ;; … … 3251 3576 esac 3252 3577 fi 3253 case "$host"in3578 case $host in 3254 3579 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 3255 case ":$dllsearchpath:"in3580 case :$dllsearchpath: in 3256 3581 *":$libdir:"*) ;; 3257 3582 *) dllsearchpath="$dllsearchpath:$libdir";; … … 3277 3602 else 3278 3603 # Just accumulate the unique libdirs. 3279 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator"in3604 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in 3280 3605 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 3281 3606 ;; … … 3314 3639 3315 3640 if test -n "$dlsyms"; then 3316 case "$dlsyms"in3641 case $dlsyms in 3317 3642 "") ;; 3318 3643 *.c) … … 3445 3770 3446 3771 pic_flag_for_symtable= 3447 case "$host"in3772 case $host in 3448 3773 # compiling the symbol table file with pic_flag works around 3449 3774 # a FreeBSD bug that causes programs to crash when -lm is … … 3513 3838 rpath= 3514 3839 for dir in $temp_rpath; do 3515 case "$dir"in3840 case $dir in 3516 3841 [\\/]* | [A-Za-z]:[\\/]*) 3517 3842 # Absolute path. … … 3621 3946 # Quote $echo for shipping. 3622 3947 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then 3623 case "$0"in3948 case $0 in 3624 3949 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; 3625 3950 *) qecho="$SHELL `pwd`/$0 --fallback-echo";; … … 3636 3961 case $output in 3637 3962 *.exe) output=`echo $output|sed 's,.exe$,,'` ;; 3963 esac 3964 # test for cygwin because mv fails w/o .exe extensions 3965 case $host in 3966 *cygwin*) exeext=.exe ;; 3967 *) exeext= ;; 3638 3968 esac 3639 3969 $rm $output … … 3666 3996 if test \"\$libtool_install_magic\" = \"$magic\"; then 3667 3997 # install mode needs the following variable: 3668 uninst_deplibs='$uninst_deplibs'3998 notinst_deplibs='$notinst_deplibs' 3669 3999 else 3670 4000 # When we are sourced in execute mode, \$file and \$echo are already set. … … 3715 4045 if test "$fast_install" = yes; then 3716 4046 echo >> $output "\ 3717 program=lt-'$outputname' 4047 program=lt-'$outputname'$exeext 3718 4048 progdir=\"\$thisdir/$objdir\" 3719 4049 … … 3734 4064 # relink executable if necessary 3735 4065 if test -n \"\$relink_command\"; then 3736 if (eval \$relink_command); then :4066 if relink_command_output=\`eval \$relink_command 2>&1\`; then : 3737 4067 else 4068 $echo \"\$relink_command_output\" >&2 3738 4069 $rm \"\$progdir/\$file\" 3739 4070 exit 1 … … 3860 4191 for xlib in $addlibs; do 3861 4192 # Extract the objects. 3862 case "$xlib"in4193 case $xlib in 3863 4194 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3864 4195 *) xabs=`pwd`"/$xlib" ;; … … 3904 4235 # done 3905 4236 3906 eval cmds=\"$old_archive_cmds\" 4237 eval cmds=\"$old_archive_cmds\" 4238 4239 if len=`expr "X$cmds" : ".*"` && 4240 test $len -le $max_cmd_len; then 4241 : 4242 else 4243 # the command line is too long to link in one step, link in parts 4244 $echo "using piecewise archive linking..." 4245 save_RANLIB=$RANLIB 4246 RANLIB=: 4247 objlist= 4248 concat_cmds= 4249 save_oldobjs=$oldobjs 4250 for obj in $save_oldobjs 4251 do 4252 oldobjs="$objlist $obj" 4253 objlist="$objlist $obj" 4254 eval test_cmds=\"$old_archive_cmds\" 4255 if len=`expr "X$test_cmds" : ".*"` && 4256 test $len -le $max_cmd_len; then 4257 : 4258 else 4259 # the above command should be used before it gets too long 4260 oldobjs=$objlist 4261 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 4262 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" 4263 objlist= 4264 fi 4265 done 4266 RANLIB=$save_RANLIB 4267 oldobjs=$objlist 4268 eval cmds=\"\$concat_cmds~$old_archive_cmds\" 4269 fi 3907 4270 fi 3908 4271 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' … … 3921 4284 3922 4285 # Now create the libtool archive. 3923 case "$output"in4286 case $output in 3924 4287 *.la) 3925 4288 old_library= … … 3939 4302 done 3940 4303 # Quote the link command for shipping. 3941 relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" 4304 tagopts= 4305 for tag in $taglist; do 4306 tagopts="$tagopts --tag $tag" 4307 done 4308 relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)" 3942 4309 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 3943 4310 … … 3953 4320 newdependency_libs= 3954 4321 for deplib in $dependency_libs; do 3955 case "$deplib"in4322 case $deplib in 3956 4323 *.la) 3957 4324 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` … … 3991 4358 fi 3992 4359 $rm $output 4360 # place dlname in correct position for cygwin 4361 tdlname=$dlname 4362 case $host,$output,$installed,$module,$dlname in 4363 *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; 4364 esac 3993 4365 $echo > $output "\ 3994 4366 # $outputname - a libtool library file … … 3999 4371 4000 4372 # The name that we can dlopen(3). 4001 dlname='$ dlname'4373 dlname='$tdlname' 4002 4374 4003 4375 # Names of this library. … … 4051 4423 # Aesthetically quote it. 4052 4424 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` 4053 case "$arg"in4425 case $arg in 4054 4426 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 4055 4427 arg="\"$arg\"" … … 4067 4439 # Aesthetically quote it. 4068 4440 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 4069 case "$arg"in4441 case $arg in 4070 4442 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 4071 4443 arg="\"$arg\"" … … 4090 4462 fi 4091 4463 4092 case "$arg"in4464 case $arg in 4093 4465 -d) isdir=yes ;; 4094 4466 -f) prev="-f" ;; … … 4115 4487 # Aesthetically quote the argument. 4116 4488 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 4117 case "$arg"in4489 case $arg in 4118 4490 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 4119 4491 arg="\"$arg\"" … … 4166 4538 fi 4167 4539 fi 4168 case "$destdir"in4540 case $destdir in 4169 4541 [\\/]* | [A-Za-z]:[\\/]*) ;; 4170 4542 *) 4171 4543 for file in $files; do 4172 case "$file"in4544 case $file in 4173 4545 *.lo) ;; 4174 4546 *) … … 4192 4564 4193 4565 # Do each installation. 4194 case "$file"in4566 case $file in 4195 4567 *.$libext) 4196 4568 # Do the static libraries later. … … 4211 4583 relink_command= 4212 4584 # If there is no directory component, then add one. 4213 case "$file"in4585 case $file in 4214 4586 */* | *\\*) . $file ;; 4215 4587 *) . ./$file ;; … … 4240 4612 else 4241 4613 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 4242 continue4614 exit 1 4243 4615 fi 4244 4616 fi … … 4307 4679 4308 4680 # Deduce the name of the destination old-style object file. 4309 case "$destfile"in4681 case $destfile in 4310 4682 *.lo) 4311 4683 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` … … 4350 4722 # Do a test to see if this is really a libtool program. 4351 4723 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4352 uninst_deplibs=4724 notinst_deplibs= 4353 4725 relink_command= 4354 4726 4355 4727 # If there is no directory component, then add one. 4356 case "$file"in4728 case $file in 4357 4729 */* | *\\*) . $file ;; 4358 4730 *) . ./$file ;; … … 4360 4732 4361 4733 # Check the variables that should have been set. 4362 if test -z "$ uninst_deplibs"; then4734 if test -z "$notinst_deplibs"; then 4363 4735 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 4364 4736 exit 1 … … 4366 4738 4367 4739 finalize=yes 4368 for lib in $ uninst_deplibs; do4740 for lib in $notinst_deplibs; do 4369 4741 # Check to see that each library is installed. 4370 4742 libdir= 4371 4743 if test -f "$lib"; then 4372 4744 # If there is no directory component, then add one. 4373 case "$lib"in4745 case $lib in 4374 4746 */* | *\\*) . $lib ;; 4375 4747 *) . ./$lib ;; … … 4385 4757 relink_command= 4386 4758 # If there is no directory component, then add one. 4387 case "$file"in4759 case $file in 4388 4760 */* | *\\*) . $file ;; 4389 4761 *) . ./$file ;; … … 4423 4795 fi 4424 4796 4797 4798 # remove .exe since cygwin /usr/bin/install will append another 4799 # one anyways 4800 case $install_prog,$host in 4801 */usr/bin/install*,*cygwin*) 4802 case $file:$destfile in 4803 *.exe:*.exe) 4804 # this is ok 4805 ;; 4806 *.exe:*) 4807 destfile=$destfile.exe 4808 ;; 4809 *:*.exe) 4810 destfile=`echo $destfile | sed -e 's,.exe$,,'` 4811 ;; 4812 esac 4813 ;; 4814 esac 4815 4425 4816 $show "$install_prog$stripme $file $destfile" 4426 4817 $run eval "$install_prog\$stripme \$file \$destfile" || exit $? … … 4462 4853 # Maybe just do a dry run. 4463 4854 test -n "$run" && current_libdirs=" -n$current_libdirs" 4464 exec $SHELL $0 --finish$current_libdirs 4465 exit 1 4855 exec_cmd='$SHELL $0 --finish$current_libdirs' 4856 else 4857 exit 0 4466 4858 fi 4467 4468 exit 04469 4859 ;; 4470 4860 … … 4504 4894 4505 4895 # Exit here if they wanted silent mode. 4506 test "$show" = :&& exit 04896 test "$show" = ":" && exit 0 4507 4897 4508 4898 echo "----------------------------------------------------------------------" … … 4514 4904 echo "If you ever happen to want to link against installed libraries" 4515 4905 echo "in a given directory, LIBDIR, you must either use libtool, and" 4516 echo "specify the full pathname of the library, or use \`-LLIBDIR'"4906 echo "specify the full pathname of the library, or use the \`-LLIBDIR'" 4517 4907 echo "flag during linking and do at least one of the following:" 4518 4908 if test -n "$shlibpath_var"; then … … 4564 4954 4565 4955 dir= 4566 case "$file"in4956 case $file in 4567 4957 *.la) 4568 4958 # Check to see that this really is a libtool archive. … … 4579 4969 4580 4970 # If there is no directory component, then add one. 4581 case "$file"in4971 case $file in 4582 4972 */* | *\\*) . $file ;; 4583 4973 *) . ./$file ;; … … 4634 5024 for file 4635 5025 do 4636 case "$file"in5026 case $file in 4637 5027 -*) ;; 4638 5028 *) … … 4640 5030 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4641 5031 # If there is no directory component, then add one. 4642 case "$file"in5032 case $file in 4643 5033 */* | *\\*) . $file ;; 4644 5034 *) . ./$file ;; … … 4669 5059 fi 4670 5060 4671 # Now actually exec the command. 4672 eval "exec \$cmd$args" 4673 4674 $echo "$modename: cannot exec \$cmd$args" 4675 exit 1 5061 # Now prepare to actually exec the command. 5062 exec_cmd='"$cmd"$args' 4676 5063 else 4677 5064 # Display what would be done. … … 4690 5077 rm="$nonopt" 4691 5078 files= 5079 rmforce= 5080 exit_status=0 4692 5081 4693 5082 # This variable tells wrapper scripts just to set variables rather … … 4697 5086 for arg 4698 5087 do 4699 case "$arg" in 5088 case $arg in 5089 -f) rm="$rm $arg"; rmforce=yes ;; 4700 5090 -*) rm="$rm $arg" ;; 4701 5091 *) files="$files $arg" ;; … … 4708 5098 exit 1 4709 5099 fi 5100 5101 rmdirs= 4710 5102 4711 5103 for file in $files; do … … 4720 5112 test $mode = uninstall && objdir="$dir" 4721 5113 5114 # Remember objdir for removal later, being careful to avoid duplicates 5115 if test $mode = clean; then 5116 case " $rmdirs " in 5117 *" $objdir "*) ;; 5118 *) rmdirs="$rmdirs $objdir" ;; 5119 esac 5120 fi 5121 5122 # Don't error if the file doesn't exist and rm -f was used. 5123 if (test -L "$file") >/dev/null 2>&1 \ 5124 || (test -h "$file") >/dev/null 2>&1 \ 5125 || test -f "$file"; then 5126 : 5127 elif test -d "$file"; then 5128 exit_status=1 5129 continue 5130 elif test "$rmforce" = yes; then 5131 continue 5132 fi 5133 4722 5134 rmfiles="$file" 4723 5135 4724 case "$name"in5136 case $name in 4725 5137 *.la) 4726 5138 # Possibly a libtool archive, so verify it. … … 4744 5156 $show "$cmd" 4745 5157 $run eval "$cmd" 5158 if test $? != 0 && test "$rmforce" != yes; then 5159 exit_status=1 5160 fi 4746 5161 done 4747 5162 IFS="$save_ifs" … … 4756 5171 $show "$cmd" 4757 5172 $run eval "$cmd" 5173 if test $? != 0 && test "$rmforce" != yes; then 5174 exit_status=1 5175 fi 4758 5176 done 4759 5177 IFS="$save_ifs" … … 4766 5184 *.lo) 4767 5185 # Possibly a libtool object, so verify it. 4768 if (sed -e '2q' $ arg| egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then5186 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4769 5187 4770 5188 # Read the .lo file 4771 . ./$file5189 . $dir/$name 4772 5190 4773 5191 # Add PIC object to the list of files to remove. … … 4800 5218 esac 4801 5219 $show "$rm $rmfiles" 4802 $run $rm $rmfiles 5220 $run $rm $rmfiles || exit_status=1 4803 5221 done 4804 exit 0 5222 5223 # Try to remove the ${objdir}s in the directories where we deleted files 5224 for dir in $rmdirs; do 5225 if test -d "$dir"; then 5226 $show "rmdir $dir" 5227 $run rmdir $dir >/dev/null 2>&1 5228 fi 5229 done 5230 5231 exit $exit_status 4805 5232 ;; 4806 5233 … … 4812 5239 esac 4813 5240 4814 $echo "$modename: invalid operation mode \`$mode'" 1>&2 4815 $echo "$generic_help" 1>&2 5241 if test -z "$exec_cmd"; then 5242 $echo "$modename: invalid operation mode \`$mode'" 1>&2 5243 $echo "$generic_help" 1>&2 5244 exit 1 5245 fi 5246 fi # test -z "$show_help" 5247 5248 if test -n "$exec_cmd"; then 5249 eval exec $exec_cmd 4816 5250 exit 1 4817 fi # test -z "$show_help"5251 fi 4818 5252 4819 5253 # We need to display help for each of the modes. 4820 case "$mode"in5254 case $mode in 4821 5255 "") $echo \ 4822 5256 "Usage: $modename [OPTION]... [MODE-ARG]... … … 4874 5308 4875 5309 -o OUTPUT-FILE set the output file name to OUTPUT-FILE 5310 -prefer-pic try to building PIC objects only 5311 -prefer-non-pic try to building non-PIC objects only 4876 5312 -static always build a \`.o' file suitable for static linking 4877 5313 … … 4957 5393 -no-undefined declare that a library does not refer to external symbols 4958 5394 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects 5395 -objectlist FILE Use a list of object files found in FILE to specify objects 4959 5396 -release RELEASE specify package release information 4960 5397 -rpath LIBDIR the created library will eventually be installed in LIBDIR -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.