Only modify LD_LIBRARY_PATH in case there are directories.
Jarkko Hietaniemi [Wed, 27 Feb 2002 01:11:13 +0000 (01:11 +0000)]
p4raw-id: //depot/perl@14891

hints/dec_osf.sh

index 87d3933..1e64da1 100644 (file)
@@ -322,11 +322,13 @@ case "$loclibpth" in
            if test -n "`ls $p/libdb.so* 2>/dev/null`"; then
                needusrshlib=yes
            fi
-           echo "Appending $p to LD_LIBRARY_PATH." >& 4
-           case "$LD_LIBRARY_PATH" in
-           '') LD_LIBRARY_PATH=$p                  ;;
-           *)  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$p ;;
-           esac
+           if test -d $p; then
+               echo "Appending $p to LD_LIBRARY_PATH." >& 4
+               case "$LD_LIBRARY_PATH" in
+               '') LD_LIBRARY_PATH=$p                  ;;
+               *)  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$p ;;
+               esac
+           fi  
        done
        echo "LD_LIBRARY_PATH is now $LD_LIBRARY_PATH." >& 4
        # This is evil but I can't think of a nice workaround: