X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=boehm-gc%2Fconfigure.in;h=e58ca15424c4e5d2599d546603a5ddd0f26e8cbb;hb=4657ee94b49cecd79d4a296fada598ffd3919629;hp=85d0eeb707ce9c970b386c325accd9ac50aac4f8;hpb=d30fdfb972fa8c97695e72fc0e939ace7d497e13;p=pf3gnuchains%2Fgcc-fork.git diff --git a/boehm-gc/configure.in b/boehm-gc/configure.in index 85d0eeb707c..e58ca15424c 100644 --- a/boehm-gc/configure.in +++ b/boehm-gc/configure.in @@ -1,4 +1,5 @@ # Copyright (c) 1999, 2000, 2001, 2002, 2003 by Red Hat, Inc. All rights reserved. +# Copyright 2004 Nathanael Nerode # # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED # OR IMPLIED. ANY USE IS AT YOUR OWN RISK. @@ -10,9 +11,11 @@ # modified is included with the above copyright notice. # # Original author: Tom Tromey +# Modified by Nathanael Nerode dnl Process this file with autoconf to produce configure. +AC_PREREQ(2.57) AC_INIT(gcj_mlc.c) # This works around the fact that libtool configuration may change LD @@ -21,9 +24,51 @@ AC_INIT(gcj_mlc.c) # exported. ORIGINAL_LD_FOR_MULTILIBS=$LD -dnl Can't be done in GC_CONFIGURE because that confuses automake. +dnl Can't be done in GC_CONFIGURE because that confuses automake. AC_CONFIG_AUX_DIR(.) +dnl Default to --enable-multilib +AC_ARG_ENABLE(multilib, +[ --enable-multilib build many library versions (default)], +[case "${enableval}" in + yes) multilib=yes ;; + no) multilib=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;; + esac], [multilib=yes])dnl + +dnl We may get other options which we don't document: +dnl --with-target-subdir, --with-multisrctop, --with-multisubdir + +dnl I needed to add the -n test to allow configuration in src directory - HB +if test "[$]{srcdir}" = "."; then + if test "[$]{with_target_subdir}" != "." -a -n "[$]{with_target_subdir}"; then + gc_basedir="[$]{srcdir}/[$]{with_multisrctop}../." + else + gc_basedir="[$]{srcdir}/[$]{with_multisrctop}." + fi +else + gc_basedir="[$]{srcdir}/." +fi +AC_SUBST(gc_basedir) +AC_CONFIG_AUX_DIR($gc_basedir/..) +if :; then :; else + # This overrides the previous occurrence for automake, but not for + # autoconf, which is exactly what we want. + AC_CONFIG_AUX_DIR(..) +fi + +AC_CANONICAL_SYSTEM + +# Get the 'noncanonical' system names. +sinclude(../config/acx.m4) +_GCC_TOPLEV_NONCANONICAL_BUILD +_GCC_TOPLEV_NONCANONICAL_HOST +_GCC_TOPLEV_NONCANONICAL_TARGET + +# This works around an automake problem. +mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs" +AC_SUBST(mkinstalldirs) + GC_CONFIGURE(.) AM_PROG_LIBTOOL @@ -36,16 +81,6 @@ AC_ARG_WITH(cross-host, [ --with-cross-host=HOST configuring with a cross compiler]) AM_MAINTAINER_MODE -# automake wants to see AC_EXEEXT. But we don't need it. And having -# it is actually a problem, because the compiler we're passed can't -# necessarily do a full link. So we fool automake here. -if false; then - # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands - # to nothing, so nothing would remain between `then' and `fi' if it - # were not for the `:' below. - : - AC_EXEEXT -fi AC_MSG_CHECKING([for thread model used by GCC]) THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` @@ -169,7 +204,7 @@ AC_MSG_RESULT($THREADLIBS) esac AC_SUBST(THREADLIBS) -case "$host" in +case "$host" in powerpc-*-darwin*) powerpc_darwin=true ;; @@ -180,7 +215,7 @@ AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue) # dyld calls anyway case "$host" in *-*-darwin*) ;; - *) + *) AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl") ;; esac @@ -189,7 +224,7 @@ AC_SUBST(EXTRA_TEST_LIBS) target_all=libgcjgc.la AC_SUBST(target_all) -AC_SUBST(target_alias) +AC_SUBST(target_noncanonical) dnl If the target is an eCos system, use the appropriate eCos dnl I/O routines. @@ -245,7 +280,13 @@ esac # Configuration of machine-dependent code # -AC_MSG_CHECKING(which machine-dependent code should be used) +# We don't set NO_EXECUTE_PERMISSION by default because gcj (and +# anything else that creates trampolines in gc-allocated memory) +# always needs exec permission. The exceptions to this are IA-64 and +# some variations of Power PC, where trampolines don't contain +# executable code. +# +AC_MSG_CHECKING(which machine-dependent code should be used) machdep= case "$host" in alpha*-*-openbsd*) @@ -270,11 +311,10 @@ case "$host" in ;; mips-nec-sysv*|mips-unknown-sysv*) ;; - mips*-*-linux*) - ;; + mips*-*-linux*) + ;; mips-*-*) machdep="mips_sgi_mach_dep.lo" - AC_DEFINE(NO_EXECUTE_PERMISSION) ;; sparc-*-netbsd*) machdep="sparc_netbsd_mach_dep.lo" @@ -287,6 +327,7 @@ case "$host" in machdep="sparc_mach_dep.lo" ;; ia64-*-*) + AC_DEFINE(NO_EXECUTE_PERMISSION) machdep="mach_dep.lo ia64_save_regs_in_stack.lo" ;; esac @@ -310,7 +351,7 @@ ac_is_dgux=no AC_CHECK_HEADER(sys/dg_sys_info.h, [ac_is_dgux=yes;]) -AC_MSG_RESULT($ac_is_dgux) +AC_MSG_RESULT($ac_is_dgux) ## :GOTCHA: we do not check anything but sys/dg_sys_info.h if test $ac_is_dgux = yes; then if test "$enable_full_debug" = "yes"; then @@ -331,17 +372,6 @@ AC_ARG_WITH(target-subdir, AC_ARG_WITH(cross-host, [ --with-cross-host=HOST configuring with a cross compiler]) -# automake wants to see AC_EXEEXT. But we don't need it. And having -# it is actually a problem, because the compiler we're passed can't -# necessarily do a full link. So we fool automake here. -if false; then - # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands - # to nothing, so nothing would remain between `then' and `fi' if it - # were not for the `:' below. - : - AC_EXEEXT -fi - dnl As of 4.13a2, the collector will not properly work on Solaris when dnl built with gcc and -O. So we remove -O in the appropriate case. dnl @@ -376,7 +406,6 @@ dnl Include defines that have become de facto standard. dnl ALL_INTERIOR_POINTERS can be overridden in startup code. AC_DEFINE(SILENT) AC_DEFINE(NO_SIGNALS) -AC_DEFINE(NO_EXECUTE_PERMISSION) AC_DEFINE(ALL_INTERIOR_POINTERS) dnl By default, make the library as general as possible. @@ -415,10 +444,10 @@ AC_ARG_ENABLE(full-debug, if test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then - toolexecdir='$(exec_prefix)/$(target_alias)' + toolexecdir='$(exec_prefix)/$(target_noncanonical)' toolexeclibdir='$(toolexecdir)/lib' else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' toolexeclibdir='$(libdir)' fi multi_os_directory=`$CC -print-multi-os-directory`