New Makefile variables $(RANLIB) and $(PERL).
[openssl.git] / util / pl / unix.pl
index aa2d7d1..146611a 100644 (file)
@@ -38,7 +38,7 @@ $ex_libs="";
 # static library stuff
 $mklib='ar r';
 $mlflags='';
-$ranlib='util/ranlib.sh';
+$ranlib=&which("ranlib") or $ranlib="true";
 $plib='lib';
 $libp=".a";
 $shlibp=".a";
@@ -80,4 +80,17 @@ sub do_link_rule
        return($ret);
        }
 
+sub which
+       {
+       my ($name)=@_;
+       my $path;
+       foreach $path (split /:/, $ENV{PATH})
+               {
+               if (-x "$path/$name")
+                       {
+                       return "$path/$name";
+                       }
+               }
+       }
+
 1;