summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2008-10-05 21:19:16 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2008-10-05 21:19:16 +0000
commitcae9a32cbcc4c133301d64f49d36709ccbc994da (patch)
tree2c41753d6c88c8b8817cc0a811bb7c0801ec9f02 /configure.ac
parente93c4ea50e2390957e16c1d4c8de76de1666725f (diff)
downloadclasspath-cae9a32cbcc4c133301d64f49d36709ccbc994da.tar.gz
Add -regen-gjdoc-parser option.
2008-10-02 Andrew John Hughes <gnu_andrew@member.fsf.org> * configure.ac: Add regen-gjdoc-parser option, and separate antlr tests. * m4/ac_prog_antlr.m4: Turn single test into AC_LIB_ANTLR and AC_PROG_ANTLR. * m4/ac_prog_java.m4: Quote tests. * tools/Makefile.am: Support CREATE_GJDOC_PARSER option.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 27 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index cd045a6a2..073c38b71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -312,8 +312,9 @@ AC_ARG_WITH([antlr-jar],
])
dnl -----------------------------------------------------------
-dnl Regenerate headers at build time (disabled by default)
+dnl Regenerate headers at build time (enabled if not found)
dnl -----------------------------------------------------------
+AC_MSG_CHECKING([whether to regenerate the headers])
AC_ARG_ENABLE([regen-headers],
[AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=yes if headers don't exist])],
[case "${enableval}" in
@@ -321,13 +322,33 @@ AC_ARG_ENABLE([regen-headers],
no) REGENERATE_JNI_HEADERS=no ;;
*) REGENERATE_JNI_HEADERS=yes ;;
esac],
- [if test -e include/java_lang_VMSystem.h; then
+ [if test -e ${srcdir}/include/java_lang_VMSystem.h; then
REGENERATE_JNI_HEADERS=no ;
else
REGENERATE_JNI_HEADERS=yes ;
fi])
+AC_MSG_RESULT(${REGENERATE_JNI_HEADERS})
AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes)
+dnl ------------------------------------------------------------------------
+dnl Regenerate GJDoc parser at build time (enabled if not found)
+dnl ------------------------------------------------------------------------
+AC_MSG_CHECKING([whether to regenerate the GJDoc parser])
+AC_ARG_ENABLE([regen-gjdoc-parser],
+ [AS_HELP_STRING(--enable-regen-gjdoc-parser,automatically regenerate the GJDoc parser [default=yes if generated source doesn't exist])],
+ [case "${enableval}" in
+ yes) REGENERATE_GJDOC_PARSER=yes ;;
+ no) REGENERATE_GJDOC_PARSER=no ;;
+ *) REGENERATE_GJDOC_PARSER=yes ;;
+ esac],
+ [if test -e ${srcdir}/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaLexer.java; then
+ REGENERATE_GJDOC_PARSER=no ;
+ else
+ REGENERATE_GJDOC_PARSER=yes ;
+ fi])
+AC_MSG_RESULT(${REGENERATE_GJDOC_PARSER})
+AM_CONDITIONAL(CREATE_GJDOC_PARSER, test "x${REGENERATE_GJDOC_PARSER}" = xyes)
+
dnl -----------------------------------------------------------
dnl Enable tool wrapper binaries (disabled by default)
dnl -----------------------------------------------------------
@@ -943,7 +964,10 @@ if test "x${TOOLSDIR}" != x; then
fi
if test "x${COMPILE_GJDOC}" = xyes; then
AC_PROG_JAVA
- AC_PROG_ANTLR(2,7,1)
+ AC_LIB_ANTLR
+ if test "x${REGENERATE_GJDOC_PARSER}" = xyes; then
+ AC_PROG_ANTLR(2,7,1)
+ fi
fi
fi