diff options
author | Nicholas Clark <nick@ccl4.org> | 2000-10-21 23:23:19 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-22 17:49:59 +0000 |
commit | e6197cabf1bf43625f8aa8a80559d7b5bf95f2cf (patch) | |
tree | 96c3e98a7382bca179438c96d07f621ee7115106 | |
parent | b4e944950b7e107f02268dfe7e9eaf2795323d47 (diff) | |
download | perl-e6197cabf1bf43625f8aa8a80559d7b5bf95f2cf.tar.gz |
PATCH $Config::Config{ldlibpthname} in ext/DynaLoader/DynaLoader_pm.PL
Message-ID: <20001021222319.B45586@plum.flirble.org>
p4raw-id: //depot/perl@7399
-rw-r--r-- | ext/DynaLoader/DynaLoader_pm.PL | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL index b7b45d8372..0d4e8cd463 100644 --- a/ext/DynaLoader/DynaLoader_pm.PL +++ b/ext/DynaLoader/DynaLoader_pm.PL @@ -100,17 +100,35 @@ if ($Is_MacOS) { push(@dl_library_path, split(/,/, $ENV{LD_LIBRARY_PATH})) if exists $ENV{LD_LIBRARY_PATH}; } else { - push(@dl_library_path, split(/:/, $ENV{$Config::Config{ldlibpthname}})) - if exists $Config::Config{ldlibpthname} && - $Config::Config{ldlibpthname} ne '' && - exists $ENV{$Config::Config{ldlibpthname}} ;; - push(@dl_library_path, split(/:/, $ENV{$Config::Config{ldlibpthname}})) - if exists $Config::Config{ldlibpthname} && - $Config::Config{ldlibpthname} ne '' && - exists $ENV{$Config::Config{ldlibpthname}} ;; +# push(@dl_library_path, split(/:/, $ENV{$Config::Config{ldlibpthname}})) +# if exists $Config::Config{ldlibpthname} && +# $Config::Config{ldlibpthname} ne '' && +# exists $ENV{$Config::Config{ldlibpthname}} ;; +# push(@dl_library_path, split(/:/, $ENV{$Config::Config{ldlibpthname}})) +# if exists $Config::Config{ldlibpthname} && +# $Config::Config{ldlibpthname} ne '' && +# exists $ENV{$Config::Config{ldlibpthname}} ;; # E.g. HP-UX supports both its native SHLIB_PATH *and* LD_LIBRARY_PATH. -push(@dl_library_path, split(/:/, $ENV{LD_LIBRARY_PATH})) - if exists $ENV{LD_LIBRARY_PATH}; +# push(@dl_library_path, split(/:/, $ENV{LD_LIBRARY_PATH})) +# if exists $ENV{LD_LIBRARY_PATH}; +EOT + +# Make a list of paths to print. +# HP-UX supports both its native SHLIB_PATH *and* LD_LIBRARY_PATH, +# but for other OSes no point pushing 'LD_LIBRARY_PATH' twice. +my @ldlibpthname = 'LD_LIBRARY_PATH'; +if (exists $Config::Config{ldlibpthname} + and length $Config::Config{ldlibpthname} + and $Config::Config{ldlibpthname} ne 'LD_LIBRARY_PATH') { + unshift @ldlibpthname, $Config::Config{ldlibpthname}; +} + +foreach (@ldlibpthname) { + print OUT " push(\@dl_library_path, split(/:/, \$ENV{", to_string($_), + "}))\n\tif exists \$ENV{", to_string($_), "};\n"; +} + +print OUT <<'EOT'; } # No prizes for guessing why we don't say 'bootstrap DynaLoader;' here. |