aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2022-07-25 18:20:01 +0300
committerLasse Collin <lasse.collin@tukaani.org>2022-07-25 18:20:01 +0300
commit4d80b463a1251aa22eabc87d2732fec13b1adda6 (patch)
treec5911505d0d470c50f28cc705b607d17317b7b34
parentxz: Update the man page that change to --keep will be in 5.2.6. (diff)
downloadxz-4d80b463a1251aa22eabc87d2732fec13b1adda6.tar.xz
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.
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d8233f10..7443489a 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], [