Skip to content

Commit 50f725b

Browse files
committed
btrfs-progs: build: move --disable-lzo option closer to zstd
There are two configure options for compression so group them and update the description so it mentions all commands that use compression. Signed-off-by: David Sterba <[email protected]>
1 parent 451bf73 commit 50f725b

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

Diff for: configure.ac

+22-22
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ PKG_CHECK_MODULES(ZLIB, [zlib])
454454
PKG_STATIC(ZLIB_LIBS_STATIC, [zlib])
455455

456456
AC_ARG_ENABLE([zstd],
457-
AS_HELP_STRING([--disable-zstd], [build without zstd support for restore and receive (default: enabled)]),
457+
AS_HELP_STRING([--disable-zstd], [build without zstd compression support (btrfs-restore, btrfs-receive, mkfs.btrfs) (default: enabled)]),
458458
[], [enable_zstd=yes]
459459
)
460460

@@ -466,6 +466,27 @@ fi
466466
AS_IF([test "x$enable_zstd" = xyes], [COMPRESSION_ZSTD=1], [COMPRESSION_ZSTD=0])
467467
AC_SUBST(COMPRESSION_ZSTD)
468468

469+
AC_ARG_ENABLE([lzo],
470+
AS_HELP_STRING([--disable-lzo], [build without lzo compression support (btrfs-restore, btrfs-receive, mkfs.btrfs) (default: enabled)]),
471+
[], [enable_lzo=yes]
472+
)
473+
474+
if test "x$enable_lzo" = xyes; then
475+
dnl lzo library does not provide pkg-config, use classic way
476+
AC_CHECK_LIB([lzo2], [lzo_version], [
477+
LZO2_LIBS="-llzo2"
478+
LZO2_CFLAGS=""
479+
LZO2_LIBS_STATIC="-llzo2"],[
480+
AC_MSG_ERROR([cannot find lzo2 library])
481+
])
482+
AC_SUBST([LZO2_LIBS])
483+
AC_SUBST([LZO2_LIBS_STATIC])
484+
AC_SUBST([LZO2_CFLAGS])
485+
fi
486+
487+
AS_IF([test "x$enable_lzo" = xyes], [COMPRESSION_LZO=1], [COMPRESSION_LZO=0])
488+
AC_SUBST(COMPRESSION_LZO)
489+
469490
AC_ARG_ENABLE([libudev],
470491
AS_HELP_STRING([--disable-libudev], [build without libudev support (for multipath)]),
471492
[], [enable_libudev=yes]
@@ -513,27 +534,6 @@ if ${PKG_CONFIG} udev --atleast-version 190; then
513534
fi
514535
AC_SUBST(UDEVDIR)
515536

516-
AC_ARG_ENABLE([lzo],
517-
AS_HELP_STRING([--disable-lzo], [build without lzo support for restore and receive (default: enabled)]),
518-
[], [enable_lzo=yes]
519-
)
520-
521-
if test "x$enable_lzo" = xyes; then
522-
dnl lzo library does not provide pkg-config, use classic way
523-
AC_CHECK_LIB([lzo2], [lzo_version], [
524-
LZO2_LIBS="-llzo2"
525-
LZO2_CFLAGS=""
526-
LZO2_LIBS_STATIC="-llzo2"],[
527-
AC_MSG_ERROR([cannot find lzo2 library])
528-
])
529-
AC_SUBST([LZO2_LIBS])
530-
AC_SUBST([LZO2_LIBS_STATIC])
531-
AC_SUBST([LZO2_CFLAGS])
532-
fi
533-
534-
AS_IF([test "x$enable_lzo" = xyes], [COMPRESSION_LZO=1], [COMPRESSION_LZO=0])
535-
AC_SUBST(COMPRESSION_LZO)
536-
537537
dnl call PKG_INSTALLDIR from pkg.m4 to set pkgconfigdir
538538
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_MSG_ERROR([please install pkgconf])])
539539

0 commit comments

Comments
 (0)