diff --git a/m4/compression.m4 b/m4/compression.m4 index 6755ef13..8cb7ce2d 100644 --- a/m4/compression.m4 +++ b/m4/compression.m4 @@ -32,4 +32,5 @@ AC_SUBST([$2][_REQUIRES]) AC_SUBST([$2][_CFLAGS]) AC_SUBST([$2][_LIBS]) AC_SUBST([$2][_PC_LIBS]) +AM_CONDITIONAL(HAVE_$2, test "x$have_$1" = xyes) ]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 0c03b20b..8ac90b39 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -196,10 +196,6 @@ test_scripts = \ diskdump-empty-s390x \ diskdump-empty-x86_64 \ diskdump-basic-raw \ - diskdump-basic-zlib \ - diskdump-basic-lzo \ - diskdump-basic-snappy \ - diskdump-basic-zstd \ diskdump-flat-raw \ diskdump-multiread \ diskdump-excluded \ @@ -331,6 +327,19 @@ test_scripts = \ xlat-xen-x86_64-4.6-bigmem \ zero-size +if HAVE_ZSTD +test_scripts += diskdump-basic-zstd +endif +if HAVE_ZLIB +test_scripts += diskdump-basic-zlib +endif +if HAVE_LZO +test_scripts += diskdump-basic-lzo +endif +if HAVE_SNAPPY +test_scripts += diskdump-basic-snappy +endif + dist_check_DATA = \ addrmap-single-begin.expect \ addrmap-single-middle.expect \