Mercurial > hg > octave-nkf
changeset 15711:e88b31c485c0
improve autoconf check for java version and location.
configure.ac: fix issues with checking for java version and location on OSX.
author | Carlo de Falco <cdf@users.sourceforge.net> |
---|---|
date | Tue, 27 Nov 2012 22:39:26 +0100 |
parents | cd3d7f126190 |
children | 74ff287f41cb |
files | configure.ac |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -756,8 +756,8 @@ AC_MSG_CHECKING([for Java version]) java_version=[`$JAVA -version 2>&1 | sed -n -e 's/^java version[^0-9"]*"\([^"]*\)"/\1/p'`] AC_MSG_RESULT($java_version) - java_major=[`echo -n $java_version | sed -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*$/\1/'`] - java_minor=[`echo -n $java_version | sed -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*$/\2/'`] + java_major=[`echo $java_version | sed -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*$/\1/'`] + java_minor=[`echo $java_version | sed -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*$/\2/'`] if test $java_major -ge 1 -a $java_minor -ge 5; then case "$canonical_host_type" in *-msdosmsvc*) @@ -776,6 +776,7 @@ JAVA_TEMP="/System/Library/Frameworks/JavaVM.framework" JAVA_HOME="${JAVA_TEMP}/Home" JAVA_ARCH="${JAVA_TEMP}/Libraries/libjvm_compat.dylib" + JAVA_LIBS="-framework JavaVM" # According to: # http://developer.apple.com/unix/crossplatform.html # you need to explicitely set the include path @@ -791,7 +792,7 @@ JAVA_HOME=/usr/lib/jvm fi fi - JAVA_HOME=[`echo -n $JAVA_HOME | sed -e 's|/$||'`] + JAVA_HOME=[`echo $JAVA_HOME | sed -e 's|/$||'`] if test -z "$JAVA_ARCH"; then if test -d "${JAVA_HOME}/jre/lib/i386"; then JAVA_ARCH="i386";