Skip to content

Commit b136526

Browse files
committed
build: prevent using minimal mode without elements support or with a system secp
Minimal mode assumes the in-tree secp is being used, so enforce this.
1 parent f71c85f commit b136526

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ if test "x$standard_secp" = "xyes"; then
149149
fi
150150

151151
if test "x$minimal" = "xyes"; then
152+
if test "x$elements" = "xno"; then
153+
AC_MSG_FAILURE([ERROR: Minimal mode requires Elements support to be enabled])
154+
fi
152155
AX_CHECK_COMPILE_FLAG([-DBUILD_MINIMAL=1], [AM_CFLAGS="$AM_CFLAGS -DBUILD_MINIMAL=1"])
153156
fi
154157

@@ -271,6 +274,9 @@ AC_ARG_WITH([system-secp256k1],
271274
AM_CONDITIONAL([LINK_SYSTEM_SECP256K1], [test "x$with_system_secp256k1" != xno])
272275
AM_COND_IF([LINK_SYSTEM_SECP256K1], [
273276
dnl Use the secp installed system-wide (after checking it for suitability)
277+
if test "x$minimal" = "xyes"; then
278+
AC_MSG_ERROR([Minimal mode cannot be used with --with-system-secp256k1])
279+
fi
274280
saved_LIBS=$LIBS
275281
m4_ifdef([PKG_CHECK_MODULES],
276282
[PKG_CHECK_MODULES([libsecp256k1], [$with_system_secp256k1])],

0 commit comments

Comments
 (0)