+##############################################
+## Specific mode for build daemons.
+## (they compile the SVN without having the autotools installed)
+AC_ARG_ENABLE(botbuild,
+ AS_HELP_STRING([--enable-botbuild], [Compilation mode for build daemons -- do not use it]),
+ botbuild=$enableval,botbuild=no)
+AM_CONDITIONAL(BOTBUILD_MODE,test x$botbuild != xno)
+
+if test -e .svn && test x$USE_MAINTAINER_MODE != xyes && test x$botbuild != xyes ; then
+ echo "ERROR: "
+ echo "ERROR: You have to enable the maintainer mode to compile the SVN."
+ echo "ERROR: For this, just call configure this way:"
+ echo "ERROR:"
+ echo "ERROR: ./configure '--enable-maintainer-mode' $ac_configure_args"
+ echo "ERROR:"
+ exit 1
+fi
+
+
+SG_CONFIGURE_PART(Check for Java bindings...)
+# Java cruft
+AC_ARG_ENABLE(java,
+ AS_HELP_STRING([--disable-java], [To not compile the Java bindings even if the tools are found]),
+ disable_java=$enableval,disable_java=yes)
+AC_MSG_CHECKING(whether to compile java bindings)
+if test "x$disable_java" != "xyes" ; then
+ use_java="disabled by user"
+else
+ AC_PATH_PROG([JAVAC], [javac], `which javac`)
+ AC_PATH_PROG([JAVA], [java] , `which java`)
+ AC_PATH_PROG([JAR], [jar] , `which jar`)
+ AC_CHECK_HEADERS(jni.h)
+ if test -n "$JAVAC" \
+ && test -n "$JAVA" \
+ && test -n "$JAR" \
+ && test "x$ac_cv_header_jni_h" = "xyes" ; then
+
+ use_java="yes"
+ else
+ use_java="no"
+ fi
+fi
+AC_MSG_RESULT($use_java)
+AM_CONDITIONAL(HAVE_JAVA,test "x$use_java" = "xyes")
+