lnsocket

A minimal C library for connecting to the lightning network
git clone git://jb55.com/lnsocket
Log | Files | Refs | Submodules | README | LICENSE

0001-configure-customizable-AR-and-RANLIB.patch (2080B)


      1 From 0d253d52e804a5affb0f1c851ec250071e7345d9 Mon Sep 17 00:00:00 2001
      2 From: Tim Ruffing <crypto@timruffing.de>
      3 Date: Sun, 13 Mar 2022 10:39:55 +0100
      4 Subject: [PATCH] configure: Use modern way to set AR
      5 
      6 This uses AM_PROG_AR to discover ar, which is the recommended way to do
      7 so. Among other advantages, it honors the AR environment variable (as
      8 set from the outside). The macro has been around since automake 1.11.2
      9 (Dec 2011).
     10 
     11 This commit also removes code that discovers ranlib and strip. ranlib
     12 has been obsolete for decades (ar does its task now automatically), and
     13 anyway LT_INIT takes care of discovering it. The code we used to set
     14 STRIP was last mentioned in the automake 1.5 manual. Since automake 1.6
     15 (Mar 2002), strip is discovered automatically when necessary (look for
     16 the *private* macro AM_PROG_INSTALL_STRIP in the automake manual).
     17 ---
     18  .gitignore   |  1 +
     19  configure.ac | 11 +++++------
     20  2 files changed, 6 insertions(+), 6 deletions(-)
     21 
     22 diff --git a/.gitignore b/.gitignore
     23 index 53941f23a..d88627d72 100644
     24 --- a/.gitignore
     25 +++ b/.gitignore
     26 @@ -46,6 +46,7 @@ coverage.*.html
     27  
     28  src/libsecp256k1-config.h
     29  src/libsecp256k1-config.h.in
     30 +build-aux/ar-lib
     31  build-aux/config.guess
     32  build-aux/config.sub
     33  build-aux/depcomp
     34 diff --git a/configure.ac b/configure.ac
     35 index cc766b20a..16a492071 100644
     36 --- a/configure.ac
     37 +++ b/configure.ac
     38 @@ -25,24 +25,23 @@ AC_CANONICAL_HOST
     39  AH_TOP([#ifndef LIBSECP256K1_CONFIG_H])
     40  AH_TOP([#define LIBSECP256K1_CONFIG_H])
     41  AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/])
     42 -AM_INIT_AUTOMAKE([foreign subdir-objects])
     43  
     44 -LT_INIT([win32-dll])
     45 +# Require Automake 1.11.2 for AM_PROG_AR
     46 +AM_INIT_AUTOMAKE([1.11.2 foreign subdir-objects])
     47  
     48  # Make the compilation flags quiet unless V=1 is used.
     49  m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
     50  
     51  PKG_PROG_PKG_CONFIG
     52  
     53 -AC_PATH_TOOL(AR, ar)
     54 -AC_PATH_TOOL(RANLIB, ranlib)
     55 -AC_PATH_TOOL(STRIP, strip)
     56 -
     57  AC_PROG_CC
     58  if test x"$ac_cv_prog_cc_c89" = x"no"; then
     59    AC_MSG_ERROR([c89 compiler support required])
     60  fi
     61  AM_PROG_AS
     62 +AM_PROG_AR
     63 +
     64 +LT_INIT([win32-dll])
     65  
     66  build_windows=no
     67