# We may get other options which we don't document:
# --with-target-subdir, --with-multisrctop, --with-multisubdir
-# When building with srcdir == objdir, links to the source files will
-# be created in directories within the target_subdir. We have to
-# adjust toplevel_srcdir accordingly, so that configure finds
-# install-sh and other auxiliary files that live in the top-level
-# source directory.
-if test "${srcdir}" = "."; then
- if test -z "${with_target_subdir}"; then
- toprel=".."
- else
- if test "${with_target_subdir}" != "."; then
- toprel="${with_multisrctop}../.."
- else
- toprel="${with_multisrctop}.."
- fi
- fi
-else
- toprel=".."
-fi
-
-libgcj_basedir=$srcdir/$toprel/./libjava
-AC_SUBST(libgcj_basedir)
+# Find the rest of the source tree framework.
+AM_ENABLE_MULTILIB(, ..)
AC_CANONICAL_SYSTEM
_GCC_TOPLEV_NONCANONICAL_BUILD
[version_specific_libs=no]
)
-# Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
- AS_HELP_STRING([--enable-multilib],
- [build many library versions (default)]),
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
AC_ARG_ENABLE(plugin,
AS_HELP_STRING([--enable-plugin],
[build gcjwebplugin web browser plugin]),
GCC_UNWIND_INCLUDE=
GCJ="${target_noncanonical}-gcj"
else
- GCJ="$built_gcc_dir/gcj -B$built_gcc_dir/"
+ GCJ="${target_noncanonical}-gcj -B`${PWDCMD-pwd}`/"
fi
GCJH="$built_gcc_dir/gcjh"
;;
AC_ARG_WITH(ecj-jar,
AS_HELP_STRING([--with-ecj-jar=FILE], [use preinstalled ecj jar]),
[ECJ_JAR=$withval],
- [if test -f $libgcj_basedir/../ecj.jar; then
- ECJ_BUILD_JAR=$libgcj_basedir/../ecj.jar
+ [if test -f $multi_basedir/ecj.jar; then
+ ECJ_BUILD_JAR=$multi_basedir/ecj.jar
ECJ_JAR='$(jardir)/ecj.jar'
install_ecj_jar=yes
fi])
AC_CONFIG_LINKS(gnu/java/net/natPlainSocketImpl.cc:gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc)
AC_CONFIG_LINKS(gnu/java/net/natPlainDatagramSocketImpl.cc:gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc)
-# Likewise for natPipeImpl.cc and natSelectorImpl.cc.
+# Likewise for natVMPipe.cc and natVMSelector.cc.
test -d gnu/java/nio || mkdir gnu/java/nio
-AC_CONFIG_LINKS(gnu/java/nio/natPipeImpl.cc:gnu/java/nio/natPipeImpl${PLATFORM}.cc)
-AC_CONFIG_LINKS(gnu/java/nio/natSelectorImpl.cc:gnu/java/nio/natSelectorImpl${PLATFORM}.cc)
+AC_CONFIG_LINKS(gnu/java/nio/natVMPipe.cc:gnu/java/nio/natVMPipe${PLATFORM}.cc)
+AC_CONFIG_LINKS(gnu/java/nio/natVMSelector.cc:gnu/java/nio/natVMSelector${PLATFORM}.cc)
+
+# Likewise for natFileChannelImpl.cc
test -d gnu/java/nio/channels || mkdir gnu/java/nio/channels
AC_CONFIG_LINKS(gnu/java/nio/channels/natFileChannelImpl.cc:gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc)
AM_CONDITIONAL(USING_GCC, test "$GCC" = yes)
# We're in the tree with gcc, and need to include some of its headers.
-GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
+GCC_UNWIND_INCLUDE='-I$(multi_basedir)/./libjava/../gcc'
if test "x${with_newlib}" = "xyes"; then
# We are being configured with a cross compiler. AC_REPLACE_FUNCS
AC_CHECK_LIB(dld, dladdr, [
AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])])])
- if test x"$build" = x"$host"; then
+ 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])])
else
case " $CONFIG_FILES " in
*" Makefile "*)
LD="${ORIGINAL_LD_FOR_MULTILIBS}"
- ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
+ ac_file=Makefile . ${multi_basedir}/./libjava/../config-ml.in
;;
esac
for ac_multi_file in $CONFIG_FILES; do
with_multisubdir=${with_multisubdir}
ac_configure_args="${multilib_arg} ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-libgcj_basedir=${libgcj_basedir}
+multi_basedir=${multi_basedir}
CC="${CC}"
CXX="${CXX}"
ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"