public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [0.98 branch patch] don't build gjdoc, if antlr.jar not available
@ 2008-10-15 15:34 Matthias Klose
  0 siblings, 0 replies; only message in thread
From: Matthias Klose @ 2008-10-15 15:34 UTC (permalink / raw)
  To: java-patches

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

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


[-- Attachment #2: gjdoc.diff --]
[-- Type: text/plain, Size: 3492 bytes --]

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"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-15 15:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-15 15:34 [0.98 branch patch] don't build gjdoc, if antlr.jar not available Matthias Klose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).