0N/A#!/bin/sh
2362N/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.
2362N/A#
2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A# or visit www.oracle.com if you need additional information or have any
0N/A# questions.
0N/A#
0N/A#
0N/A
0N/A# This file sets common environment variables for all SA scripts
0N/A
0N/AOS=`uname`
0N/ASTARTDIR=`(cd \`dirname $0 \`; pwd)`
0N/AARCH=`uname -m`
0N/A
0N/Aif [ "x$SA_JAVA" = "x" ]; then
0N/A SA_JAVA=java
0N/Afi
0N/A
0N/Aif [ "$OS" = "Linux" ]; then
0N/A if [ "$ARCH" = "ia64" ] ; then
0N/A SA_LIBPATH=$STARTDIR/../src/os/linux/ia64:$STARTDIR/linux/ia64
0N/A OPTIONS="-Dsa.library.path=$SA_LIBPATH"
0N/A CPU=ia64
0N/A elif [ "$ARCH" = "x86_64" ] ; then
0N/A SA_LIBPATH=$STARTDIR/../src/os/linux/amd64:$STARTDIR/linux/amd64
0N/A OPTIONS="-Dsa.library.path=$SA_LIBPATH"
0N/A CPU=amd64
0N/A else
0N/A SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
0N/A OPTIONS="-Dsa.library.path=$SA_LIBPATH"
0N/A CPU=i386
0N/A fi
0N/Aelse
0N/A # configure audit helper library if SA_ALTROOT is set
0N/A if [ -n "$SA_ALTROOT" ]; then
0N/A LD_AUDIT_32=$STARTDIR/../src/os/solaris/proc/`uname -p`/libsaproc_audit.so
0N/A export LD_AUDIT_32
0N/A if [ ! -f $LD_AUDIT_32 ]; then
0N/A echo "SA_ALTROOT is set and can't find libsaproc_audit.so."
0N/A echo "Make sure to build it with 'make natives'."
0N/A exit 1
0N/A fi
0N/A fi
0N/A SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
0N/A OPTIONS="-Dsa.library.path=$SA_LIBPATH -Dsun.jvm.hotspot.debugger.useProcDebugger"
0N/A CPU=sparc
0N/Afi
0N/A
0N/Aif [ "x$SA_DISABLE_VERS_CHK" != "x" ]; then
0N/A OPTIONS="-Dsun.jvm.hotspot.runtime.VM.disableVersionCheck ${OPTIONS}"
0N/Afi
0N/A
0N/A
0N/ASA_CLASSPATH=$STARTDIR/../build/classes:$STARTDIR/../src/share/lib/js.jar:$STARTDIR/sa.jar:$STARTDIR/lib/js.jar
0N/A
0N/Aif [ ! -z "$SA_TYPEDB" ]; then
0N/A if [ ! -f $SA_TYPEDB ]; then
0N/A echo "$SA_TYPEDB is unreadable"
0N/A exit 1
0N/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 -showversion ${OPTIONS} -cp $SA_CLASSPATH $SA_OPTIONS"
0N/A