configure: log JAR detected version 75/20275/1
Clément DAVID [Mon, 16 Jul 2018 14:27:17 +0000 (16:27 +0200)]
 1. be more verbose on config.log
 2. detect MANIFEST Specification-Version

Change-Id: I6bf7bdb08197a1676ef82805240822dabdcdca03

scilab/configure
scilab/configure.ac
scilab/m4/java-thirdparty.m4

index b9691ce..47bbc2a 100755 (executable)
@@ -13760,26 +13760,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -13791,10 +13802,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -13808,10 +13819,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -13890,7 +13902,7 @@ $as_echo_n "checking jgraphx... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 13893 "configure"
+// #line 13905 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -13949,26 +13961,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -13980,10 +14003,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -13997,10 +14020,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -14069,11 +14093,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker jgraphx com.mxgraph.view.mxGraph $jar_resolved VERSION 2.0.0.1 "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"jgraphx\" \"com.mxgraph.view.mxGraph\" \"$jar_resolved\" \"VERSION\" \"2.0.0.1\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -14111,7 +14138,7 @@ $as_echo_n "checking scirenderer... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 14114 "configure"
+// #line 14141 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -14170,26 +14197,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -14201,10 +14239,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -14218,10 +14256,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -14290,11 +14329,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker scirenderer org.scilab.forge.scirenderer.PackageInfo $jar_resolved VERSION 1.1.0 "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"scirenderer\" \"org.scilab.forge.scirenderer.PackageInfo\" \"$jar_resolved\" \"VERSION\" \"1.1.0\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -14338,7 +14380,7 @@ $as_echo_n "checking flexdock... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 14341 "configure"
+// #line 14383 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -14397,26 +14439,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -14428,10 +14481,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -14445,10 +14498,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -14517,11 +14571,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker flexdock org.flexdock.util.Utilities $jar_resolved VERSION 1.2.4 "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"flexdock\" \"org.flexdock.util.Utilities\" \"$jar_resolved\" \"VERSION\" \"1.2.4\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -14557,7 +14614,7 @@ $as_echo_n "checking looks... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 14560 "configure"
+// #line 14617 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -14616,26 +14673,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -14647,10 +14715,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -14664,10 +14732,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -14736,11 +14805,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker looks com.jgoodies.looks.common.MenuItemRenderer $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"looks\" \"com.jgoodies.looks.common.MenuItemRenderer\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -14776,7 +14848,7 @@ $as_echo_n "checking jgoodies-looks... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 14779 "configure"
+// #line 14851 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -14835,26 +14907,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -14866,10 +14949,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -14883,10 +14966,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -14955,11 +15039,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker jgoodies-looks com.jgoodies.looks.common.MenuItemRenderer $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"jgoodies-looks\" \"com.jgoodies.looks.common.MenuItemRenderer\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -14996,7 +15083,7 @@ $as_echo_n "checking skinlf... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 14999 "configure"
+// #line 15086 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -15055,26 +15142,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -15086,10 +15184,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -15103,10 +15201,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -15175,11 +15274,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker skinlf com.l2fprod.util.AccessUtils $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"skinlf\" \"com.l2fprod.util.AccessUtils\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -15215,7 +15317,7 @@ $as_echo_n "checking jogl2... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 15218 "configure"
+// #line 15320 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -15274,26 +15376,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -15305,10 +15418,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -15322,10 +15435,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -15394,11 +15508,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker jogl2 javax.media.opengl.glu.GLUnurbs $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"jogl2\" \"javax.media.opengl.glu.GLUnurbs\" \"$jar_resolved\" \"\" \"2.2\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -15419,168 +15536,6 @@ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar jogl2 used
                 JOGL2=$PACKAGE_JAR_FILE
 
 
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (Specification-Version 2.2) of jogl2" >&5
-$as_echo_n "checking minimal version (Specification-Version 2.2) of jogl2... " >&6; }
-    export JARFILE=$JOGL2;
-    if test "x" == "x"; then
-
-    cat << \EOF > conftest.java
-// #line 15429 "configure"
-import java.util.regex.Pattern;
-
-import java.io.IOException;
-import java.util.jar.JarFile;
-
-public class conftest {
-    public static void main(String[] argv) {
-        String minVersion="2.2";
-        try {
-            String version = new JarFile(System.getenv("JARFILE")).getManifest().getMainAttributes().getValue("Specification-Version");
-            System.out.println(version);
-            if (compare(minVersion, version) > 0) {
-                System.exit(-1);
-            }
-        } catch (IOException e) {
-            System.err.println(e.getMessage());
-            System.exit(1);
-        }
-    }
-
-    private static int compare(String v1, String v2) {
-        String s1 = normalisedVersion(v1);
-        String s2 = normalisedVersion(v2);
-        return s1.compareTo(s2);
-    }
-
-    private static String normalisedVersion(String version) {
-        return normalisedVersion(version, ".", 4);
-    }
-
-    private static String normalisedVersion(String version, String sep, int maxWidth) {
-        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
-        StringBuilder sb = new StringBuilder();
-        for (String s : split) {
-            sb.append(String.format("%" + maxWidth + 's', s));
-        }
-        return sb.toString();
-    }
-}
-EOF
-
-    CLASSPATH=$ac_java_classpath
-    export CLASSPATH
-    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
-    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
-       if test ""yes"" = "no"; then
-           echo "yes" >&5
-              echo "yes"
-       else
-              cmd="$JAVA conftest"
-              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
-               echo "yes" >&5
-                  echo "yes"
-            else
-                echo "configure: failed program was:" >&5
-                cat conftest.java >&5
-                if test -s conftest.java.output; then
-                   STDOUT=`cat conftest.java.output`
-                fi
-                echo "configure: CLASSPATH was $CLASSPATH" >&5
-                  as_fn_error $? "Wrong version of jogl2. Expected at least 2.2. Found $STDOUT" "$LINENO" 5
-                            fi
-        fi
-        if test -f conftest.java.output; then
-           rm conftest.java.output
-        fi
-    else
-        echo "configure: failed program was:" >&5
-        cat conftest.java >&5
-        echo "configure: CLASSPATH was $CLASSPATH" >&5
-          as_fn_error $? "Wrong version of jogl2. Expected at least 2.2. Found $STDOUT" "$LINENO" 5
-            fi
-
-    else
-
-    cat << \EOF > conftest.java
-// #line 15506 "configure"
-import java.util.regex.Pattern;
-
-import java.io.IOException;
-import java.util.jar.JarFile;
-
-public class conftest {
-    public static void main(String[] argv) {
-        String minVersion="2.2";
-        try {
-            String version = new JarFile(System.getenv("JARFILE")).getManifest().getMainAttributes().getValue("Specification-Version");
-            System.out.println("Specification-Version" + ": " + version);
-            if (compare(minVersion, version) != 0) {
-                System.exit(-1);
-            }
-        } catch (IOException e) {
-            System.err.println(e.getMessage());
-            System.exit(1);
-        }
-    }
-
-    private static int compare(String v1, String v2) {
-        String s1 = normalisedVersion(v1);
-        String s2 = normalisedVersion(v2);
-        return s1.compareTo(s2);
-    }
-
-    private static String normalisedVersion(String version) {
-        return normalisedVersion(version, ".", 4);
-    }
-
-    private static String normalisedVersion(String version, String sep, int maxWidth) {
-        String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
-        StringBuilder sb = new StringBuilder();
-        for (String s : split) {
-            sb.append(String.format("%" + maxWidth + 's', s));
-        }
-        return sb.toString();
-    }
-}
-EOF
-
-    CLASSPATH=$ac_java_classpath
-    export CLASSPATH
-    cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
-    if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
-       if test ""yes"" = "no"; then
-           echo "yes" >&5
-              echo "yes"
-       else
-              cmd="$JAVA conftest"
-              if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
-               echo "yes" >&5
-                  echo "yes"
-            else
-                echo "configure: failed program was:" >&5
-                cat conftest.java >&5
-                if test -s conftest.java.output; then
-                   STDOUT=`cat conftest.java.output`
-                fi
-                echo "configure: CLASSPATH was $CLASSPATH" >&5
-                  as_fn_error $? "Wrong version of jogl2. Expected exact version Specification-Version. Found $STDOUT" "$LINENO" 5
-                            fi
-        fi
-        if test -f conftest.java.output; then
-           rm conftest.java.output
-        fi
-    else
-        echo "configure: failed program was:" >&5
-        cat conftest.java >&5
-        echo "configure: CLASSPATH was $CLASSPATH" >&5
-          as_fn_error $? "Wrong version of jogl2. Expected exact version Specification-Version. Found $STDOUT" "$LINENO" 5
-            fi
-
-    fi
-    unset JARFILE
-
-
                 if test "$MACOSX" = 1; then
                    echo "Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X"
                 else
