Annotation of OpenXM_contrib2/asir2000/gc/configure.in, Revision 1.2
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
1.2 ! noro 13: # Modified by: Grzegorz Jakacki <jakacki at acm dot org>
1.1 noro 14:
15: dnl Process this file with autoconf to produce configure.
16:
1.2 ! noro 17: # Initialization
! 18: # ==============
1.1 noro 19:
1.2 ! noro 20: AC_INIT(gc,6.2alpha6,Hans.Boehm@hp.com)
! 21: ## version must conform to [0-9]+[.][0-9]+(alpha[0-9]+)?
1.1 noro 22: AC_CONFIG_SRCDIR(gcj_mlc.c)
1.2 ! noro 23: AC_CANONICAL_TARGET
! 24: AC_PREREQ(2.53)
! 25: AC_REVISION($Revision: 1.2 $)
! 26: GC_SET_VERSION
! 27: AM_INIT_AUTOMAKE
1.1 noro 28:
1.2 ! noro 29: AC_SUBST(PACKAGE)
! 30: AC_SUBST(GC_VERSION)
1.1 noro 31:
32: AC_PROG_CC
33: AC_PROG_CXX
34:
35: AM_PROG_AS
36: AC_CHECK_TOOL(AR, ar)
1.2 ! noro 37: AC_CHECK_TOOL(RANLIB, ranlib, :) # :)
1.1 noro 38:
39: AC_PROG_INSTALL
40:
41: AM_MAINTAINER_MODE
42:
43: . [$]{srcdir}/configure.host
44:
45: GC_CFLAGS=${gc_cflags}
46: AC_SUBST(GC_CFLAGS)
47:
48: AC_ARG_ENABLE(threads, [ --enable-threads=TYPE choose threading package],
49: THREADS=$enableval,
50: [ AC_MSG_CHECKING([for thread model used by GCC])
51: THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
52: if test -z "$THREADS"; then
53: THREADS=no
54: fi
55: AC_MSG_RESULT([$THREADS])])
56:
57: AC_ARG_ENABLE(parallel-mark,
58: [ --enable-parallel-mark parallelize marking and free list construction],
59: [case "$THREADS" in
60: no | none | single)
61: AC_MSG_ERROR([Parallel mark requires --enable-threads=x spec])
62: ;;
63: esac]
64: )
65:
1.2 ! noro 66: AC_ARG_ENABLE(cplusplus,
! 67: [ --enable-cplusplus install C++ support],
! 68: )
! 69:
1.1 noro 70: INCLUDES=-I${srcdir}/include
71: THREADLIBS=
72: case "$THREADS" in
73: no | none | single)
74: THREADS=none
75: ;;
76: posix | pthreads)
77: THREADS=posix
78: THREADLIBS=-lpthread
79: case "$host" in
1.2 ! noro 80: x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux*)
1.1 noro 81: AC_DEFINE(GC_LINUX_THREADS)
82: AC_DEFINE(_REENTRANT)
83: if test "${enable_parallel_mark}" = yes; then
84: AC_DEFINE(PARALLEL_MARK)
85: fi
86: AC_DEFINE(THREAD_LOCAL_ALLOC)
87: ;;
88: *-*-linux*)
89: AC_DEFINE(GC_LINUX_THREADS)
90: AC_DEFINE(_REENTRANT)
91: ;;
1.2 ! noro 92: *-*-aix*)
! 93: AC_DEFINE(GC_AIX_THREADS)
! 94: AC_DEFINE(_REENTRANT)
! 95: ;;
1.1 noro 96: *-*-hpux*)
97: AC_MSG_WARN("Only HP/UX 11 threads are supported.")
98: AC_DEFINE(GC_HPUX_THREADS)
99: AC_DEFINE(_POSIX_C_SOURCE,199506L)
100: if test "${enable_parallel_mark}" = yes; then
101: AC_DEFINE(PARALLEL_MARK)
102: fi
103: AC_DEFINE(THREAD_LOCAL_ALLOC)
104: THREADLIBS="-lpthread -lrt"
105: ;;
106: *-*-freebsd*)
107: AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
108: AC_DEFINE(GC_FREEBSD_THREADS)
109: INCLUDES="$INCLUDES -pthread"
110: THREADLIBS=-pthread
111: ;;
112: *-*-solaris*)
113: AC_DEFINE(GC_SOLARIS_THREADS)
114: AC_DEFINE(GC_SOLARIS_PTHREADS)
115: ;;
116: *-*-irix*)
117: AC_DEFINE(GC_IRIX_THREADS)
118: ;;
119: *-*-cygwin*)
120: AC_DEFINE(GC_WIN32_THREADS)
121: ;;
1.2 ! noro 122: *-*-darwin*)
! 123: AC_DEFINE(GC_DARWIN_THREADS)
! 124: AC_DEFINE(THREAD_LOCAL_ALLOC)
! 125: if test "${enable_parallel_mark}" = yes; then
! 126: AC_DEFINE(PARALLEL_MARK)
! 127: fi
! 128: ;;
! 129: *-*-osf*)
! 130: AC_DEFINE(GC_OSF1_THREADS)
! 131: if test "${enable_parallel_mark}" = yes; then
! 132: AC_DEFINE(PARALLEL_MARK)
! 133: AC_DEFINE(THREAD_LOCAL_ALLOC)
! 134: # May want to enable it in other cases, too.
! 135: # Measurements havent yet been done.
! 136: fi
! 137: INCLUDES="$INCLUDES -pthread"
! 138: THREADLIBS="-lpthread -lrt"
! 139: ;;
1.1 noro 140: esac
141: ;;
142: win32)
143: AC_DEFINE(GC_WIN32_THREADS)
144: dnl Wine getenv may not return NULL for missing entry
145: AC_DEFINE(NO_GETENV)
146: ;;
147: dgux386)
148: THREADS=dgux386
1.2 ! noro 149: AC_MSG_RESULT($THREADLIBS)
1.1 noro 150: # Use pthread GCC switch
151: THREADLIBS=-pthread
152: if test "${enable_parallel_mark}" = yes; then
153: AC_DEFINE(PARALLEL_MARK)
154: fi
155: AC_DEFINE(THREAD_LOCAL_ALLOC)
156: AC_DEFINE(GC_DGUX386_THREADS)
157: AC_DEFINE(DGUX_THREADS)
158: # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread
159: INCLUDES="-pthread $INCLUDES"
160: ;;
161: decosf1 | irix | mach | os2 | solaris | dce | vxworks)
162: AC_MSG_ERROR(thread package $THREADS not yet supported)
163: ;;
164: *)
165: AC_MSG_ERROR($THREADS is an unknown thread package)
166: ;;
167: esac
168: AC_SUBST(THREADLIBS)
169:
1.2 ! noro 170: case "$host" in
! 171: powerpc-*-darwin*)
! 172: powerpc_darwin=true
! 173: ;;
! 174: esac
! 175: AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
! 176:
! 177: # We never want libdl on darwin. It is a fake libdl that just ends up making
! 178: # dyld calls anyway
! 179: case "$host" in
! 180: *-*-darwin*) ;;
! 181: *)
! 182: AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
! 183: ;;
! 184: esac
! 185:
1.1 noro 186: AC_SUBST(EXTRA_TEST_LIBS)
187:
188: target_all=libgc.la
189: AC_SUBST(target_all)
190:
191: dnl If the target is an eCos system, use the appropriate eCos
192: dnl I/O routines.
193: dnl FIXME: this should not be a local option but a global target
194: dnl system; at present there is no eCos target.
195: TARGET_ECOS="no"
196: AC_ARG_WITH(ecos,
197: [ --with-ecos enable runtime eCos target support],
198: TARGET_ECOS="$with_ecos"
199: )
200:
201: addobjs=
1.2 ! noro 202: addlibs=
! 203: addincludes=
! 204: addtests=
1.1 noro 205: CXXINCLUDES=
206: case "$TARGET_ECOS" in
207: no)
208: ;;
209: *)
210: AC_DEFINE(ECOS)
211: CXXINCLUDES="-I${TARGET_ECOS}/include"
212: addobjs="$addobjs ecos.lo"
213: ;;
214: esac
1.2 ! noro 215:
! 216: if test "${enable_cplusplus}" = yes; then
! 217: addincludes="$addincludes include/gc_cpp.h include/gc_allocator.h"
! 218: addtests="$addtests test_cpp"
! 219: fi
! 220:
! 221: AM_CONDITIONAL(CPLUSPLUS, test "${enable_cplusplus}" = yes)
! 222:
1.1 noro 223: AC_SUBST(CXX)
224:
225: AC_SUBST(INCLUDES)
226: AC_SUBST(CXXINCLUDES)
227:
1.2 ! noro 228: # Configuration of shared libraries
! 229: #
! 230: AC_MSG_CHECKING(whether to build shared libraries)
! 231: AC_ENABLE_SHARED
1.1 noro 232:
233: case "$host" in
234: alpha-*-openbsd*)
1.2 ! noro 235: enable_shared=no
! 236: AC_MSG_RESULT(no)
1.1 noro 237: ;;
238: *)
1.2 ! noro 239: AC_MSG_RESULT(yes)
1.1 noro 240: ;;
241: esac
242:
1.2 ! noro 243: # Configuration of machine-dependent code
! 244: #
! 245: AC_MSG_CHECKING(which machine-dependent code should be used)
! 246: machdep=
1.1 noro 247: case "$host" in
248: alpha-*-openbsd*)
249: machdep="alpha_mach_dep.lo"
250: if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
251: AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
252: fi
253: ;;
1.2 ! noro 254: alpha*-*-linux*)
1.1 noro 255: machdep="alpha_mach_dep.lo"
256: ;;
257: i?86-*-solaris2.[[89]]*)
258: AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
259: ;;
260: mipstx39-*-elf*)
261: machdep="mips_ultrix_mach_dep.lo"
262: AC_DEFINE(STACKBASE, __stackbase)
263: AC_DEFINE(DATASTART_IS_ETEXT)
264: ;;
265: mips-dec-ultrix*)
266: machdep="mips_ultrix_mach-dep.lo"
267: ;;
268: mips-nec-sysv*|mips-unknown-sysv*)
269: ;;
1.2 ! noro 270: mips*-*-linux*)
! 271: ;;
1.1 noro 272: mips-*-*)
273: machdep="mips_sgi_mach_dep.lo"
274: AC_DEFINE(NO_EXECUTE_PERMISSION)
275: ;;
276: sparc-*-netbsd*)
277: machdep="sparc_netbsd_mach_dep.lo"
278: ;;
279: sparc-sun-solaris2.3*)
280: machdep="sparc_mach_dep.lo"
281: AC_DEFINE(SUNOS53_SHARED_LIB)
282: ;;
283: sparc-sun-solaris2.*)
284: machdep="sparc_mach_dep.lo"
285: ;;
286: ia64-*-*)
287: machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
288: ;;
289: esac
290: if test x"$machdep" = x; then
1.2 ! noro 291: AC_MSG_RESULT($machdep)
1.1 noro 292: machdep="mach_dep.lo"
293: fi
294: addobjs="$addobjs $machdep"
295: AC_SUBST(addobjs)
1.2 ! noro 296: AC_SUBST(addincludes)
! 297: AC_SUBST(addlibs)
! 298: AC_SUBST(addtests)
1.1 noro 299:
300: AC_PROG_LIBTOOL
301:
1.2 ! noro 302: #
! 303: # Check for AViiON Machines running DGUX
! 304: #
1.1 noro 305: AC_MSG_CHECKING(if host is AViiON running DGUX)
306: ac_is_dgux=no
307: AC_CHECK_HEADER(sys/dg_sys_info.h,
308: [ac_is_dgux=yes;])
309:
1.2 ! noro 310: AC_MSG_RESULT($ac_is_dgux)
! 311: ## :GOTCHA: we do not check anything but sys/dg_sys_info.h
1.1 noro 312: if test $ac_is_dgux = yes; then
1.2 ! noro 313: if test "$enable_full_debug" = "yes"; then
1.1 noro 314: CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
315: CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
1.2 ! noro 316: else
1.1 noro 317: CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
318: CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
1.2 ! noro 319: fi
! 320: AC_SUBST(CFLAGS)
! 321: AC_SUBST(CXXFLAGS)
1.1 noro 322: fi
323:
324: dnl We use these options to decide which functions to include.
325: AC_ARG_WITH(target-subdir,
326: [ --with-target-subdir=SUBDIR
327: configuring with a cross compiler])
328: AC_ARG_WITH(cross-host,
329: [ --with-cross-host=HOST configuring with a cross compiler])
330:
331: # automake wants to see AC_EXEEXT. But we don't need it. And having
332: # it is actually a problem, because the compiler we're passed can't
333: # necessarily do a full link. So we fool automake here.
334: if false; then
335: # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
336: # to nothing, so nothing would remain between `then' and `fi' if it
337: # were not for the `:' below.
338: :
339: AC_EXEEXT
340: fi
341:
342: dnl As of 4.13a2, the collector will not properly work on Solaris when
343: dnl built with gcc and -O. So we remove -O in the appropriate case.
1.2 ! noro 344: dnl
! 345: AC_MSG_CHECKING(whether Solaris gcc optimization fix is necessary)
1.1 noro 346: case "$host" in
347: sparc-sun-solaris2*)
348: if test "$GCC" = yes; then
1.2 ! noro 349: AC_MSG_RESULT(yes)
1.1 noro 350: new_CFLAGS=
351: for i in $CFLAGS; do
352: case "$i" in
353: -O*)
354: ;;
355: *)
356: new_CFLAGS="$new_CFLAGS $i"
357: ;;
358: esac
359: done
360: CFLAGS="$new_CFLAGS"
1.2 ! noro 361: else
! 362: AC_MSG_RESULT(no)
1.1 noro 363: fi
364: ;;
1.2 ! noro 365: *) AC_MSG_RESULT(no) ;;
1.1 noro 366: esac
367:
368: dnl We need to override the top-level CFLAGS. This is how we do it.
369: MY_CFLAGS="$CFLAGS"
370: AC_SUBST(MY_CFLAGS)
371:
372: dnl Include defines that have become de facto standard.
373: dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
374: AC_DEFINE(SILENT)
375: AC_DEFINE(NO_SIGNALS)
376: AC_DEFINE(NO_EXECUTE_PERMISSION)
377: AC_DEFINE(ALL_INTERIOR_POINTERS)
378:
379: dnl By default, make the library as general as possible.
380: AC_DEFINE(JAVA_FINALIZATION)
381: AC_DEFINE(GC_GCJ_SUPPORT)
382: AC_DEFINE(ATOMIC_UNCOLLECTABLE)
383:
384: dnl This is something of a hack. When cross-compiling we turn off
385: dnl some functionality. We also enable the "small" configuration.
386: dnl These is only correct when targetting an embedded system. FIXME.
387: if test -n "${with_cross_host}"; then
388: AC_DEFINE(NO_SIGSET)
389: AC_DEFINE(NO_CLOCK)
390: AC_DEFINE(SMALL_CONFIG)
391: AC_DEFINE(NO_DEBUGGING)
392: fi
393:
394: AC_ARG_ENABLE(full-debug,
395: [ --enable-full-debug include full support for pointer backtracing etc.],
396: [ if test "$enable_full_debug" = "yes"; then
397: AC_MSG_WARN("Must define GC_DEBUG and use debug alloc. in clients.")
398: AC_DEFINE(KEEP_BACK_PTRS)
399: AC_DEFINE(DBG_HDRS_ALL)
400: case $host in
401: ia64-*-linux* )
402: AC_DEFINE(MAKE_BACK_GRAPH)
403: ;;
1.2 ! noro 404: x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
1.1 noro 405: AC_DEFINE(MAKE_BACK_GRAPH)
406: AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
407: AC_DEFINE(SAVE_CALL_COUNT, 8)
408: ;;
409: i[3456]86-*-dgux*)
410: AC_DEFINE(MAKE_BACK_GRAPH)
411: ;;
412: esac ]
413: fi)
414:
415: AC_ARG_ENABLE(redirect-malloc,
416: [ --enable-redirect-malloc redirect malloc and friends to GC routines])
417:
418: if test "${enable_redirect_malloc}" = yes; then
419: if test "${enable_full_debug}" = yes; then
420: AC_DEFINE(REDIRECT_MALLOC, GC_debug_malloc_replacement)
421: AC_DEFINE(REDIRECT_REALLOC, GC_debug_realloc_replacement)
1.2 ! noro 422: AC_DEFINE(REDIRECT_FREE, GC_debug_free)
1.1 noro 423: else
424: AC_DEFINE(REDIRECT_MALLOC, GC_malloc)
425: fi
426: fi
427:
1.2 ! noro 428: AC_ARG_ENABLE(gc-assertions,
! 429: [ --enable-gc-assertions collector-internal assertion checking])
! 430: if test "${enable_gc_assertions}" = yes; then
! 431: AC_DEFINE(GC_ASSERTIONS)
! 432: fi
! 433:
1.1 noro 434: AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
435:
1.2 ! noro 436: AC_OUTPUT([Makefile doc/Makefile include/Makefile],,
1.1 noro 437: srcdir=${srcdir}
438: host=${host}
439: CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
440: CC="${CC}"
441: DEFS="$DEFS"
442: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>