Engage Applink in mingw. Note that application-side module is not
[openssl.git] / util / pl / unix.pl
index aa2d7d1f370531aed60617826aa45e04bb2ec4a4..146611ad99586edac881f7f199a745271130850f 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;