summaryrefslogtreecommitdiff
path: root/ext/DynaLoader
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-07-23 11:58:49 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-07-23 11:58:49 +0000
commit5cf1d1f16c1401220ecaa7b3127343c7c6c095d2 (patch)
tree54b9a35ecbdce7afc4cae82642d6de2a4a7e0d11 /ext/DynaLoader
parentc1f7b11a6702e2397d89f7692c76fed567098176 (diff)
downloadperl-5cf1d1f16c1401220ecaa7b3127343c7c6c095d2.tar.gz
Introduce $Config{ldlibpthname} which contains
the name of the environment variable holding the dynamic library search path, often LD_LIBRARY_PATH. Use this new feature all over. Also removed remnants of admonition "add LD_LIBRARY_PATH before running make" because Makefile.SH does this for you. p4raw-id: //depot/cfgperl@3725
Diffstat (limited to 'ext/DynaLoader')
-rw-r--r--ext/DynaLoader/DynaLoader_pm.PL13
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL
index 96c9962708..3e30698f87 100644
--- a/ext/DynaLoader/DynaLoader_pm.PL
+++ b/ext/DynaLoader/DynaLoader_pm.PL
@@ -93,12 +93,15 @@ print OUT "push(\@dl_library_path, split(' ', ",
print OUT <<'EOT';
-# Add to @dl_library_path any extra directories we can gather from
-# environment variables. So far LD_LIBRARY_PATH is the only known
-# variable used for this purpose. Others may be added later.
+# Add to @dl_library_path any extra directories we can gather
+# from environment variables.
+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 $ENV{LD_LIBRARY_PATH};
-
+ if exists $ENV{LD_LIBRARY_PATH};
# No prizes for guessing why we don't say 'bootstrap DynaLoader;' here.
boot_DynaLoader('DynaLoader') if defined(&boot_DynaLoader) &&