diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-05-26 18:42:57 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-05-27 11:13:00 +0200 |
commit | 6de9dfac1d25ea9440a47a06fcb39507f87ca4ec (patch) | |
tree | 318b1887fb87dab980c6d039da2bc9b9ca3db8f0 /configure.ac | |
parent | c77c39056847d23a109172ff53bfac0ba4c21b39 (diff) |
configure: try to detect using JDK with wrong bitness
Another option would be to try -d32 / -d64, not obvious which is better.
Change-Id: I2836d8a07e55971999f91dd417916aca394ccfa6
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e507cb508664..4130928b5abf 100644 --- a/configure.ac +++ b/configure.ac @@ -6836,6 +6836,21 @@ if test "$ENABLE_JAVA" != ""; then else AC_MSG_RESULT([no]) fi + else # ? not sure if it's valid for all OS, and all JVMs? + case $CPUNAME in + AXP|X86_64|HPPA|IA64|POWERPC64|S390X|SPARC64) + if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then + AC_MSG_WARN([You are building 64-bit binaries but the JDK $JAVAINTERPRETER is 32-bit]) + AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK]) + fi + ;; + *) # assumption: everything else 32-bit + if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 2>&1 | $GREP -i 64-bit`" != "" >/dev/null; then + AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit]) + AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK]) + fi + ;; + esac fi fi |