From: Nicholas Clark Date: Sat, 21 Oct 2000 22:23:19 +0000 (+0100) Subject: PATCH $Config::Config{ldlibpthname} in ext/DynaLoader/DynaLoader_pm.PL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e6197cabf1bf43625f8aa8a80559d7b5bf95f2cf;p=p5sagit%2Fp5-mst-13.2.git PATCH $Config::Config{ldlibpthname} in ext/DynaLoader/DynaLoader_pm.PL Message-ID: <20001021222319.B45586@plum.flirble.org> p4raw-id: //depot/perl@7399 --- diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL index b7b45d8..0d4e8cd 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.