@@ -15702,7 +15657,7 @@ $as_echo_n "checking gluegen2-rt... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 15705 "configure"
+// #line 15660 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -15761,26 +15716,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -15792,10 +15758,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -15809,10 +15775,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -15881,11 +15848,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker gluegen2-rt jogamp.common.os.MachineDescriptionRuntime $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"gluegen2-rt\" \"jogamp.common.os.MachineDescriptionRuntime\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -15978,7 +15948,7 @@ $as_echo_n "checking jhall... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 15981 "configure"
+// #line 15951 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -16037,26 +16007,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -16068,10 +16049,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -16085,10 +16066,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -16157,11 +16139,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker jhall javax.help.JHelp $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"jhall\" \"javax.help.JHelp\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -16195,7 +16180,7 @@ $as_echo_n "checking javahelp2... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 16198 "configure"
+// #line 16183 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -16254,26 +16239,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -16285,10 +16281,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -16302,10 +16298,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -16374,11 +16371,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker javahelp2 javax.help.JHelp $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"javahelp2\" \"javax.help.JHelp\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -16474,26 +16474,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -16505,10 +16516,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -16522,10 +16533,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -16594,11 +16606,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker lucene-core org.apache.lucene.LucenePackage $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"lucene-core\" \"org.apache.lucene.LucenePackage\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -16634,7 +16649,7 @@ $as_echo_n "checking lucene-analyzers-common... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 16637 "configure"
+// #line 16652 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -16693,26 +16708,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -16724,10 +16750,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -16741,10 +16767,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -16813,11 +16840,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker lucene-analyzers-common org.apache.lucene.analysis.standard.StandardAnalyzer $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"lucene-analyzers-common\" \"org.apache.lucene.analysis.standard.StandardAnalyzer\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -16825,10 +16855,10 @@ $as_echo "$PACKAGE_JAR_FILE" >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
       if test "" = "yes"; then
