summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-05-13 01:55:42 +0000
committerTom Tromey <tromey@redhat.com>2001-05-13 01:55:42 +0000
commitedccc341c6c00119f7386acba5f1eac8852ad546 (patch)
tree628d6a01f8f07be409392c9b6416dbcb6907f2af /m4
parent8cebf6e20157fa9b1779dbac63cfb250f463c305 (diff)
downloadautomake-edccc341c6c00119f7386acba5f1eac8852ad546.tar.gz
Fixes PR automake/169.
* m4/depend.m4 (AM_DEPENDENCIES): Handle GCJ. Don't assume gcc style for OBJC. * automake.in (java): Added autodep entry. * tests/Makefile.am (TESTS): Added gcj3.test. * tests/gcj3.test: New file.
Diffstat (limited to 'm4')
-rw-r--r--m4/depend.m413
1 files changed, 11 insertions, 2 deletions
diff --git a/m4/depend.m4 b/m4/depend.m4
index cb73080a4..1911b3248 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -14,6 +14,7 @@
AC_DEFUN([AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+am_compiler_list=
ifelse([$1], CC,
[AC_REQUIRE([AC_PROG_][CC])dnl
AC_REQUIRE([AC_PROG_][CPP])
@@ -23,7 +24,12 @@ depcpp="$CPP"],
AC_REQUIRE([AC_PROG_][CXXCPP])
depcc="$CXX"
depcpp="$CXXCPP"],
- [$1], OBJC, [am_cv_OBJC_dependencies_compiler_type=gcc],
+ [$1], OBJC, [am_compiler_list='gcc gcc3'
+depcc="$OBJC"
+depcpp=""],
+ [$1], GCJ, [am_compiler_list='gcc gcc3'
+depcc="$GCJ"
+depcpp=""],
[AC_REQUIRE([AC_PROG_][$1])dnl
depcc="$$1"
depcpp=""])
@@ -45,7 +51,10 @@ AC_CACHE_CHECK([dependency style of $depcc],
cd confdir
am_cv_$1_dependencies_compiler_type=none
- for depmode in `sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < "./depcomp"`; do
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list="`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`"
+ fi
+ for depmode in $am_compiler_list; do
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.