[Libreoffice-commits] .: 2 commits - configure.in solenv/bin
Tor Lillqvist
tml at kemper.freedesktop.org
Wed Jan 26 07:09:45 PST 2011
configure.in | 70 ++++++++++++++++++++++++++++++----------------------
solenv/bin/build.pl | 61 ---------------------------------------------
2 files changed, 41 insertions(+), 90 deletions(-)
New commits:
commit a0c1303e621ef09929448a59d40e7a1dc62e3522
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jan 26 17:07:47 2011 +0200
Improve Java tests on Windows
diff --git a/configure.in b/configure.in
index cde56e6..be8aa6c 100755
--- a/configure.in
+++ b/configure.in
@@ -3195,25 +3195,43 @@ if test "$_os" = "Linux" && test "$host_cpu" = "powerpc"; then
export JITC_PROCESSOR_TYPE
fi
-if test "$_os" = "WINNT"; then
- if test -z "$with_jdk_home"; then
- _jdk_home=`./oowintool --jdk-home`
- if test -d "$_jdk_home"; then
- with_jdk_home="$_jdk_home"
- fi
- else
- with_jdk_home=`cygpath -u "$with_jdk_home"`
- fi
-fi
if test $_os = "WINNT"; then
WITH_VC_REDIST="TRUE"
fi
AC_SUBST(WITH_VC_REDIST)
dnl ===================================================================
-dnl Checks for java
+dnl Checks for Java
dnl ===================================================================
if test "$SOLAR_JAVA" != ""; then
+
+ # Windows-specific tests
+ if test "$_os" = "WINNT"; then
+ if test "$CL_X64" != ""; then
+ bitness="64-bit"
+ otherbitness="32-bit"
+ else
+ bitness="32-bit"
+ otherbitness="64-bit"
+ fi
+ if test -z "$with_jdk_home"; then
+
+ # Unfortunately apparently no way to find, if needed, the 64-bit
+ # JDK in the Registry from the 32-bit Perl oowintool
+
+ _jdk_home=`./oowintool --jdk-home`
+ if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
+ with_jdk_home="$_jdk_home"
+ howfound="found by oowintool"
+ else
+ AC_MSG_ERROR([No JDK found by oowintool, pass the --with-jdk-home option pointing to a $bitness JDK])
+ fi
+ else
+ with_jdk_home=`cygpath -u "$with_jdk_home"`
+ howfound="you passed"
+ fi
+ fi
+
JAVA_HOME=; export JAVA_HOME
if test -z "$with_jdk_home"; then
AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA)
@@ -3223,10 +3241,21 @@ if test "$SOLAR_JAVA" != ""; then
if test -x "$_java_path"; then
JAVAINTERPRETER=$_java_path
else
- AC_MSG_ERROR([$_java_path not found set with_jdk_home])
+ AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
fi
fi
+
if test "$_os" = "WINNT"; then
+ # Check that the JDK found is correct architecture
+ shortjdkhome=`cygpath -d "$with_jdk_home"`
+ if test "$CL_X64" != "" -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" == "" >/dev/null; then
+ AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
+ AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
+ elif test "$CL_X64" == "" -a -f "$_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -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
+
if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
fi
@@ -3256,23 +3285,6 @@ if test "$SOLAR_JAVA" != ""; then
dnl java -version sends output to stderr!
if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
-# dnl Kaffe specific tests
-# KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"`
-# if test -z "$KAFFE_VER"; then
-# AC_MSG_ERROR([looks like Kaffe but version detection failed])
-# fi
-# _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
-# if test "$_kaffe_ver" -lt 10100; then
-# AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0])
-# fi
-# JDK=kaffe
-#
-# dnl TODO: define some project exclusion variables
-#
-# AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)])
-# AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile])
-# echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
-# JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
JDK=gcj
AC_MSG_RESULT([checked (gcj)])
commit b1f7644461d1bec6e83e0da8aaa66106940edfec
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jan 26 17:06:30 2011 +0200
Drop CWS-related and "Heiner's proprietary" code
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 833edee..fc841eb 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -53,10 +53,6 @@
unshift(@INC, "$ENV{COMMON_ENV_TOOLS}/modules");
$in_so_env++;
};
- if (defined $ENV{CWS_WORK_STAMP}) {
- require GenInfoParser; import GenInfoParser;
- require IO::Handle; import IO::Handle;
- };
my $verbose_mode = 0;
if (defined $ENV{verbose} || defined $ENV{VERBOSE}) {
$verbose_mode = ($ENV{verbose} =~ /^t\S*$/i);
@@ -2206,21 +2202,6 @@ sub provide_consistency {
};
#
-# Get the workspace list ('stand.lst'), either from 'localini'
-# or, if this is not possible, from 'globalini.
-# (Heiner's proprietary :)
-#
-sub get_workspace_lst
-{
- my $home = $ENV{HOME};
- my $inifile = $ENV{HOME}. '/localini/stand.lst';
- if (-f $inifile) {
- return $inifile;
- };
- return '';
-}
-
-#
# Procedure clears up module for incompatible build
#
sub ensure_clear_module {
@@ -2504,27 +2485,6 @@ sub get_modules_passed {
};
};
-sub get_workspace_platforms {
- my $workspace_patforms = shift;
- my $solver_path = $ENV{SOLARVERSION};
- opendir(SOLVERDIR, $solver_path);
- @dir_list = readdir(SOLVERDIR);
- close SOLVERDIR;
- foreach (@dir_list) {
- next if /^common/;
- next if /^\./;
- if (open(LS, "ls $solver_path/$_/inc/*minor.mk 2>$nul |")) {
- foreach my $string (<LS>) {
- chomp $string;
- if ($string =~ /minor.mk$/) {
- $$workspace_patforms{$_}++
- };
- };
- close LS;
- };
- };
-};
-
sub get_platforms {
my $platforms_ref = shift;
if ($only_platform) {
@@ -2534,27 +2494,6 @@ sub get_platforms {
$platforms_ref = \%platforms_to_copy;
};
- my $workspace_lst = get_workspace_lst();
- if ($workspace_lst) {
- my $workspace_db;
- eval { $workspace_db = GenInfoParser->new(); };
- if (!$@) {
- my $success = $workspace_db->load_list($workspace_lst);
- if ( !$success ) {
- print_error("Can't load workspace list '$workspace_lst'.", 4);
- }
- my $access_path = $ENV{WORK_STAMP} . '/Environments';
- my @platforms_available = $workspace_db->get_keys($access_path);
- my $solver = $ENV{SOLARVERSION};
- foreach (@platforms_available) {
- my $s_path = $solver . '/' . $_;
- $$platforms_ref{$_}++ if (-d $s_path);
- };
- } else {
- get_workspace_platforms(\%platforms);
- };
- };
-
if (!scalar keys %platforms) {
# An Auses wish - fallback to INPATH for new platforms
if (defined $ENV{INPATH}) {
More information about the Libreoffice-commits
mailing list