Annotation of OpenXM_contrib2/asir2000/gc/configure.in, Revision 1.1
1.1 ! noro 1: # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
! 2: #
! 3: # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
! 4: # OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
! 5: #
! 6: # Permission is hereby granted to use or copy this program
! 7: # for any purpose, provided the above notices are retained on all copies.
! 8: # Permission to modify the code and to distribute modified code is granted,
! 9: # provided the above notices are retained, and a notice that the code was
! 10: # modified is included with the above copyright notice.
! 11: #
! 12: # Original author: Tom Tromey
! 13:
! 14: dnl Process this file with autoconf to produce configure.
! 15:
! 16: AC_INIT(gc, 6.1, Hans_Boehm@hp.com)
! 17:
! 18: AM_INIT_AUTOMAKE(gc, 6.1, no-define)
! 19:
! 20: AC_CONFIG_SRCDIR(gcj_mlc.c)
! 21:
! 22: dnl Can't be done in GC_CONFIGURE because that confuses automake.
! 23: dnl AC_CONFIG_AUX_DIR(.)
! 24:
! 25: AC_CANONICAL_HOST
! 26:
! 27: AC_PROG_CC
! 28: AC_PROG_CXX
! 29:
! 30: AM_PROG_AS
! 31: AC_CHECK_TOOL(AR, ar)
! 32: AC_CHECK_TOOL(RANLIB, ranlib, :)
! 33:
! 34: AC_PROG_INSTALL
! 35:
! 36: AM_MAINTAINER_MODE
! 37:
! 38: if test "[$]{srcdir}" = "."; then
! 39: if test "[$]{with_target_subdir}" != "." -a -n "[$]{with_target_subdir}"; then
! 40: gc_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
! 41: else
! 42: gc_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
! 43: fi
! 44: else
! 45: gc_basedir="[$]{srcdir}/$1"
! 46: fi
! 47: AC_SUBST(gc_basedir)
! 48:
! 49: # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
! 50: # at least currently, we never actually build a program, so we never
! 51: # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
! 52: # fails, because we are probably configuring with a cross compiler
! 53: # which can't create executables. So we include AC_EXEEXT to keep
! 54: # automake happy, but we don't execute it, since we don't care about
! 55: # the result.
! 56: if false; then
! 57: # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
! 58: # to nothing, so nothing would remain between `then' and `fi' if it
! 59: # were not for the `:' below.
! 60: :
! 61: AC_EXEEXT
! 62: fi
! 63:
! 64: . [$]{srcdir}/configure.host
! 65:
! 66: GC_CFLAGS=${gc_cflags}
! 67: AC_SUBST(GC_CFLAGS)
! 68:
! 69: AC_ARG_ENABLE(threads, [ --enable-threads=TYPE choose threading package],
! 70: THREADS=$enableval,
! 71: [ AC_MSG_CHECKING([for thread model used by GCC])
! 72: THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
! 73: if test -z "$THREADS"; then
! 74: THREADS=no
! 75: fi
! 76: AC_MSG_RESULT([$THREADS])])
! 77:
! 78: AC_ARG_ENABLE(parallel-mark,
! 79: [ --enable-parallel-mark parallelize marking and free list construction],
! 80: [case "$THREADS" in
! 81: no | none | single)
! 82: AC_MSG_ERROR([Parallel mark requires --enable-threads=x spec])
! 83: ;;
! 84: esac]
! 85: )
! 86:
! 87: INCLUDES=-I${srcdir}/include
! 88: THREADLIBS=
! 89: case "$THREADS" in
! 90: no | none | single)
! 91: THREADS=none
! 92: ;;
! 93: posix | pthreads)
! 94: THREADS=posix
! 95: THREADLIBS=-lpthread
! 96: case "$host" in
! 97: x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux*)
! 98: AC_DEFINE(GC_LINUX_THREADS)
! 99: AC_DEFINE(_REENTRANT)
! 100: if test "${enable_parallel_mark}" = yes; then
! 101: AC_DEFINE(PARALLEL_MARK)
! 102: fi
! 103: AC_DEFINE(THREAD_LOCAL_ALLOC)
! 104: ;;
! 105: *-*-linux*)
! 106: AC_DEFINE(GC_LINUX_THREADS)
! 107: AC_DEFINE(_REENTRANT)
! 108: ;;
! 109: *-*-hpux*)
! 110: AC_MSG_WARN("Only HP/UX 11 threads are supported.")
! 111: AC_DEFINE(GC_HPUX_THREADS)
! 112: AC_DEFINE(_POSIX_C_SOURCE,199506L)
! 113: if test "${enable_parallel_mark}" = yes; then
! 114: AC_DEFINE(PARALLEL_MARK)
! 115: fi
! 116: AC_DEFINE(THREAD_LOCAL_ALLOC)
! 117: THREADLIBS="-lpthread -lrt"
! 118: ;;
! 119: *-*-freebsd*)
! 120: AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
! 121: AC_DEFINE(GC_FREEBSD_THREADS)
! 122: INCLUDES="$INCLUDES -pthread"
! 123: THREADLIBS=-pthread
! 124: ;;
! 125: *-*-solaris*)
! 126: AC_DEFINE(GC_SOLARIS_THREADS)
! 127: AC_DEFINE(GC_SOLARIS_PTHREADS)
! 128: ;;
! 129: *-*-irix*)
! 130: AC_DEFINE(GC_IRIX_THREADS)
! 131: ;;
! 132: *-*-cygwin*)
! 133: AC_DEFINE(GC_WIN32_THREADS)
! 134: ;;
! 135: esac
! 136: ;;
! 137: win32)
! 138: AC_DEFINE(GC_WIN32_THREADS)
! 139: dnl Wine getenv may not return NULL for missing entry
! 140: AC_DEFINE(NO_GETENV)
! 141: ;;
! 142: dgux386)
! 143: THREADS=dgux386
! 144: # Use pthread GCC switch
! 145: THREADLIBS=-pthread
! 146: if test "${enable_parallel_mark}" = yes; then
! 147: AC_DEFINE(PARALLEL_MARK)
! 148: fi
! 149: AC_DEFINE(THREAD_LOCAL_ALLOC)
! 150: AC_DEFINE(GC_DGUX386_THREADS)
! 151: AC_DEFINE(DGUX_THREADS)
! 152: # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread
! 153: INCLUDES="-pthread $INCLUDES"
! 154: ;;
! 155: decosf1 | irix | mach | os2 | solaris | dce | vxworks)
! 156: AC_MSG_ERROR(thread package $THREADS not yet supported)
! 157: ;;
! 158: *)
! 159: AC_MSG_ERROR($THREADS is an unknown thread package)
! 160: ;;
! 161: esac
! 162: AC_SUBST(THREADLIBS)
! 163:
! 164: AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
! 165: AC_SUBST(EXTRA_TEST_LIBS)
! 166:
! 167: target_all=libgc.la
! 168: AC_SUBST(target_all)
! 169:
! 170: dnl If the target is an eCos system, use the appropriate eCos
! 171: dnl I/O routines.
! 172: dnl FIXME: this should not be a local option but a global target
! 173: dnl system; at present there is no eCos target.
! 174: TARGET_ECOS="no"
! 175: AC_ARG_WITH(ecos,
! 176: [ --with-ecos enable runtime eCos target support],
! 177: TARGET_ECOS="$with_ecos"
! 178: )
! 179:
! 180: addobjs=
! 181: CXXINCLUDES=
! 182: case "$TARGET_ECOS" in
! 183: no)
! 184: ;;
! 185: *)
! 186: AC_DEFINE(ECOS)
! 187: CXXINCLUDES="-I${TARGET_ECOS}/include"
! 188: addobjs="$addobjs ecos.lo"
! 189: ;;
! 190: esac
! 191: AC_SUBST(CXX)
! 192:
! 193: AC_SUBST(INCLUDES)
! 194: AC_SUBST(CXXINCLUDES)
! 195:
! 196: machdep=
! 197:
! 198: case "$host" in
! 199: alpha-*-openbsd*)
! 200: AC_DISABLE_SHARED
! 201: ;;
! 202: *)
! 203: AC_ENABLE_SHARED
! 204: ;;
! 205: esac
! 206:
! 207: case "$host" in
! 208: alpha-*-openbsd*)
! 209: machdep="alpha_mach_dep.lo"
! 210: if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
! 211: AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
! 212: fi
! 213: ;;
! 214: alpha*-*-*)
! 215: machdep="alpha_mach_dep.lo"
! 216: ;;
! 217: i?86-*-solaris2.[[89]]*)
! 218: AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
! 219: ;;
! 220: mipstx39-*-elf*)
! 221: machdep="mips_ultrix_mach_dep.lo"
! 222: AC_DEFINE(STACKBASE, __stackbase)
! 223: AC_DEFINE(DATASTART_IS_ETEXT)
! 224: ;;
! 225: mips-dec-ultrix*)
! 226: machdep="mips_ultrix_mach-dep.lo"
! 227: ;;
! 228: mips-nec-sysv*|mips-unknown-sysv*)
! 229: ;;
! 230: mips-*-*)
! 231: machdep="mips_sgi_mach_dep.lo"
! 232: AC_DEFINE(NO_EXECUTE_PERMISSION)
! 233: ;;
! 234: sparc-*-netbsd*)
! 235: machdep="sparc_netbsd_mach_dep.lo"
! 236: ;;
! 237: sparc-sun-solaris2.3*)
! 238: machdep="sparc_mach_dep.lo"
! 239: AC_DEFINE(SUNOS53_SHARED_LIB)
! 240: ;;
! 241: sparc-sun-solaris2.*)
! 242: machdep="sparc_mach_dep.lo"
! 243: ;;
! 244: ia64-*-*)
! 245: machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
! 246: ;;
! 247: esac
! 248: if test x"$machdep" = x; then
! 249: machdep="mach_dep.lo"
! 250: fi
! 251: addobjs="$addobjs $machdep"
! 252: AC_SUBST(addobjs)
! 253:
! 254: AC_PROG_LIBTOOL
! 255:
! 256: dnl checks for AViiON Machines running DGUX
! 257: AC_MSG_CHECKING(if host is AViiON running DGUX)
! 258: ac_is_dgux=no
! 259: AC_CHECK_HEADER(sys/dg_sys_info.h,
! 260: [ac_is_dgux=yes;])
! 261:
! 262: if test $ac_is_dgux = yes; then
! 263: if test "$enable_full_debug" = "yes"; then
! 264: CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
! 265: CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
! 266: else
! 267: CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
! 268: CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
! 269: fi
! 270: AC_SUBST(CFLAGS)
! 271: AC_SUBST(CXXFLAGS)
! 272: fi
! 273:
! 274: dnl We use these options to decide which functions to include.
! 275: AC_ARG_WITH(target-subdir,
! 276: [ --with-target-subdir=SUBDIR
! 277: configuring with a cross compiler])
! 278: AC_ARG_WITH(cross-host,
! 279: [ --with-cross-host=HOST configuring with a cross compiler])
! 280:
! 281: AM_MAINTAINER_MODE
! 282: # automake wants to see AC_EXEEXT. But we don't need it. And having
! 283: # it is actually a problem, because the compiler we're passed can't
! 284: # necessarily do a full link. So we fool automake here.
! 285: if false; then
! 286: # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
! 287: # to nothing, so nothing would remain between `then' and `fi' if it
! 288: # were not for the `:' below.
! 289: :
! 290: AC_EXEEXT
! 291: fi
! 292:
! 293: AC_MSG_CHECKING([for threads package to use])
! 294:
! 295: dnl As of 4.13a2, the collector will not properly work on Solaris when
! 296: dnl built with gcc and -O. So we remove -O in the appropriate case.
! 297: case "$host" in
! 298: sparc-sun-solaris2*)
! 299: if test "$GCC" = yes; then
! 300: new_CFLAGS=
! 301: for i in $CFLAGS; do
! 302: case "$i" in
! 303: -O*)
! 304: ;;
! 305: *)
! 306: new_CFLAGS="$new_CFLAGS $i"
! 307: ;;
! 308: esac
! 309: done
! 310: CFLAGS="$new_CFLAGS"
! 311: fi
! 312: ;;
! 313: esac
! 314:
! 315: dnl We need to override the top-level CFLAGS. This is how we do it.
! 316: MY_CFLAGS="$CFLAGS"
! 317: AC_SUBST(MY_CFLAGS)
! 318:
! 319: dnl Include defines that have become de facto standard.
! 320: dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
! 321: AC_DEFINE(SILENT)
! 322: AC_DEFINE(NO_SIGNALS)
! 323: AC_DEFINE(NO_EXECUTE_PERMISSION)
! 324: AC_DEFINE(ALL_INTERIOR_POINTERS)
! 325:
! 326: dnl By default, make the library as general as possible.
! 327: AC_DEFINE(JAVA_FINALIZATION)
! 328: AC_DEFINE(GC_GCJ_SUPPORT)
! 329: AC_DEFINE(ATOMIC_UNCOLLECTABLE)
! 330:
! 331: dnl This is something of a hack. When cross-compiling we turn off
! 332: dnl some functionality. We also enable the "small" configuration.
! 333: dnl These is only correct when targetting an embedded system. FIXME.
! 334: if test -n "${with_cross_host}"; then
! 335: AC_DEFINE(NO_SIGSET)
! 336: AC_DEFINE(NO_CLOCK)
! 337: AC_DEFINE(SMALL_CONFIG)
! 338: AC_DEFINE(NO_DEBUGGING)
! 339: fi
! 340:
! 341: AC_ARG_ENABLE(full-debug,
! 342: [ --enable-full-debug include full support for pointer backtracing etc.],
! 343: [ if test "$enable_full_debug" = "yes"; then
! 344: AC_MSG_WARN("Must define GC_DEBUG and use debug alloc. in clients.")
! 345: AC_DEFINE(KEEP_BACK_PTRS)
! 346: AC_DEFINE(DBG_HDRS_ALL)
! 347: case $host in
! 348: ia64-*-linux* )
! 349: AC_DEFINE(MAKE_BACK_GRAPH)
! 350: ;;
! 351: x86-*-linux* | i586-*-linux* | i686-*-linux* )
! 352: AC_DEFINE(MAKE_BACK_GRAPH)
! 353: AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
! 354: AC_DEFINE(SAVE_CALL_COUNT, 8)
! 355: ;;
! 356: i[3456]86-*-dgux*)
! 357: AC_DEFINE(MAKE_BACK_GRAPH)
! 358: ;;
! 359: esac ]
! 360: fi)
! 361:
! 362: AC_ARG_ENABLE(redirect-malloc,
! 363: [ --enable-redirect-malloc redirect malloc and friends to GC routines])
! 364:
! 365: if test "${enable_redirect_malloc}" = yes; then
! 366: if test "${enable_full_debug}" = yes; then
! 367: AC_DEFINE(REDIRECT_MALLOC, GC_debug_malloc_replacement)
! 368: AC_DEFINE(REDIRECT_REALLOC, GC_debug_realloc_replacement)
! 369: else
! 370: AC_DEFINE(REDIRECT_MALLOC, GC_malloc)
! 371: fi
! 372: fi
! 373:
! 374: AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
! 375:
! 376: if test "${multilib}" = "yes"; then
! 377: multilib_arg="--enable-multilib"
! 378: else
! 379: multilib_arg=
! 380: fi
! 381:
! 382: AC_OUTPUT(Makefile,,
! 383: srcdir=${srcdir}
! 384: host=${host}
! 385: with_multisubdir=${with_multisubdir}
! 386: ac_configure_args="${multilib_arg} ${ac_configure_args}"
! 387: CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
! 388: gc_basedir=${gc_basedir}
! 389: CC="${CC}"
! 390: DEFS="$DEFS"
! 391: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>