lnsocket

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

commit 49bf1736e06e1da5218ba0ab125d6907e3d43097
parent 7dec825602d365d5eaadc9c715c3dd31f60c09f5
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 14 Mar 2022 10:55:02 -0700

secp256k1: use tim's AR patch instead

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mtools/0001-configure-customizable-AR-and-RANLIB.patch | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 54 insertions(+), 26 deletions(-)

diff --git a/tools/0001-configure-customizable-AR-and-RANLIB.patch b/tools/0001-configure-customizable-AR-and-RANLIB.patch @@ -1,39 +1,67 @@ -From 5964a2ebc52305d51167ebdf0479dc17aae200b6 Mon Sep 17 00:00:00 2001 -From: William Casarin <jb55@jb55.com> -Date: Sat, 12 Mar 2022 10:48:28 -0800 -Subject: [PATCH] configure: customizable AR and RANLIB +From 0d253d52e804a5affb0f1c851ec250071e7345d9 Mon Sep 17 00:00:00 2001 +From: Tim Ruffing <crypto@timruffing.de> +Date: Sun, 13 Mar 2022 10:39:55 +0100 +Subject: [PATCH] configure: Use modern way to set AR -This is needed for emscripten wasm builds +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). -Signed-off-by: William Casarin <jb55@jb55.com> +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). --- - configure.ac | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + .gitignore | 1 + + configure.ac | 11 +++++------ + 2 files changed, 6 insertions(+), 6 deletions(-) +diff --git a/.gitignore b/.gitignore +index 53941f23a..d88627d72 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -46,6 +46,7 @@ coverage.*.html + + src/libsecp256k1-config.h + src/libsecp256k1-config.h.in ++build-aux/ar-lib + build-aux/config.guess + build-aux/config.sub + build-aux/depcomp diff --git a/configure.ac b/configure.ac -index cc766b2..d938c68 100644 +index cc766b20a..16a492071 100644 --- a/configure.ac +++ b/configure.ac -@@ -34,8 +34,8 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +@@ -25,24 +25,23 @@ AC_CANONICAL_HOST + AH_TOP([#ifndef LIBSECP256K1_CONFIG_H]) + AH_TOP([#define LIBSECP256K1_CONFIG_H]) + AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/]) +-AM_INIT_AUTOMAKE([foreign subdir-objects]) + +-LT_INIT([win32-dll]) ++# Require Automake 1.11.2 for AM_PROG_AR ++AM_INIT_AUTOMAKE([1.11.2 foreign subdir-objects]) + + # Make the compilation flags quiet unless V=1 is used. + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) PKG_PROG_PKG_CONFIG -AC_PATH_TOOL(AR, ar) -AC_PATH_TOOL(RANLIB, ranlib) -+AC_PATH_TOOL(AR, $AR, ar) -+AC_PATH_TOOL(RANLIB, $RANLIB, ranlib) - AC_PATH_TOOL(STRIP, strip) - +-AC_PATH_TOOL(STRIP, strip) +- AC_PROG_CC -@@ -438,6 +438,8 @@ fi - echo - echo " valgrind = $enable_valgrind" - echo " CC = $CC" -+echo " AR = $AR" -+echo " RANLIB = $RANLIB" - echo " CPPFLAGS = $CPPFLAGS" - echo " SECP_CFLAGS = $SECP_CFLAGS" - echo " CFLAGS = $CFLAGS" --- -2.32.0 (Apple Git-132) - + if test x"$ac_cv_prog_cc_c89" = x"no"; then + AC_MSG_ERROR([c89 compiler support required]) + fi + AM_PROG_AS ++AM_PROG_AR ++ ++LT_INIT([win32-dll]) + + build_windows=no +