From: mquinson Date: Mon, 16 Jul 2007 09:15:50 +0000 (+0000) Subject: Allow users to disable Java binding, even if the configure thinks it found the tools X-Git-Tag: v3.3~1563 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4c54951e0b04dc8bef3b3709bf2c5f917062ced5?ds=sidebyside Allow users to disable Java binding, even if the configure thinks it found the tools git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3797 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/configure.ac b/configure.ac index f846d66353..525ff79294 100644 --- a/configure.ac +++ b/configure.ac @@ -289,21 +289,30 @@ AC_SUBST([abs_top_srcdir]) SG_CONFIGURE_PART(Check for Java bindings...) # Java cruft -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) -AC_MSG_CHECKING(whether to compile java bindings) -if test -n "$JAVAC" \ - && test -n "$JAVA" \ - && test -n "$JAR" \ - && test "x$ac_cv_header_jni_h" = "xyes" ; then +AC_ARG_ENABLE(java, + AS_HELP_STRING([--disable-java], [To not compile the Java bindings even if the tools are found]), + want_java=$enableval,want_java=yes) +if test "x$want_java" != "xyes" ; then + AC_MSG_CHECKING(whether to compile java bindings) + AC_MSG_RESULT(disabled by user) + 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) + AC_MSG_CHECKING(whether to compile java bindings) + 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" + use_java="yes" + else + use_java="no" + fi + AC_MSG_RESULT($use_java) fi -AC_MSG_RESULT($use_java) AM_CONDITIONAL(HAVE_JAVA,test "x$use_java" = "xyes") #####################