This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[0.98 branch patch] don't build gjdoc, if antlr.jar not available
- From: Matthias Klose <doko at ubuntu dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 15 Oct 2008 17:33:54 +0200
- Subject: [0.98 branch patch] don't build gjdoc, if antlr.jar not available
if antlr.jar is not found on the system, or it is not specifed with --with-antlr-jar, then do not
build gjdoc. committed to the branch.
we do need to document the new configure options for gcc/java/install.texi for the merge
Matthias
Index: ChangeLog
===================================================================
--- ChangeLog (revision 141136)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2008-10-15 Matthias Klose <doko@ubuntu.com>
+
+ * configure.ac: Disable build of gjdoc, if configured without
+ --with-antlr-jar or if no antlr.jar found.
+ * configure: Regenerate.
+
2008-10-09 Andrew John Hughes <gnu_andrew@member.fsf.org>
* classpath/configure.ac,
Index: configure.ac
===================================================================
--- configure.ac (revision 141136)
+++ configure.ac (working copy)
@@ -77,16 +77,6 @@
[gconf_enabled=no]
)
-AC_ARG_ENABLE([gjdoc],
- [AS_HELP_STRING(--disable-gjdoc,compile GJDoc (disabled by --disable-gjdoc) [default=yes])],
- [case "${enableval}" in
- yes) COMPILE_GJDOC=yes ;;
- no) COMPILE_GJDOC=no ;;
- *) COMPILE_GJDOC=yes ;;
- esac],
- [COMPILE_GJDOC=yes])
-AM_CONDITIONAL(CREATE_GJDOC, test "x${COMPILE_GJDOC}" = xyes)
-
AC_ARG_WITH([antlr-jar],
[AS_HELP_STRING([--with-antlr-jar=file],[Use ANTLR from the specified jar file])],
[
@@ -96,19 +86,23 @@
ANTLR_JAR=
])
-if test "x${COMPILE_GJDOC}" = xyes; then
- AC_MSG_CHECKING([for antlr.jar])
+AC_MSG_CHECKING([for antlr.jar])
+if test "x$ANTLR_JAR" = x; then
+ for antlr_lib_home in `ls -d /usr/local/share/antlr* 2> /dev/null` \
+ /usr/share/antlr/lib /usr/share/java /usr/lib;
+ do
+ if test -f "$antlr_lib_home/antlr.jar"; then
+ # FIXME: version check for antlr needed without using a VM
+ ANTLR_JAR="$antlr_lib_home/antlr.jar"
+ break
+ fi
+ done
if test "x$ANTLR_JAR" = x; then
- for antlr_lib_home in `ls -d /usr/local/share/antlr* 2> /dev/null` \
- /usr/share/antlr/lib /usr/share/java /usr/lib;
- do
- if test -f "$antlr_lib_home/antlr.jar"; then
- # FIXME: version check for antlr needed without using a VM
- ANTLR_JAR="$antlr_lib_home/antlr.jar"
- break
- fi
- done
+ AC_MSG_RESULT([not found])
+ else
+ AC_MSG_RESULT($ANTLR_JAR)
fi
+else
if test -f "${ANTLR_JAR}"; then
AC_MSG_RESULT($ANTLR_JAR)
else
@@ -117,6 +111,29 @@
fi
AC_SUBST(ANTLR_JAR)
+AC_ARG_ENABLE([gjdoc],
+ [AS_HELP_STRING(--disable-gjdoc,compile GJDoc (disabled by --disable-gjdoc) [default=yes])],
+ [case "${enableval}" in
+ yes) BUILD_GJDOC=yes ;;
+ no) BUILD_GJDOC=no ;;
+ *) BUILD_GJDOC=yes ;;
+ esac],
+ [BUILD_GJDOC=maybe])
+
+AC_MSG_CHECKING([wether to build gjdoc])
+if test "x$BUILD_GJDOC" = xmaybe; then
+ if test -f "${ANTLR_JAR}"; then
+ BUILD_GJDOC=yes
+ AC_MSG_RESULT(yes)
+ else
+ BUILD_GJDOC=no
+ AC_MSG_RESULT([no, antlr.jar not found])
+ fi
+else
+ AC_MSG_RESULT($BUILD_GJDOC)
+fi
+AM_CONDITIONAL(CREATE_GJDOC, test "x${BUILD_GJDOC}" = xyes)
+
AC_ARG_ENABLE(java-maintainer-mode,
AS_HELP_STRING([--enable-java-maintainer-mode],
[allow rebuilding of .class and .h files]))
@@ -464,6 +481,9 @@
ac_configure_args="$ac_configure_args --with-escher=$with_escher"
fi
fi
+if test "x$BUILD_GJDOC" = xno; then
+ ac_configure_args="$ac_configure_args --disable-gjdoc"
+fi
# -Werror causes unavoidable problems in code using alsa.
ac_configure_args="$ac_configure_args --disable-regen-headers"
ac_configure_args="$ac_configure_args --disable-Werror"