0N/A#!/bin/sh
1472N/A#
0N/A# Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
0N/A# published by the Free Software Foundation.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1472N/A#
1472N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A# or visit www.oracle.com if you need additional information or have any
0N/A# questions.
0N/A#
0N/A#
1879N/A
1879N/A# This file sets common environment variables for all 64-bit Solaris [sparcv9,
1879N/A# amd64] SA scripts. Please note that for 64-bit Linux use saenv.sh.
1879N/A
1879N/AOS=`uname`
1879N/ASTARTDIR=`dirname $0`
1879N/A
1879N/ACPU=`isainfo | grep sparcv9`
1879N/A
1879N/Aif [ "x$CPU" != "x" ]; then
1879N/A CPU=sparcv9
1879N/Aelse
1879N/A CPU=`isainfo | grep amd64`
1879N/A if [ "x$CPU" != "x" ]; then
1879N/A CPU=amd64
1879N/A else
1879N/A echo "unknown CPU, only sparcv9, amd64 are supported!"
1879N/A exit 1
1879N/A fi
1879N/Afi
1879N/A
1879N/A# configure audit helper library if SA_ALTROOT is set
1879N/Aif [ -n "$SA_ALTROOT" ]; then
1879N/A LD_AUDIT_64=$STARTDIR/../src/os/solaris/proc/$CPU/libsaproc_audit.so
1879N/A export LD_AUDIT_64
1879N/A if [ ! -f $LD_AUDIT_64 ]; then
1879N/A echo "SA_ALTROOT is set and can't find libsaproc_audit.so."
1879N/A echo "Make sure to build it with 'make natives'."
1879N/A exit 1
1879N/A fi
1879N/Afi
1879N/ASA_LIBPATH=$STARTDIR/../src/os/solaris/proc/$CPU:$STARTDIR/solaris/$CPU
1879N/A
0N/AOPTIONS="-Dsa.library.path=$SA_LIBPATH -Dsun.jvm.hotspot.debugger.useProcDebugger"
0N/A
0N/Aif [ "x$SA_JAVA" = "x" ]; then
0N/A SA_JAVA=java
0N/Afi
1387N/A
1387N/Aif [ "x$SA_DISABLE_VERS_CHK" != "x" ]; then
1387N/A OPTIONS="-Dsun.jvm.hotspot.runtime.VM.disableVersionCheck ${OPTIONS}"
1387N/Afi
1387N/A
1387N/ASA_CLASSPATH=$STARTDIR/../build/classes:$STARTDIR/../src/share/lib/js.jar:$STARTDIR/sa.jar::$STARTDIR/lib/js.jar
1387N/A
0N/Aif [ ! -z "$SA_TYPEDB" ]; then
0N/A if [ ! -f $SA_TYPEDB ]; then
453N/A echo "$SA_TYPEDB is unreadable"
0N/A exit 1
457N/A fi
0N/A OPTIONS="-Dsun.jvm.hotspot.typedb=$SA_TYPEDB ${OPTIONS}"
0N/Afi
0N/A
0N/AOPTIONS="-Djava.system.class.loader=sun.jvm.hotspot.SALauncherLoader ${OPTIONS}"
0N/A
0N/ASA_JAVA_CMD="$SA_PREFIX_CMD $SA_JAVA -d64 -showversion ${OPTIONS} -cp $SA_CLASSPATH $SA_OPTIONS"
0N/A