summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2007-10-08 23:09:15 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2007-10-08 23:09:15 +0000
commitc865a3e98ef6cc114d59239867cbbd5225829f2f (patch)
tree3311da0eb96dcd464ef0d48b9323c7cb99199231 /m4
parent438e3d547e66271e3d3804c22a1a633cd5a6b11e (diff)
downloadclasspath-c865a3e98ef6cc114d59239867cbbd5225829f2f.tar.gz
2007-10-08 Andrew John Hughes <gnu_andrew@member.fsf.org>
PR classpath/33623: * examples/Makefile.am: Exit with no compiler. * lib/Makefile.am: Likewise. * m4/acinclude.m4: Handle ecj and javac using separate variables and catch when JAVAC/ECJ is empty.
Diffstat (limited to 'm4')
-rw-r--r--m4/acinclude.m418
1 files changed, 12 insertions, 6 deletions
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index fc22b4c55..200bda885 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -3,6 +3,7 @@ dnl Used by aclocal to generate configure
dnl -----------------------------------------------------------
AC_DEFUN([CLASSPATH_FIND_JAVAC],
[
+ user_specified_ecj=
user_specified_javac=
dnl CLASSPATH_WITH_GCJ
@@ -11,22 +12,27 @@ dnl CLASSPATH_WITH_KJC
CLASSPATH_WITH_ECJ
CLASSPATH_WITH_JAVAC
+ if test "x${user_specified_ecj}" = x; then
+ AM_CONDITIONAL(FOUND_ECJ, test "x${ECJ}" != x)
+ else
+ AM_CONDITIONAL(FOUND_ECJ, test "x${user_specified_javac}" = xecj && test "x${ECJ}" != x)
+ fi
+
if test "x${user_specified_javac}" = x; then
dnl AM_CONDITIONAL(FOUND_GCJ, test "x${GCJ}" != x)
dnl AM_CONDITIONAL(FOUND_JIKES, test "x${JIKES}" != x)
- AM_CONDITIONAL(FOUND_ECJ, test "x${ECJ}" != x)
AM_CONDITIONAL(FOUND_JAVAC, test "x${JAVAC}" != x)
else
dnl AM_CONDITIONAL(FOUND_GCJ, test "x${user_specified_javac}" = xgcj)
dnl AM_CONDITIONAL(FOUND_JIKES, test "x${user_specified_javac}" = xjikes)
- AM_CONDITIONAL(FOUND_ECJ, test "x${user_specified_javac}" = xecj)
- AM_CONDITIONAL(FOUND_JAVAC, test "x${user_specified_javac}" = xjavac)
+ AM_CONDITIONAL(FOUND_JAVAC, test "x${user_specified_javac}" = xjavac && test "x${JAVAC}" != x)
fi
+
dnl AM_CONDITIONAL(FOUND_KJC, test "x${user_specified_javac}" = xkjc)
dnl if test "x${GCJ}" = x && test "x${JIKES}" = x && test "x${user_specified_javac}" != xkjc; then
- if test "x${ECJ}" = x && test "x${JAVAC}" = x && test "x${user_specified_javac}" != xecj; then
- AC_MSG_ERROR([cannot find javac, try --with-ecj])
+ if test "x${ECJ}" = x && test "x${JAVAC}" = x && test "x${user_specified_ecj}" != xecj && test "x${user_specified_javac}" != xjavac; then
+ AC_MSG_ERROR([cannot find javac, try --with-ecj or --with-javac])
fi
])
@@ -397,7 +403,7 @@ AC_DEFUN([CLASSPATH_WITH_ECJ],
CLASSPATH_CHECK_ECJ
fi
fi
- user_specified_javac=ecj
+ user_specified_ecj=ecj
],
[
CLASSPATH_CHECK_ECJ