-         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar lucene-analyzers-common used by StandardAnalyzer (looking for package org.apache.lucene.analysis.standard.StandardAnalyzer)" >&5
-$as_echo "$as_me: WARNING: Could not find or use the Java package/jar lucene-analyzers-common used by StandardAnalyzer (looking for package org.apache.lucene.analysis.standard.StandardAnalyzer)" >&2;}
+         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar lucene-analyzers-common used by Lucene StandardAnalyzer (looking for package org.apache.lucene.analysis.standard.StandardAnalyzer)" >&5
+$as_echo "$as_me: WARNING: Could not find or use the Java package/jar lucene-analyzers-common used by Lucene StandardAnalyzer (looking for package org.apache.lucene.analysis.standard.StandardAnalyzer)" >&2;}
       else
-          as_fn_error $? "Could not find or use the Java package/jar lucene-analyzers-common used by StandardAnalyzer (looking for package org.apache.lucene.analysis.standard.StandardAnalyzer)" "$LINENO" 5
+          as_fn_error $? "Could not find or use the Java package/jar lucene-analyzers-common used by Lucene StandardAnalyzer (looking for package org.apache.lucene.analysis.standard.StandardAnalyzer)" "$LINENO" 5
       fi
     fi
     if test -f conftestSharedChecker.java.output; then
@@ -16853,7 +16883,7 @@ $as_echo_n "checking lucene-queryparser... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 16856 "configure"
+// #line 16886 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -16912,26 +16942,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -16943,10 +16984,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -16960,10 +17001,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -17032,11 +17074,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker lucene-queryparser org.apache.lucene.queryparser.classic.QueryParser $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"lucene-queryparser\" \"org.apache.lucene.queryparser.classic.QueryParser\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -17044,10 +17089,10 @@ $as_echo "$PACKAGE_JAR_FILE" >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
       if test "" = "yes"; then
-         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar lucene-queryparser used by QueryParser (looking for package org.apache.lucene.queryparser.classic.QueryParser)" >&5
-$as_echo "$as_me: WARNING: Could not find or use the Java package/jar lucene-queryparser used by QueryParser (looking for package org.apache.lucene.queryparser.classic.QueryParser)" >&2;}
+         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar lucene-queryparser used by Lucene QueryParser (looking for package org.apache.lucene.queryparser.classic.QueryParser)" >&5
+$as_echo "$as_me: WARNING: Could not find or use the Java package/jar lucene-queryparser used by Lucene QueryParser (looking for package org.apache.lucene.queryparser.classic.QueryParser)" >&2;}
       else
-          as_fn_error $? "Could not find or use the Java package/jar lucene-queryparser used by QueryParser (looking for package org.apache.lucene.queryparser.classic.QueryParser)" "$LINENO" 5
+          as_fn_error $? "Could not find or use the Java package/jar lucene-queryparser used by Lucene QueryParser (looking for package org.apache.lucene.queryparser.classic.QueryParser)" "$LINENO" 5
       fi
     fi
     if test -f conftestSharedChecker.java.output; then
