summaryrefslogtreecommitdiff
path: root/jpl
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-07-26 02:38:28 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-07-26 02:38:28 +0000
commit94672f70d8cd80d85af601db230d5a82be7c7f28 (patch)
treed62587ea2ac236c4b2727c5699124980751e671c /jpl
parentf2b5be74500fffd3dc232fca7cb3c51bc3b9abf9 (diff)
parentdb3c82715f3e5554ab07ece08f574ddcc983cc0e (diff)
downloadperl-94672f70d8cd80d85af601db230d5a82be7c7f28.tar.gz
integrate cfgperl contents into mainline
p4raw-id: //depot/perl@3753
Diffstat (limited to 'jpl')
-rw-r--r--jpl/JNI/JNI.pm5
-rwxr-xr-xjpl/install-jpl16
2 files changed, 14 insertions, 7 deletions
diff --git a/jpl/JNI/JNI.pm b/jpl/JNI/JNI.pm
index 7797ad632a..45a92df8d9 100644
--- a/jpl/JNI/JNI.pm
+++ b/jpl/JNI/JNI.pm
@@ -2,6 +2,7 @@ package JNI;
use strict;
use Carp;
+use Errno;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD $JVM @JVM_ARGS $JAVALIB);
require Exporter;
@@ -198,7 +199,7 @@ sub AUTOLOAD {
($constname = $AUTOLOAD) =~ s/.*:://;
my $val = constant($constname, @_ ? $_[0] : 0);
if ($! != 0) {
- if ($! =~ /Invalid/) {
+ if ($!{EINVAL} || $! =~ /Invalid/) {
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD;
}
@@ -228,7 +229,7 @@ if (not $JPL::_env_) {
$ENV{THREADS_TYPE} ||= "green_threads";
$JAVALIB = "$ENV{JAVA_HOME}/lib/$arch/$ENV{THREADS_TYPE}";
- $ENV{LD_LIBRARY_PATH} .= ":$JAVALIB";
+ $ENV{$Config{ldlibpthname}} .= ":$JAVALIB";
$JVM = GetJavaVM("$JAVALIB/libjava.so",@JVM_ARGS);
}
diff --git a/jpl/install-jpl b/jpl/install-jpl
index 546ae91cc1..c1ef0b4e12 100755
--- a/jpl/install-jpl
+++ b/jpl/install-jpl
@@ -187,8 +187,14 @@ archname=`$JPLPERL -MConfig -e 'print $Config{archname}'`
CLASSPATH=".:$JPL_HOME/lib${CLASSPATH:+:$CLASSPATH}"
export CLASSPATH
-LD_LIBRARY_PATH=".:$JPL_HOME/lib/$archname:$archlib/CORE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
-export LD_LIBRARY_PATH
+ldlibpthname=`$JPLPERL -MConfig -e 'print $Config{ldlibpthname}'`
+case "$ldlibpthname" in
+'') ldlibpthname=LD_LIBRARY_PATH ;;
+esac
+eval "ldlibpth=\$$ldlibpthname"
+
+$ldlibpthname=".:$JPL_HOME/lib/$archname:$archlib/CORE$ldlibpth"
+export $ldlibpthname
PERL5LIB="$JPL_HOME/perl${PERL5LIB:+:$PERL5LIB}"
export PERL5LIB
@@ -205,13 +211,13 @@ case "$1" in
\$ENV{JPL_HOME} = '$JPL_HOME';
\$ENV{JPLPERL} = '$JPLPERL';
\$ENV{CLASSPATH} = '$CLASSPATH';
-\$ENV{LD_LIBRARY_PATH} = '$LD_LIBRARY_PATH';
+\$ENV{$ldlibpthname} = '$ldlibpth';
\$ENV{PERL5LIB} = '$PERL5LIB';
END
;;
-sh)
cat <<END
- PATH='$PATH';export PATH;JAVA_HOME='$JAVA_HOME';export JAVA_HOME;JPL_HOME='$JPL_HOME';export JPL_HOME;JPLPERL='$JPLPERL';export JPLPERL;CLASSPATH='$CLASSPATH';export CLASSPATH;LD_LIBRARY_PATH='$LD_LIBRARY_PATH';export LD_LIBRARY_PATH;PERL5LIB='$PERL5LIB';export PERL5LIB
+ PATH='$PATH';export PATH;JAVA_HOME='$JAVA_HOME';export JAVA_HOME;JPL_HOME='$JPL_HOME';export JPL_HOME;JPLPERL='$JPLPERL';export JPLPERL;CLASSPATH='$CLASSPATH';export CLASSPATH;$ldlibpthname='$ldlibpth';export $ldlibpthname;PERL5LIB='$PERL5LIB';export PERL5LIB
END
;;
-csh)
@@ -221,7 +227,7 @@ setenv JAVA_HOME '$JAVA_HOME';
setenv JPL_HOME '$JPL_HOME';
setenv JPLPERL '$JPLPERL';
setenv CLASSPATH '$CLASSPATH';
-setenv LD_LIBRARY_PATH '$LD_LIBRARY_PATH';
+setenv $ldlibpthname '$ldlibpth';
setenv PERL5LIB '$PERL5LIB';
END
;;