diff --git a/configure.ac b/configure.ac index 3397f03a2..47204e9b8 100644 --- a/configure.ac +++ b/configure.ac @@ -270,7 +270,9 @@ AM_CONDITIONAL([LINK_SYSTEM_SECP256K1], [test "x$with_system_secp256k1" != xno]) AM_COND_IF([LINK_SYSTEM_SECP256K1], [ dnl Use the secp installed system-wide (after checking it for suitability) saved_LIBS=$LIBS - PKG_CHECK_MODULES([libsecp256k1], [$with_system_secp256k1]) + m4_ifdef([PKG_CHECK_MODULES], + [PKG_CHECK_MODULES([libsecp256k1], [$with_system_secp256k1])], + [AC_MSG_ERROR([You need to install pkg-config to use --with-system-secp256k1.])]) LIBS="$libsecp256k1_LIBS $LIBS" missing_modules= AC_DEFUN([CHECK_MODULE], [