@@ -17072,7 +17117,7 @@ $as_echo_n "checking jrosetta-API... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 17075 "configure"
+// #line 17120 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -17131,26 +17176,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -17162,10 +17218,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -17179,10 +17235,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -17251,11 +17308,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker jrosetta-API com.artenum.rosetta.interfaces.core.ConsoleConfiguration $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"jrosetta-API\" \"com.artenum.rosetta.interfaces.core.ConsoleConfiguration\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -17288,7 +17348,7 @@ $as_echo_n "checking jrosetta-api... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 17291 "configure"
+// #line 17351 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -17347,26 +17407,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -17378,10 +17449,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -17395,10 +17466,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -17467,11 +17539,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker jrosetta-api com.artenum.rosetta.interfaces.core.ConsoleConfiguration $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"jrosetta-api\" \"com.artenum.rosetta.interfaces.core.ConsoleConfiguration\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -17508,7 +17583,7 @@ $as_echo_n "checking jrosetta-engine... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 17511 "configure"
+// #line 17586 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -17567,26 +17642,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -17598,10 +17684,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -17615,10 +17701,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -17687,11 +17774,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker jrosetta-engine com.artenum.rosetta.util.ConfigurationBuilder $jar_resolved getVersion 1.0.4 "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"jrosetta-engine\" \"com.artenum.rosetta.util.ConfigurationBuilder\" \"$jar_resolved\" \"getVersion\" \"1.0.4\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -17729,7 +17819,7 @@ $as_echo_n "checking jeuclid-core... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 17732 "configure"
+// #line 17822 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -17788,26 +17878,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -17819,10 +17920,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -17836,10 +17937,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -17908,11 +18010,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker jeuclid-core net.sourceforge.jeuclid.LayoutContext $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"jeuclid-core\" \"net.sourceforge.jeuclid.LayoutContext\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -17950,7 +18055,7 @@ $as_echo_n "checking fop... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 17953 "configure"
+// #line 18058 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -18009,26 +18114,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -18040,10 +18156,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -18057,10 +18173,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -18129,11 +18246,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker fop org.apache.fop.pdf.PDFInfo $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"fop\" \"org.apache.fop.pdf.PDFInfo\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -18176,7 +18296,7 @@ $as_echo_n "checking freehep-graphics2d... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 18179 "configure"
+// #line 18299 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -18235,26 +18355,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -18266,10 +18397,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -18283,10 +18414,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -18355,11 +18487,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker freehep-graphics2d org.freehep.graphics2d.VectorGraphics $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"freehep-graphics2d\" \"org.freehep.graphics2d.VectorGraphics\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -18395,7 +18530,7 @@ $as_echo_n "checking freehep-graphicsio... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 18398 "configure"
+// #line 18533 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -18454,26 +18589,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -18485,10 +18631,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -18502,10 +18648,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -18574,11 +18721,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker freehep-graphicsio org.freehep.graphicsio.VectorGraphicsIO $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"freehep-graphicsio\" \"org.freehep.graphicsio.VectorGraphicsIO\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -18614,7 +18764,7 @@ $as_echo_n "checking freehep-graphicsio-emf... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 18617 "configure"
+// #line 18767 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -18673,26 +18823,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -18704,10 +18865,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -18721,10 +18882,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -18793,11 +18955,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker freehep-graphicsio-emf org.freehep.graphicsio.emf.EMFGraphics2D $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"freehep-graphicsio-emf\" \"org.freehep.graphicsio.emf.EMFGraphics2D\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -18833,7 +18998,7 @@ $as_echo_n "checking freehep-io... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 18836 "configure"
+// #line 19001 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -18892,26 +19057,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -18923,10 +19099,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -18940,10 +19116,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -19012,11 +19189,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker freehep-io org.freehep.util.io.XMLSequence $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"freehep-io\" \"org.freehep.util.io.XMLSequence\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -19052,7 +19232,7 @@ $as_echo_n "checking freehep-util... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 19055 "configure"
+// #line 19235 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -19111,26 +19291,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -19142,10 +19333,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -19159,10 +19350,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -19231,11 +19423,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker freehep-util org.freehep.util.StringUtilities $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"freehep-util\" \"org.freehep.util.StringUtilities\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -19272,7 +19467,7 @@ $as_echo_n "checking batik-all... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 19275 "configure"
+// #line 19470 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -19331,26 +19526,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -19362,10 +19568,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -19379,10 +19585,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -19451,11 +19658,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker batik-all org.apache.batik.Version $jar_resolved getVersion 1.8 "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"batik-all\" \"org.apache.batik.Version\" \"$jar_resolved\" \"getVersion\" \"1.8\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -19491,7 +19701,7 @@ $as_echo_n "checking batik... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 19494 "configure"
+// #line 19704 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -19550,26 +19760,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -19581,10 +19802,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -19598,10 +19819,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -19670,11 +19892,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker batik org.apache.batik.Version $jar_resolved getVersion 1.8 "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"batik\" \"org.apache.batik.Version\" \"$jar_resolved\" \"getVersion\" \"1.8\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -19711,7 +19936,7 @@ $as_echo_n "checking commons-io... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 19714 "configure"
+// #line 19939 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -19770,26 +19995,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -19801,10 +20037,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -19818,10 +20054,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -19890,11 +20127,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker commons-io org.apache.commons.io.output.CountingOutputStream $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"commons-io\" \"org.apache.commons.io.output.CountingOutputStream\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -19930,7 +20170,7 @@ $as_echo_n "checking xmlgraphics-commons... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 19933 "configure"
+// #line 20173 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -19989,26 +20229,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -20020,10 +20271,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -20037,10 +20288,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -20109,11 +20361,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker xmlgraphics-commons org.apache.xmlgraphics.util.Service $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"xmlgraphics-commons\" \"org.apache.xmlgraphics.util.Service\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -20149,7 +20404,7 @@ $as_echo_n "checking avalon-framework... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 20152 "configure"
+// #line 20407 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -20208,26 +20463,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -20239,10 +20505,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -20256,10 +20522,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -20328,11 +20595,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker avalon-framework org.apache.avalon.framework.configuration.ConfigurationException $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"avalon-framework\" \"org.apache.avalon.framework.configuration.ConfigurationException\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -20368,7 +20638,7 @@ $as_echo_n "checking xml-apis-ext... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 20371 "configure"
+// #line 20641 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -20427,26 +20697,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -20458,10 +20739,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -20475,10 +20756,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -20547,11 +20829,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker xml-apis-ext org.w3c.dom.svg.SVGDocument $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"xml-apis-ext\" \"org.w3c.dom.svg.SVGDocument\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -20587,7 +20872,7 @@ $as_echo_n "checking xml-commons-apis-ext... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 20590 "configure"
+// #line 20875 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -20646,26 +20931,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -20677,10 +20973,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -20694,10 +20990,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -20766,11 +21063,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker xml-commons-apis-ext org.w3c.dom.svg.SVGDocument $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"xml-commons-apis-ext\" \"org.w3c.dom.svg.SVGDocument\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -20810,7 +21110,7 @@ $as_echo_n "checking commons-logging... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 20813 "configure"
+// #line 21113 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -20869,26 +21169,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -20900,10 +21211,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -20917,10 +21228,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -20989,11 +21301,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker commons-logging org.apache.commons.logging.LogFactory $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"commons-logging\" \"org.apache.commons.logging.LogFactory\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -21029,7 +21344,7 @@ $as_echo_n "checking jlatexmath... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 21032 "configure"
+// #line 21347 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -21088,26 +21403,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -21119,10 +21445,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -21136,10 +21462,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -21208,11 +21535,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker jlatexmath org.scilab.forge.jlatexmath.TeXFormula $jar_resolved VERSION 1.0.3 "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"jlatexmath\" \"org.scilab.forge.jlatexmath.TeXFormula\" \"$jar_resolved\" \"VERSION\" \"1.0.3\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -21248,7 +21578,7 @@ $as_echo_n "checking jlatexmath-fop... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 21251 "configure"
+// #line 21581 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -21307,26 +21637,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -21338,10 +21679,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -21355,10 +21696,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -21427,11 +21769,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker jlatexmath-fop org.scilab.forge.jlatexmath.fop.JLaTeXMathObj $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"jlatexmath-fop\" \"org.scilab.forge.jlatexmath.fop.JLaTeXMathObj\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -21473,7 +21818,7 @@ $as_echo_n "checking checkstyle... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 21476 "configure"
+// #line 21821 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -21532,26 +21877,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -21563,10 +21919,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -21580,10 +21936,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -21652,11 +22009,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker checkstyle com.puppycrawl.tools.checkstyle.CheckStyleTask $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"checkstyle\" \"com.puppycrawl.tools.checkstyle.CheckStyleTask\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -21692,7 +22052,7 @@ $as_echo_n "checking commons-beanutils... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 21695 "configure"
+// #line 22055 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -21751,26 +22111,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -21782,10 +22153,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -21799,10 +22170,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -21871,11 +22243,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker commons-beanutils org.apache.commons.beanutils.Converter $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"commons-beanutils\" \"org.apache.commons.beanutils.Converter\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -21911,7 +22286,7 @@ $as_echo_n "checking antlr... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 21914 "configure"
+// #line 22289 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -21970,26 +22345,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -22001,10 +22387,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -22018,10 +22404,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -22090,11 +22477,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker antlr antlr.TokenStreamException $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"antlr\" \"antlr.TokenStreamException\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -22130,7 +22520,7 @@ $as_echo_n "checking junit4... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 22133 "configure"
+// #line 22523 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -22189,26 +22579,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -22220,10 +22621,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -22237,10 +22638,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -22309,11 +22711,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker junit4 org.junit.Assert $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"junit4\" \"org.junit.Assert\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -22346,7 +22751,7 @@ $as_echo_n "checking junit... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 22349 "configure"
+// #line 22754 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -22405,26 +22810,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -22436,10 +22852,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -22453,10 +22869,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -22525,11 +22942,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker junit org.junit.Assert $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"junit\" \"org.junit.Assert\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -22569,7 +22989,7 @@ $as_echo_n "checking hamcrest-all... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 22572 "configure"
+// #line 22992 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -22628,26 +23048,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -22659,10 +23090,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -22676,10 +23107,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -22748,11 +23180,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker hamcrest-all org.hamcrest.core.IsNull $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"hamcrest-all\" \"org.hamcrest.core.IsNull\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -22785,7 +23220,7 @@ $as_echo_n "checking hamcrest/all... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 22788 "configure"
+// #line 23223 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -22844,26 +23279,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -22875,10 +23321,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -22892,10 +23338,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -22964,11 +23411,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker hamcrest/all org.hamcrest.core.IsNull $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"hamcrest/all\" \"org.hamcrest.core.IsNull\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -23005,7 +23455,7 @@ $as_echo_n "checking cobertura... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 23008 "configure"
+// #line 23458 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -23064,26 +23514,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -23095,10 +23556,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -23112,10 +23573,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -23184,11 +23646,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker cobertura net.sourceforge.cobertura.merge.Main $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"cobertura\" \"net.sourceforge.cobertura.merge.Main\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -23224,7 +23689,7 @@ $as_echo_n "checking asm3... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 23227 "configure"
+// #line 23692 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -23283,26 +23748,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -23314,10 +23790,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -23331,10 +23807,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -23403,11 +23880,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker asm3 org.objectweb.asm.Type $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"asm3\" \"org.objectweb.asm.Type\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -23440,7 +23920,7 @@ $as_echo_n "checking asm... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 23443 "configure"
+// #line 23923 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -23499,26 +23979,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -23530,10 +24021,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -23547,10 +24038,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -23619,11 +24111,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker asm org.objectweb.asm.Type $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"asm\" \"org.objectweb.asm.Type\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -23659,7 +24154,7 @@ $as_echo_n "checking ecj... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 23662 "configure"
+// #line 24157 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -23718,26 +24213,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -23749,10 +24255,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -23766,10 +24272,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -23838,11 +24345,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker ecj org.eclipse.jdt.core.compiler.batch.BatchCompiler $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"ecj\" \"org.eclipse.jdt.core.compiler.batch.BatchCompiler\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -28045,7 +28555,7 @@ CHK_EIGEN_MINOR=2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Eigen is version $CHK_EIGEN_WORLD.$CHK_EIGEN_MAJOR.$CHK_EIGEN_MINOR or later" >&5
 $as_echo_n "checking if Eigen is version $CHK_EIGEN_WORLD.$CHK_EIGEN_MAJOR.$CHK_EIGEN_MINOR or later... " >&6; }
 cat > conftest.$ac_ext <<EOF
