1 dnl Process this file with autoconf to produce configure.
5 dnl Can't be done in BOEHM_CONFIGURE because that confuses automake.
14 dnl We use these options to decide which functions to include.
15 AC_ARG_WITH(target-subdir,
16 [ --with-target-subdir=SUBDIR
17 configuring with a cross compiler])
18 AC_ARG_WITH(cross-host,
19 [ --with-cross-host=HOST configuring with a cross compiler])
22 # automake wants to see AC_EXEEXT. But we don't need it. And having
23 # it is actually a problem, because the compiler we're passed can't
24 # necessarily do a full link. So we fool automake here.
25 if test "x" = "y"; then
29 AC_MSG_CHECKING([for threads package to use])
30 AC_ARG_ENABLE(threads, [ --enable-threads=TYPE choose threading package],
32 dnl FIXME: figure out native threads to use here.
35 if test "$THREADS" = yes; then
41 # FIXME: this isn't correct in all cases.
48 # FIXME: for now, choose POSIX, because we implement that.
49 # Later, choose irix threads.
53 # FIXME: for now, choose POSIX, because we implement that.
54 # Later, choose solaris threads.
74 AC_DEFINE(LINUX_THREADS)
78 AC_DEFINE(SOLARIS_THREADS)
79 AC_DEFINE(_SOLARIS_PTHREADS)
82 AC_DEFINE(IRIX_THREADS)
88 AC_DEFINE(QUICK_THREADS)
89 INCLUDES="-I${boehm_gc_basedir}/../qthreads"
90 THREADLIB=../qthreads/libgcjcoop.la
92 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
93 AC_MSG_ERROR(thread package $THREADS not yet supported)
96 AC_MSG_ERROR($THREADS is an unknown thread package)
99 AC_MSG_RESULT($THREADS)
102 AC_ARG_ENABLE(java-gc,
103 changequote(<<,>>)dnl
104 << --enable-java-gc=TYPE choose garbage collector [boehm]>>,
109 if test "$GC" = "boehm"; then
110 target_all=libgcjgc.la
114 dnl If the target is an eCos system, use the appropriate eCos
116 dnl FIXME: this should not be a local option but a global target
117 dnl system; at present there is no eCos target.
120 [ --with-ecos enable runtime eCos target support],
121 TARGET_ECOS="$with_ecos"
126 case "$TARGET_ECOS" in
131 CXXINCLUDES="-I${TARGET_ECOS}/include"
132 addobjs="$addobjs ecos.lo"
138 AC_SUBST(CXXINCLUDES)
143 machdep="alpha_mach_dep.lo"
146 machdep="mips_ultrix_mach_dep.lo"
147 AC_DEFINE(STACKBASE, __stackbase)
148 AC_DEFINE(DATASTART_IS_ETEXT)
151 machdep="mips_ultrix_mach-dep.lo"
154 machdep="mips_sgi_mach_dep.lo"
155 AC_DEFINE(NO_EXECUTE_PERMISSION)
157 sparc-sun-solaris2.3*)
158 AC_DEFINE(SUNOS53_SHARED_LIB)
161 if test x"$machdep" = x; then
162 machdep="mach_dep.lo"
164 addobjs="$addobjs $machdep"
167 dnl As of 4.13a2, the collector will not properly work on Solaris when
168 dnl built with gcc and -O. So we remove -O in the appropriate case.
171 if test "$GCC" = yes; then
178 new_CFLAGS="$new_CFLAGS $i"
187 dnl We need to override the top-level CFLAGS. This is how we do it.
191 dnl Define a few things to retarget the library towards
194 AC_DEFINE(NO_SIGNALS)
195 AC_DEFINE(NO_DEBUGGING)
196 AC_DEFINE(JAVA_FINALIZATION)
198 dnl This is something of a hack. When cross-compiling we turn off
199 dnl some functionality. We also enable the "small" configuration.
200 dnl These is only correct when targetting an embedded system. FIXME.
201 if test -n "${with_cross_host}"; then
204 AC_DEFINE(SMALL_CONFIG)
207 AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
209 if test "${multilib}" = "yes"; then
210 multilib_arg="--enable-multilib"
217 dnl Put all the -D options in a file. These are required before
218 dnl boehm-config.h can be included. This is a huge hack brought
219 dnl about by overall poor structuring of this entire library.
220 echo "$DEFS" > boehm-cflags
222 if test -n "$CONFIG_FILES"; then
223 ac_file=Makefile . ${boehm_gc_basedir}/../config-ml.in
228 with_multisubdir=${with_multisubdir}
229 ac_configure_args="${multilib_arg} ${ac_configure_args}"
230 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
231 boehm_gc_basedir=${boehm_gc_basedir}