autotools: Rename `build-aux` to `autotools-aux`
What changed, and why it matters
This commit simply renames the Autotools helper directory from 'build-aux' to 'autotools-aux' and updates the related references in build files and .gitignore. It is a build-system housekeeping change with no effect on the cryptographic code or runtime security.
No security action needed; this is a benign build-system refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change moves build-aux/m4/bitcoin_secp.m4 to autotools-aux/m4/bitcoin_secp.m4, updates AC_CONFIG_AUX_DIR/AC_CONFIG_MACRO_DIR in configure.ac, ACLOCAL_AMFLAGS in Makefile.am, a comment in src/CMakeLists.txt, and refactors .gitignore entries. The file contents are identical; only paths change.
Changed components
Autotools build configuration.gitignoreMakefile.amconfigure.acsrc/CMakeLists.txtInspect captured patch +98 / −109
diff --git a/.gitignore b/.gitignore
index ce33a84..cae2821 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,20 +45,9 @@ coverage.*.html
*.gcno
*.gcov
-build-aux/ar-lib
-build-aux/config.guess
-build-aux/config.sub
-build-aux/depcomp
-build-aux/install-sh
-build-aux/ltmain.sh
-build-aux/m4/libtool.m4
-build-aux/m4/lt~obsolete.m4
-build-aux/m4/ltoptions.m4
-build-aux/m4/ltsugar.m4
-build-aux/m4/ltversion.m4
-build-aux/missing
-build-aux/compile
-build-aux/test-driver
+/autotools-aux/
+!/autotools-aux/m4/bitcoin_secp.m4
+
libsecp256k1.pc
### CMake
diff --git a/Makefile.am b/Makefile.am
index dc79857..07d7a2b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-ACLOCAL_AMFLAGS = -I build-aux/m4
+ACLOCAL_AMFLAGS = -I autotools-aux/m4
# AM_CFLAGS will be automatically prepended to CFLAGS by Automake when compiling some foo
# which does not have an explicit foo_CFLAGS variable set.
diff --git a/autotools-aux/m4/bitcoin_secp.m4 b/autotools-aux/m4/bitcoin_secp.m4
new file mode 100644
index 0000000..1428d4d
--- /dev/null
+++ b/autotools-aux/m4/bitcoin_secp.m4
@@ -0,0 +1,91 @@
+dnl escape "$0x" below using the m4 quadrigaph @S|@, and escape it again with a \ for the shell.
+AC_DEFUN([SECP_X86_64_ASM_CHECK],[
+AC_MSG_CHECKING(for x86_64 assembly availability)
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdint.h>]],[[
+ uint64_t a = 11, tmp = 0;
+ __asm__ __volatile__("movq \@S|@0x100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx");
+ ]])], [has_x86_64_asm=yes], [has_x86_64_asm=no])
+AC_MSG_RESULT([$has_x86_64_asm])
+])
+
+AC_DEFUN([SECP_ARM32_ASM_CHECK], [
+ AC_MSG_CHECKING(for ARM32 assembly availability)
+ SECP_ARM32_ASM_CHECK_CFLAGS_saved_CFLAGS="$CFLAGS"
+ CFLAGS="-x assembler"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
+ .syntax unified
+ .eabi_attribute 24, 1
+ .eabi_attribute 25, 1
+ .text
+ .global main
+ main:
+ ldr r0, =0x002A
+ mov r7, #1
+ swi 0
+ ]])], [has_arm32_asm=yes], [has_arm32_asm=no])
+ AC_MSG_RESULT([$has_arm32_asm])
+ CFLAGS="$SECP_ARM32_ASM_CHECK_CFLAGS_saved_CFLAGS"
+])
+
+AC_DEFUN([SECP_VALGRIND_CHECK],[
+AC_MSG_CHECKING([for valgrind support])
+if test x"$has_valgrind" != x"yes"; then
+ CPPFLAGS_TEMP="$CPPFLAGS"
+ CPPFLAGS="$VALGRIND_CPPFLAGS $CPPFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <valgrind/memcheck.h>
+ ]], [[
+ #if defined(NVALGRIND)
+ # error "Valgrind does not support this platform."
+ #endif
+ ]])], [has_valgrind=yes])
+ CPPFLAGS="$CPPFLAGS_TEMP"
+fi
+AC_MSG_RESULT($has_valgrind)
+])
+
+AC_DEFUN([SECP_MSAN_CHECK], [
+AC_MSG_CHECKING(whether MemorySanitizer is enabled)
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #if defined(__has_feature)
+ # if __has_feature(memory_sanitizer)
+ /* MemorySanitizer is enabled. */
+ # elif
+ # error "MemorySanitizer is disabled."
+ # endif
+ #else
+ # error "__has_feature is not defined."
+ #endif
+ ]])], [msan_enabled=yes], [msan_enabled=no])
+AC_MSG_RESULT([$msan_enabled])
+])
+
+dnl SECP_TRY_APPEND_CFLAGS(flags, VAR)
+dnl Append flags to VAR if CC accepts them.
+AC_DEFUN([SECP_TRY_APPEND_CFLAGS], [
+ AC_MSG_CHECKING([if ${CC} supports $1])
+ SECP_TRY_APPEND_CFLAGS_saved_CFLAGS="$CFLAGS"
+ CFLAGS="$1 $CFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], [flag_works=yes], [flag_works=no])
+ AC_MSG_RESULT($flag_works)
+ CFLAGS="$SECP_TRY_APPEND_CFLAGS_saved_CFLAGS"
+ if test x"$flag_works" = x"yes"; then
+ $2="$$2 $1"
+ fi
+ unset flag_works
+ AC_SUBST($2)
+])
+
+dnl SECP_SET_DEFAULT(VAR, default, default-dev-mode)
+dnl Set VAR to default or default-dev-mode, depending on whether dev mode is enabled
+AC_DEFUN([SECP_SET_DEFAULT], [
+ if test "${enable_dev_mode+set}" != set; then
+ AC_MSG_ERROR([[Set enable_dev_mode before calling SECP_SET_DEFAULT]])
+ fi
+ if test x"$enable_dev_mode" = x"yes"; then
+ $1="$3"
+ else
+ $1="$2"
+ fi
+])
diff --git a/build-aux/m4/bitcoin_secp.m4 b/build-aux/m4/bitcoin_secp.m4
deleted file mode 100644
index 1428d4d..0000000
--- a/build-aux/m4/bitcoin_secp.m4
+++ /dev/null
@@ -1,91 +0,0 @@
-dnl escape "$0x" below using the m4 quadrigaph @S|@, and escape it again with a \ for the shell.
-AC_DEFUN([SECP_X86_64_ASM_CHECK],[
-AC_MSG_CHECKING(for x86_64 assembly availability)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- #include <stdint.h>]],[[
- uint64_t a = 11, tmp = 0;
- __asm__ __volatile__("movq \@S|@0x100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx");
- ]])], [has_x86_64_asm=yes], [has_x86_64_asm=no])
-AC_MSG_RESULT([$has_x86_64_asm])
-])
-
-AC_DEFUN([SECP_ARM32_ASM_CHECK], [
- AC_MSG_CHECKING(for ARM32 assembly availability)
- SECP_ARM32_ASM_CHECK_CFLAGS_saved_CFLAGS="$CFLAGS"
- CFLAGS="-x assembler"
- AC_LINK_IFELSE([AC_LANG_SOURCE([[
- .syntax unified
- .eabi_attribute 24, 1
- .eabi_attribute 25, 1
- .text
- .global main
- main:
- ldr r0, =0x002A
- mov r7, #1
- swi 0
- ]])], [has_arm32_asm=yes], [has_arm32_asm=no])
- AC_MSG_RESULT([$has_arm32_asm])
- CFLAGS="$SECP_ARM32_ASM_CHECK_CFLAGS_saved_CFLAGS"
-])
-
-AC_DEFUN([SECP_VALGRIND_CHECK],[
-AC_MSG_CHECKING([for valgrind support])
-if test x"$has_valgrind" != x"yes"; then
- CPPFLAGS_TEMP="$CPPFLAGS"
- CPPFLAGS="$VALGRIND_CPPFLAGS $CPPFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <valgrind/memcheck.h>
- ]], [[
- #if defined(NVALGRIND)
- # error "Valgrind does not support this platform."
- #endif
- ]])], [has_valgrind=yes])
- CPPFLAGS="$CPPFLAGS_TEMP"
-fi
-AC_MSG_RESULT($has_valgrind)
-])
-
-AC_DEFUN([SECP_MSAN_CHECK], [
-AC_MSG_CHECKING(whether MemorySanitizer is enabled)
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
- #if defined(__has_feature)
- # if __has_feature(memory_sanitizer)
- /* MemorySanitizer is enabled. */
- # elif
- # error "MemorySanitizer is disabled."
- # endif
- #else
- # error "__has_feature is not defined."
- #endif
- ]])], [msan_enabled=yes], [msan_enabled=no])
-AC_MSG_RESULT([$msan_enabled])
-])
-
-dnl SECP_TRY_APPEND_CFLAGS(flags, VAR)
-dnl Append flags to VAR if CC accepts them.
-AC_DEFUN([SECP_TRY_APPEND_CFLAGS], [
- AC_MSG_CHECKING([if ${CC} supports $1])
- SECP_TRY_APPEND_CFLAGS_saved_CFLAGS="$CFLAGS"
- CFLAGS="$1 $CFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], [flag_works=yes], [flag_works=no])
- AC_MSG_RESULT($flag_works)
- CFLAGS="$SECP_TRY_APPEND_CFLAGS_saved_CFLAGS"
- if test x"$flag_works" = x"yes"; then
- $2="$$2 $1"
- fi
- unset flag_works
- AC_SUBST($2)
-])
-
-dnl SECP_SET_DEFAULT(VAR, default, default-dev-mode)
-dnl Set VAR to default or default-dev-mode, depending on whether dev mode is enabled
-AC_DEFUN([SECP_SET_DEFAULT], [
- if test "${enable_dev_mode+set}" != set; then
- AC_MSG_ERROR([[Set enable_dev_mode before calling SECP_SET_DEFAULT]])
- fi
- if test x"$enable_dev_mode" = x"yes"; then
- $1="$3"
- else
- $1="$2"
- fi
-])
diff --git a/configure.ac b/configure.ac
index 6028ee2..36699c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,8 +19,8 @@ define(_LIB_VERSION_AGE, 0)
AC_INIT([libsecp256k1],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_PATCH)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-dev]),[https://github.com/bitcoin-core/secp256k1/issues],[libsecp256k1],[https://github.com/bitcoin-core/secp256k1])
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CONFIG_MACRO_DIR([build-aux/m4])
+AC_CONFIG_AUX_DIR([autotools-aux])
+AC_CONFIG_MACRO_DIR([autotools-aux/m4])
AC_CANONICAL_HOST
# Require Automake 1.11.2 for AM_PROG_AR
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ecbbbbe..46db778 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -95,7 +95,7 @@ set_target_properties(secp256k1_objs PROPERTIES
)
# This emulates Libtool to make sure Libtool and CMake agree on the ABI version,
-# see below "Calculate the version variables" in build-aux/ltmain.sh.
+# see below "Calculate the version variables" in autotools-aux/ltmain.sh.
math(EXPR ${PROJECT_NAME}_soversion "${${PROJECT_NAME}_LIB_VERSION_CURRENT} - ${${PROJECT_NAME}_LIB_VERSION_AGE}")
set_target_properties(secp256k1 PROPERTIES
SOVERSION ${${PROJECT_NAME}_soversion}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.