Please, someone help me with this. I don't get it.
Thanks,
Andrew.
--- Begin Message ---
The computation of $toolexeclibdir in libjava/configure.ac does not
agree with the same computation in libjava/classpath/m4/acinclude.m4's
CLASSPATH_TOOLEXECLIBDIR. (Note that CLASSPATH_TOOLEXECLIBDIR is
marked as GCJ local.)
I have a patch to fix this, attached. Note that I've also borrowed
from the top-level config/acx.m4 in libjava/classpath/configure.ac.
OK to apply? Should I move the host_noncanonical/target_noncanonical
bits into the acinclude.m4 macro? Is there a better overall way to do
this?
If the patch is OK, is the wildcard in the ChangeLog OK? I saw that
idiom elsewhere in ChangeLog.gcj, so copied it.
--
Mark Mitchell
CodeSourcery
m...@codesourcery.com
(650) 331-3385 x713
2009-02-10 Mark Mitchell <m...@codesourcery.com>
* m4/acinclude.m4 (CLASSPATH_TOOLEXECLIBDIR):
Match libjava definition of toolexeclibdir.
* configure.ac: Define host_noncanonical and
target_noncanonical. Support --enable-version-specific-runtime-libs.
* Makefile.in, */Makefile.in: Regenerate.
Index: libjava/classpath/m4/acinclude.m4
===================================================================
--- libjava/classpath/m4/acinclude.m4 (revision 236120)
+++ libjava/classpath/m4/acinclude.m4 (working copy)
@@ -427,11 +427,35 @@ dnl GCJ LOCAL: Calculate toolexeclibdir
dnl -----------------------------------------------------------
AC_DEFUN([CLASSPATH_TOOLEXECLIBDIR],
[
- multi_os_directory=`$CC -print-multi-os-directory`
- case $multi_os_directory in
- .) toolexeclibdir=${libdir} ;; # Avoid trailing /.
- *) toolexeclibdir=${libdir}/${multi_os_directory} ;;
+ case ${version_specific_libs} in
+ yes)
+ # Need the gcc compiler version to know where to install libraries
+ # and header files if --enable-version-specific-runtime-libs option
+ # is selected.
+ includedir='$(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include/'
+ toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
+ toolexecmainlibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
+ toolexeclibdir=$toolexecmainlibdir
+ ;;
+ no)
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ # Install a library built with a cross compiler in tooldir, not libdir.
+ toolexecdir='$(exec_prefix)/$(target_noncanonical)'
+ toolexecmainlibdir='$(toolexecdir)/lib'
+ else
+ toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
+ toolexecmainlibdir='$(libdir)'
+ fi
+ multi_os_directory=`$CC -print-multi-os-directory`
+ case $multi_os_directory in
+ .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
+ *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
+ esac
+ ;;
esac
+ AC_SUBST(toolexecdir)
+ AC_SUBST(toolexecmainlibdir)
AC_SUBST(toolexeclibdir)
])
Index: libjava/classpath/configure.ac
===================================================================
--- libjava/classpath/configure.ac (revision 236120)
+++ libjava/classpath/configure.ac (working copy)
@@ -289,6 +289,26 @@ dnl defined to the same value for all mu
dnl so that we can refer to the multilib installation directories from
dnl classpath's build files.
dnl -----------------------------------------------------------
+case ${host_alias} in
+ "") host_noncanonical=${build_noncanonical} ;;
+ *) host_noncanonical=${host_alias} ;;
+esac
+case ${target_alias} in
+ "") target_noncanonical=${host_noncanonical} ;;
+ *) target_noncanonical=${target_alias} ;;
+esac
+AC_SUBST(target_noncanonical)
+
+AC_ARG_ENABLE(version-specific-runtime-libs,
+ AS_HELP_STRING([--enable-version-specific-runtime-libs],
+ [specify that runtime libraries should be installed in a
compiler-specific directory]),
+ [case "$enableval" in
+ yes) version_specific_libs=yes ;;
+ no) version_specific_libs=no ;;
+ *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific
libs]);;
+ esac],
+ [version_specific_libs=no]
+)
CLASSPATH_TOOLEXECLIBDIR
dnl -----------------------------------------------------------
--- End Message ---