From 749b86c2c18ab61a07f19ec8fefc67325da97397 Mon Sep 17 00:00:00 2001 From: Jia Tan Date: Mon, 25 Jul 2022 18:20:01 +0300 Subject: [PATCH] Build: Don't allow empty LIST in --enable-match-finders=LIST. It's enforced only when a match finder is needed, that is, when LZMA1 or LZMA2 encoder is enabled. --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 2418e4b0..7945934c 100644 --- a/configure.ac +++ b/configure.ac @@ -210,6 +210,10 @@ AC_ARG_ENABLE([match-finders], AS_HELP_STRING([--enable-match-finders=LIST], [enable_match_finders=SUPPORTED_MATCH_FINDERS]) enable_match_finders=`echo "$enable_match_finders" | sed 's/,/ /g'` if test "x$enable_encoder_lz" = xyes ; then + if test -z "$enable_match_finders"; then + AC_MSG_ERROR([At least one match finder is required for an LZ-based encoder.]) + fi + for arg in $enable_match_finders do case $arg in m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], [