From: Gurusamy Sarathy Date: Fri, 4 Feb 2000 07:06:10 +0000 (+0000) Subject: avoid adding null components to LD_LIBRARY_PATH, OpenBSD has trouble X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c1b49bc05a7f5b36c923faeabca360535a46341c;p=p5sagit%2Fp5-mst-13.2.git avoid adding null components to LD_LIBRARY_PATH, OpenBSD has trouble with them (from Todd C. Miller ) p4raw-id: //depot/perl@4977 --- diff --git a/Makefile.SH b/Makefile.SH index fc1b606..044317d 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 ;;