[openssl.org #2081] [patch] respect $AR and $RANLIB

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown [openssl.org #2081] [patch] respect $AR and $RANLIB

by Alon Bar-Lev via RT :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

if the toolchain env vars $AR and/or $RANLIB are set in the environment, the
Configure script should default to those.  this matches behavior of many other
package build systems (like autotools) and usage already in place in openssl
itself (CC/etc...).

patch is against OpenSSL_0_9_8-stable, but it's simple and should be easy to
port elsewhere
-mike


Index: Configure
===================================================================
RCS file: /usr/local/src/openssl/CVSROOT/openssl/Configure,v
retrieving revision 1.488.2.95
diff -u -p -r1.488.2.95 Configure
--- Configure 18 Oct 2009 14:24:47 -0000 1.488.2.95
+++ Configure 26 Oct 2009 10:30:59 -0000
@@ -995,7 +995,8 @@ my $shared_target = $fields[$idx_shared_
 my $shared_cflag = $fields[$idx_shared_cflag];
 my $shared_ldflag = $fields[$idx_shared_ldflag];
 my $shared_extension = $fields[$idx_shared_extension];
-my $ranlib = $fields[$idx_ranlib];
+my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib];
+my $ar = $ENV{'AR'} || "ar";
 my $arflags = $fields[$idx_arflags];
 
 if ($fips)
@@ -1506,6 +1507,7 @@ while (<IN>)
  }
  else {
  s/^CC=.*$/CC= $cc/;
+ s/^AR=.*/AR= $ar/;
  s/^RANLIB=.*/RANLIB= $ranlib/;
  }
  s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";