-#line 28048 "configure"
+#line 28558 "configure"
 #include "confdefs.h"
 
 #include "$PATH_TO_EIGEN/Eigen/Sparse"
@@ -32722,7 +33232,7 @@ CPPFLAGS="$CPPFLAGS -I$CHK_TCL_INCLUDE_PATH"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later" >&5
 $as_echo_n "checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later... " >&6; }
 cat > conftest.$ac_ext <<EOF
-#line 32725 "configure"
+#line 33235 "configure"
 #include "confdefs.h"
 
 #include "$CHK_TCL_INCLUDE_PATH/$CHK_TCL_INC_NAME"
@@ -33033,7 +33543,7 @@ CPPFLAGS="$CPPFLAGS $TCL_INC_PATH -I$CHK_TK_INCLUDE_PATH $X_CFLAGS"
 $as_echo_n "checking if tk is version $CHK_TK_MAJOR.$CHK_TK_MINOR or later... " >&6; }
 
 cat > conftest.$ac_ext <<EOF
-#line 33036 "configure"
+#line 33546 "configure"
 #include "confdefs.h"
 
 #include "$CHK_TK_INCLUDE_PATH/$CHK_TK_INC_NAME"
@@ -33622,7 +34132,7 @@ $as_echo_n "checking saxon9he... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 33625 "configure"
+// #line 34135 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -33681,26 +34191,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -33712,10 +34233,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -33729,10 +34250,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -33801,11 +34323,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker saxon9he net.sf.saxon.Version $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"saxon9he\" \"net.sf.saxon.Version\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -33839,7 +34364,7 @@ $as_echo_n "checking saxon... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 33842 "configure"
+// #line 34367 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -33898,26 +34423,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -33929,10 +34465,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -33946,10 +34482,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -34018,11 +34555,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker saxon net.sf.saxon.Version $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"saxon\" \"net.sf.saxon.Version\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -34057,7 +34597,7 @@ $as_echo_n "checking saxon... " >&6; }
     if test ! -f conftestSharedChecker.class ; then
 
     cat << \EOF > conftestSharedChecker.java
