X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=util%2Fpl%2Funix.pl;h=146611ad99586edac881f7f199a745271130850f;hb=0d7dba92c806cd120b06aa24fc86f8f56aaecf2c;hp=4c0c91a67442c32ba0e01eb5284316fff2e3b77c;hpb=eda1f21f1af8b6f77327e7b37573af9c1ba73726;p=oweals%2Fopenssl.git diff --git a/util/pl/unix.pl b/util/pl/unix.pl index 4c0c91a674..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,6 +59,7 @@ sub do_lib_rule local($ret,$_,$Name); $target =~ s/\//$o/g if $o ne '/'; + $target="$target"; ($Name=$name) =~ tr/a-z/A-Z/; $ret.="$target: \$(${Name}OBJ)\n"; @@ -79,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;