Tweak the java setup so it works better on Mac. Only build mapreduce and allocators if hadoop support was requested.
This commit was SVN r26448.
Этот коммит содержится в:
родитель
f8ace21366
Коммит
ca1b325738
@ -77,47 +77,58 @@ AC_DEFUN([ORTE_SETUP_JAVA],[
|
|||||||
# Some java installations are in obscure places. So let's
|
# Some java installations are in obscure places. So let's
|
||||||
# hard-code a few of the common ones so that users don't have to
|
# hard-code a few of the common ones so that users don't have to
|
||||||
# specify --with-java-<foo>=LONG_ANNOYING_DIRECTORY.
|
# specify --with-java-<foo>=LONG_ANNOYING_DIRECTORY.
|
||||||
AS_IF([test -z "$with_jdk_dir" -a -z "$with_jdk_dir" -a -z "$with_jdk_bindir"],
|
AS_IF([test -z "$with_jdk_bindir"],
|
||||||
[ # OS X Snow Leopard and Lion (10.6 and 10.7 -- did not
|
[ # OS X Snow Leopard and Lion (10.6 and 10.7 -- did not
|
||||||
# check prior versions)
|
# check prior versions)
|
||||||
found=0
|
found=0
|
||||||
dir=/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers
|
dir=/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers
|
||||||
AS_IF([test -d $dir], [found=1
|
AC_MSG_CHECKING([OSX locations])
|
||||||
with_jdk_headers=$dir
|
AS_IF([test -d $dir],
|
||||||
with_jdk_bindir=/usr/bin])
|
[AC_MSG_RESULT([found])
|
||||||
|
found=1
|
||||||
|
with_jdk_headers=$dir
|
||||||
|
with_jdk_bindir=/usr/bin],
|
||||||
|
[AC_MSG_RESULT([not found])])
|
||||||
|
|
||||||
# Various Linux
|
if test "$found" = "0"; then
|
||||||
dir='/usr/lib/jvm/java-*-openjdk-*/include/'
|
# Various Linux
|
||||||
jnih=`ls $dir/jni.h 2>/dev/null | head -n 1`
|
dir='/usr/lib/jvm/java-*-openjdk-*/include/'
|
||||||
AS_IF([test -r "$jnih"],
|
jnih=`ls $dir/jni.h 2>/dev/null | head -n 1`
|
||||||
[with_jdk_headers=`dirname $jnih`
|
AC_MSG_CHECKING([Linux locations])
|
||||||
OPAL_WHICH([javac], [with_jdk_bindir])
|
AS_IF([test -r "$jnih"],
|
||||||
AS_IF([test -n "$with_jdk_bindir"],
|
[with_jdk_headers=`dirname $jnih`
|
||||||
[found=1
|
OPAL_WHICH([javac], [with_jdk_bindir])
|
||||||
with_jdk_bindir=`dirname $with_jdk_bindir`],
|
AS_IF([test -n "$with_jdk_bindir"],
|
||||||
[with_jdk_headers=])],
|
[AC_MSG_RESULT([found])
|
||||||
[dir='/usr/lib/jvm/default-java/include/'
|
found=1
|
||||||
jnih=`ls $dir/jni.h 2>/dev/null | head -n 1`
|
with_jdk_bindir=`dirname $with_jdk_bindir`],
|
||||||
AS_IF([test -r "$jnih"],
|
[with_jdk_headers=])],
|
||||||
[with_jdk_headers=`dirname $jnih`
|
[dir='/usr/lib/jvm/default-java/include/'
|
||||||
OPAL_WHICH([javac], [with_jdk_bindir])
|
jnih=`ls $dir/jni.h 2>/dev/null | head -n 1`
|
||||||
AS_IF([test -n "$with_jdk_bindir"],
|
AS_IF([test -r "$jnih"],
|
||||||
[found=1
|
[with_jdk_headers=`dirname $jnih`
|
||||||
with_jdk_bindir=`dirname $with_jdk_bindir`],
|
OPAL_WHICH([javac], [with_jdk_bindir])
|
||||||
[with_jdk_headers=])])])
|
AS_IF([test -n "$with_jdk_bindir"],
|
||||||
|
[AC_MSG_RESULT([found])
|
||||||
|
found=1
|
||||||
|
with_jdk_bindir=`dirname $with_jdk_bindir`],
|
||||||
|
[with_jdk_headers=])],
|
||||||
|
[AC_MSG_RESULT([not found])])])
|
||||||
|
fi
|
||||||
|
|
||||||
# Solaris
|
if test "$found" = "0"; then
|
||||||
dir=/usr/java
|
# Solaris
|
||||||
AS_IF([test "$found" -eq 0 -a -d $dir -a -r "$dir/include/jni.h"],
|
dir=/usr/java
|
||||||
[with_jdk_headers=$dir/include
|
AC_MSG_CHECKING([Solaris locations])
|
||||||
with_jdk_bindir=$dir/bin
|
AS_IF([test -d $dir -a -r "$dir/include/jni.h"],
|
||||||
found=1])
|
[AC_MSG_RESULT([found])
|
||||||
|
with_jdk_headers=$dir/include
|
||||||
# If we think we found them, announce
|
with_jdk_bindir=$dir/bin
|
||||||
AS_IF([test "$found" -eq 1],
|
found=1],
|
||||||
[AC_MSG_NOTICE([guessing that JDK headers are in $with_jdk_headers])
|
[AC_MSG_RESULT([not found])])
|
||||||
AC_MSG_NOTICE([guessing that JDK javac is in $with_jdk_bindir])])
|
fi
|
||||||
])
|
],
|
||||||
|
[found=1])
|
||||||
|
|
||||||
if test "$found" = "1"; then
|
if test "$found" = "1"; then
|
||||||
OMPI_CHECK_WITHDIR([jdk-bindir], [$with_jdk_bindir], [javac])
|
OMPI_CHECK_WITHDIR([jdk-bindir], [$with_jdk_bindir], [javac])
|
||||||
|
@ -13,12 +13,12 @@ include $(top_srcdir)/Makefile.man-page-rules
|
|||||||
man_pages = mapreduce.1
|
man_pages = mapreduce.1
|
||||||
EXTRA_DIST = $(man_pages:.1=.1in)
|
EXTRA_DIST = $(man_pages:.1=.1in)
|
||||||
|
|
||||||
if !ORTE_DISABLE_FULL_SUPPORT
|
bin_PROGRAMS =
|
||||||
if OMPI_INSTALL_BINARIES
|
|
||||||
|
|
||||||
bin_PROGRAMS = mapreduce
|
mapreduce_SOURCES = \
|
||||||
|
mapreduce.c
|
||||||
|
|
||||||
nodist_man_MANS = $(man_pages)
|
mapreduce_LDADD = $(top_builddir)/orte/libopen-rte.la
|
||||||
|
|
||||||
# Ensure that the man pages are rebuilt if the opal_config.h file
|
# Ensure that the man pages are rebuilt if the opal_config.h file
|
||||||
# changes; a "good enough" way to know if configure was run again (and
|
# changes; a "good enough" way to know if configure was run again (and
|
||||||
@ -27,14 +27,22 @@ $(nodist_man_MANS): $(top_builddir)/opal/include/opal_config.h
|
|||||||
|
|
||||||
dist_pkgdata_DATA = help-mapreduce.txt
|
dist_pkgdata_DATA = help-mapreduce.txt
|
||||||
|
|
||||||
|
if !ORTE_DISABLE_FULL_SUPPORT
|
||||||
|
if OMPI_INSTALL_BINARIES
|
||||||
|
|
||||||
|
# Only do this stuff if we want Hadoop support
|
||||||
|
if ORTE_WANT_HADOOP_SUPPORT
|
||||||
|
|
||||||
|
bin_PROGRAMS += mapreduce
|
||||||
|
|
||||||
|
nodist_man_MANS = $(man_pages)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
endif # OMPI_INSTALL_BINARIES
|
endif # OMPI_INSTALL_BINARIES
|
||||||
|
|
||||||
mapreduce_SOURCES = \
|
|
||||||
mapreduce.c
|
|
||||||
|
|
||||||
mapreduce_LDADD = $(top_builddir)/orte/libopen-rte.la
|
|
||||||
|
|
||||||
endif # !ORTE_DISABLE_FULL_SUPPORT
|
endif # !ORTE_DISABLE_FULL_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
distclean-local:
|
distclean-local:
|
||||||
rm -f $(man_pages)
|
rm -f $(man_pages)
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user