]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Incorporate fix for Gentoo from Daniel Goertzen.
authorscipio <scipio>
Tue, 9 Jan 2007 20:49:25 +0000 (20:49 +0000)
committerscipio <scipio>
Tue, 9 Jan 2007 20:49:25 +0000 (20:49 +0000)
tools/tinyos/misc/tos-locate-jre

index b114d2c7898e81bc71e604321db377308788c891..55908ed98d4b30c23f60b0d2fe33268ef17fc443 100755 (executable)
@@ -50,9 +50,13 @@ case `uname` in
     ;;
 
     Linux)
+    # Check gentoo java configuration
+    javapath=`java-config -c 2>/dev/null`
     # We check the path first, on the assumption that that's the preferred
     # version.
-    pathlocate javac || { test -z "$javac" && pathlocate java; }
+    if [ -z "$javapath" ]; then
+        pathlocate javac || { test -z "$javac" && pathlocate java; }
+    fi
     if [ -z "$javapath" ]; then
        # We try a bunch of standard names, before resorting to rpm -qa
        rpmlocate IBMJava2-SDK javac || \