X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=util%2Fpl%2Funix.pl;h=146611ad99586edac881f7f199a745271130850f;hb=07bb51b6b4961108a97ca0dad9f3e82418c1b0e0;hp=36311711c64bea6a29cfae45449fc5c19a3b150d;hpb=78414a6a897db42c9bcf06aa21c705811ab33921;p=oweals%2Fopenssl.git diff --git a/util/pl/unix.pl b/util/pl/unix.pl index 36311711c6..146611ad99 100644 --- a/util/pl/unix.pl +++ b/util/pl/unix.pl @@ -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"; @@ -46,8 +46,8 @@ $lfile=''; $asm='as'; $afile='-o '; -$bn_mulw_obj=""; -$bn_mulw_src=""; +$bn_asm_obj=""; +$bn_asm_src=""; $des_enc_obj=""; $des_enc_src=""; $bf_enc_obj=""; @@ -59,7 +59,7 @@ sub do_lib_rule local($ret,$_,$Name); $target =~ s/\//$o/g if $o ne '/'; - $target="\$(LIB_D)$o$target"; + $target="$target"; ($Name=$name) =~ tr/a-z/A-Z/; $ret.="$target: \$(${Name}OBJ)\n"; @@ -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;