summaryrefslogtreecommitdiff
path: root/Makefile.SH
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-04 07:06:10 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-04 07:06:10 +0000
commitc1b49bc05a7f5b36c923faeabca360535a46341c (patch)
treed81ef1c7c94866100868f36a98ec9e56bce2047f /Makefile.SH
parent29637182f1ce5e31e567538e50f95af145aaa57c (diff)
downloadperl-c1b49bc05a7f5b36c923faeabca360535a46341c.tar.gz
avoid adding null components to LD_LIBRARY_PATH, OpenBSD has trouble
with them (from Todd C. Miller <Todd.Miller@courtesan.com>) p4raw-id: //depot/perl@4977
Diffstat (limited to 'Makefile.SH')
-rw-r--r--Makefile.SH9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.SH b/Makefile.SH
index fc1b606ba7..044317df7b 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -30,7 +30,12 @@ case "$useshrplib" in
true)
# Prefix all runs of 'miniperl' and 'perl' with
# $ldlibpth so that ./perl finds *this* shared libperl.
- ldlibpth="LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH"
+ case "$LD_LIBRARY_PATH" in
+ '')
+ ldlibpth="LD_LIBRARY_PATH=`pwd`";;
+ *)
+ ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
+ esac
pldlflags="$cccdlflags"
case "${osname}${osvers}" in
@@ -78,6 +83,8 @@ true)
eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
;;
esac
+ # Strip off any trailing :'s
+ ldlibpth=`echo $ldlibpth | sed 's/:*$//'`
;;
esac
;;