summaryrefslogtreecommitdiff
path: root/libjava/acinclude.m4
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-03 22:31:43 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-03 22:31:43 +0000
commit65e1971a26bc973f12efd7f4394b7c2a6a1e67d9 (patch)
tree2c76ecf82c068a3bbea66631d44cc1ce20e2c30f /libjava/acinclude.m4
parent7d5aa1271e8364adcf18f427373dd67e367f1fa6 (diff)
downloadgcc-65e1971a26bc973f12efd7f4394b7c2a6a1e67d9.tar.gz
Fix for PR bootstrap/3281:
* aclocal.m4, configure: Rebuilt. * acinclude.m4 (LIBGCJ_CONFIGURE): Don't set libgcj_flagbasedir. Correctly compute libgcj_basedir. (mkinstalldirs): Define and subst. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43739 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/acinclude.m4')
-rw-r--r--libjava/acinclude.m433
1 files changed, 22 insertions, 11 deletions
diff --git a/libjava/acinclude.m4 b/libjava/acinclude.m4
index e005c02aadd..2559adcccb0 100644
--- a/libjava/acinclude.m4
+++ b/libjava/acinclude.m4
@@ -12,23 +12,39 @@ AC_ARG_ENABLE(multilib,
dnl We may get other options which we dont document:
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- libgcj_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
+# 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
- libgcj_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
+ if test "${with_target_subdir}" != "."; then
+ toprel="${with_multisrctop}../.."
+ else
+ toprel="${with_multisrctop}.."
+ fi
fi
else
- libgcj_basedir="[$]{srcdir}/$1"
+ toprel=".."
fi
+
+libgcj_basedir=$srcdir/$toprel/$1/libjava
AC_SUBST(libgcj_basedir)
-AC_CONFIG_AUX_DIR($libgcj_basedir/..)
+
+AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
if :; then :; else
# This overrides the previous occurrence for automake, but not for
# autoconf, which is exactly what we want.
AC_CONFIG_AUX_DIR(..)
fi
+# This works around an automake problem.
+mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
+AC_SUBST(mkinstalldirs)
+
AC_CANONICAL_SYSTEM
dnl This shouldn't be needed, as long as top-level dependencies are
@@ -85,11 +101,6 @@ libgcj_javaflags=
. [$]{srcdir}/configure.host
-case [$]{libgcj_basedir} in
-/* | [A-Za-z]:[/\\]*) libgcj_flagbasedir=[$]{libgcj_basedir} ;;
-*) libgcj_flagbasedir='[$](top_builddir)/'[$]{libgcj_basedir} ;;
-esac
-
LIBGCJ_CFLAGS="[$]{libgcj_cflags}"
LIBGCJ_CXXFLAGS="[$]{libgcj_cxxflags}"
LIBGCJ_JAVAFLAGS="[$]{libgcj_javaflags}"