--- configure.jpackagecompat 2009-05-01 06:11:11.000000000 +0200
+++ configure 2009-06-30 00:44:32.000000000 +0200
@@ -43,6 +43,7 @@
#
my $os;
+my $vmlayout;
my $quiet;
# There's nothing worse than having an old config file, getting half way
@@ -654,6 +655,12 @@
output "\n";
+if ( -f "/etc/java/jpackage-release" ) {
+ $vmlayout = "jpackage";
+} else {
+ $vmlayout = "unknown";
+}
+
# --------------------------------------------------------------------
# Specify locations of dependencies, by operating system, and
# verify pre-requisites are present.
@@ -857,9 +864,17 @@
my $javah;
my $jar;
my $javadoc;
-
+if ($vmlayout eq "jpackage") {
+ my $vendor = "System";
+ check_compiler($javac, "$vendor javac", "/usr/bin/javac", "-g -source 5 -target 5");
+ check_jni_header_generator($javah, "$vendor javah", "/usr/bin/javah", "-jni");
+ check_jar($jar, "System jar", "/usr/bin/jar", "");
+ check_javadoc($javadoc, "$vendor javadoc", "/usr/bin/javadoc", "");
+} else {
+ output "Unknown VM layout, trying OS-specific routines\n";
+}
+if (!$javac) {
if ($os eq "gentoo") {
-
if ( ! -x "/usr/bin/java-config") {
bail "", "INTERNAL ERROR couldn't find java-config";
}
@@ -1245,6 +1260,7 @@
} else {
bail "failed!", "This OS not configured with a workable Java compiler checks!\nTHIS IS AN INTERNAL ERROR, PLEASE FILE A BUG.";
}
+}
output "\n";
@@ -1261,6 +1277,13 @@
my $cacao;
my $jamvm;
+if ($vmlayout eq "jpackage") {
+ my $vendor = "System";
+ check_runtime($java, "$vendor javac", "/usr/bin/java", "-client -ea");
+} else {
+ output "Unknown VM layout, trying OS-specific routines\n";
+}
+if (!$java) {
if ($os eq "gentoo") {
# check java (the one specified by Gentoo's java-config tool)
# Is there any actual scenario where the javac would be from one
@@ -1641,6 +1664,7 @@
} else {
bail "failed!", "This OS not configured with appropriate Java VM checks!\nTHIS IS AN INTERNAL ERROR, PLEASE FILE A BUG.";
}
+}
output "\n";
@@ -1865,7 +1889,15 @@
my $jni_include = "";
my $java_home = dirname($java);
+ my $java_home;
+ if ($vmlayout = "jpackage") {
+ $java_home = dirname(`readlink /etc/alternatives/javac`);
+ chomp($java_home);
+ } else {
+ $java_home = dirname($java);
+ }
$java_home =~ s/\/bin$//;
+ output "Using Java SDK home: $java_home\n";
if (!-d "$java_home"."/include") {
$java_home =~ s/\/jre//;