Skip to content

Commit 430ad6c

Browse files
real-or-randomPiRK
authored andcommitted
[secp256k1] configure: Use modern way to set AR
Summary: This uses AM_PROG_AR to discover ar, which is the recommended way to do so. Among other advantages, it honors the AR environment variable (as set from the outside). The macro has been around since automake 1.11.2 (Dec 2011). This commit also removes code that discovers ranlib and strip. ranlib has been obsolete for decades (ar does its task now automatically), and anyway LT_INIT takes care of discovering it. The code we used to set STRIP was last mentioned in the automake 1.5 manual. Since automake 1.6 (Mar 2002), strip is discovered automatically when necessary (look for the *private* macro AM_PROG_INSTALL_STRIP in the automake manual). This is a backport of [[bitcoin-core/secp256k1#1088 | secp256k1#1088]] Test Plan: ``` ./autogen.sh cd build_autotools ../configure make ``` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D19501
1 parent c6d59af commit 430ad6c

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/secp256k1/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ libtool
3333
*.trs
3434
src/libsecp256k1-config.h
3535
src/libsecp256k1-config.h.in
36+
build-aux/ar-lib
3637
build-aux/config.guess
3738
build-aux/config.sub
3839
build-aux/depcomp

src/secp256k1/configure.ac

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@ AC_CANONICAL_HOST
66
AH_TOP([#ifndef LIBSECP256K1_CONFIG_H])
77
AH_TOP([#define LIBSECP256K1_CONFIG_H])
88
AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/])
9-
AM_INIT_AUTOMAKE([foreign subdir-objects])
109

11-
LT_INIT([win32-dll])
10+
# Require Automake 1.11.2 for AM_PROG_AR
11+
AM_INIT_AUTOMAKE([1.11.2 foreign subdir-objects])
1212

1313
# Make the compilation flags quiet unless V=1 is used.
1414
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
1515

1616
PKG_PROG_PKG_CONFIG
1717

18-
AC_PATH_TOOL(AR, ar)
19-
AC_PATH_TOOL(RANLIB, ranlib)
20-
AC_PATH_TOOL(STRIP, strip)
21-
2218
AC_PROG_CC
2319
AM_PROG_AS
20+
AM_PROG_AR
21+
22+
LT_INIT([win32-dll])
2423

2524
case $host_os in
2625
*darwin*)

0 commit comments

Comments
 (0)