Allow for spaces in path to java include directory and executables
For typical Windows installs of Java. Also don't use cygpath on MinGW.
This commit is contained in:
parent
a57302527a
commit
f27faa9c69
1 changed files with 31 additions and 13 deletions
44
configure.ac
44
configure.ac
|
|
@ -1108,6 +1108,7 @@ fi
|
||||||
AC_MSG_CHECKING(for java include file jni.h)
|
AC_MSG_CHECKING(for java include file jni.h)
|
||||||
AC_ARG_WITH(javaincl, [ --with-javaincl=path Set location of Java include directory], [JAVAINCDIR="$withval"], [JAVAINCDIR=])
|
AC_ARG_WITH(javaincl, [ --with-javaincl=path Set location of Java include directory], [JAVAINCDIR="$withval"], [JAVAINCDIR=])
|
||||||
|
|
||||||
|
JAVAINC=""
|
||||||
if test -z "$JAVAINCDIR" ; then
|
if test -z "$JAVAINCDIR" ; then
|
||||||
JAVAINCDIR="/usr/j2sdk*/include /usr/local/j2sdk*/include /usr/jdk*/include /usr/local/jdk*/include /opt/j2sdk*/include /opt/jdk*/include /usr/java/include /usr/java/j2sdk*/include /usr/java/jdk*/include /usr/local/java/include /opt/java/include /usr/include/java /usr/local/include/java /usr/lib/java/include /usr/lib/jvm/java*/include /usr/lib64/jvm/java*/include /usr/include/kaffe /usr/local/include/kaffe /usr/include"
|
JAVAINCDIR="/usr/j2sdk*/include /usr/local/j2sdk*/include /usr/jdk*/include /usr/local/jdk*/include /opt/j2sdk*/include /opt/jdk*/include /usr/java/include /usr/java/j2sdk*/include /usr/java/jdk*/include /usr/local/java/include /opt/java/include /usr/include/java /usr/local/include/java /usr/lib/java/include /usr/lib/jvm/java*/include /usr/lib64/jvm/java*/include /usr/include/kaffe /usr/local/include/kaffe /usr/include"
|
||||||
|
|
||||||
|
|
@ -1117,30 +1118,33 @@ if test -z "$JAVAINCDIR" ; then
|
||||||
*-*-darwin*) JAVAINCDIR="/System/Library/Frameworks/JavaVM.framework/Headers $JAVAINCDIR";;
|
*-*-darwin*) JAVAINCDIR="/System/Library/Frameworks/JavaVM.framework/Headers $JAVAINCDIR";;
|
||||||
*);;
|
*);;
|
||||||
esac
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
JAVAINC=""
|
for d in $JAVAINCDIR ; do
|
||||||
for d in $JAVAINCDIR ; do
|
if test -r "$d/jni.h" ; then
|
||||||
if test -r "$d/jni.h" ; then
|
JAVAINCDIR=$d
|
||||||
AC_MSG_RESULT($d)
|
JAVAINC=-I\"$d\"
|
||||||
JAVAINCDIR=$d
|
break
|
||||||
JAVAINC=-I\"$d\"
|
fi
|
||||||
break
|
done
|
||||||
|
else
|
||||||
|
if test -r "$JAVAINCDIR/jni.h" ; then
|
||||||
|
JAVAINC=-I\"$JAVAINCDIR\"
|
||||||
fi
|
fi
|
||||||
done
|
fi
|
||||||
|
|
||||||
if test "$JAVAINC" = "" ; then
|
if test "$JAVAINC" = "" ; then
|
||||||
AC_MSG_RESULT(not found)
|
AC_MSG_RESULT(not found)
|
||||||
else
|
else
|
||||||
|
AC_MSG_RESULT($JAVAINC)
|
||||||
# now look for <arch>/jni_md.h
|
# now look for <arch>/jni_md.h
|
||||||
AC_MSG_CHECKING(for java include file jni_md.h)
|
AC_MSG_CHECKING(for java include file jni_md.h)
|
||||||
JAVAMDDIR=`find "$JAVAINCDIR" -follow -name jni_md.h -print`
|
JAVAMDDIR=`find "$JAVAINCDIR" -follow -name jni_md.h -print`
|
||||||
if test "$JAVAMDDIR" = "" ; then
|
if test "$JAVAMDDIR" = "" ; then
|
||||||
AC_MSG_RESULT(not found)
|
AC_MSG_RESULT(not found)
|
||||||
else
|
else
|
||||||
JAVAMDDIR=`dirname "$JAVAMDDIR" | tail -1`
|
JAVAMDDIR=-I\"`dirname "$JAVAMDDIR" | tail -1`\"
|
||||||
JAVAINC="${JAVAINC} -I\"$JAVAMDDIR\""
|
|
||||||
AC_MSG_RESULT($JAVAMDDIR)
|
AC_MSG_RESULT($JAVAMDDIR)
|
||||||
|
JAVAINC="${JAVAINC} ${JAVAMDDIR}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1195,6 +1199,15 @@ case $host in
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Quote for spaces in path to executables
|
||||||
|
if test -n "$JAVA"; then
|
||||||
|
JAVA=\"$JAVA\"
|
||||||
|
fi
|
||||||
|
if test -n "$JAVAC"; then
|
||||||
|
JAVAC=\"$JAVAC\"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
AC_SUBST(JAVA)
|
AC_SUBST(JAVA)
|
||||||
AC_SUBST(JAVAC)
|
AC_SUBST(JAVAC)
|
||||||
AC_SUBST(JAVAINC)
|
AC_SUBST(JAVAINC)
|
||||||
|
|
@ -2669,13 +2682,18 @@ AC_SUBST(SKIP_ANDROID)
|
||||||
ABS_SRCDIR=`(cd ${srcdir} && pwd)`
|
ABS_SRCDIR=`(cd ${srcdir} && pwd)`
|
||||||
|
|
||||||
# Root directory
|
# Root directory
|
||||||
# Translate path for native Windows compilers for use with 'make check'
|
|
||||||
ROOT_DIR=`pwd`
|
ROOT_DIR=`pwd`
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin* | *-*-mingw*)
|
*-*-cygwin*)
|
||||||
|
# Translate path for native Windows compilers for use with 'make check'
|
||||||
if (cygpath --mixed $ROOT_DIR) >/dev/null 2>/dev/null; then
|
if (cygpath --mixed $ROOT_DIR) >/dev/null 2>/dev/null; then
|
||||||
ROOT_DIR=`cygpath --mixed $ROOT_DIR`
|
ROOT_DIR=`cygpath --mixed $ROOT_DIR`
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $host in
|
||||||
|
*-*-cygwin* | *-*-mingw*)
|
||||||
# Extra files generated by some Windows compilers
|
# Extra files generated by some Windows compilers
|
||||||
EXTRA_CLEAN="*.stackdump *.exp *.lib *.pdb *.ilk"
|
EXTRA_CLEAN="*.stackdump *.exp *.lib *.pdb *.ilk"
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue