1 dnl Process this file with autoconf to produce configure.
9 dnl We use these options to decide which functions to include.
10 AC_ARG_WITH(target-subdir,
11 [ --with-target-subdir=SUBDIR
12 configuring with a cross compiler])
13 AC_ARG_WITH(cross-host,
14 [ --with-cross-host=HOST configuring with a cross compiler])
17 # automake wants to see AC_EXEEXT. But we don't need it. And having
18 # it is actually a problem, because the compiler we're passed can't
19 # necessarily do a full link. So we fool automake here.
20 if test "x" = "y"; then
24 AC_MSG_CHECKING([for thread model used by GCC])
25 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
26 AC_MSG_RESULT([$THREADS])
38 AC_DEFINE(LINUX_THREADS)
42 AC_DEFINE(SOLARIS_THREADS)
43 AC_DEFINE(_SOLARIS_PTHREADS)
46 AC_DEFINE(IRIX_THREADS)
51 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
52 AC_MSG_ERROR(thread package $THREADS not yet supported)
55 AC_MSG_ERROR($THREADS is an unknown thread package)
60 AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
61 AC_SUBST(EXTRA_TEST_LIBS)
63 AC_ARG_ENABLE(java-gc,
65 << --enable-java-gc=TYPE choose garbage collector [boehm]>>,
70 if test "$GC" = "boehm"; then
71 target_all=libgcjgc.la
75 dnl If the target is an eCos system, use the appropriate eCos
77 dnl FIXME: this should not be a local option but a global target
78 dnl system; at present there is no eCos target.
81 [ --with-ecos enable runtime eCos target support],
82 TARGET_ECOS="$with_ecos"
87 case "$TARGET_ECOS" in
92 CXXINCLUDES="-I${TARGET_ECOS}/include"
93 addobjs="$addobjs ecos.lo"
103 # alpha_mach_dep.s assumes that pointers are not saved in fp registers.
104 # Gcc on a 21264 can spill pointers to fp registers. Oops.
106 # machdep="alpha_mach_dep.lo"
109 machdep="mips_ultrix_mach_dep.lo"
110 AC_DEFINE(STACKBASE, __stackbase)
111 AC_DEFINE(DATASTART_IS_ETEXT)
114 machdep="mips_ultrix_mach-dep.lo"
117 machdep="mips_sgi_mach_dep.lo"
118 AC_DEFINE(NO_EXECUTE_PERMISSION)
120 sparc-sun-solaris2.3*)
121 AC_DEFINE(SUNOS53_SHARED_LIB)
124 if test x"$machdep" = x; then
125 machdep="mach_dep.lo"
127 addobjs="$addobjs $machdep"
130 dnl As of 4.13a2, the collector will not properly work on Solaris when
131 dnl built with gcc and -O. So we remove -O in the appropriate case.
134 if test "$GCC" = yes; then
141 new_CFLAGS="$new_CFLAGS $i"
150 dnl We need to override the top-level CFLAGS. This is how we do it.
154 dnl Define a few things to retarget the library towards
157 AC_DEFINE(NO_SIGNALS)
158 AC_DEFINE(JAVA_FINALIZATION)
159 AC_DEFINE(GC_GCJ_SUPPORT)
161 dnl This is something of a hack. When cross-compiling we turn off
162 dnl some functionality. We also enable the "small" configuration.
163 dnl These is only correct when targetting an embedded system. FIXME.
164 if test -n "${with_cross_host}"; then
167 AC_DEFINE(SMALL_CONFIG)
168 AC_DEFINE(NO_DEBUGGING)
171 AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
173 if test "${multilib}" = "yes"; then
174 multilib_arg="--enable-multilib"
181 dnl Put all the -D options in a file. These are required before
182 dnl boehm-config.h can be included. This is a huge hack brought
183 dnl about by overall poor structuring of this entire library.
184 echo "$DEFS" > boehm-cflags
186 if test -n "$CONFIG_FILES"; then
187 ac_file=Makefile . ${boehm_gc_basedir}/../config-ml.in
192 with_multisubdir=${with_multisubdir}
193 ac_configure_args="${multilib_arg} ${ac_configure_args}"
194 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
195 boehm_gc_basedir=${boehm_gc_basedir}