-// #line 34060 "configure"
+// #line 34600 "configure"
 import java.util.regex.Pattern;
 import java.io.File;
 import java.io.IOException;
@@ -34116,26 +34656,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
 
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[3])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
 
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[3];
         final String expected = argv[4];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[5])) {
             atLeastOrEqual = argv[5];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
+
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
 
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -34147,10 +34698,10 @@ public class conftestSharedChecker {
                 }
 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -34164,10 +34715,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
 
         switch(atLeastOrEqual) {
             case ">":
@@ -34236,11 +34788,14 @@ EOF
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker saxon com.icl.saxon.Loader $jar_resolved   "
+    echo "CLASSPATH="$CLASSPATH >&5
+    cmd="$JAVA conftestSharedChecker \"saxon\" \"com.icl.saxon.Loader\" \"$jar_resolved\" \"\" \"\" \"\""
     if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
-$as_echo "$PACKAGE_JAR_FILE" >&6; }
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result:  $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&5
+$as_echo " $PACKAGE_JAR_FILE\" \"$PACKAGE_JAR_VERSION " >&6; }
         echo "yes" >&5
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
index e2bfb76..c4fc4c8 100644 (file)
@@ -951,12 +951,10 @@ if test "$with_javasci" != no -o "$with_gui" != no -o "$enable_build_help" != no
                 AC_SUBST(SKINLF)
 
                 # JOGL 2
