Oops - if we don't want the Java bindings, then we really shouldn't be building them :-/
Also ensure we don't try to build them if no Java support was found, and error out if the user requests the bindings and we didn't find Java support. Add a configure flag to skip the Java tests and just force-set the Java support to "disabled" This commit was SVN r26484.
Этот коммит содержится в:
родитель
88d5e6f2b4
Коммит
31beff6362
@ -91,10 +91,14 @@ SUBDIRS = \
|
|||||||
$(OMPI_MPIEXT_USEMPIF08_DIRS) \
|
$(OMPI_MPIEXT_USEMPIF08_DIRS) \
|
||||||
$(OMPI_FORTRAN_USEMPIF08_DIR) \
|
$(OMPI_FORTRAN_USEMPIF08_DIR) \
|
||||||
mpi/fortran/mpiext \
|
mpi/fortran/mpiext \
|
||||||
mpi/java \
|
|
||||||
$(MCA_ompi_FRAMEWORK_COMPONENT_DSO_SUBDIRS) \
|
$(MCA_ompi_FRAMEWORK_COMPONENT_DSO_SUBDIRS) \
|
||||||
$(OMPI_CONTRIB_SUBDIRS)
|
$(OMPI_CONTRIB_SUBDIRS)
|
||||||
|
|
||||||
|
if OMPI_WANT_JAVA_BINDINGS
|
||||||
|
SUBDIRS += \
|
||||||
|
mpi/java
|
||||||
|
endif
|
||||||
|
|
||||||
# The ordering of the DIST_SUBDIRS isn't as important, but note that
|
# The ordering of the DIST_SUBDIRS isn't as important, but note that
|
||||||
# its contents *are* different than SUBDIRS. In particular, the
|
# its contents *are* different than SUBDIRS. In particular, the
|
||||||
# MPIEXT subdirs has a different value that is *not* equivalent to the
|
# MPIEXT subdirs has a different value that is *not* equivalent to the
|
||||||
|
@ -41,8 +41,15 @@ AC_DEFUN([OMPI_SETUP_JAVA_BINDINGS],[
|
|||||||
AC_HELP_STRING([--enable-mpi-java],
|
AC_HELP_STRING([--enable-mpi-java],
|
||||||
[enable Java MPI bindings (default: disabled)]))
|
[enable Java MPI bindings (default: disabled)]))
|
||||||
|
|
||||||
|
# check for required support
|
||||||
|
if test "$orte_java_happy" = "no" -a "$enable_mpi_java" = "yes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_MSG_WARN([Java bindings requested but no Java support found])
|
||||||
|
AC_MSG_ERROR([cannot continue])
|
||||||
|
fi
|
||||||
|
|
||||||
# Only build the Java bindings if requested
|
# Only build the Java bindings if requested
|
||||||
if test "$enable_mpi_java" = "yes"; then
|
if test "$orte_java_happy" = "yes" -a "$enable_mpi_java" = "yes"; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
WANT_MPI_JAVA_SUPPORT=1
|
WANT_MPI_JAVA_SUPPORT=1
|
||||||
AC_MSG_CHECKING([if shared libraries are enabled])
|
AC_MSG_CHECKING([if shared libraries are enabled])
|
||||||
|
@ -33,6 +33,10 @@ AC_DEFUN([ORTE_SETUP_JAVA_BANNER],[
|
|||||||
AC_DEFUN([ORTE_SETUP_JAVA],[
|
AC_DEFUN([ORTE_SETUP_JAVA],[
|
||||||
AC_REQUIRE([ORTE_SETUP_JAVA_BANNER])
|
AC_REQUIRE([ORTE_SETUP_JAVA_BANNER])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(java,
|
||||||
|
AC_HELP_STRING([--enable-java],
|
||||||
|
[Enable Java-based support in the system - use this option to disable all Java-based compiler tests (default: enabled)]))
|
||||||
|
|
||||||
AC_ARG_WITH(jdk-dir,
|
AC_ARG_WITH(jdk-dir,
|
||||||
AC_HELP_STRING([--with-jdk-dir(=DIR)],
|
AC_HELP_STRING([--with-jdk-dir(=DIR)],
|
||||||
[Location of the JDK header directory. If you use this option, do not specify --with-jdk-bindir or --with-jdk-headers.]))
|
[Location of the JDK header directory. If you use this option, do not specify --with-jdk-bindir or --with-jdk-headers.]))
|
||||||
@ -43,6 +47,10 @@ AC_DEFUN([ORTE_SETUP_JAVA],[
|
|||||||
AC_HELP_STRING([--with-jdk-headers(=DIR)],
|
AC_HELP_STRING([--with-jdk-headers(=DIR)],
|
||||||
[Location of the JDK header directory. If you use this option, you must also use --with-jdk-bindir (and you must NOT use --with-jdk-dir)]))
|
[Location of the JDK header directory. If you use this option, you must also use --with-jdk-bindir (and you must NOT use --with-jdk-dir)]))
|
||||||
|
|
||||||
|
if test "$enable_java" = "no"; then
|
||||||
|
HAVE_JAVA_SUPPORT=0
|
||||||
|
orte_java_happy=no
|
||||||
|
else
|
||||||
# Check for bozo case: ensure a directory was specified
|
# Check for bozo case: ensure a directory was specified
|
||||||
AS_IF([test "$with_jdk_dir" = "yes" -o "$with_jdk_dir" = "no"],
|
AS_IF([test "$with_jdk_dir" = "yes" -o "$with_jdk_dir" = "no"],
|
||||||
[AC_MSG_WARN([Must specify a directory name for --with-jdk-dir])
|
[AC_MSG_WARN([Must specify a directory name for --with-jdk-dir])
|
||||||
@ -154,6 +162,8 @@ AC_DEFUN([ORTE_SETUP_JAVA],[
|
|||||||
# Look for jni.h
|
# Look for jni.h
|
||||||
AS_IF([test "$orte_java_happy" = "yes"],
|
AS_IF([test "$orte_java_happy" = "yes"],
|
||||||
[CPPFLAGS_save=$CPPFLAGS
|
[CPPFLAGS_save=$CPPFLAGS
|
||||||
|
# silence a stupid Mac warning
|
||||||
|
CPPFLAGS="$CPPFLAGS -DTARGET_RT_MAC_CFM=0"
|
||||||
AS_IF([test -n "$with_jdk_headers" -a "$with_jdk_headers" != "yes" -a "$with_jdk_headers" != "no"],
|
AS_IF([test -n "$with_jdk_headers" -a "$with_jdk_headers" != "yes" -a "$with_jdk_headers" != "no"],
|
||||||
[ORTE_JDK_CPPFLAGS="-I$with_jdk_headers"
|
[ORTE_JDK_CPPFLAGS="-I$with_jdk_headers"
|
||||||
# Some flavors of JDK also require -I<blah>/linux.
|
# Some flavors of JDK also require -I<blah>/linux.
|
||||||
@ -177,6 +187,7 @@ AC_DEFUN([ORTE_SETUP_JAVA],[
|
|||||||
HAVE_JAVA_SUPPORT=no;
|
HAVE_JAVA_SUPPORT=no;
|
||||||
fi
|
fi
|
||||||
AC_SUBST(ORTE_JDK_CPPFLAGS)
|
AC_SUBST(ORTE_JDK_CPPFLAGS)
|
||||||
|
fi
|
||||||
|
|
||||||
# Are we happy?
|
# Are we happy?
|
||||||
AC_MSG_CHECKING([Java support available])
|
AC_MSG_CHECKING([Java support available])
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user