Fri, 24 Aug 2012 19:45:42 -0700
Merge
1.1 --- a/src/os/posix/launcher/launcher.script Fri Aug 24 16:23:59 2012 -0700 1.2 +++ b/src/os/posix/launcher/launcher.script Fri Aug 24 19:45:42 2012 -0700 1.3 @@ -29,7 +29,7 @@ 1.4 # inside Emacs". 1.5 # 1.6 # If the first parameter is "-dbx", HotSpot will be launched inside dbx. 1.7 -# 1.8 +# 1.9 # If the first parameter is "-valgrind", HotSpot will be launched 1.10 # inside Valgrind (http://valgrind.kde.org) using the Memcheck skin, 1.11 # and with memory leak detection enabled. This currently (2005jan19) 1.12 @@ -45,19 +45,19 @@ 1.13 1.14 # This is the name of the gdb binary to use 1.15 if [ ! "$GDB" ] 1.16 -then 1.17 +then 1.18 GDB=gdb 1.19 fi 1.20 1.21 # This is the name of the gdb binary to use 1.22 if [ ! "$DBX" ] 1.23 -then 1.24 +then 1.25 DBX=dbx 1.26 fi 1.27 1.28 # This is the name of the Valgrind binary to use 1.29 if [ ! "$VALGRIND" ] 1.30 -then 1.31 +then 1.32 VALGRIND=valgrind 1.33 fi 1.34 1.35 @@ -98,7 +98,7 @@ 1.36 JDK= 1.37 if [ "${ALT_JAVA_HOME}" = "" ]; then 1.38 . ${MYDIR}/jdkpath.sh 1.39 -else 1.40 +else 1.41 JDK=${ALT_JAVA_HOME%%/jre}; 1.42 fi 1.43 1.44 @@ -114,22 +114,34 @@ 1.45 # any. 1.46 JRE=$JDK/jre 1.47 JAVA_HOME=$JDK 1.48 +export JAVA_HOME 1.49 + 1.50 ARCH=@@LIBARCH@@ 1.51 - 1.52 SBP=${MYDIR}:${JRE}/lib/${ARCH} 1.53 1.54 -# Set up a suitable LD_LIBRARY_PATH 1.55 1.56 -if [ -z "$LD_LIBRARY_PATH" ] 1.57 +# Set up a suitable LD_LIBRARY_PATH or DYLD_LIBRARY_PATH 1.58 +OS=`uname -s` 1.59 +if [ "${OS}" = "Darwin" ] 1.60 then 1.61 - LD_LIBRARY_PATH="$SBP" 1.62 + if [ -z "$DYLD_LIBRARY_PATH" ] 1.63 + then 1.64 + DYLD_LIBRARY_PATH="$SBP" 1.65 + else 1.66 + DYLD_LIBRARY_PATH="$SBP:$DYLD_LIBRARY_PATH" 1.67 + fi 1.68 + export DYLD_LIBRARY_PATH 1.69 else 1.70 - LD_LIBRARY_PATH="$SBP:$LD_LIBRARY_PATH" 1.71 + # not 'Darwin' 1.72 + if [ -z "$LD_LIBRARY_PATH" ] 1.73 + then 1.74 + LD_LIBRARY_PATH="$SBP" 1.75 + else 1.76 + LD_LIBRARY_PATH="$SBP:$LD_LIBRARY_PATH" 1.77 + fi 1.78 + export LD_LIBRARY_PATH 1.79 fi 1.80 1.81 -export LD_LIBRARY_PATH 1.82 -export JAVA_HOME 1.83 - 1.84 JPARMS="$@ $JAVA_ARGS"; 1.85 1.86 # Locate the gamma development launcher