echo gnu/java/awt/peer/x >> standard.omit
fi
+# Tools that need to be compiled against classpath's tools classes
+: > vm-tools-packages
+for package in gnu/gcj/tools/gc_analyze ; do
+ echo $package >> standard.omit
+ echo $package >> vm-tools-packages
+done
+
if test -z "${with_multisubdir}"; then
builddotdot=.
else
else
GCJ="${target_noncanonical}-gcj -B`${PWDCMD-pwd}`/"
fi
- GCJH="$built_gcc_dir/gcjh"
+ GCJH='$(target_noncanonical)-gcjh'
;;
path)
GCJ="gcj -B`${PWDCMD-pwd}`/"
fi
INTERPRETER="$libgcj_interpreter"
AC_SUBST(INTERPRETER)
+AM_CONDITIONAL(INTERPRETER, test "$libgcj_interpreter" = yes)
AC_MSG_CHECKING([for exception model to use])
AC_LANG_PUSH(C++)
esac
AM_CONDITIONAL(USING_DARWIN_CRT, $DARWIN_CRT)
-# These may not be defined in a non-ANS conformant embedded system.
+# This may not be defined in a non-ANS conformant embedded system.
# FIXME: Should these case a runtime exception in that case?
-AC_EGREP_HEADER(mktime, time.h, AC_DEFINE(HAVE_MKTIME, 1,
- [Define is you have 'mktime' in <time.h>]))
AC_EGREP_HEADER(localtime, time.h, AC_DEFINE(HAVE_LOCALTIME, 1,
[Define is you have 'localtime' in <time.h>]))
esac
AC_SUBST(SYSTEMSPEC)
-LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
-AC_SUBST(LIBGCJTESTSPEC)
-
AC_ARG_WITH(system-zlib,
AS_HELP_STRING([--with-system-zlib],
[use installed libz]))
# FIXME: this should be _libs on some hosts.
libsubdir=.libs
+LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
+
+LIBSTDCXXSPEC=
# extra LD Flags which are required for targets
case "${host}" in
*-*-darwin[[0-7]].*)
# on Darwin -single_module speeds up loading of the dynamic libraries.
extra_ldflags_libjava=-Wl,-single_module
;;
+arm*linux*eabi)
+ # Some of the ARM unwinder code is actually in libstdc++. We
+ # could in principle replicate it in libgcj, but it's better to
+ # have a dependency on libstdc++.
+ extra_ldflags='-L$(here)/../libstdc++-v3/src/.libs -lstdc++'
+ LIBSTDCXXSPEC=-lstdc++
+ LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -L`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -rpath `${PWDCMD-pwd}`/.libs:`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -lstdc++"
+ ;;
esac
AC_SUBST(extra_ldflags_libjava)
+AC_SUBST(extra_ldflags)
+AC_SUBST(LIBSTDCXXSPEC)
+
+AC_SUBST(LIBGCJTESTSPEC)
# Allow the GC to be disabled. Can be useful when debugging.
AC_MSG_CHECKING([for garbage collector to use])
# we'll have.
AC_DEFINE(HAVE_MEMMOVE, 1, [Define if you have memmove.])
AC_DEFINE(HAVE_MEMCPY, 1, [Define if you have memcpy.])
- AC_DEFINE(HAVE_STRERROR, 1, [Define if you have strerror.])
AC_DEFINE(HAVE_TIME, 1, [Define if you have time.])
AC_DEFINE(HAVE_GMTIME_R, 1, [Define if you have the 'gmtime_r' function])
AC_DEFINE(HAVE_LOCALTIME_R, 1, [Define if you have the 'localtime_r' function.])
AC_DEFINE(HAVE_USLEEP_DECL, 1, [Define if usleep is declared in <unistd.h>.])
# This is only for POSIX threads.
AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT, 1, [Define if using POSIX threads that have the mutexattr functions.])
- # We also assume we are using gcc, which provides alloca.
- AC_DEFINE(HAVE_ALLOCA)
# Assume we do not have getuid and friends.
AC_DEFINE(NO_GETUID, 1, [Define if getuid() and friends are missing.])
PLATFORMNET=NoNet
else
- AC_CHECK_FUNCS([strerror ioctl select fstat open fsync sleep opendir \
- gmtime_r localtime_r readdir_r getpwuid_r getcwd \
+ AC_CHECK_FUNCS([strerror_r select fstat open fsync sleep opendir \
+ localtime_r readdir_r getpwuid_r getcwd \
access stat lstat mkdir rename rmdir unlink utime chmod readlink \
nl_langinfo setlocale \
inet_pton uname inet_ntoa \
- fork execvp pipe sigaction ftruncate mmap \
+ getrlimit sigaction ftruncate mmap \
getifaddrs])
AC_CHECK_FUNCS(inet_aton inet_addr, break)
- AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
+ AC_CHECK_HEADERS(unistd.h dlfcn.h sys/resource.h)
# Do an additional check on dld, HP-UX for example has dladdr in libdld.sl
AC_CHECK_LIB(dl, dladdr, [
AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])], [
if test x"$cross_compiling" = x"no"; then
AC_CHECK_FILES(/proc/self/exe, [
AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])])
+ AC_CHECK_FILES(/proc/self/maps, [
+ AC_DEFINE(HAVE_PROC_SELF_MAPS, 1,
+ [Define if you have /proc/self/maps])])
else
case $host in
*-linux*)
AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])
+ AC_DEFINE(HAVE_PROC_SELF_MAPS, 1, [Define if you have /proc/self/maps])
;;
esac
fi
if test "$THREADS" = posix; then
save_LIBS="$LIBS"
LIBS="$LIBS $THREADLIBS"
- # Some POSIX thread systems don't have pthread_mutexattr_settype.
- # E.g., Solaris.
- AC_CHECK_FUNCS(pthread_mutexattr_settype pthread_mutexattr_setkind_np)
# Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
# Solaris 7 the name librt is preferred.
# On Solaris, and maybe other architectures, the Boehm collector
# requires -ldl.
if test "$GC" = boehm; then
- AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
+ case "${host}" in
+ mips-sgi-irix6*)
+ # IRIX 6 lacks a N64 libdl.so, but only the N32 (default multilib)
+ # libgcj.spec is used, so override here
+ SYSTEMSPEC="$SYSTEMSPEC %{!mabi=64:-ldl}"
+ ;;
+ *)
+ AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
+ ;;
+ esac
fi
fi
-e "s,@default_toolkit@,$TOOLKIT," \
-e "s,@JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@,false," \
-e "s,@GTK_CAIRO_ENABLED@,false," \
+ -e "s,@ECJ_JAR@,," \
< $srcdir/classpath/gnu/classpath/Configuration.java.in \
> gnu/classpath/Configuration.java
# We do not want to redirect the output of the grep below to /dev/null,
AC_SUBST(toolexecmainlibdir)
AC_SUBST(toolexeclibdir)
+# Determine gcj and libgcj version number.
+gcjversion=`cat "$srcdir/../gcc/BASE-VER"`
+libgcj_soversion=`awk -F: '/^[[^#]].*:/ { print $1 }' $srcdir/libtool-version`
+GCJVERSION=$gcjversion
+AC_SUBST(GCJVERSION)
+AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVERSION", [Short GCJ version ID])
+
# Determine where the standard .db file and GNU Classpath JNI
# libraries are found.
+gcjsubdir=gcj-$gcjversion-$libgcj_soversion
multi_os_directory=`$CC -print-multi-os-directory`
case $multi_os_directory in
.)
- dbexecdir='$(libdir)/gcj-$(gcc_version)' # Avoid /.
+ dbexecdir='$(libdir)/'$gcjsubdir # Avoid /.
;;
*)
- dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'
+ dbexecdir='$(libdir)/'$multi_os_directory/$gcjsubdir
;;
esac
AC_SUBST(dbexecdir)
-# Determine gcj version number.
-gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([[^ ]]*\).*$/\1/p'`
-GCJVERSION=$gcjversion
-AC_SUBST(GCJVERSION)
-AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVERSION", [Short GCJ version ID])
-
AC_DEFINE(JV_VERSION, "1.5.0", [Compatibility version string])
AC_DEFINE(JV_API_VERSION, "1.5", [API compatibility version string])
AC_DEFINE(HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])
AC_DEFINE(JV_HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])
])
-AC_HEADER_SYS_WAIT
AC_CHECK_TYPE([ssize_t], [int])
AC_CHECK_TYPE([magic_t], [
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])])])
-AC_FUNC_ALLOCA
-
AC_CHECK_PROGS(PERL, perl, false)
SYSDEP_SOURCES=
# For _Unwind_GetIPInfo.
GCC_CHECK_UNWIND_GETIPINFO
+# See if linker supports anonymous version scripts.
+AC_CACHE_CHECK([whether ld supports anonymous version scripts],
+ [libjava_cv_anon_version_script],
+ [save_CFLAGS="$CFLAGS"; save_LDFLAGS="$LDFLAGS"
+ libjava_cv_anon_version_script=no
+ CFLAGS="$CFLAGS -fPIC"; LDFLAGS="$LDFLAGS -shared -Wl,--version-script,conftest.map"
+ echo '{ global: globalsymb*; local: *; };' > conftest.map
+ AC_TRY_LINK(void globalsymbol (void) {} void localsymbol (void) {},,
+ [libjava_cv_anon_version_script=yes], [])
+ CFLAGS="$save_CFLAGS"; LDFLAGS="$save_LDFLAGS"
+ ])
+AM_CONDITIONAL(ANONVERSCRIPT, test "$libjava_cv_anon_version_script" = yes)
+
# Check if linker supports static linking on a per library basis
LD_START_STATIC_SPEC=
LD_FINISH_STATIC_SPEC=