-                AC_JAVA_CHECK_JAR([jogl2],[javax.media.opengl.glu.GLUnurbs],[Scilab 3D rendering - Version 2.0])
+                AC_JAVA_CHECK_JAR([jogl2],[javax.media.opengl.glu.GLUnurbs],[Scilab 3D rendering - Version 2.0], [], [], [2.2])
                 JOGL2=$PACKAGE_JAR_FILE
                 AC_SUBST(JOGL2)
 
-                AC_JAVA_CHECK_VERSION_MANIFEST([jogl2],$JOGL2,[2.2],[Specification-Version])
-
                 if test "$MACOSX" = 1; then
                    echo "Check of the presence of libjogl.jnilib and libjogl_awt.jnilib disabled under Mac OS X"
                 else
@@ -1017,12 +1015,12 @@ interface for JOGL2 - or libGL (OpenGL library) are installed and if the version
                 AC_SUBST(LUCENE)
 
                 # Lucene Apache - analyzers-common
-                AC_JAVA_CHECK_JAR([lucene-analyzers-common],[org.apache.lucene.analysis.standard.StandardAnalyzer],[StandardAnalyzer])
+                AC_JAVA_CHECK_JAR([lucene-analyzers-common],[org.apache.lucene.analysis.standard.StandardAnalyzer],[Lucene StandardAnalyzer])
                 LUCENE_ANALYZER=$PACKAGE_JAR_FILE
                 AC_SUBST(LUCENE_ANALYZER)
 
                 # Lucene Apache - lucene-queryparser
-                AC_JAVA_CHECK_JAR([lucene-queryparser],[org.apache.lucene.queryparser.classic.QueryParser],[QueryParser])
+                AC_JAVA_CHECK_JAR([lucene-queryparser],[org.apache.lucene.queryparser.classic.QueryParser],[Lucene QueryParser])
                 LUCENE_PARSER=$PACKAGE_JAR_FILE
                 AC_SUBST(LUCENE_PARSER)
 
index 1618f05..ceea152 100644 (file)
@@ -17,7 +17,7 @@ dnl
 # AC_JAVA_COMPILE_CHECKER_CLASS (internally used)
 #
 # Compile a shared conftestSharedChecker.java class that will be used by 
-# AC_JAVA_CHECK_PACKAGE later. Using only one shared class to check all 
+# AC_JAVA_CHECK_JAR later. Using only one shared class to check all 
 # java package slightly reduce the configure time.
 #
 # Arguments: None
@@ -86,26 +86,37 @@ public class conftestSharedChecker {
         String path = pathURL.substring(pathURL.indexOf(':') + 1);
         System.err.println("found: " + path);
         
-        if (argv.length > 3) {
-            checkVersion(klass, argv);
+        String version;
+        if (!"".equals(argv[[3]])) {
+            version = checkVersion(klass, argv);
+        } else {
+            version = klass.getPackage().getSpecificationVersion();
         }
         
-        System.out.println(path);
+        System.out.println(path + " " + version);
     }
 
-    private static void checkVersion(Class<?> klass, String[[]] argv) throws SecurityException, IllegalArgumentException {
+    private static String checkVersion(Class<?> klass, String[[]] argv) throws SecurityException, IllegalArgumentException {
         final String versionMethod = argv[[3]];
         final String expected = argv[[4]];
         final String atLeastOrEqual;
-        if (argv.length > 5)
+        if (!"".equals(argv[[5]])) {
             atLeastOrEqual = argv[[5]];
-        else
+        } else {
             atLeastOrEqual = "<=";
+        }
         
+        String value = "";
+        if (versionMethod.isEmpty()) {
+            value = klass.getPackage().getSpecificationVersion();
+            compareAndDisplay(atLeastOrEqual, expected, value);
+            return value;
+        }
+
         try {
             try {
                 Field field = klass.getField(versionMethod);
-                Object value = field.get(null);
+                value = String.valueOf(field.get(null));
                 compareAndDisplay(atLeastOrEqual, expected, value);
             } catch (NoSuchFieldException fe) {
                 Method method = null;
@@ -117,10 +128,10 @@ public class conftestSharedChecker {
                 }
                 
                 try {
-                    Object value = method.invoke(null);
+                    value = String.valueOf(method.invoke(null));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 } catch (NullPointerException ex) {
-                    Object value = method.invoke(klass.newInstance());
+                    value = String.valueOf(method.invoke(klass.newInstance()));
                     compareAndDisplay(atLeastOrEqual, expected, value);
                 }
             }
@@ -134,10 +145,11 @@ public class conftestSharedChecker {
             System.err.println(ex);
             System.exit(-2);
         }
+        return value;
     }
 
-    private static void compareAndDisplay(String atLeastOrEqual, String expected, Object value) {
-        int cmp = compare(expected, value.toString());
+    private static void compareAndDisplay(String atLeastOrEqual, String expected, String value) {
+        int cmp = compare(expected, value);
         
         switch(atLeastOrEqual) {
             case ">":
@@ -215,7 +227,7 @@ EOF
 #   2. name of the class to test
 #   3. used by (Comment)
 #   4. (optional) warn if "yes" else error on not found
-#   5. (optional, needed to check the version) version field or method
+#   5. (optional, needed to check the version) version field or method, SpecificationVersion by default
 #   6. (optional, needed to check the version) version value to check
 #   7. (optional) "=" or "<=" to compare version
 #------------------------------------------------------------------------
@@ -235,10 +247,13 @@ AC_DEFUN([AC_JAVA_CHECK_JAR], [
 
     CLASSPATH=$ac_java_classpath
     export CLASSPATH
-    cmd="$JAVA conftestSharedChecker $1 $2 $jar_resolved $5 $6 $7"
+    echo "CLASSPATH="$CLASSPATH >&AS_MESSAGE_LOG_FD
+    cmd="$JAVA conftestSharedChecker \"$1\" \"$2\" \"$jar_resolved\" \"$5\" \"$6\" \"$7\""
     if (echo $cmd >&AS_MESSAGE_LOG_FD ; eval $cmd >conftestSharedChecker.java.output 2>&AS_MESSAGE_LOG_FD); then
-        PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
-        AC_MSG_RESULT([$PACKAGE_JAR_FILE])
+        read PACKAGE_JAR_FILE PACKAGE_JAR_VERSION << EOF
+$(tail -n 1 conftestSharedChecker.java.output)
+EOF
+        AC_MSG_RESULT([ $PACKAGE_JAR_FILE $PACKAGE_JAR_VERSION ])
         echo "yes" >&AS_MESSAGE_LOG_FD
         # append the found file to the classpath to manage jar dependency
         ac_java_classpath="$ac_java_classpath:$PACKAGE_JAR_FILE"
@@ -255,54 +270,3 @@ AC_DEFUN([AC_JAVA_CHECK_JAR], [
     fi
 ])
 
-#------------------------------------------------------------------------
-# AC_JAVA_CHECK_VERSION_MANIFEST(NAME, JAR, MIN_VERSION, [PRE_PROCESSING], [GREATER_OR_EQUALS])
-#
-# Check if the minimal version of a software/package is available or not.
-# Note that since java does not provide an universal mechanism to detect
-# the version of a package, we assume that the "Specification-Version" of
-# the MANIFEST.MF is correct.
-#
-# Arguments:
-#    1. The name of the package (only used in the display of feedbacks)
-#    2. The name of the jar files used to build against
-#    3. What is the minimal version expected
-#    4. Manifest attribute name
-#    5. Specify if we want the exact version or greater. (equals or greater by
-#      default).
-#
-#------------------------------------------------------------------------
-
-AC_DEFUN([AC_JAVA_CHECK_VERSION_MANIFEST], [
-    AC_MSG_CHECKING([minimal version ($4 $3) of $1])
-    export JARFILE=$2;
-    if test "x$5" == "x"; then
-    AC_JAVA_TRY_COMPILE([import java.io.IOException;
-import java.util.jar.JarFile;], [String minVersion="$3";
-        try {
-            String version = new JarFile(System.getenv("JARFILE")).getManifest().getMainAttributes().getValue("$4");
-            System.out.println(version);
-            if (compare(minVersion, version) > 0) {
-                System.exit(-1);
-            }
-        } catch (IOException e) {
-            System.err.println(e.getMessage());
-            System.exit(1);
-        } ], "yes", echo "yes" , AC_MSG_ERROR([Wrong version of $1. Expected at least $3. Found $STDOUT]))
-    else
-    AC_JAVA_TRY_COMPILE([import java.io.IOException;
-import java.util.jar.JarFile;], [String minVersion="$3";
-        try {
-            String version = new JarFile(System.getenv("JARFILE")).getManifest().getMainAttributes().getValue("$4");
-            System.out.println("$4" + ": " + version);
-            if (compare(minVersion, version) != 0) {
-                System.exit(-1);
-            }
-        } catch (IOException e) {
-            System.err.println(e.getMessage());
-            System.exit(1);
-        } ], "yes", echo "yes" , AC_MSG_ERROR([Wrong version of $1. Expected exact version $4. Found $STDOUT]))
-    fi
-    unset JARFILE
-])
-