main - lvresize_fs_helper: cleanup shellcheck warns
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=35e1f15e0386341617c...
Commit: 35e1f15e0386341617c5810c481a2c8d227026d1
Parent: b681b774dcacd35d08f16d8952ec99d1e85433d6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Feb 9 16:22:11 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 17:50:27 2023 +0100
lvresize_fs_helper: cleanup shellcheck warns
Use commands directly in 'if cmd; then'.
Use shell vars in $(( )) in recommended way.
---
scripts/lvresize_fs_helper.sh | 54 +++++++++++++++----------------------------
1 file changed, 19 insertions(+), 35 deletions(-)
diff --git a/scripts/lvresize_fs_helper.sh b/scripts/lvresize_fs_helper.sh
index f531dd447..90b1a9782 100755
--- a/scripts/lvresize_fs_helper.sh
+++ b/scripts/lvresize_fs_helper.sh
@@ -30,8 +30,7 @@ RESIZEFS_FAILED=0
fsextend() {
if [ "$DO_UNMOUNT" -eq 1 ]; then
logmsg "unmount ${MOUNTDIR}"
- umount "$MOUNTDIR"
- if [ $? -eq 0 ]; then
+ if umount "$MOUNTDIR"; then
logmsg "unmount done"
else
logmsg "unmount failed"
@@ -41,8 +40,7 @@ fsextend() {
if [ "$DO_FSCK" -eq 1 ]; then
logmsg "e2fsck ${DEVPATH}"
- e2fsck -f -p "$DEVPATH"
- if [ $? -eq 0 ]; then
+ if e2fsck -f -p "$DEVPATH"; then
logmsg "e2fsck done"
else
logmsg "e2fsck failed"
@@ -52,8 +50,7 @@ fsextend() {
if [ "$DO_CRYPTRESIZE" -eq 1 ]; then
logmsg "cryptsetup resize ${DEVPATH}"
- cryptsetup resize "$DEVPATH"
- if [ $? -eq 0 ]; then
+ if cryptsetup resize "$DEVPATH"; then
logmsg "cryptsetup done"
else
logmsg "cryptsetup failed"
@@ -63,8 +60,7 @@ fsextend() {
if [ "$DO_MOUNT" -eq 1 ]; then
logmsg "mount ${DEVPATH} ${TMPDIR}"
- mount -t "$FSTYPE" "$DEVPATH" "$TMPDIR"
- if [ $? -eq 0 ]; then
+ if mount -t "$FSTYPE" "$DEVPATH" "$TMPDIR"; then
logmsg "mount done"
TMP_MOUNT_DONE=1
else
@@ -75,8 +71,7 @@ fsextend() {
if [[ "$FSTYPE" == "ext"* ]]; then
logmsg "resize2fs ${DEVPATH}"
- resize2fs "$DEVPATH"
- if [ $? -eq 0 ]; then
+ if resize2fs "$DEVPATH"; then
logmsg "resize2fs done"
else
logmsg "resize2fs failed"
@@ -84,8 +79,7 @@ fsextend() {
fi
elif [[ "$FSTYPE" == "xfs" ]]; then
logmsg "xfs_growfs ${DEVPATH}"
- xfs_growfs "$DEVPATH"
- if [ $? -eq 0 ]; then
+ if xfs_growfs "$DEVPATH"; then
logmsg "xfs_growfs done"
else
logmsg "xfs_growfs failed"
@@ -96,8 +90,7 @@ fsextend() {
# If the fs was temporarily mounted, now unmount it.
if [ $TMP_MOUNT_DONE -eq 1 ]; then
logmsg "cleanup unmount ${TMPDIR}"
- umount "$TMPDIR"
- if [ $? -eq 0 ]; then
+ if umount "$TMPDIR"; then
logmsg "cleanup unmount done"
TMP_MOUNT_DONE=0
rmdir "$TMPDIR"
@@ -111,8 +104,7 @@ fsextend() {
# Not considered a command failure if this fails.
if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
logmsg "remount ${DEVPATH} ${MOUNTDIR}"
- mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"
- if [ $? -eq 0 ]; then
+ if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
logmsg "remount done"
else
logmsg "remount failed"
@@ -130,8 +122,7 @@ fsextend() {
fsreduce() {
if [ "$DO_UNMOUNT" -eq 1 ]; then
logmsg "unmount ${MOUNTDIR}"
- umount "$MOUNTDIR"
- if [ $? -eq 0 ]; then
+ if umount "$MOUNTDIR"; then
logmsg "unmount done"
else
logmsg "unmount failed"
@@ -141,8 +132,7 @@ fsreduce() {
if [ "$DO_FSCK" -eq 1 ]; then
logmsg "e2fsck ${DEVPATH}"
- e2fsck -f -p "$DEVPATH"
- if [ $? -eq 0 ]; then
+ if e2fsck -f -p "$DEVPATH"; then
logmsg "e2fsck done"
else
logmsg "e2fsck failed"
@@ -152,8 +142,7 @@ fsreduce() {
if [ "$DO_MOUNT" -eq 1 ]; then
logmsg "mount ${DEVPATH} ${TMPDIR}"
- mount -t "$FSTYPE" "$DEVPATH" "$TMPDIR"
- if [ $? -eq 0 ]; then
+ if mount -t "$FSTYPE" "$DEVPATH" "$TMPDIR"; then
logmsg "mount done"
TMP_MOUNT_DONE=1
else
@@ -163,10 +152,9 @@ fsreduce() {
fi
if [[ "$FSTYPE" == "ext"* ]]; then
- NEWSIZEKB=$(($NEWSIZEBYTES/1024))
+ NEWSIZEKB=$(( NEWSIZEBYTES / 1024 ))
logmsg "resize2fs ${DEVPATH} ${NEWSIZEKB}k"
- resize2fs "$DEVPATH" "$NEWSIZEKB"k
- if [ $? -eq 0 ]; then
+ if resize2fs "$DEVPATH" "$NEWSIZEKB"k; then
logmsg "resize2fs done"
else
logmsg "resize2fs failed"
@@ -178,8 +166,7 @@ fsreduce() {
# If the fs was temporarily mounted, now unmount it.
if [ $TMP_MOUNT_DONE -eq 1 ]; then
logmsg "cleanup unmount ${TMPDIR}"
- umount "$TMPDIR"
- if [ $? -eq 0 ]; then
+ if umount "$TMPDIR"; then
logmsg "cleanup unmount done"
TMP_MOUNT_DONE=0
rmdir "$TMPDIR"
@@ -195,10 +182,9 @@ fsreduce() {
fi
if [ "$DO_CRYPTRESIZE" -eq 1 ]; then
- NEWSIZESECTORS=$(($NEWSIZEBYTES/512))
+ NEWSIZESECTORS=$(( NEWSIZEBYTES / 512 ))
logmsg "cryptsetup resize ${NEWSIZESECTORS} sectors ${DEVPATH}"
- cryptsetup resize --size "$NEWSIZESECTORS" "$DEVPATH"
- if [ $? -eq 0 ]; then
+ if cryptsetup resize --size "$NEWSIZESECTORS" "$DEVPATH"; then
logmsg "cryptsetup done"
else
logmsg "cryptsetup failed"
@@ -210,8 +196,7 @@ fsreduce() {
# Not considered a command failure if this fails.
if [[ $DO_UNMOUNT -eq 1 && $REMOUNT -eq 1 ]]; then
logmsg "remount ${DEVPATH} ${MOUNTDIR}"
- mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"
- if [ $? -eq 0 ]; then
+ if mount -t "$FSTYPE" "$DEVPATH" "$MOUNTDIR"; then
logmsg "remount done"
else
logmsg "remount failed"
@@ -222,10 +207,9 @@ fsreduce() {
}
cryptresize() {
- NEWSIZESECTORS=$(($NEWSIZEBYTES/512))
+ NEWSIZESECTORS=$(( NEWSIZEBYTES / 512 ))
logmsg "cryptsetup resize ${NEWSIZESECTORS} sectors ${DEVPATH}"
- cryptsetup resize --size "$NEWSIZESECTORS" "$DEVPATH"
- if [ $? -eq 0 ]; then
+ if cryptsetup resize --size "$NEWSIZESECTORS" "$DEVPATH"; then
logmsg "cryptsetup done"
else
logmsg "cryptsetup failed"
3 months, 4 weeks
main - configure: update
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b681b774dcacd35d08f...
Commit: b681b774dcacd35d08f16d8952ec99d1e85433d6
Parent: e67ebc5c40948bcbea536fd407535009a76ede00
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Feb 8 16:15:26 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 17:50:27 2023 +0100
configure: update
---
configure | 1708 +++++++++++++++++++++++++++++++++++++------------------------
1 file changed, 1030 insertions(+), 678 deletions(-)
diff --git a/configure b/configure
index 718f281bc..2406deddc 100755
--- a/configure
+++ b/configure
@@ -652,8 +652,6 @@ ac_subst_vars='LTLIBOBJS
usrsbindir
usrlibdir
tmpfilesdir
-systemdutildir
-systemdsystemunitdir
udevdir
udev_prefix
tmpdir
@@ -734,6 +732,8 @@ INTEGRITY
HAVE_VALGRIND
HAVE_REALTIME
HAVE_LIBDL
+HAVE_BLKID_SUBLKS_FSINFO
+HAVE_BLKID
BLKDEACTIVATE
LVRESIZE_FS_HELPER_PATH
FSADM_PATH
@@ -785,6 +785,8 @@ BLKID_PC
READLINE_LIBS
READLINE_CFLAGS
MODPROBE_CMD
+systemdutildir
+systemdsystemunitdir
MSGFMT
EDITLINE_LIBS
EDITLINE_CFLAGS
@@ -823,8 +825,6 @@ HAVE_WCLOBBERED
HAVE_WJUMP
CPG_LIBS
CPG_CFLAGS
-PKGCONFIGINIT_LIBS
-PKGCONFIGINIT_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
@@ -989,7 +989,6 @@ enable_notify_dbus
enable_systemd_journal
enable_app_machineid
enable_blkid_wiping
-enable_udev_systemd_background_jobs
enable_udev_sync
enable_udev_rules
enable_udev_rule_exec_detection
@@ -1047,8 +1046,6 @@ AIO_LIBS
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
-PKGCONFIGINIT_CFLAGS
-PKGCONFIGINIT_LIBS
CPG_CFLAGS
CPG_LIBS
VALGRIND_CFLAGS
@@ -1070,6 +1067,8 @@ UDEV_LIBS
PYTHON
EDITLINE_CFLAGS
EDITLINE_LIBS
+systemdsystemunitdir
+systemdutildir
READLINE_CFLAGS
READLINE_LIBS'
@@ -1728,9 +1727,6 @@ Optional Features:
--disable-app-machineid disable LVM system ID using app-specific machine-id
--disable-blkid_wiping disable libblkid detection of signatures when wiping
and use native code instead
- --disable-udev-systemd-background-jobs
- disable udev-systemd protocol to instantiate a
- service for background job
--enable-udev_sync enable synchronisation with udev processing
--enable-udev_rules install rule files needed for udev synchronisation
--enable-udev-rule-exec-detection
@@ -1862,10 +1858,6 @@ Some influential environment variables:
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
- PKGCONFIGINIT_CFLAGS
- C compiler flags for PKGCONFIGINIT, overriding pkg-config
- PKGCONFIGINIT_LIBS
- linker flags for PKGCONFIGINIT, overriding pkg-config
CPG_CFLAGS C compiler flags for CPG, overriding pkg-config
CPG_LIBS linker flags for CPG, overriding pkg-config
VALGRIND_CFLAGS
@@ -1902,6 +1894,10 @@ Some influential environment variables:
C compiler flags for EDITLINE, overriding pkg-config
EDITLINE_LIBS
linker flags for EDITLINE, overriding pkg-config
+ systemdsystemunitdir
+ value of systemdsystemunitdir for systemd, overriding pkg-config
+ systemdutildir
+ value of systemdutildir for systemd, overriding pkg-config
READLINE_CFLAGS
C compiler flags for readline
READLINE_LIBS
@@ -3727,40 +3723,39 @@ if test -z "$CFLAGS"
then :
COPTIMISE_FLAG="-O2"
fi
-case "$host_os" in
- linux*)
+case "$host_os" in #(
+ linux*) :
+
# equivalent to -rdynamic
ELDFLAGS="-Wl,--export-dynamic"
# FIXME Generate list and use --dynamic-list=.dlopen.sym
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
- LIB_SUFFIX=so
- DEVMAPPER=yes
- BUILD_LVMPOLLD=no
- ODIRECT=yes
- DM_IOCTLS=yes
- SELINUX=yes
- FSADM=yes
- LVMIMPORTVDO=yes
- BLKDEACTIVATE=yes
- ;;
- darwin*)
+ LIB_SUFFIX="so"
+ DEVMAPPER="yes"
+ BUILD_LVMPOLLD="no"
+ ODIRECT="yes"
+ DM_IOCTLS="yes"
+ SELINUX="yes"
+ FSADM="yes"
+ LVMIMPORTVDO="yes"
+ BLKDEACTIVATE="yes" ;; #(
+ darwin*) :
+
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
ELDFLAGS=
CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE=
- LIB_SUFFIX=dylib
- DEVMAPPER=yes
- ODIRECT=no
- DM_IOCTLS=no
- SELINUX=no
- FSADM=no
- LVMIMPORTVDO=no
- BLKDEACTIVATE=no
- ;;
- *)
- CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"
- ;;
+ LIB_SUFFIX="dylib"
+ DEVMAPPER="yes"
+ ODIRECT="no"
+ DM_IOCTLS="no"
+ SELINUX="no"
+ FSADM="no"
+ LVMIMPORTVDO="no"
+ BLKDEACTIVATE="no" ;; #(
+ *) :
+ CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}" ;;
esac
################################################################################
@@ -7045,9 +7040,9 @@ else $as_nop
fi
done
-case "$host_os" in
- linux*)
- for ac_header in asm/byteorder.h linux/fs.h malloc.h
+case "$host_os" in #(
+ linux*) :
+ for ac_header in asm/byteorder.h linux/fs.h malloc.h
do :
as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -7061,9 +7056,9 @@ else $as_nop
as_fn_error $? "bailing out" "$LINENO" 5
fi
-done ;;
- darwin*)
- for ac_header in machine/endian.h sys/disk.h
+done ;; #(
+ darwin*) :
+ for ac_header in machine/endian.h sys/disk.h
do :
as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -7077,7 +7072,9 @@ else $as_nop
as_fn_error $? "bailing out" "$LINENO" 5
fi
-done ;;
+done ;; #(
+ *) :
+ ;;
esac
################################################################################
@@ -9031,7 +9028,7 @@ if test ${enable_dependency_tracking+y}
then :
enableval=$enable_dependency_tracking; USE_TRACKING=$enableval
else $as_nop
- USE_TRACKING=yes
+ USE_TRACKING="yes"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_TRACKING" >&5
@@ -9045,7 +9042,7 @@ if test ${enable_silent_rules+y}
then :
enableval=$enable_silent_rules; SILENT_RULES=$enableval
else $as_nop
- SILENT_RULES=yes
+ SILENT_RULES="yes"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SILENT_RULES" >&5
@@ -9060,7 +9057,7 @@ if test ${enable_static_link+y}
then :
enableval=$enable_static_link; STATIC_LINK=$enableval
else $as_nop
- STATIC_LINK=no
+ STATIC_LINK="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STATIC_LINK" >&5
@@ -9153,11 +9150,11 @@ printf "%s\n" "$ac_cv_flag_HAVE_FULL_RELRO" >&6; }
################################################################################
-test "$exec_prefix" = NONE -a "$prefix" = NONE && exec_prefix=""
+test "$exec_prefix" = "NONE" && test "$prefix" = "NONE" && exec_prefix=""
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "$prefix" = "NONE" && prefix=$ac_default_prefix
# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+test "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
################################################################################
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking file owner" >&5
@@ -9255,10 +9252,13 @@ else $as_nop
ADD_NODE=resume
fi
-case "$ADD_NODE" in
- resume) add_on=DM_ADD_NODE_ON_RESUME;;
- create) add_on=DM_ADD_NODE_ON_CREATE;;
- *) as_fn_error $? "--with-device-nodes-on parameter invalid" "$LINENO" 5;;
+case "$ADD_NODE" in #(
+ resume) :
+ add_on=DM_ADD_NODE_ON_RESUME ;; #(
+ create) :
+ add_on=DM_ADD_NODE_ON_CREATE ;; #(
+ *) :
+ as_fn_error $? "--with-device-nodes-on parameter invalid" "$LINENO" 5 ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: on $ADD_NODE" >&5
printf "%s\n" "on $ADD_NODE" >&6; }
@@ -9278,9 +9278,11 @@ else $as_nop
DEFAULT_USE_DEVICES_FILE=0
fi
-case "$DEFAULT_USE_DEVICES_FILE" in
- 0|1);;
- *) as_fn_error $? "--with-default-use-devices-file parameter invalid" "$LINENO" 5;;
+case "$DEFAULT_USE_DEVICES_FILE" in #(
+ 0|1) :
+ ;; #(
+ *) :
+ as_fn_error $? "--with-default-use-devices-file parameter invalid" "$LINENO" 5 ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_DEVICES_FILE" >&5
printf "%s\n" "$DEFAULT_USE_DEVICES_FILE" >&6; }
@@ -9299,11 +9301,15 @@ else $as_nop
MANGLING=auto
fi
-case "$MANGLING" in
- auto) mangling=DM_STRING_MANGLING_AUTO;;
- no|none|disabled) mangling=DM_STRING_MANGLING_NONE;;
- hex) mangling=DM_STRING_MANGLING_HEX;;
- *) as_fn_error $? "--with-default-name-mangling parameter invalid" "$LINENO" 5;;
+case "$MANGLING" in #(
+ auto) :
+ mangling=DM_STRING_MANGLING_AUTO ;; #(
+ no|none|disabled) :
+ mangling=DM_STRING_MANGLING_NONE ;; #(
+ hex) :
+ mangling=DM_STRING_MANGLING_HEX ;; #(
+ *) :
+ as_fn_error $? "--with-default-name-mangling parameter invalid" "$LINENO" 5 ;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANGLING" >&5
printf "%s\n" "$MANGLING" >&6; }
@@ -9326,12 +9332,16 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SNAPSHOTS" >&5
printf "%s\n" "$SNAPSHOTS" >&6; }
-case "$SNAPSHOTS" in
- no|none|shared) ;;
- internal)
+case "$SNAPSHOTS" in #(
+ no|none|shared) :
+ ;; #(
+ internal) :
+
+
printf "%s\n" "#define SNAPSHOT_INTERNAL 1" >>confdefs.h
- ;;
- *) as_fn_error $? "--with-snapshots parameter invalid" "$LINENO" 5 ;;
+ ;; #(
+ *) :
+ as_fn_error $? "--with-snapshots parameter invalid" "$LINENO" 5 ;;
esac
################################################################################
@@ -9349,12 +9359,16 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MIRRORS" >&5
printf "%s\n" "$MIRRORS" >&6; }
-case "$MIRRORS" in
- no|none|shared) ;;
- internal)
+case "$MIRRORS" in #(
+ no|none|shared) :
+ ;; #(
+ internal) :
+
+
printf "%s\n" "#define MIRRORED_INTERNAL 1" >>confdefs.h
- ;;
- *) as_fn_error $? "--with-mirrors parameter invalid" "$LINENO" 5 ;;
+ ;; #(
+ *) :
+ as_fn_error $? "--with-mirrors parameter invalid" "$LINENO" 5 ;;
esac
################################################################################
@@ -9394,10 +9408,14 @@ printf "%s\n" "#define DEFAULT_RAID10_SEGTYPE \"$DEFAULT_RAID10_SEGTYPE\"" >>con
# Check whether --with-default-sparse-segtype was given.
if test ${with_default_sparse_segtype+y}
then :
- withval=$with_default_sparse_segtype; case "$withval" in
- thin|snapshot) DEFAULT_SPARSE_SEGTYPE=$withval ;;
- *) as_fn_error $? "--with-default-sparse-segtype parameter invalid" "$LINENO" 5 ;;
- esac
+ withval=$with_default_sparse_segtype;
+ case "$withval" in #(
+ thin|snapshot) :
+ DEFAULT_SPARSE_SEGTYPE=$withval ;; #(
+ *) :
+ as_fn_error $? "--with-default-sparse-segtype parameter invalid" "$LINENO" 5 ;;
+esac
+
else $as_nop
DEFAULT_SPARSE_SEGTYPE="thin"
fi
@@ -9455,13 +9473,18 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIN" >&5
printf "%s\n" "$THIN" >&6; }
-case "$THIN" in
- no|none) test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;;
- shared) ;;
- internal)
+case "$THIN" in #(
+ no|none) :
+ test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;; #(
+ shared) :
+ ;; #(
+ internal) :
+
+
printf "%s\n" "#define THIN_INTERNAL 1" >>confdefs.h
- ;;
- *) as_fn_error $? "--with-thin parameter invalid ($THIN)" "$LINENO" 5 ;;
+ ;; #(
+ *) :
+ as_fn_error $? "--with-thin parameter invalid ($THIN)" "$LINENO" 5 ;;
esac
@@ -9473,16 +9496,19 @@ if test ${enable_thin_check_needs_check+y}
then :
enableval=$enable_thin_check_needs_check; THIN_CHECK_NEEDS_CHECK=$enableval
else $as_nop
- THIN_CHECK_NEEDS_CHECK=yes
+ THIN_CHECK_NEEDS_CHECK="yes"
fi
# Test if necessary thin tools are available
# if not - use plain defaults and warn user
-case "$THIN" in
- internal|shared)
+case "$THIN" in #(
+ internal|shared) :
+
# Empty means a config way to ignore thin checking
- if test "$THIN_CHECK_CMD" = "autodetect"; then
+ if test "$THIN_CHECK_CMD" = "autodetect"
+then :
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}thin_check", so it can be a program name with args.
set dummy ${ac_tool_prefix}thin_check; ac_word=$2
@@ -9591,32 +9617,47 @@ else
THIN_CHECK_CMD="$ac_cv_path_THIN_CHECK_CMD"
fi
- if test -z "$THIN_CHECK_CMD"; then
+ if test -z "$THIN_CHECK_CMD"
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thin_check not found in path $PATH" >&5
printf "%s\n" "$as_me: WARNING: thin_check not found in path $PATH" >&2;}
- THIN_CHECK_CMD=/usr/sbin/thin_check
- THIN_CONFIGURE_WARN=y
- fi
- fi
- if test "$THIN_CHECK_NEEDS_CHECK" = yes && test "$THIN_CONFIGURE_WARN" != y ; then
- THIN_CHECK_VSN=`"$THIN_CHECK_CMD" -V 2>/dev/null`
- THIN_CHECK_VSN_MAJOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}'`
- THIN_CHECK_VSN_MINOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}'`
+ THIN_CHECK_CMD="/usr/sbin/thin_check"
+ THIN_CONFIGURE_WARN="y"
+
+fi
+
+fi
+ if test "$THIN_CHECK_NEEDS_CHECK" = "yes" && test "$THIN_CONFIGURE_WARN" != "y"
+then :
+
+ THIN_CHECK_VSN=$("$THIN_CHECK_CMD" -V 2>/dev/null)
+ THIN_CHECK_VSN_MAJOR=$(echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}')
+ THIN_CHECK_VSN_MINOR=$(echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}')
+
+ if test -z "$THIN_CHECK_VSN_MAJOR" || test -z "$THIN_CHECK_VSN_MINOR"
+then :
- if test -z "$THIN_CHECK_VSN_MAJOR" -o -z "$THIN_CHECK_VSN_MINOR"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $THIN_CHECK_CMD: Bad version \"$THIN_CHECK_VSN\" found" >&5
printf "%s\n" "$as_me: WARNING: $THIN_CHECK_CMD: Bad version \"$THIN_CHECK_VSN\" found" >&2;}
- THIN_CHECK_VERSION_WARN=y
- THIN_CHECK_NEEDS_CHECK=no
- elif test "$THIN_CHECK_VSN_MAJOR" -eq 0 -a "$THIN_CHECK_VSN_MINOR" -lt 3; then
+ THIN_CHECK_VERSION_WARN="y"
+ THIN_CHECK_NEEDS_CHECK="no"
+
+elif test "$THIN_CHECK_VSN_MAJOR" -eq 0 && test "$THIN_CHECK_VSN_MINOR" -lt 3
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $THIN_CHECK_CMD: Old version \"$THIN_CHECK_VSN\" found" >&5
printf "%s\n" "$as_me: WARNING: $THIN_CHECK_CMD: Old version \"$THIN_CHECK_VSN\" found" >&2;}
- THIN_CHECK_VERSION_WARN=y
- THIN_CHECK_NEEDS_CHECK=no
- fi
- fi
+ THIN_CHECK_VERSION_WARN="y"
+ THIN_CHECK_NEEDS_CHECK="no"
+
+fi
+
+fi
# Empty means a config way to ignore thin dumping
- if test "$THIN_DUMP_CMD" = "autodetect"; then
+ if test "$THIN_DUMP_CMD" = "autodetect"
+then :
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}thin_dump", so it can be a program name with args.
set dummy ${ac_tool_prefix}thin_dump; ac_word=$2
@@ -9725,15 +9766,21 @@ else
THIN_DUMP_CMD="$ac_cv_path_THIN_DUMP_CMD"
fi
- test -z "$THIN_DUMP_CMD" && {
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thin_dump not found in path $PATH" >&5
-printf "%s\n" "$as_me: WARNING: thin_dump not found in path $PATH" >&2;}
- THIN_DUMP_CMD=/usr/sbin/thin_dump
- THIN_CONFIGURE_WARN=y
- }
- fi
+ if test -z "$THIN_DUMP_CMD"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"thin_dump not found in path $PATH\"" >&5
+printf "%s\n" "$as_me: WARNING: \"thin_dump not found in path $PATH\"" >&2;}
+ THIN_DUMP_CMD="/usr/sbin/thin_dump"
+ THIN_CONFIGURE_WARN="y"
+
+fi
+
+fi
# Empty means a config way to ignore thin repairing
- if test "$THIN_REPAIR_CMD" = "autodetect"; then
+ if test "$THIN_REPAIR_CMD" = "autodetect"
+then :
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}thin_repair", so it can be a program name with args.
set dummy ${ac_tool_prefix}thin_repair; ac_word=$2
@@ -9842,15 +9889,21 @@ else
THIN_REPAIR_CMD="$ac_cv_path_THIN_REPAIR_CMD"
fi
- test -z "$THIN_REPAIR_CMD" && {
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thin_repair not found in path $PATH" >&5
-printf "%s\n" "$as_me: WARNING: thin_repair not found in path $PATH" >&2;}
- THIN_REPAIR_CMD=/usr/sbin/thin_repair
- THIN_CONFIGURE_WARN=y
- }
- fi
+ if test -z "$THIN_REPAIR_CMD"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"thin_repair not found in path $PATH\"" >&5
+printf "%s\n" "$as_me: WARNING: \"thin_repair not found in path $PATH\"" >&2;}
+ THIN_REPAIR_CMD="/usr/sbin/thin_repair"
+ THIN_CONFIGURE_WARN="y"
+
+fi
+
+fi
# Empty means a config way to ignore thin restoring
- if test "$THIN_RESTORE_CMD" = "autodetect"; then
+ if test "$THIN_RESTORE_CMD" = "autodetect"
+then :
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}thin_restore", so it can be a program name with args.
set dummy ${ac_tool_prefix}thin_restore; ac_word=$2
@@ -9959,24 +10012,33 @@ else
THIN_RESTORE_CMD="$ac_cv_path_THIN_RESTORE_CMD"
fi
- test -z "$THIN_RESTORE_CMD" && {
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thin_restore not found in path $PATH" >&5
-printf "%s\n" "$as_me: WARNING: thin_restore not found in path $PATH" >&2;}
- THIN_RESTORE_CMD=/usr/sbin/thin_restore
- THIN_CONFIGURE_WARN=y
- }
- fi
+ if test -z "$THIN_RESTORE_CMD"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"thin_restore not found in path $PATH\"" >&5
+printf "%s\n" "$as_me: WARNING: \"thin_restore not found in path $PATH\"" >&2;}
+ THIN_RESTORE_CMD="/usr/sbin/thin_restore"
+ THIN_CONFIGURE_WARN="y"
+
+fi
+
+fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether thin_check supports the needs-check flag" >&5
printf %s "checking whether thin_check supports the needs-check flag... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $THIN_CHECK_NEEDS_CHECK" >&5
printf "%s\n" "$THIN_CHECK_NEEDS_CHECK" >&6; }
- if test "$THIN_CHECK_NEEDS_CHECK" = yes; then
+ if test "$THIN_CHECK_NEEDS_CHECK" = "yes"
+then :
+
printf "%s\n" "#define THIN_CHECK_NEEDS_CHECK 1" >>confdefs.h
- fi
- ;;
+
+fi
+ ;; #(
+ *) :
+ ;;
esac
@@ -10046,12 +10108,16 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CACHE" >&5
printf "%s\n" "$CACHE" >&6; }
-case "$CACHE" in
- no|none|shared) ;;
- internal)
+case "$CACHE" in #(
+ no|none|shared) :
+ ;; #(
+ internal) :
+
+
printf "%s\n" "#define CACHE_INTERNAL 1" >>confdefs.h
- ;;
- *) as_fn_error $? "--with-cache parameter invalid" "$LINENO" 5 ;;
+ ;; #(
+ *) :
+ as_fn_error $? "--with-cache parameter invalid" "$LINENO" 5 ;;
esac
# Check whether --enable-cache_check_needs_check was given.
@@ -10059,16 +10125,19 @@ if test ${enable_cache_check_needs_check+y}
then :
enableval=$enable_cache_check_needs_check; CACHE_CHECK_NEEDS_CHECK=$enableval
else $as_nop
- CACHE_CHECK_NEEDS_CHECK=yes
+ CACHE_CHECK_NEEDS_CHECK="yes"
fi
# Test if necessary cache tools are available
# if not - use plain defaults and warn user
-case "$CACHE" in
- internal|shared)
+case "$CACHE" in #(
+ internal|shared) :
+
# Empty means a config way to ignore cache checking
- if test "$CACHE_CHECK_CMD" = "autodetect"; then
+ if test "$CACHE_CHECK_CMD" = "autodetect"
+then :
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cache_check", so it can be a program name with args.
set dummy ${ac_tool_prefix}cache_check; ac_word=$2
@@ -10177,14 +10246,20 @@ else
CACHE_CHECK_CMD="$ac_cv_path_CACHE_CHECK_CMD"
fi
- if test -z "$CACHE_CHECK_CMD"; then
+ if test -z "$CACHE_CHECK_CMD"
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache_check not found in path $PATH" >&5
printf "%s\n" "$as_me: WARNING: cache_check not found in path $PATH" >&2;}
- CACHE_CHECK_CMD=/usr/sbin/cache_check
- CACHE_CONFIGURE_WARN=y
- fi
- fi
- if test "$CACHE_CHECK_NEEDS_CHECK" = yes && test "$CACHE_CONFIGURE_WARN" != y ; then
+ CACHE_CHECK_CMD="/usr/sbin/cache_check"
+ CACHE_CONFIGURE_WARN="y"
+
+fi
+
+fi
+ if test "$CACHE_CHECK_NEEDS_CHECK" = "yes" && test "$CACHE_CONFIGURE_WARN" != "y"
+then :
+
$CACHE_CHECK_CMD -V 2>/dev/null >conftest.tmp
read -r CACHE_CHECK_VSN < conftest.tmp
IFS=.- read -r CACHE_CHECK_VSN_MAJOR CACHE_CHECK_VSN_MINOR CACHE_CHECK_VSN_PATCH LEFTOVER < conftest.tmp
@@ -10193,28 +10268,43 @@ printf "%s\n" "$as_me: WARNING: cache_check not found in path $PATH" >&2;}
# Require version >= 0.5.4 for --clear-needs-check-flag
if test -z "$CACHE_CHECK_VSN_MAJOR" \
|| test -z "$CACHE_CHECK_VSN_MINOR" \
- || test -z "$CACHE_CHECK_VSN_PATCH"; then
+ || test -z "$CACHE_CHECK_VSN_PATCH"
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $CACHE_CHECK_CMD: Bad version \"$CACHE_CHECK_VSN\" found" >&5
printf "%s\n" "$as_me: WARNING: $CACHE_CHECK_CMD: Bad version \"$CACHE_CHECK_VSN\" found" >&2;}
- CACHE_CHECK_VERSION_WARN=y
- CACHE_CHECK_NEEDS_CHECK=no
- elif test "$CACHE_CHECK_VSN_MAJOR" -eq 0 ; then
+ CACHE_CHECK_VERSION_WARN="y"
+ CACHE_CHECK_NEEDS_CHECK="no"
+
+elif test "$CACHE_CHECK_VSN_MAJOR" -eq 0
+then :
+
if test "$CACHE_CHECK_VSN_MINOR" -lt 5 \
- || test "$CACHE_CHECK_VSN_MINOR" -eq 5 -a "$CACHE_CHECK_VSN_PATCH" -lt 4; then
+ || ( test "$CACHE_CHECK_VSN_MINOR" -eq 5 && test "$CACHE_CHECK_VSN_PATCH" -lt 4 )
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $CACHE_CHECK_CMD: Old version \"$CACHE_CHECK_VSN\" found" >&5
printf "%s\n" "$as_me: WARNING: $CACHE_CHECK_CMD: Old version \"$CACHE_CHECK_VSN\" found" >&2;}
- CACHE_CHECK_VERSION_WARN=y
- CACHE_CHECK_NEEDS_CHECK=no
- fi
- if test "$CACHE_CHECK_VSN_MINOR" -lt 7 ; then
+ CACHE_CHECK_VERSION_WARN="y"
+ CACHE_CHECK_NEEDS_CHECK="no"
+
+fi
+ if test "$CACHE_CHECK_VSN_MINOR" -lt 7
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $CACHE_CHECK_CMD: Old version \"$CACHE_CHECK_VSN\" does not support new cache format V2" >&5
printf "%s\n" "$as_me: WARNING: $CACHE_CHECK_CMD: Old version \"$CACHE_CHECK_VSN\" does not support new cache format V2" >&2;}
CACHE_CHECK_VERSION_WARN=y
- fi
- fi
- fi
+
+fi
+
+fi
+
+fi
# Empty means a config way to ignore cache dumping
- if test "$CACHE_DUMP_CMD" = "autodetect"; then
+ if test "$CACHE_DUMP_CMD" = "autodetect"
+then :
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cache_dump", so it can be a program name with args.
set dummy ${ac_tool_prefix}cache_dump; ac_word=$2
@@ -10323,15 +10413,21 @@ else
CACHE_DUMP_CMD="$ac_cv_path_CACHE_DUMP_CMD"
fi
- test -z "$CACHE_DUMP_CMD" && {
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache_dump not found in path $PATH" >&5
-printf "%s\n" "$as_me: WARNING: cache_dump not found in path $PATH" >&2;}
- CACHE_DUMP_CMD=/usr/sbin/cache_dump
- CACHE_CONFIGURE_WARN=y
- }
- fi
+ if test -z "$CACHE_DUMP_CMD"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"cache_dump not found in path $PATH\"" >&5
+printf "%s\n" "$as_me: WARNING: \"cache_dump not found in path $PATH\"" >&2;}
+ CACHE_DUMP_CMD="/usr/sbin/cache_dump"
+ CACHE_CONFIGURE_WARN="y"
+
+fi
+
+fi
# Empty means a config way to ignore cache repairing
- if test "$CACHE_REPAIR_CMD" = "autodetect"; then
+ if test "$CACHE_REPAIR_CMD" = "autodetect"
+then :
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cache_repair", so it can be a program name with args.
set dummy ${ac_tool_prefix}cache_repair; ac_word=$2
@@ -10440,15 +10536,21 @@ else
CACHE_REPAIR_CMD="$ac_cv_path_CACHE_REPAIR_CMD"
fi
- test -z "$CACHE_REPAIR_CMD" && {
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache_repair not found in path $PATH" >&5
-printf "%s\n" "$as_me: WARNING: cache_repair not found in path $PATH" >&2;}
- CACHE_REPAIR_CMD=/usr/sbin/cache_repair
- CACHE_CONFIGURE_WARN=y
- }
- fi
+ if test -z "$CACHE_REPAIR_CMD"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"cache_repair not found in path $PATH\"" >&5
+printf "%s\n" "$as_me: WARNING: \"cache_repair not found in path $PATH\"" >&2;}
+ CACHE_REPAIR_CMD="/usr/sbin/cache_repair"
+ CACHE_CONFIGURE_WARN="y"
+
+fi
+
+fi
# Empty means a config way to ignore cache restoring
- if test "$CACHE_RESTORE_CMD" = "autodetect"; then
+ if test "$CACHE_RESTORE_CMD" = "autodetect"
+then :
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cache_restore", so it can be a program name with args.
set dummy ${ac_tool_prefix}cache_restore; ac_word=$2
@@ -10557,24 +10659,33 @@ else
CACHE_RESTORE_CMD="$ac_cv_path_CACHE_RESTORE_CMD"
fi
- test -z "$CACHE_RESTORE_CMD" && {
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache_restore not found in path $PATH" >&5
-printf "%s\n" "$as_me: WARNING: cache_restore not found in path $PATH" >&2;}
- CACHE_RESTORE_CMD=/usr/sbin/cache_restore
- CACHE_CONFIGURE_WARN=y
- }
- fi
+ if test -z "$CACHE_RESTORE_CMD"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"cache_restore not found in path $PATH\"" >&5
+printf "%s\n" "$as_me: WARNING: \"cache_restore not found in path $PATH\"" >&2;}
+ CACHE_RESTORE_CMD="/usr/sbin/cache_restore"
+ CACHE_CONFIGURE_WARN="y"
+
+fi
+
+fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cache_check supports the needs-check flag" >&5
printf %s "checking whether cache_check supports the needs-check flag... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CACHE_CHECK_NEEDS_CHECK" >&5
printf "%s\n" "$CACHE_CHECK_NEEDS_CHECK" >&6; }
- if test "$CACHE_CHECK_NEEDS_CHECK" = yes; then
+ if test "$CACHE_CHECK_NEEDS_CHECK" = "yes"
+then :
+
printf "%s\n" "#define CACHE_CHECK_NEEDS_CHECK 1" >>confdefs.h
- fi
- ;;
+
+fi
+ ;; #(
+ *) :
+ ;;
esac
@@ -10618,14 +10729,18 @@ else $as_nop
VDO_FORMAT_CMD="autodetect"
fi
-case "$VDO" in
- no|none) ;;
- internal)
+case "$VDO" in #(
+ no|none) :
+ ;; #(
+ internal) :
+
printf "%s\n" "#define VDO_INTERNAL 1" >>confdefs.h
- if test "$VDO_FORMAT_CMD" = "autodetect"; then
- if test -n "$ac_tool_prefix"; then
+ if test "$VDO_FORMAT_CMD" = "autodetect"
+then :
+
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}vdoformat", so it can be a program name with args.
set dummy ${ac_tool_prefix}vdoformat; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -10733,15 +10848,19 @@ else
VDO_FORMAT_CMD="$ac_cv_path_VDO_FORMAT_CMD"
fi
- if test -z "$VDO_FORMAT_CMD"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: vdoformat not found in path $PATH" >&5
+ if test -z "$VDO_FORMAT_CMD"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: vdoformat not found in path $PATH" >&5
printf "%s\n" "$as_me: WARNING: vdoformat not found in path $PATH" >&2;}
- VDO_FORMAT_CMD=/usr/bin/vdoformat
- VDO_CONFIGURE_WARN=y
- fi
- fi
- ;;
- *) as_fn_error $? "--with-vdo parameter invalid" "$LINENO" 5 ;;
+ VDO_FORMAT_CMD="/usr/bin/vdoformat"
+ VDO_CONFIGURE_WARN=y
+
+fi
+
+fi ;; #(
+ *) :
+ as_fn_error $? "--with-vdo parameter invalid" "$LINENO" 5 ;;
esac
@@ -10755,13 +10874,13 @@ printf "%s\n" "#define VDO_FORMAT_CMD \"$VDO_FORMAT_CMD\"" >>confdefs.h
# AS_HELP_STRING([--with-vdo-include=PATH],
# [vdo support: Path to utils headers: [/usr/include/vdo/utils]]),
# VDO_INCLUDE=$withval, VDO_INCLUDE="/usr/include/vdo/utils")
-#AC_MSG_RESULT($VDO_INCLUDE)
+#AC_MSG_RESULT([$VDO_INCLUDE])
#
#AC_ARG_WITH(vdo-lib,
# AS_HELP_STRING([--with-vdo-lib=PATH],
# [vdo support: Path to utils lib: [/usr/lib]]),
# VDO_LIB=$withval, VDO_LIB="/usr/lib")
-#AC_MSG_RESULT($VDO_LIB)
+#AC_MSG_RESULT([$VDO_LIB])
################################################################################
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to include writecache" >&5
@@ -10779,14 +10898,16 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WRITECACHE" >&5
printf "%s\n" "$WRITECACHE" >&6; }
-case "$WRITECACHE" in
- no|none) ;;
- internal)
+case "$WRITECACHE" in #(
+ no|none) :
+ ;; #(
+ internal) :
-printf "%s\n" "#define WRITECACHE_INTERNAL 1" >>confdefs.h
- ;;
- *) as_fn_error $? "--with-writecache parameter invalid" "$LINENO" 5 ;;
+printf "%s\n" "#define WRITECACHE_INTERNAL 1" >>confdefs.h
+ ;; #(
+ *) :
+ as_fn_error $? "--with-writecache parameter invalid" "$LINENO" 5 ;;
esac
################################################################################
@@ -10805,14 +10926,16 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INTEGRITY" >&5
printf "%s\n" "$INTEGRITY" >&6; }
-case "$INTEGRITY" in
- no|none) ;;
- internal)
+case "$INTEGRITY" in #(
+ no|none) :
+ ;; #(
+ internal) :
-printf "%s\n" "#define INTEGRITY_INTERNAL 1" >>confdefs.h
- ;;
- *) as_fn_error $? "--with-integrity parameter invalid" "$LINENO" 5 ;;
+printf "%s\n" "#define INTEGRITY_INTERNAL 1" >>confdefs.h
+ ;; #(
+ *) :
+ as_fn_error $? "--with-integrity parameter invalid" "$LINENO" 5 ;;
esac
################################################################################
@@ -10829,7 +10952,7 @@ if test ${enable_readline+y}
then :
enableval=$enable_readline; READLINE=$enableval
else $as_nop
- READLINE=maybe
+ READLINE="maybe"
fi
@@ -10839,7 +10962,7 @@ if test ${enable_editline+y}
then :
enableval=$enable_editline; EDITLINE=$enableval
else $as_nop
- EDITLINE=no
+ EDITLINE="no"
fi
@@ -10851,7 +10974,7 @@ if test ${enable_realtime+y}
then :
enableval=$enable_realtime; REALTIME=$enableval
else $as_nop
- REALTIME=yes
+ REALTIME="yes"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $REALTIME" >&5
@@ -10865,7 +10988,7 @@ if test ${enable_ocf+y}
then :
enableval=$enable_ocf; OCF=$enableval
else $as_nop
- OCF=no
+ OCF="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OCF" >&5
@@ -10881,71 +11004,153 @@ fi
################################################################################
-pkg_config_init() {
- if test "$PKGCONFIG_INIT" != 1; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default run directory" >&5
+printf %s "checking for default run directory... " >&6; }
+RUN_DIR="/run"
+test -d "/run" || RUN_DIR="/var/run"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUN_DIR" >&5
+printf "%s\n" "$RUN_DIR" >&6; }
+# Check whether --with-default-pid-dir was given.
+if test ${with_default_pid_dir+y}
+then :
+ withval=$with_default_pid_dir; DEFAULT_PID_DIR="$withval"
+else $as_nop
+ DEFAULT_PID_DIR=$RUN_DIR
+fi
+
+printf "%s\n" "#define DEFAULT_PID_DIR \"$DEFAULT_PID_DIR\"" >>confdefs.h
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_path_PKG_CONFIG+y}
+# Check whether --with-default-dm-run-dir was given.
+if test ${with_default_dm_run_dir+y}
then :
- printf %s "(cached) " >&6
+ withval=$with_default_dm_run_dir; DEFAULT_DM_RUN_DIR="$withval"
else $as_nop
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-printf "%s\n" "$PKG_CONFIG" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+ DEFAULT_DM_RUN_DIR=$RUN_DIR
fi
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
- ac_pt_PKG_CONFIG=$PKG_CONFIG
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
-then :
+printf "%s\n" "#define DEFAULT_DM_RUN_DIR \"$DEFAULT_DM_RUN_DIR\"" >>confdefs.h
+
+
+
+
+# Check whether --with-default-run-dir was given.
+if test ${with_default_run_dir+y}
+then :
+ withval=$with_default_run_dir; DEFAULT_RUN_DIR="$withval"
+else $as_nop
+ DEFAULT_RUN_DIR="$RUN_DIR/lvm"
+fi
+
+
+printf "%s\n" "#define DEFAULT_RUN_DIR \"$DEFAULT_RUN_DIR\"" >>confdefs.h
+
+
+################################################################################
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build cluster mirror log daemon" >&5
+printf %s "checking whether to build cluster mirror log daemon... " >&6; }
+# Check whether --enable-cmirrord was given.
+if test ${enable_cmirrord+y}
+then :
+ enableval=$enable_cmirrord; CMIRRORD=$enableval
+else $as_nop
+ CMIRRORD="no"
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CMIRRORD" >&5
+printf "%s\n" "$CMIRRORD" >&6; }
+
+BUILD_CMIRRORD=$CMIRRORD
+
+################################################################################
+if test "$BUILD_CMIRRORD" = "yes"
+then :
+
+
+# Check whether --with-cmirrord-pidfile was given.
+if test ${with_cmirrord_pidfile+y}
+then :
+ withval=$with_cmirrord_pidfile; CMIRRORD_PIDFILE=$withval
+else $as_nop
+ CMIRRORD_PIDFILE="$DEFAULT_PID_DIR/cmirrord.pid"
+fi
+
+
+printf "%s\n" "#define CMIRRORD_PIDFILE \"$CMIRRORD_PIDFILE\"" >>confdefs.h
+
+
+fi
+
+################################################################################
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
printf %s "(cached) " >&6
else $as_nop
case $ac_pt_PKG_CONFIG in
@@ -11013,170 +11218,10 @@ printf "%s\n" "no" >&6; }
PKG_CONFIG=""
fi
fi
-
-pkg_failed=no
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PKGCONFIGINIT" >&5
-printf %s "checking for PKGCONFIGINIT... " >&6; }
-
-if test -n "$PKGCONFIGINIT_CFLAGS"; then
- pkg_cv_PKGCONFIGINIT_CFLAGS="$PKGCONFIGINIT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkgconfiginit\""; } >&5
- ($PKG_CONFIG --exists --print-errors "pkgconfiginit") 2>&5
- ac_status=$?
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_PKGCONFIGINIT_CFLAGS=`$PKG_CONFIG --cflags "pkgconfiginit" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$PKGCONFIGINIT_LIBS"; then
- pkg_cv_PKGCONFIGINIT_LIBS="$PKGCONFIGINIT_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkgconfiginit\""; } >&5
- ($PKG_CONFIG --exists --print-errors "pkgconfiginit") 2>&5
- ac_status=$?
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_PKGCONFIGINIT_LIBS=`$PKG_CONFIG --libs "pkgconfiginit" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- PKGCONFIGINIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkgconfiginit" 2>&1`
- else
- PKGCONFIGINIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkgconfiginit" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$PKGCONFIGINIT_PKG_ERRORS" >&5
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config initialized" >&5
-printf "%s\n" "pkg-config initialized" >&6; }
-elif test $pkg_failed = untried; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config initialized" >&5
-printf "%s\n" "pkg-config initialized" >&6; }
-else
- PKGCONFIGINIT_CFLAGS=$pkg_cv_PKGCONFIGINIT_CFLAGS
- PKGCONFIGINIT_LIBS=$pkg_cv_PKGCONFIGINIT_LIBS
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
-
-fi
- PKGCONFIG_INIT=1
- fi
-}
-
-################################################################################
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default run directory" >&5
-printf %s "checking for default run directory... " >&6; }
-RUN_DIR="/run"
-test -d "/run" || RUN_DIR="/var/run"
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUN_DIR" >&5
-printf "%s\n" "$RUN_DIR" >&6; }
-
-
-# Check whether --with-default-pid-dir was given.
-if test ${with_default_pid_dir+y}
-then :
- withval=$with_default_pid_dir; DEFAULT_PID_DIR="$withval"
-else $as_nop
- DEFAULT_PID_DIR=$RUN_DIR
-fi
-
-
-printf "%s\n" "#define DEFAULT_PID_DIR \"$DEFAULT_PID_DIR\"" >>confdefs.h
-
-
-
-
-# Check whether --with-default-dm-run-dir was given.
-if test ${with_default_dm_run_dir+y}
+if test "$BUILD_CMIRRORD" = "yes" && test "$HAVE_CPG" != "yes"
then :
- withval=$with_default_dm_run_dir; DEFAULT_DM_RUN_DIR="$withval"
-else $as_nop
- DEFAULT_DM_RUN_DIR=$RUN_DIR
-fi
-
-
-printf "%s\n" "#define DEFAULT_DM_RUN_DIR \"$DEFAULT_DM_RUN_DIR\"" >>confdefs.h
-
-
-# Check whether --with-default-run-dir was given.
-if test ${with_default_run_dir+y}
-then :
- withval=$with_default_run_dir; DEFAULT_RUN_DIR="$withval"
-else $as_nop
- DEFAULT_RUN_DIR="$RUN_DIR/lvm"
-fi
-
-
-printf "%s\n" "#define DEFAULT_RUN_DIR \"$DEFAULT_RUN_DIR\"" >>confdefs.h
-
-
-################################################################################
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build cluster mirror log daemon" >&5
-printf %s "checking whether to build cluster mirror log daemon... " >&6; }
-# Check whether --enable-cmirrord was given.
-if test ${enable_cmirrord+y}
-then :
- enableval=$enable_cmirrord; CMIRRORD=$enableval
-else $as_nop
- CMIRRORD=no
-fi
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CMIRRORD" >&5
-printf "%s\n" "$CMIRRORD" >&6; }
-
-BUILD_CMIRRORD=$CMIRRORD
-
-################################################################################
-if test "$BUILD_CMIRRORD" = yes; then
-
-# Check whether --with-cmirrord-pidfile was given.
-if test ${with_cmirrord_pidfile+y}
-then :
- withval=$with_cmirrord_pidfile; CMIRRORD_PIDFILE=$withval
-else $as_nop
- CMIRRORD_PIDFILE="$DEFAULT_PID_DIR/cmirrord.pid"
-fi
-
-
-printf "%s\n" "#define CMIRRORD_PIDFILE \"$CMIRRORD_PIDFILE\"" >>confdefs.h
-
-fi
-
-################################################################################
-if [ "$BUILD_CMIRRORD" = yes ]; then
- pkg_config_init
-
- if test "$HAVE_CPG" != yes; then
-
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CPG" >&5
printf %s "checking for CPG... " >&6; }
@@ -11267,7 +11312,7 @@ else
printf "%s\n" "yes" >&6; }
fi
- fi
+
fi
################################################################################
@@ -11278,16 +11323,17 @@ if test ${enable_debug+y}
then :
enableval=$enable_debug; DEBUG=$enableval
else $as_nop
- DEBUG=no
+ DEBUG="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEBUG" >&5
printf "%s\n" "$DEBUG" >&6; }
-if test "$DEBUG" = yes; then
- COPTIMISE_FLAG=
-else
- CSCOPE_CMD=
+if test "$DEBUG" = "yes"
+then :
+ COPTIMISE_FLAG=""
+else $as_nop
+ CSCOPE_CMD=""
fi
@@ -11431,27 +11477,35 @@ printf %s "checking whether to use symbol versioning... " >&6; }
# Check whether --with-symvers was given.
if test ${with_symvers+y}
then :
- withval=$with_symvers; case "$withval" in
- gnu|no) symvers=$withval ;;
- *) as_fn_error $? "--with-symvers parameter invalid" "$LINENO" 5 ;;
- esac
+ withval=$with_symvers;
+ case "$withval" in #(
+ gnu|no) :
+ symvers=$withval ;; #(
+ *) :
+ as_fn_error $? "--with-symvers parameter invalid" "$LINENO" 5 ;;
+esac
else $as_nop
- symvers=gnu
+ symvers="gnu"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $symvers" >&5
printf "%s\n" "$symvers" >&6; }
-if test "$GCC" = "yes" && test "$symvers" = "gnu" ; then
+if test "$GCC" = "yes" && test "$symvers" = "gnu"
+then :
+
printf "%s\n" "#define GNU_SYMVER 1" >>confdefs.h
- case "$host_os" in
- linux*)
+ case "$host_os" in #(
+ linux*) :
+
CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym"
- LDDEPS="$LDDEPS .export.sym"
- ;;
- esac
+ LDDEPS="$LDDEPS .export.sym" ;; #(
+ *) :
+ ;;
+esac
+
fi
################################################################################
@@ -11462,13 +11516,15 @@ if test ${enable_profiling+y}
then :
enableval=$enable_profiling; PROFILING=$enableval
else $as_nop
- PROFILING=no
+ PROFILING="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROFILING" >&5
printf "%s\n" "$PROFILING" >&6; }
-if test "$PROFILING" = yes; then
+if test "$PROFILING" = "yes"
+then :
+
COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}lcov", so it can be a program name with args.
@@ -11686,7 +11742,12 @@ else
GENHTML="$ac_cv_path_GENHTML"
fi
- test -z "$LCOV" -o -z "$GENHTML" && as_fn_error $? "lcov and genhtml are required for profiling" "$LINENO" 5
+ if test -z "$LCOV" || test -z "$GENHTML"
+then :
+
+ as_fn_error $? "lcov and genhtml are required for profiling" "$LINENO" 5
+
+fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}genpng", so it can be a program name with args.
set dummy ${ac_tool_prefix}genpng; ac_word=$2
@@ -11795,21 +11856,30 @@ else
GENPNG="$ac_cv_path_GENPNG"
fi
- if test -n "$GENPNG"; then
+ if test -n "$GENPNG"
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $GENPNG has all required modules" >&5
printf %s "checking whether $GENPNG has all required modules... " >&6; }
- if "$GENPNG" --help > /dev/null 2>&1 ; then
+ if "$GENPNG" --help > /dev/null 2>&1
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
printf "%s\n" "ok" >&6; }
GENHTML="$GENHTML --frames"
- else
+
+else $as_nop
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
printf "%s\n" "not supported" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GD.pm perl module is not installed" >&5
printf "%s\n" "$as_me: WARNING: GD.pm perl module is not installed" >&2;}
GENPNG=
- fi
- fi
+
+fi
+
+fi
+
fi
################################################################################
@@ -11827,13 +11897,12 @@ if test ${enable_valgrind_pool+y}
then :
enableval=$enable_valgrind_pool; VALGRIND_POOL=$enableval
else $as_nop
- VALGRIND_POOL=no
+ VALGRIND_POOL="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VALGRIND_POOL" >&5
printf "%s\n" "$VALGRIND_POOL" >&6; }
-pkg_config_init
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for VALGRIND" >&5
@@ -11893,30 +11962,46 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$VALGRIND_PKG_ERRORS" >&5
- if test x$VALGRIND_POOL = xyes; then as_fn_error $? "bailing out" "$LINENO" 5; fi
+
+ if test "$VALGRIND_POOL" = "yes"
+then :
+ as_fn_error $? "bailing out" "$LINENO" 5
+fi
+
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
- if test x$VALGRIND_POOL = xyes; then as_fn_error $? "bailing out" "$LINENO" 5; fi
+
+ if test "$VALGRIND_POOL" = "yes"
+then :
+ as_fn_error $? "bailing out" "$LINENO" 5
+fi
+
else
VALGRIND_CFLAGS=$pkg_cv_VALGRIND_CFLAGS
VALGRIND_LIBS=$pkg_cv_VALGRIND_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
- HAVE_VALGRIND=yes
+ HAVE_VALGRIND="yes"
fi
-if test x$HAVE_VALGRIND = xyes; then
+if test "$HAVE_VALGRIND" = "yes"
+then :
+
printf "%s\n" "#define HAVE_VALGRIND 1" >>confdefs.h
+
fi
-if test x$VALGRIND_POOL = xyes; then
+if test "$VALGRIND_POOL" = "yes"
+then :
+
printf "%s\n" "#define VALGRIND_POOL 1" >>confdefs.h
+
fi
################################################################################
@@ -11931,10 +12016,13 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVMAPPER" >&5
printf "%s\n" "$DEVMAPPER" >&6; }
-if test "$DEVMAPPER" = yes; then
+if test "$DEVMAPPER" = "yes"
+then :
+
printf "%s\n" "#define DEVMAPPER_SUPPORT 1" >>confdefs.h
+
fi
################################################################################
@@ -11945,7 +12033,7 @@ if test ${enable_lvmpolld+y}
then :
enableval=$enable_lvmpolld; LVMPOLLD=$enableval
else $as_nop
- LVMPOLLD=no
+ LVMPOLLD="no"
fi
test -n "$LVMPOLLD" && BUILD_LVMPOLLD=$LVMPOLLD
@@ -11962,7 +12050,7 @@ if test ${enable_lvmlockd_sanlock+y}
then :
enableval=$enable_lvmlockd_sanlock; LOCKDSANLOCK=$enableval
else $as_nop
- LOCKDSANLOCK=no
+ LOCKDSANLOCK="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCKDSANLOCK" >&5
@@ -11970,7 +12058,9 @@ printf "%s\n" "$LOCKDSANLOCK" >&6; }
BUILD_LOCKDSANLOCK=$LOCKDSANLOCK
-if test "$BUILD_LOCKDSANLOCK" = yes; then
+if test "$BUILD_LOCKDSANLOCK" = "yes"
+then :
+
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LOCKD_SANLOCK" >&5
@@ -12046,6 +12136,7 @@ fi
printf "%s\n" "#define LOCKDSANLOCK_SUPPORT 1" >>confdefs.h
BUILD_LVMLOCKD=yes
+
fi
################################################################################
@@ -12056,7 +12147,7 @@ if test ${enable_lvmlockd_dlm+y}
then :
enableval=$enable_lvmlockd_dlm; LOCKDDLM=$enableval
else $as_nop
- LOCKDDLM=no
+ LOCKDDLM="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCKDDLM" >&5
@@ -12064,7 +12155,9 @@ printf "%s\n" "$LOCKDDLM" >&6; }
BUILD_LOCKDDLM=$LOCKDDLM
-if test "$BUILD_LOCKDDLM" = yes; then
+if test "$BUILD_LOCKDDLM" = "yes"
+then :
+
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LOCKD_DLM" >&5
@@ -12140,6 +12233,7 @@ fi
printf "%s\n" "#define LOCKDDLM_SUPPORT 1" >>confdefs.h
BUILD_LVMLOCKD=yes
+
fi
################################################################################
@@ -12150,7 +12244,7 @@ if test ${enable_lvmlockd_dlmcontrol+y}
then :
enableval=$enable_lvmlockd_dlmcontrol; LOCKDDLM_CONTROL=$enableval
else $as_nop
- LOCKDDLM_CONTROL=no
+ LOCKDDLM_CONTROL="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCKDDLM_CONTROL" >&5
@@ -12158,7 +12252,9 @@ printf "%s\n" "$LOCKDDLM_CONTROL" >&6; }
BUILD_LOCKDDLM_CONTROL=$LOCKDDLM_CONTROL
-if test "$BUILD_LOCKDDLM_CONTROL" = yes; then
+if test "$BUILD_LOCKDDLM_CONTROL" = "yes"
+then :
+
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LOCKD_DLM_CONTROL" >&5
@@ -12234,6 +12330,7 @@ fi
printf "%s\n" "#define LOCKDDLM_CONTROL_SUPPORT 1" >>confdefs.h
BUILD_LVMLOCKD=yes
+
fi
################################################################################
@@ -12244,7 +12341,7 @@ if test ${enable_lvmlockd_idm+y}
then :
enableval=$enable_lvmlockd_idm; LOCKDIDM=$enableval
else $as_nop
- LOCKDIDM=no
+ LOCKDIDM="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCKDIDM" >&5
@@ -12252,7 +12349,9 @@ printf "%s\n" "$LOCKDIDM" >&6; }
BUILD_LOCKDIDM=$LOCKDIDM
-if test "$BUILD_LOCKDIDM" = yes; then
+if test "$BUILD_LOCKDIDM" = "yes"
+then :
+
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LOCKD_IDM" >&5
@@ -12330,7 +12429,7 @@ fi
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- HAVE_LOCKD_IDM=yes
+ HAVE_LOCKD_IDM="yes"
else
$bailout
fi
@@ -12338,6 +12437,7 @@ fi
printf "%s\n" "#define LOCKDIDM_SUPPORT 1" >>confdefs.h
BUILD_LVMLOCKD=yes
+
fi
################################################################################
@@ -12346,12 +12446,14 @@ printf %s "checking whether to build lvmlockd... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_LVMLOCKD" >&5
printf "%s\n" "$BUILD_LVMLOCKD" >&6; }
-if test "$BUILD_LVMLOCKD" = yes; then
- if test "$LVMPOLLD" = no
+if test "$BUILD_LVMLOCKD" = "yes"
+then :
+
+ if test "$LVMPOLLD" = "no"
then :
as_fn_error $? "cannot build lvmlockd with --disable-lvmpolld." "$LINENO" 5
fi
- if test "$BUILD_LVMPOLLD" = no
+ if test "$BUILD_LVMPOLLD" = "no"
then :
BUILD_LVMPOLLD=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Enabling lvmpolld - required by lvmlockd." >&5
printf "%s\n" "$as_me: WARNING: Enabling lvmpolld - required by lvmlockd." >&2;}
@@ -12361,10 +12463,12 @@ printf %s "checking defaults for use_lvmlockd... " >&6; }
# Check whether --enable-use_lvmlockd was given.
if test ${enable_use_lvmlockd+y}
then :
- enableval=$enable_use_lvmlockd; case ${enableval} in
- yes) DEFAULT_USE_LVMLOCKD=1 ;;
- *) DEFAULT_USE_LVMLOCKD=0 ;;
- esac
+ enableval=$enable_use_lvmlockd; if test "$enableval" = "yes"
+then :
+ DEFAULT_USE_LVMLOCKD=1
+else $as_nop
+ DEFAULT_USE_LVMLOCKD=0
+fi
else $as_nop
DEFAULT_USE_LVMLOCKD=1
fi
@@ -12387,24 +12491,31 @@ fi
printf "%s\n" "#define LVMLOCKD_PIDFILE \"$LVMLOCKD_PIDFILE\"" >>confdefs.h
-else
+
+else $as_nop
+
DEFAULT_USE_LVMLOCKD=0
+
fi
printf "%s\n" "#define DEFAULT_USE_LVMLOCKD $DEFAULT_USE_LVMLOCKD" >>confdefs.h
################################################################################
-if test "$BUILD_LVMPOLLD" = yes; then
+if test "$BUILD_LVMPOLLD" = "yes"
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmpolld" >&5
printf %s "checking defaults for use_lvmpolld... " >&6; }
# Check whether --enable-use_lvmpolld was given.
if test ${enable_use_lvmpolld+y}
then :
- enableval=$enable_use_lvmpolld; case ${enableval} in
- yes) DEFAULT_USE_LVMPOLLD=1 ;;
- *) DEFAULT_USE_LVMPOLLD=0 ;;
- esac
+ enableval=$enable_use_lvmpolld; if test "$enableval" = "yes"
+then :
+ DEFAULT_USE_LVMPOLLD=1
+else $as_nop
+ DEFAULT_USE_LVMPOLLD=0
+fi
else $as_nop
DEFAULT_USE_LVMPOLLD=1
fi
@@ -12427,8 +12538,11 @@ fi
printf "%s\n" "#define LVMPOLLD_PIDFILE \"$LVMPOLLD_PIDFILE\"" >>confdefs.h
-else
+
+else $as_nop
+
DEFAULT_USE_LVMPOLLD=0
+
fi
printf "%s\n" "#define DEFAULT_USE_LVMPOLLD $DEFAULT_USE_LVMPOLLD" >>confdefs.h
@@ -12442,7 +12556,7 @@ if test ${enable_dmfilemapd+y}
then :
enableval=$enable_dmfilemapd; BUILD_DMFILEMAPD=$enableval
else $as_nop
- BUILD_DMFILEMAPD=no
+ BUILD_DMFILEMAPD="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_DMFILEMAPD" >&5
@@ -12451,7 +12565,9 @@ printf "%s\n" "$BUILD_DMFILEMAPD" >&6; }
printf "%s\n" "#define DMFILEMAPD \$BUILD_DMFILEMAPD" >>confdefs.h
-if test "$BUILD_DMFILEMAPD" = yes; then
+if test "$BUILD_DMFILEMAPD" = "yes"
+then :
+
ac_fn_c_check_header_compile "$LINENO" "linux/fiemap.h" "ac_cv_header_linux_fiemap_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_fiemap_h" = xyes
then :
@@ -12460,10 +12576,10 @@ else $as_nop
as_fn_error $? "--enable-dmfilemapd requires fiemap.h" "$LINENO" 5
fi
+
fi
SYSTEMD_MIN_VERSION=0
-pkg_config_init
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"systemd >= 205\""; } >&5
($PKG_CONFIG --exists --print-errors "systemd >= 205") 2>&5
@@ -12487,19 +12603,19 @@ printf %s "checking whether to build notifydbus... " >&6; }
# Check whether --enable-notify-dbus was given.
if test ${enable_notify_dbus+y}
then :
- enableval=$enable_notify_dbus; if test "$enableval" = yes && test "$SYSTEMD_MIN_VERSION" -lt 221
+ enableval=$enable_notify_dbus; if test "$enableval" = "yes" && test "$SYSTEMD_MIN_VERSION" -lt 221
then :
as_fn_error $? "Enabling notify-dbus requires systemd >= 221" "$LINENO" 5
fi
NOTIFYDBUS_SUPPORT=$enableval
else $as_nop
- NOTIFYDBUS_SUPPORT=no
+ NOTIFYDBUS_SUPPORT="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NOTIFYDBUS_SUPPORT" >&5
printf "%s\n" "$NOTIFYDBUS_SUPPORT" >&6; }
-if test "$NOTIFYDBUS_SUPPORT" = yes
+if test "$NOTIFYDBUS_SUPPORT" = "yes"
then :
printf "%s\n" "#define NOTIFYDBUS_SUPPORT 1" >>confdefs.h
@@ -12509,19 +12625,19 @@ fi
################################################################################
if test "$SYSTEMD_MIN_VERSION" -ge 221
then :
- SYSTEMD_JOURNAL_SUPPORT=maybe
+ SYSTEMD_JOURNAL_SUPPORT="maybe"
else $as_nop
- SYSTEMD_JOURNAL_SUPPORT=no
+ SYSTEMD_JOURNAL_SUPPORT="no"
fi
ac_fn_c_check_header_compile "$LINENO" "systemd/sd-journal.h" "ac_cv_header_systemd_sd_journal_h" "$ac_includes_default"
if test "x$ac_cv_header_systemd_sd_journal_h" = xyes
then :
- if test "$SYSTEMD_JOURNAL_SUPPORT" != no
+ if test "$SYSTEMD_JOURNAL_SUPPORT" != "no"
then :
- SYSTEMD_JOURNAL_SUPPORT=yes
+ SYSTEMD_JOURNAL_SUPPORT="yes"
fi
else $as_nop
- SYSTEMD_JOURNAL_SUPPORT=no
+ SYSTEMD_JOURNAL_SUPPORT="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to log to systemd journal" >&5
@@ -12529,7 +12645,7 @@ printf %s "checking whether to log to systemd journal... " >&6; }
# Check whether --enable-systemd-journal was given.
if test ${enable_systemd_journal+y}
then :
- enableval=$enable_systemd_journal; if test "$enableval" = yes && test "$SYSTEMD_JOURNAL_SUPPORT" = no
+ enableval=$enable_systemd_journal; if test "$enableval" = "yes" && test "$SYSTEMD_JOURNAL_SUPPORT" = "no"
then :
as_fn_error $? "Enabling systemd journal requires systemd/sd-journal.h and systemd >= 221." "$LINENO" 5
fi
@@ -12539,7 +12655,7 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SYSTEMD_JOURNAL_SUPPORT" >&5
printf "%s\n" "$SYSTEMD_JOURNAL_SUPPORT" >&6; }
-if test "$SYSTEMD_JOURNAL_SUPPORT" = yes
+if test "$SYSTEMD_JOURNAL_SUPPORT" = "yes"
then :
printf "%s\n" "#define SYSTEMD_JOURNAL_SUPPORT 1" >>confdefs.h
@@ -12560,9 +12676,9 @@ fi
ac_fn_c_check_header_compile "$LINENO" "systemd/sd-id128.h" "ac_cv_header_systemd_sd_id128_h" "$ac_includes_default"
if test "x$ac_cv_header_systemd_sd_id128_h" = xyes
then :
- if test "$APP_MACHINEID_SUPPORT" != no
+ if test "$APP_MACHINEID_SUPPORT" != "no"
then :
- APP_MACHINEID_SUPPORT=yes
+ APP_MACHINEID_SUPPORT="yes"
fi
else $as_nop
APP_MACHINEID_SUPPORT=no
@@ -12573,7 +12689,7 @@ printf %s "checking whether to support systemd appmachineid... " >&6; }
# Check whether --enable-app-machineid was given.
if test ${enable_app_machineid+y}
then :
- enableval=$enable_app_machineid; if test "$enableval" = yes && test "$APP_MACHINEID_SUPPORT" = no
+ enableval=$enable_app_machineid; if test "$enableval" = "yes" && test "$APP_MACHINEID_SUPPORT" = "no"
then :
as_fn_error $? "Enabling app machineid requires systemd/sd-id128.h and systemd >= 234." "$LINENO" 5
fi
@@ -12583,17 +12699,16 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $APP_MACHINEID_SUPPORT" >&5
printf "%s\n" "$APP_MACHINEID_SUPPORT" >&6; }
-if test "$APP_MACHINEID_SUPPORT" = yes
+if test "$APP_MACHINEID_SUPPORT" = "yes"
then :
printf "%s\n" "#define APP_MACHINEID_SUPPORT 1" >>confdefs.h
fi
-if test "$NOTIFYDBUS_SUPPORT" = yes || test "$SYSTEMD_JOURNAL_SUPPORT" = yes || test "$APP_MACHINEID_SUPPORT" = yes
+if test "$NOTIFYDBUS_SUPPORT" = "yes" || test "$SYSTEMD_JOURNAL_SUPPORT" = "yes" || test "$APP_MACHINEID_SUPPORT" = "yes"
then :
- pkg_config_init
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
@@ -12665,6 +12780,7 @@ else
printf "%s\n" "yes" >&6; }
SYSTEMD_LIBS="-lsystemd"
fi
+
fi
################################################################################
@@ -12674,13 +12790,21 @@ if test ${enable_blkid_wiping+y}
then :
enableval=$enable_blkid_wiping; BLKID_WIPING=$enableval
else $as_nop
- BLKID_WIPING=maybe
+ BLKID_WIPING="maybe"
fi
+# TODO: possibly detect right version of blkid with BLKID_SUBLKS_FSINFO support
+# so lvresize can check detected flag here
+#
DEFAULT_USE_BLKID_WIPING=0
-if test "$BLKID_WIPING" != no; then
- pkg_config_init
+if test "$BLKID_WIPING" != "no"
+then :
+ blkdir_version=">= 2.24"
+else $as_nop
+ blkid_version=""
+fi
+
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BLKID" >&5
@@ -12690,12 +12814,12 @@ if test -n "$BLKID_CFLAGS"; then
pkg_cv_BLKID_CFLAGS="$BLKID_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid >= 2.24\""; } >&5
- ($PKG_CONFIG --exists --print-errors "blkid >= 2.24") 2>&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid \$blkid_version \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "blkid $blkid_version ") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_BLKID_CFLAGS=`$PKG_CONFIG --cflags "blkid >= 2.24" 2>/dev/null`
+ pkg_cv_BLKID_CFLAGS=`$PKG_CONFIG --cflags "blkid $blkid_version " 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -12707,12 +12831,12 @@ if test -n "$BLKID_LIBS"; then
pkg_cv_BLKID_LIBS="$BLKID_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid >= 2.24\""; } >&5
- ($PKG_CONFIG --exists --print-errors "blkid >= 2.24") 2>&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid \$blkid_version \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "blkid $blkid_version ") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_BLKID_LIBS=`$PKG_CONFIG --libs "blkid >= 2.24" 2>/dev/null`
+ pkg_cv_BLKID_LIBS=`$PKG_CONFIG --libs "blkid $blkid_version " 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -12732,77 +12856,123 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
else
_pkg_short_errors_supported=no
fi
- if test $_pkg_short_errors_supported = yes; then
- BLKID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "blkid >= 2.24" 2>&1`
- else
- BLKID_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "blkid >= 2.24" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$BLKID_PKG_ERRORS" >&5
-
- if test "$BLKID_WIPING" = maybe; then
- BLKID_WIPING=no
- else
- as_fn_error $? "bailing out... blkid library >= 2.24 is required" "$LINENO" 5
- fi
-elif test $pkg_failed = untried; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
- if test "$BLKID_WIPING" = maybe; then
- BLKID_WIPING=no
- else
- as_fn_error $? "bailing out... blkid library >= 2.24 is required" "$LINENO" 5
- fi
-else
- BLKID_CFLAGS=$pkg_cv_BLKID_CFLAGS
- BLKID_LIBS=$pkg_cv_BLKID_LIBS
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
- BLKID_WIPING=yes
- BLKID_PC="blkid"
- DEFAULT_USE_BLKID_WIPING=1
+ if test $_pkg_short_errors_supported = yes; then
+ BLKID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "blkid $blkid_version " 2>&1`
+ else
+ BLKID_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "blkid $blkid_version " 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$BLKID_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (blkid $blkid_version ) were not met:
+
+$BLKID_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables BLKID_CFLAGS
+and BLKID_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables BLKID_CFLAGS
+and BLKID_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ BLKID_CFLAGS=$pkg_cv_BLKID_CFLAGS
+ BLKID_LIBS=$pkg_cv_BLKID_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+ HAVE_BLKID=1
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for blkdid.h supports SUBLKS_FSINFO." >&5
+printf %s "checking for blkdid.h supports SUBLKS_FSINFO.... " >&6; }
+if test ${ac_cv_have_blkid_sublks_fsinfo+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <blkid/blkid.h>
+#ifndef BLKID_SUBLKS_FSINFO
+#error BLKID_SUBLKS_FSINFO is missing
+#endif
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_have_blkid_sublks_fsinfo="yes"
+else $as_nop
+ ac_cv_have_blkid_sublks_fsinfo="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_blkid_sublks_fsinfo" >&5
+printf "%s\n" "$ac_cv_have_blkid_sublks_fsinfo" >&6; }
-printf "%s\n" "#define BLKID_WIPING_SUPPORT 1" >>confdefs.h
+ if test $ac_cv_have_blkid_sublks_fsinfo = yes
+then :
+printf "%s\n" "#define HAVE_BLKID_SUBLKS_FSINFO 1" >>confdefs.h
fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable libblkid detection of signatures when wiping" >&5
-printf %s "checking whether to enable libblkid detection of signatures when wiping... " >&6; }
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BLKID_WIPING" >&5
-printf "%s\n" "$BLKID_WIPING" >&6; }
-printf "%s\n" "#define DEFAULT_USE_BLKID_WIPING $DEFAULT_USE_BLKID_WIPING" >>confdefs.h
+fi
+if test "$BLKID_WIPING" != "no"
+then :
-################################################################################
-# Check whether --enable-udev-systemd-background-jobs was given.
-if test ${enable_udev_systemd_background_jobs+y}
+ if test "$HAVE_BLKID" = 1
then :
- enableval=$enable_udev_systemd_background_jobs; UDEV_SYSTEMD_BACKGROUND_JOBS=$enableval
-else $as_nop
- UDEV_SYSTEMD_BACKGROUND_JOBS=maybe
-fi
+
+ BLKID_WIPING=yes
+ BLKID_PC="blkid"
+ DEFAULT_USE_BLKID_WIPING=1
+
+printf "%s\n" "#define BLKID_WIPING_SUPPORT 1" >>confdefs.h
-if test "$UDEV_SYSTEMD_BACKGROUND_JOBS" != no; then
- if test "$SYSTEMD_MIN_VERSION" -ge 205
-then :
- UDEV_SYSTEMD_BACKGROUND_JOBS=yes
else $as_nop
- if test "$UDEV_SYSTEMD_BACKGROUND_JOBS" = maybe
+
+ if test "$BLKID_WIPING" = "maybe"
then :
- UDEV_SYSTEMD_BACKGROUND_JOBS=no
+
+ BLKID_WIPING=no
+
else $as_nop
- as_fn_error $? "bailing out... systemd >= 205 is required" "$LINENO" 5
+
+ as_fn_error $? "bailing out... blkid library >= 2.24 is required" "$LINENO" 5
+
fi
+
fi
+
fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable libblkid detection of signatures when wiping" >&5
+printf %s "checking whether to enable libblkid detection of signatures when wiping... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BLKID_WIPING" >&5
+printf "%s\n" "$BLKID_WIPING" >&6; }
+
+printf "%s\n" "#define DEFAULT_USE_BLKID_WIPING $DEFAULT_USE_BLKID_WIPING" >>confdefs.h
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use udev-systemd protocol for jobs in background" >&5
-printf %s "checking whether to use udev-systemd protocol for jobs in background... " >&6; }
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UDEV_SYSTEMD_BACKGROUND_JOBS" >&5
-printf "%s\n" "$UDEV_SYSTEMD_BACKGROUND_JOBS" >&6; }
################################################################################
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable synchronisation with udev processing" >&5
@@ -12812,14 +12982,15 @@ if test ${enable_udev_sync+y}
then :
enableval=$enable_udev_sync; UDEV_SYNC=$enableval
else $as_nop
- UDEV_SYNC=no
+ UDEV_SYNC="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UDEV_SYNC" >&5
printf "%s\n" "$UDEV_SYNC" >&6; }
-if test "$UDEV_SYNC" = yes; then
- pkg_config_init
+if test "$UDEV_SYNC" = "yes"
+then :
+
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for UDEV" >&5
@@ -12958,6 +13129,7 @@ printf "%s\n" "#define HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED 1" >>confdefs
fi
LIBS=$ac_check_lib_save_LIBS
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable installation of udev rules required for synchronisation" >&5
@@ -12980,23 +13152,34 @@ if test ${enable_udev_rule_exec_detection+y}
then :
enableval=$enable_udev_rule_exec_detection; UDEV_RULE_EXEC_DETECTION=$enableval
else $as_nop
- UDEV_RULE_EXEC_DETECTION=no
+ UDEV_RULE_EXEC_DETECTION="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UDEV_RULE_EXEC_DETECTION" >&5
printf "%s\n" "$UDEV_RULE_EXEC_DETECTION" >&6; }
-if test "$UDEV_RULE" != no ; then
+if test "$UDEV_RULE" != "no"
+then :
+
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev >= 176\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libudev >= 176") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+
+ UDEV_HAS_BUILTIN_BLKID="yes"
+
+else
+
+ UDEV_HAS_BUILTIN_BLKID="no"
+
+fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether udev supports built-in blkid" >&5
printf %s "checking whether udev supports built-in blkid... " >&6; }
- pkg_config_init
- if $("$PKG_CONFIG" --atleast-version=176 libudev); then
- UDEV_HAS_BUILTIN_BLKID=yes
- else
- UDEV_HAS_BUILTIN_BLKID=no
- fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UDEV_HAS_BUILTIN_BLKID" >&5
printf "%s\n" "$UDEV_HAS_BUILTIN_BLKID" >&6; }
+
fi
################################################################################
@@ -13005,14 +13188,17 @@ if test ${enable_units_compat+y}
then :
enableval=$enable_units_compat; UNITS_COMPAT=$enableval
else $as_nop
- UNITS_COMPAT=no
+ UNITS_COMPAT="no"
fi
-if test "$UNITS_COMPAT" = yes; then
+if test "$UNITS_COMPAT" = "yes"
+then :
+
printf "%s\n" "#define DEFAULT_SI_UNIT_CONSISTENCY 0" >>confdefs.h
+
fi
################################################################################
@@ -13022,7 +13208,7 @@ then :
enableval=$enable_ioctl; DM_IOCTLS=$enableval
fi
-if test "$DM_IOCTLS" = yes
+if test "$DM_IOCTLS" = "yes"
then :
printf "%s\n" "#define DM_IOCTLS 1" >>confdefs.h
@@ -13041,10 +13227,13 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ODIRECT" >&5
printf "%s\n" "$ODIRECT" >&6; }
-if test "$ODIRECT" = yes; then
+if test "$ODIRECT" = "yes"
+then :
+
printf "%s\n" "#define O_DIRECT_SUPPORT 1" >>confdefs.h
+
fi
################################################################################
@@ -13055,15 +13244,22 @@ if test ${enable_cmdlib+y}
then :
enableval=$enable_cmdlib; CMDLIB=$enableval
else $as_nop
- CMDLIB=no
+ CMDLIB="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CMDLIB" >&5
printf "%s\n" "$CMDLIB" >&6; }
-test "$CMDLIB" = yes \
- && LVM2CMD_LIB=-llvm2cmd \
- || LVM2CMD_LIB=
+if test "$CMDLIB" = "yes"
+then :
+
+ LVM2CMD_LIB="-llvm2cmd"
+
+else $as_nop
+
+ LVM2CMD_LIB=""
+
+fi
################################################################################
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to include Python D-Bus support" >&5
@@ -13073,12 +13269,12 @@ if test ${enable_dbus_service+y}
then :
enableval=$enable_dbus_service; BUILD_LVMDBUSD=$enableval
else $as_nop
- BUILD_LVMDBUSD=no
+ BUILD_LVMDBUSD="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_LVMDBUSD" >&5
printf "%s\n" "$BUILD_LVMDBUSD" >&6; }
-if test "$NOTIFYDBUS_SUPPORT" = yes && test "BUILD_LVMDBUSD" = yes
+if test "$NOTIFYDBUS_SUPPORT" = "yes" && test "BUILD_LVMDBUSD" = "yes"
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Building D-Bus support without D-Bus notifications." >&5
printf "%s\n" "$as_me: WARNING: Building D-Bus support without D-Bus notifications." >&2;}
@@ -13086,7 +13282,9 @@ fi
################################################################################
-if test "$BUILD_LVMDBUSD" = yes; then
+if test "$BUILD_LVMDBUSD" = "yes"
+then :
+
unset am_cv_pathless_PYTHON ac_cv_path_PYTHON am_cv_python_platform
unset am_cv_python_pythondir am_cv_python_version am_cv_python_pyexecdir
unset ac_cv_path_PYTHON_CONFIG ac_cv_path_ac_pt_PYTHON_CONFIG
@@ -13488,7 +13686,12 @@ printf "%s\n" "$am_cv_python_pyexecdir" >&6; }
fi
PYTHON3=$PYTHON
- test -z "$PYTHON3" && as_fn_error $? "python3 is required for --enable-python3_bindings or --enable-dbus-service but cannot be found" "$LINENO" 5
+ if test -z "$PYTHON3"
+then :
+
+ as_fn_error $? "python3 is required for --enable-python3_bindings or --enable-dbus-service but cannot be found" "$LINENO" 5
+
+fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}python3-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}python3-config; ac_word=$2
@@ -13597,11 +13800,21 @@ else
PYTHON3_CONFIG="$ac_cv_path_PYTHON3_CONFIG"
fi
- test -z "$PYTHON3_CONFIG" && as_fn_error $? "python3 headers are required for --enable-python3_bindings or --enable-dbus-service but cannot be found" "$LINENO" 5
+ if test -z "$PYTHON3_CONFIG"
+then :
+
+ as_fn_error $? "python3 headers are required for --enable-python3_bindings or --enable-dbus-service but cannot be found" "$LINENO" 5
+
+fi
PYTHON3_INCDIRS=`"$PYTHON3_CONFIG" --includes`
PYTHON3_LIBDIRS=`"$PYTHON3_CONFIG" --libs`
PYTHON3DIR=$pythondir
- test "$PYTHON3_BINDINGS" = yes && PYTHON_BINDINGS=yes
+ if test "$PYTHON3_BINDINGS" = "yes"
+then :
+
+ PYTHON_BINDINGS="yes"
+
+fi
# To get this macro, install autoconf-archive package then run autoreconf
@@ -13666,6 +13879,7 @@ printf "%s\n" "no" >&6; }
fi
fi
+
fi
################################################################################
@@ -13674,7 +13888,7 @@ if test ${enable_pkgconfig+y}
then :
enableval=$enable_pkgconfig; PKGCONFIG=$enableval
else $as_nop
- PKGCONFIG=no
+ PKGCONFIG="no"
fi
@@ -13684,7 +13898,7 @@ if test ${enable_write_install+y}
then :
enableval=$enable_write_install; WRITE_INSTALL=$enableval
else $as_nop
- WRITE_INSTALL=no
+ WRITE_INSTALL="no"
fi
@@ -13733,23 +13947,32 @@ if test ${enable_dmeventd+y}
then :
enableval=$enable_dmeventd; BUILD_DMEVENTD=$enableval
else $as_nop
- BUILD_DMEVENTD=no
+ BUILD_DMEVENTD="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_DMEVENTD" >&5
printf "%s\n" "$BUILD_DMEVENTD" >&6; }
-if test "$BUILD_DMEVENTD" = yes; then
- if test "$MIRRORS" != internal; then
+if test "$BUILD_DMEVENTD" = "yes"
+then :
+
+ if test "$MIRRORS" != "internal"
+then :
+
as_fn_error $? "--enable-dmeventd currently requires --with-mirrors=internal" "$LINENO" 5
- fi
- if test "$CMDLIB" = no; then
+
+fi
+ if test "$CMDLIB" = "no"
+then :
+
as_fn_error $? "--enable-dmeventd requires --enable-cmdlib to be used as well" "$LINENO" 5
- fi
+
+fi
printf "%s\n" "#define DMEVENTD 1" >>confdefs.h
+
fi
################################################################################
@@ -13884,17 +14107,19 @@ then :
printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h
DL_LIBS="-ldl"
- HAVE_LIBDL=yes
+ HAVE_LIBDL="yes"
else $as_nop
DL_LIBS=
- HAVE_LIBDL=no
+ HAVE_LIBDL="no"
fi
################################################################################
-if [ \( "$LVM1" = shared -o "$POOL" = shared \
- \) -a "$STATIC_LINK" = yes ]; then
+if ( test "$LVM1" = "shared" || test "$POOL" = "shared" ) && test "$STATIC_LINK" = "yes"
+then :
+
as_fn_error $? "Features cannot be 'shared' when building statically" "$LINENO" 5
+
fi
################################################################################
@@ -13998,7 +14223,9 @@ fi
printf "%s\n" "$SELINUX" >&6; }
################################################################################
-if test "$SELINUX" = yes; then
+if test "$SELINUX" = "yes"
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sepol_check_context in -lsepol" >&5
printf %s "checking for sepol_check_context in -lsepol... " >&6; }
if test ${ac_cv_lib_sepol_sepol_check_context+y}
@@ -14116,6 +14343,7 @@ printf "%s\n" "$as_me: WARNING: Disabling selinux" >&2;}
HAVE_SELINUX=no
fi
+
fi
################################################################################
@@ -14142,9 +14370,9 @@ main (void)
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- ac_cv_have_blkzeroout=yes
+ ac_cv_have_blkzeroout="yes"
else $as_nop
- ac_cv_have_blkzeroout=no
+ ac_cv_have_blkzeroout="no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
@@ -14157,21 +14385,24 @@ if test ${enable_blkzeroout+y}
then :
enableval=$enable_blkzeroout; BLKZEROOUT=$enableval
else $as_nop
- BLKZEROOUT=yes
+ BLKZEROOUT="yes"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use BLKZEROOUT for device zeroing" >&5
printf %s "checking whether to use BLKZEROOUT for device zeroing... " >&6; }
-if test "$BLKZEROOUT" = yes; then
+if test "$BLKZEROOUT" = "yes"
+then :
+
if test $ac_cv_have_blkzeroout = yes
then :
printf "%s\n" "#define HAVE_BLKZEROOUT 1" >>confdefs.h
else $as_nop
- BLKZEROOUT=no
+ BLKZEROOUT="no"
fi
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BLKZEROOUT" >&5
printf "%s\n" "$BLKZEROOUT" >&6; }
@@ -14180,7 +14411,9 @@ printf "%s\n" "$BLKZEROOUT" >&6; }
################################################################################
RT_LIBS=
HAVE_REALTIME=no
-if test "$REALTIME" = yes; then
+if test "$REALTIME" = "yes"
+then :
+
for ac_func in clock_gettime
do :
@@ -14193,7 +14426,7 @@ fi
done
- if test "$HAVE_REALTIME" != yes
+ if test "$HAVE_REALTIME" != "yes"
then :
# try again with -lrt
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
@@ -14238,14 +14471,20 @@ fi
fi
- if test "$HAVE_REALTIME" = yes; then
+ if test "$HAVE_REALTIME" = "yes"
+then :
+
printf "%s\n" "#define HAVE_REALTIME 1" >>confdefs.h
- else
+
+else $as_nop
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling realtime clock" >&5
printf "%s\n" "$as_me: WARNING: Disabling realtime clock" >&2;}
- fi
+
+fi
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct stat has st_ctim." >&5
@@ -14300,7 +14539,9 @@ fi
done
################################################################################
-if test "$EDITLINE" == yes; then
+if test "$EDITLINE" = "yes"
+then :
+
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EDITLINE" >&5
@@ -14377,10 +14618,13 @@ printf "%s\n" "yes" >&6; }
printf "%s\n" "#define EDITLINE_SUPPORT 1" >>confdefs.h
fi
+
fi
################################################################################
-if test "$READLINE" != no; then
+if test "$READLINE" != "no"
+then :
+
lvm_saved_libs=$LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
printf %s "checking for library containing tgetent... " >&6; }
@@ -14441,7 +14685,9 @@ then :
READLINE_LIBS=$ac_cv_search_tgetent
else $as_nop
- if test "$READLINE" = yes; then
+ if test "$READLINE" = "yes"
+then :
+
as_fn_error $? "termcap could not be found which is required for the
--enable-readline option (which is enabled by default). Either disable readline
support with --disable-readline or download and install termcap from:
@@ -14450,7 +14696,9 @@ Note: if you are using precompiled packages you will also need the development
package as well (which may be called termcap-devel or something similar).
Note: (n)curses also seems to work as a substitute for termcap. This was
not found either - but you could try installing that as well." "$LINENO" 5
- fi
+
+fi
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
@@ -14545,14 +14793,18 @@ fi
else $as_nop
READLINE_LIBS=
- if test "$READLINE" = yes; then
+ if test "$READLINE" = "yes"
+then :
+
as_fn_error $? "GNU Readline could not be found which is required for the
--enable-readline option (which is enabled by default). Either disable readline
support with --disable-readline or download and install readline from:
ftp.gnu.org/gnu/readline
Note: if you are using precompiled packages you will also need the development
package as well (which may be called readline-devel or something similar)." "$LINENO" 5
- fi
+
+fi
+
fi
LIBS="$READLINE_LIBS $lvm_saved_libs"
@@ -14564,6 +14816,7 @@ then :
fi
LIBS=$lvm_saved_libs
+
fi
################################################################################
@@ -14574,13 +14827,15 @@ if test ${enable_nls+y}
then :
enableval=$enable_nls; INTL=$enableval
else $as_nop
- INTL=no
+ INTL="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INTL" >&5
printf "%s\n" "$INTL" >&6; }
-if test "$INTL" = yes; then
+if test "$INTL" = "yes"
+then :
+
# FIXME - Move this - can be device-mapper too
INTL_PACKAGE="lvm2"
if test -n "$ac_tool_prefix"; then
@@ -14713,6 +14968,7 @@ printf "%s\n" "#define INTL_PACKAGE \"$INTL_PACKAGE\"" >>confdefs.h
printf "%s\n" "#define LOCALEDIR \"$(eval echo $(eval echo $localedir))\"" >>confdefs.h
+
fi
################################################################################
@@ -14795,18 +15051,72 @@ fi
# Check whether --with-systemdsystemunitdir was given.
if test ${with_systemdsystemunitdir+y}
then :
- withval=$with_systemdsystemunitdir; systemdsystemunitdir=$withval
+ withval=$with_systemdsystemunitdir;
+fi
+
+
+if test -z "$with_systemdsystemunitdir"
+then :
+
+
+if test -n "$systemdsystemunitdir"; then
+ pkg_cv_systemdsystemunitdir="$systemdsystemunitdir"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"systemd\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "systemd") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_systemdsystemunitdir=`$PKG_CONFIG --variable="systemdsystemunitdir" "systemd" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+systemdsystemunitdir=$pkg_cv_systemdsystemunitdir
+
+if test "x$systemdsystemunitdir" = x""
+then :
+
+ systemdsystemunitdir='${exec_prefix}/lib/systemd/system'
+
+fi
+
else $as_nop
- pkg_config_init
- pkg_systemdsystemunitdir=$("$PKG_CONFIG" --variable=systemdsystemunitdir systemd)
+
+ systemdsystemunitdir="$with_systemdsystemunitdir"
+
+fi
+
+
+if test -n "$systemdutildir"; then
+ pkg_cv_systemdutildir="$systemdutildir"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"systemd\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "systemd") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_systemdutildir=`$PKG_CONFIG --variable="systemdutildir" "systemd" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
+systemdutildir=$pkg_cv_systemdutildir
+if test "x$systemdutildir" = x""
+then :
-test -n "$pkg_systemdsystemunitdir" && systemdsystemunitdir=$pkg_systemdsystemunitdir
-test -z "$systemdsystemunitdir" && systemdsystemunitdir='${exec_prefix}/lib/systemd/system';
+ systemdutildir='${exec_prefix}/lib/systemd'
-systemdutildir=$("$PKG_CONFIG" --variable=systemdutildir systemd)
-test -z "$systemdutildir" && systemdutildir='${exec_prefix}/lib/systemd';
+fi
################################################################################
@@ -14819,7 +15129,9 @@ else $as_nop
fi
################################################################################
-if test "$READLINE" = yes; then
+if test "$READLINE" = "yes"
+then :
+
for ac_header in readline/readline.h readline/history.h
do :
as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -14835,13 +15147,16 @@ else $as_nop
fi
done
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable readline" >&5
printf %s "checking whether to enable readline... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READLINE" >&5
printf "%s\n" "$READLINE" >&6; }
-if test "$EDITLINE" = yes; then
+if test "$EDITLINE" = "yes"
+then :
+
for ac_header in editline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
@@ -14854,13 +15169,16 @@ else $as_nop
fi
done
+
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable editline" >&5
printf %s "checking whether to enable editline... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EDITLINE" >&5
printf "%s\n" "$EDITLINE" >&6; }
-if test "$BUILD_CMIRRORD" = yes; then
+if test "$BUILD_CMIRRORD" = "yes"
+then :
+
for ac_func in atexit
do :
@@ -14874,12 +15192,16 @@ else $as_nop
fi
done
+
fi
-if test "$BUILD_LVMLOCKD" = yes; then
- if test "$HAVE_REALTIME" != yes
+if test "$BUILD_LVMLOCKD" = "yes"
+then :
+
+ if test "$HAVE_REALTIME" != "yes"
then :
- as_fn_error $? "Realtime clock support is mandatory for lvmlockd." "$LINENO" 5
+
+ as_fn_error $? "Realtime clock support is mandatory for lvmlockd." "$LINENO" 5
fi
for ac_func in strtoull
@@ -14894,23 +15216,10 @@ else $as_nop
fi
done
-fi
-
-if test "$BUILD_LVMPOLLD" = yes; then
-
- for ac_func in strpbrk
-do :
- ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
-if test "x$ac_cv_func_strpbrk" = xyes
-then :
- printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
-else $as_nop
- hard_bailout
fi
-done
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
if test ${ac_cv_c_undeclared_builtin_options+y}
then :
@@ -14999,6 +15308,22 @@ else $as_nop
fi
printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
+if test "$BUILD_LVMPOLLD" = "yes"
+then :
+
+
+ for ac_func in strpbrk
+do :
+ ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
+if test "x$ac_cv_func_strpbrk" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
+
+else $as_nop
+ hard_bailout
+fi
+
+done
if test $ac_cv_have_decl_strerror_r = yes; then
# For backward compatibility's sake, define HAVE_STRERROR_R.
@@ -15051,9 +15376,12 @@ printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
fi
+
fi
-if test "$BUILD_DMEVENTD" = yes; then
+if test "$BUILD_DMEVENTD" = "yes"
+then :
+
for ac_header in arpa/inet.h
do :
ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
@@ -15066,9 +15394,12 @@ else $as_nop
fi
done
+
fi
-if test "$HAVE_LIBDL" = yes; then
+if test "$HAVE_LIBDL" = "yes"
+then :
+
for ac_header in dlfcn.h
do :
ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
@@ -15081,9 +15412,12 @@ else $as_nop
fi
done
+
fi
-if test "$INTL" = yes; then
+if test "$INTL" = "yes"
+then :
+
for ac_header in libintl.h
do :
ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
@@ -15096,9 +15430,12 @@ else $as_nop
fi
done
+
fi
-if test "$UDEV_SYNC" = yes; then
+if test "$UDEV_SYNC" = "yes"
+then :
+
for ac_header in sys/ipc.h sys/sem.h
do :
as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -15114,9 +15451,12 @@ else $as_nop
fi
done
+
fi
-if test "$BUILD_DMFILEMAPD" = yes; then
+if test "$BUILD_DMFILEMAPD" = "yes"
+then :
+
for ac_header in sys/inotify.h
do :
ac_fn_c_check_header_compile "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
@@ -15129,6 +15469,7 @@ else $as_nop
fi
done
+
fi
################################################################################
@@ -15241,10 +15582,13 @@ else
fi
-if test -n "$MODPROBE_CMD"; then
+if test -n "$MODPROBE_CMD"
+then :
+
printf "%s\n" "#define MODPROBE_CMD \"$MODPROBE_CMD\"" >>confdefs.h
+
fi
SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))"
@@ -15280,7 +15624,9 @@ printf "%s\n" "#define LVRESIZE_FS_HELPER_PATH \"$LVRESIZE_FS_HELPER_PATH\"" >>c
################################################################################
-if test "$BUILD_DMEVENTD" = yes; then
+if test "$BUILD_DMEVENTD" = "yes"
+then :
+
# Check whether --with-dmeventd-pidfile was given.
if test ${with_dmeventd_pidfile+y}
@@ -15293,9 +15639,12 @@ fi
printf "%s\n" "#define DMEVENTD_PIDFILE \"$DMEVENTD_PIDFILE\"" >>confdefs.h
+
fi
-if test "$BUILD_DMEVENTD" = yes; then
+if test "$BUILD_DMEVENTD" = "yes"
+then :
+
# Check whether --with-dmeventd-path was given.
if test ${with_dmeventd_path+y}
@@ -15308,6 +15657,7 @@ fi
printf "%s\n" "#define DMEVENTD_PATH \"$DMEVENTD_PATH\"" >>confdefs.h
+
fi
################################################################################
@@ -15330,7 +15680,7 @@ if test ${with_default_profile_subdir+y}
then :
withval=$with_default_profile_subdir; DEFAULT_PROFILE_SUBDIR=$withval
else $as_nop
- DEFAULT_PROFILE_SUBDIR=profile
+ DEFAULT_PROFILE_SUBDIR="profile"
fi
@@ -15343,7 +15693,7 @@ if test ${with_default_archive_subdir+y}
then :
withval=$with_default_archive_subdir; DEFAULT_ARCHIVE_SUBDIR=$withval
else $as_nop
- DEFAULT_ARCHIVE_SUBDIR=archive
+ DEFAULT_ARCHIVE_SUBDIR="archive"
fi
@@ -15356,7 +15706,7 @@ if test ${with_default_backup_subdir+y}
then :
withval=$with_default_backup_subdir; DEFAULT_BACKUP_SUBDIR=$withval
else $as_nop
- DEFAULT_BACKUP_SUBDIR=backup
+ DEFAULT_BACKUP_SUBDIR="backup"
fi
@@ -15369,7 +15719,7 @@ if test ${with_default_cache_subdir+y}
then :
withval=$with_default_cache_subdir; DEFAULT_CACHE_SUBDIR=$withval
else $as_nop
- DEFAULT_CACHE_SUBDIR=cache
+ DEFAULT_CACHE_SUBDIR="cache"
fi
@@ -15407,32 +15757,32 @@ if test ${with_interface+y}
then :
withval=$with_interface; interface=$withval
else $as_nop
- interface=ioctl
+ interface="ioctl"
fi
-test "$interface" != ioctl && as_fn_error $? "--with-interface=ioctl required. fs no longer supported." "$LINENO" 5
+test "$interface" != "ioctl" && as_fn_error $? "--with-interface=ioctl required. fs no longer supported." "$LINENO" 5
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $interface" >&5
printf "%s\n" "$interface" >&6; }
################################################################################
-read DM_LIB_VERSION < "$srcdir"/VERSION_DM 2>/dev/null || DM_LIB_VERSION=Unknown
+read DM_LIB_VERSION < "$srcdir"/VERSION_DM 2>/dev/null || DM_LIB_VERSION="Unknown"
printf "%s\n" "#define DM_LIB_VERSION \"$DM_LIB_VERSION\"" >>confdefs.h
-DM_LIB_PATCHLEVEL=`cat "$srcdir"/VERSION_DM | $AWK -F '[-. ]' '{printf "%s.%s.%s",$1,$2,$3}'`
+DM_LIB_PATCHLEVEL=$(cat "$srcdir"/VERSION_DM | $AWK -F '[-. ]' '{printf "%s.%s.%s",$1,$2,$3}')
read VER < "$srcdir"/VERSION 2>/dev/null || VER=Unknown
LVM_VERSION=\"$VER\"
-LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.* (//;s/).*//'`\""
-VER=`echo "$VER" | $AWK '{print $1}'`
-LVM_RELEASE="\"`echo "$VER" | $AWK -F '-' '{print $2}'`\""
-VER=`echo "$VER" | $AWK -F '-' '{print $1}'`
-LVM_MAJOR=`echo "$VER" | $AWK -F '.' '{print $1}'`
-LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'`
-LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[(.]' '{print $3}'`
-LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
+LVM_RELEASE_DATE="\"$(echo $VER | $SED 's/.* (//;s/).*//')\""
+VER=$(echo "$VER" | $AWK '{print $1}')
+LVM_RELEASE="\"$(echo "$VER" | $AWK -F '-' '{print $2}')\""
+VER=$(echo "$VER" | $AWK -F '-' '{print $1}')
+LVM_MAJOR=$(echo "$VER" | $AWK -F '.' '{print $1}')
+LVM_MINOR=$(echo "$VER" | $AWK -F '.' '{print $2}')
+LVM_PATCHLEVEL=$(echo "$VER" | $AWK -F '[(.]' '{print $3}')
+LVM_LIBAPI=$(echo "$VER" | $AWK -F '[()]' '{print $2}')
printf "%s\n" "#define LVM_CONFIGURE_LINE \"$CONFIGURE_LINE\"" >>confdefs.h
@@ -15601,6 +15951,8 @@ printf "%s\n" "#define LVM_CONFIGURE_LINE \"$CONFIGURE_LINE\"" >>confdefs.h
+
+
@@ -16984,7 +17336,7 @@ then :
printf "%s\n" "$as_me: WARNING: Only libdm part can be build without libaio: make [install_]device-mapper" >&2;}
fi
-if test "$ODIRECT" != yes
+if test "$ODIRECT" != "yes"
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: O_DIRECT disabled: low-memory pvmove may lock up" >&5
printf "%s\n" "$as_me: WARNING: O_DIRECT disabled: low-memory pvmove may lock up" >&2;}
3 months, 4 weeks
main - configure.ac: misc updates
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e67ebc5c40948bcbea5...
Commit: e67ebc5c40948bcbea536fd407535009a76ede00
Parent: 042fbd43d25f4cc69ceec1aea4d0658bec54b6e3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Feb 9 17:37:17 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 17:50:27 2023 +0100
configure.ac: misc updates
Use literal assignments with "" for better visibility in text editor.
Use more [] for AC_ macro args.
---
configure.ac | 468 +++++++++++++++++++++++++++++------------------------------
1 file changed, 234 insertions(+), 234 deletions(-)
diff --git a/configure.ac b/configure.ac
index 907391406..7f9b3e664 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
###############################################################################
## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
-## Copyright (C) 2004-2016 Red Hat, Inc. All rights reserved.
+## Copyright (C) 2004-2022 Red Hat, Inc. All rights reserved.
##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
@@ -35,28 +35,28 @@ AS_CASE(["$host_os"],
# FIXME Generate list and use --dynamic-list=.dlopen.sym
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
- LIB_SUFFIX=so
- DEVMAPPER=yes
- BUILD_LVMPOLLD=no
- ODIRECT=yes
- DM_IOCTLS=yes
- SELINUX=yes
- FSADM=yes
- LVMIMPORTVDO=yes
- BLKDEACTIVATE=yes],
+ LIB_SUFFIX="so"
+ DEVMAPPER="yes"
+ BUILD_LVMPOLLD="no"
+ ODIRECT="yes"
+ DM_IOCTLS="yes"
+ SELINUX="yes"
+ FSADM="yes"
+ LVMIMPORTVDO="yes"
+ BLKDEACTIVATE="yes"],
[darwin*], [
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
ELDFLAGS=
CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE=
- LIB_SUFFIX=dylib
- DEVMAPPER=yes
- ODIRECT=no
- DM_IOCTLS=no
- SELINUX=no
- FSADM=no
- LVMIMPORTVDO=no
- BLKDEACTIVATE=no],
+ LIB_SUFFIX="dylib"
+ DEVMAPPER="yes"
+ ODIRECT="no"
+ DM_IOCTLS="no"
+ SELINUX="no"
+ FSADM="no"
+ LVMIMPORTVDO="no"
+ BLKDEACTIVATE="no"],
[CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"])
################################################################################
@@ -159,31 +159,31 @@ AC_FUNC_VPRINTF
################################################################################
dnl -- Disable dependency tracking
-AC_MSG_CHECKING(whether to enable dependency tracking)
+AC_MSG_CHECKING([whether to enable dependency tracking])
AC_ARG_ENABLE(dependency-tracking,
AS_HELP_STRING([--disable-dependency-tracking],
[speeds up one-time build.]),
- USE_TRACKING=$enableval, USE_TRACKING=yes)
-AC_MSG_RESULT($USE_TRACKING)
+ USE_TRACKING=$enableval, USE_TRACKING="yes")
+AC_MSG_RESULT([$USE_TRACKING])
################################################################################
dnl -- Disable silence rules
-AC_MSG_CHECKING(whether to build silently)
+AC_MSG_CHECKING([whether to build silently])
AC_ARG_ENABLE(silent-rules,
AS_HELP_STRING([--disable-silent-rules], [disable silent building]),
- SILENT_RULES=$enableval, SILENT_RULES=yes)
-AC_MSG_RESULT($SILENT_RULES)
+ SILENT_RULES=$enableval, SILENT_RULES="yes")
+AC_MSG_RESULT([$SILENT_RULES])
################################################################################
dnl -- Enables statically-linked tools
-AC_MSG_CHECKING(whether to use static linking)
+AC_MSG_CHECKING([whether to use static linking])
AC_ARG_ENABLE(static_link,
AS_HELP_STRING([--enable-static_link],
[use this to link the tools to their libraries
statically (default is dynamic linking]),
- STATIC_LINK=$enableval, STATIC_LINK=no)
-AC_MSG_RESULT($STATIC_LINK)
+ STATIC_LINK=$enableval, STATIC_LINK="no")
+AC_MSG_RESULT([$STATIC_LINK])
################################################################################
dnl -- Check if compiler/linker supports PIE and RELRO
@@ -200,64 +200,64 @@ AC_PREFIX_DEFAULT(/usr)
dnl -- Clear default exec_prefix - install into /sbin rather than /usr/sbin
test "$exec_prefix" = "NONE" && test "$prefix" = "NONE" && exec_prefix=""
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "$prefix" = "NONE" && prefix=$ac_default_prefix
# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+test "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
################################################################################
dnl -- Setup the ownership of the files
-AC_MSG_CHECKING(file owner)
+AC_MSG_CHECKING([file owner])
AC_ARG_WITH(user,
AS_HELP_STRING([--with-user=USER],
[set the owner of installed files [USER=]]),
OWNER=$withval)
-AC_MSG_RESULT($OWNER)
+AC_MSG_RESULT([$OWNER])
test -n "$OWNER" && INSTALL="$INSTALL -o $OWNER"
################################################################################
dnl -- Setup the group ownership of the files
-AC_MSG_CHECKING(group owner)
+AC_MSG_CHECKING([group owner])
AC_ARG_WITH(group,
AS_HELP_STRING([--with-group=GROUP],
[set the group owner of installed files [GROUP=]]),
GROUP=$withval)
-AC_MSG_RESULT($GROUP)
+AC_MSG_RESULT([$GROUP])
test -n "$GROUP" && INSTALL="$INSTALL -g $GROUP"
################################################################################
dnl -- Setup device node ownership
-AC_MSG_CHECKING(device node uid)
+AC_MSG_CHECKING([device node uid])
AC_ARG_WITH(device-uid,
AS_HELP_STRING([--with-device-uid=UID],
[set the owner used for new device nodes [UID=0]]),
DM_DEVICE_UID=$withval, DM_DEVICE_UID=0)
-AC_MSG_RESULT($DM_DEVICE_UID)
+AC_MSG_RESULT([$DM_DEVICE_UID])
AC_DEFINE_UNQUOTED([DM_DEVICE_UID], [$DM_DEVICE_UID], [Define default owner for device node])
################################################################################
dnl -- Setup device group ownership
-AC_MSG_CHECKING(device node gid)
+AC_MSG_CHECKING([device node gid])
AC_ARG_WITH(device-gid,
AS_HELP_STRING([--with-device-gid=GID],
[set the group used for new device nodes [GID=0]]),
DM_DEVICE_GID=$withval, DM_DEVICE_GID=0)
-AC_MSG_RESULT($DM_DEVICE_GID)
+AC_MSG_RESULT([$DM_DEVICE_GID])
AC_DEFINE_UNQUOTED([DM_DEVICE_GID], [$DM_DEVICE_GID], [Define default group for device node])
################################################################################
dnl -- Setup device mode
-AC_MSG_CHECKING(device node mode)
+AC_MSG_CHECKING([device node mode])
AC_ARG_WITH(device-mode,
AS_HELP_STRING([--with-device-mode=MODE],
[set the mode used for new device nodes [MODE=0600]]),
DM_DEVICE_MODE=$withval, DM_DEVICE_MODE=0600)
-AC_MSG_RESULT($DM_DEVICE_MODE)
+AC_MSG_RESULT([$DM_DEVICE_MODE])
AC_DEFINE_UNQUOTED([DM_DEVICE_MODE], [$DM_DEVICE_MODE], [Define default mode for device node])
-AC_MSG_CHECKING(when to create device nodes)
+AC_MSG_CHECKING([when to create device nodes])
AC_ARG_WITH(device-nodes-on,
AS_HELP_STRING([--with-device-nodes-on=ON],
[create nodes on resume or create [ON=resume]]),
@@ -266,23 +266,23 @@ AS_CASE(["$ADD_NODE"],
[resume], [add_on=DM_ADD_NODE_ON_RESUME],
[create], [add_on=DM_ADD_NODE_ON_CREATE],
[AC_MSG_ERROR([--with-device-nodes-on parameter invalid])])
-AC_MSG_RESULT(on $ADD_NODE)
+AC_MSG_RESULT([on $ADD_NODE])
AC_DEFINE_UNQUOTED([DEFAULT_DM_ADD_NODE], $add_on, [Define default node creation behavior with dmsetup create])
dnl -- Default settings for lvm.conf { devices/use_devicesfile }
-AC_MSG_CHECKING(default for use_devicesfile)
+AC_MSG_CHECKING([default for use_devicesfile])
AC_ARG_WITH(default-use-devices-file,
AS_HELP_STRING([--with-default-use-devices-file], [default for lvm.conf devices/use_devicesfile = [0]]),
DEFAULT_USE_DEVICES_FILE=$withval, DEFAULT_USE_DEVICES_FILE=0)
AS_CASE(["$DEFAULT_USE_DEVICES_FILE"],
[0|1], [],
[AC_MSG_ERROR([--with-default-use-devices-file parameter invalid])])
-AC_MSG_RESULT($DEFAULT_USE_DEVICES_FILE)
+AC_MSG_RESULT([$DEFAULT_USE_DEVICES_FILE])
AC_DEFINE_UNQUOTED(DEFAULT_USE_DEVICES_FILE, [$DEFAULT_USE_DEVICES_FILE],
[Default for lvm.conf use_devicesfile.])
-AC_MSG_CHECKING(default name mangling)
+AC_MSG_CHECKING([default name mangling])
AC_ARG_WITH(default-name-mangling,
AS_HELP_STRING([--with-default-name-mangling=MANGLING],
[default name mangling: auto/none/hex [auto]]),
@@ -292,17 +292,17 @@ AS_CASE(["$MANGLING"],
[no|none|disabled], [mangling=DM_STRING_MANGLING_NONE],
[hex], [mangling=DM_STRING_MANGLING_HEX],
[AC_MSG_ERROR([--with-default-name-mangling parameter invalid])])
-AC_MSG_RESULT($MANGLING)
+AC_MSG_RESULT([$MANGLING])
AC_DEFINE_UNQUOTED([DEFAULT_DM_NAME_MANGLING], $mangling, [Define default name mangling behaviour])
################################################################################
dnl -- snapshots inclusion type
-AC_MSG_CHECKING(whether to include snapshots)
+AC_MSG_CHECKING([whether to include snapshots])
AC_ARG_WITH(snapshots,
AS_HELP_STRING([--with-snapshots=TYPE],
[snapshot support: internal/none [internal]]),
SNAPSHOTS=$withval, SNAPSHOTS=internal)
-AC_MSG_RESULT($SNAPSHOTS)
+AC_MSG_RESULT([$SNAPSHOTS])
AS_CASE(["$SNAPSHOTS"],
[no|none|shared], [],
@@ -312,12 +312,12 @@ AS_CASE(["$SNAPSHOTS"],
################################################################################
dnl -- mirrors inclusion type
-AC_MSG_CHECKING(whether to include mirrors)
+AC_MSG_CHECKING([whether to include mirrors])
AC_ARG_WITH(mirrors,
AS_HELP_STRING([--with-mirrors=TYPE],
[mirror support: internal/none [internal]]),
MIRRORS=$withval, MIRRORS=internal)
-AC_MSG_RESULT($MIRRORS)
+AC_MSG_RESULT([$MIRRORS])
AS_CASE(["$MIRRORS"],
[no|none|shared], [],
@@ -355,7 +355,7 @@ AC_ARG_WITH(default-sparse-segtype,
################################################################################
dnl -- thin provisioning
-AC_MSG_CHECKING(whether to include thin provisioning)
+AC_MSG_CHECKING([whether to include thin provisioning])
AC_ARG_WITH(thin,
AS_HELP_STRING([--with-thin=TYPE],
[thin provisioning support: internal/none [internal]]),
@@ -377,7 +377,7 @@ AC_ARG_WITH(thin-restore,
[thin_restore tool: [autodetect]]),
THIN_RESTORE_CMD=$withval, THIN_RESTORE_CMD="autodetect")
-AC_MSG_RESULT($THIN)
+AC_MSG_RESULT([$THIN])
AS_CASE(["$THIN"],
[no|none], [test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot"],
@@ -393,7 +393,7 @@ dnl -- thin_check needs-check flag
AC_ARG_ENABLE(thin_check_needs_check,
AS_HELP_STRING([--disable-thin_check_needs_check],
[required if thin_check version is < 0.3.0]),
- THIN_CHECK_NEEDS_CHECK=$enableval, THIN_CHECK_NEEDS_CHECK=yes)
+ THIN_CHECK_NEEDS_CHECK=$enableval, THIN_CHECK_NEEDS_CHECK="yes")
# Test if necessary thin tools are available
# if not - use plain defaults and warn user
@@ -404,50 +404,50 @@ AS_CASE(["$THIN"],
AC_PATH_TOOL(THIN_CHECK_CMD, thin_check, [], [$PATH_SBIN])
AS_IF([test -z "$THIN_CHECK_CMD"], [
AC_MSG_WARN([thin_check not found in path $PATH])
- THIN_CHECK_CMD=/usr/sbin/thin_check
- THIN_CONFIGURE_WARN=y
+ THIN_CHECK_CMD="/usr/sbin/thin_check"
+ THIN_CONFIGURE_WARN="y"
])
])
AS_IF([test "$THIN_CHECK_NEEDS_CHECK" = "yes" && test "$THIN_CONFIGURE_WARN" != "y"], [
- THIN_CHECK_VSN=`"$THIN_CHECK_CMD" -V 2>/dev/null`
- THIN_CHECK_VSN_MAJOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}'`
- THIN_CHECK_VSN_MINOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}'`
+ THIN_CHECK_VSN=$("$THIN_CHECK_CMD" -V 2>/dev/null)
+ THIN_CHECK_VSN_MAJOR=$(echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}')
+ THIN_CHECK_VSN_MINOR=$(echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}')
AS_IF([test -z "$THIN_CHECK_VSN_MAJOR" || test -z "$THIN_CHECK_VSN_MINOR"], [
AC_MSG_WARN([$THIN_CHECK_CMD: Bad version "$THIN_CHECK_VSN" found])
- THIN_CHECK_VERSION_WARN=y
- THIN_CHECK_NEEDS_CHECK=no
+ THIN_CHECK_VERSION_WARN="y"
+ THIN_CHECK_NEEDS_CHECK="no"
], [test "$THIN_CHECK_VSN_MAJOR" -eq 0 && test "$THIN_CHECK_VSN_MINOR" -lt 3], [
AC_MSG_WARN([$THIN_CHECK_CMD: Old version "$THIN_CHECK_VSN" found])
- THIN_CHECK_VERSION_WARN=y
- THIN_CHECK_NEEDS_CHECK=no
+ THIN_CHECK_VERSION_WARN="y"
+ THIN_CHECK_NEEDS_CHECK="no"
])
])
# Empty means a config way to ignore thin dumping
AS_IF([test "$THIN_DUMP_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_DUMP_CMD, thin_dump, [], [$PATH_SBIN])
AS_IF([test -z "$THIN_DUMP_CMD"], [
- AC_MSG_WARN(thin_dump not found in path $PATH)
- THIN_DUMP_CMD=/usr/sbin/thin_dump
- THIN_CONFIGURE_WARN=y
+ AC_MSG_WARN(["thin_dump not found in path $PATH"])
+ THIN_DUMP_CMD="/usr/sbin/thin_dump"
+ THIN_CONFIGURE_WARN="y"
])
])
# Empty means a config way to ignore thin repairing
AS_IF([test "$THIN_REPAIR_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_REPAIR_CMD, thin_repair, [], [$PATH_SBIN])
AS_IF([test -z "$THIN_REPAIR_CMD"], [
- AC_MSG_WARN(thin_repair not found in path $PATH)
- THIN_REPAIR_CMD=/usr/sbin/thin_repair
- THIN_CONFIGURE_WARN=y
+ AC_MSG_WARN(["thin_repair not found in path $PATH"])
+ THIN_REPAIR_CMD="/usr/sbin/thin_repair"
+ THIN_CONFIGURE_WARN="y"
])
])
# Empty means a config way to ignore thin restoring
AS_IF([test "$THIN_RESTORE_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_RESTORE_CMD, thin_restore, [], [$PATH_SBIN])
AS_IF([test -z "$THIN_RESTORE_CMD"], [
- AC_MSG_WARN(thin_restore not found in path $PATH)
- THIN_RESTORE_CMD=/usr/sbin/thin_restore
- THIN_CONFIGURE_WARN=y
+ AC_MSG_WARN(["thin_restore not found in path $PATH"])
+ THIN_RESTORE_CMD="/usr/sbin/thin_restore"
+ THIN_CONFIGURE_WARN="y"
])
])
@@ -472,7 +472,7 @@ AC_DEFINE_UNQUOTED([THIN_RESTORE_CMD], ["$THIN_RESTORE_CMD"],
################################################################################
dnl -- cache inclusion type
-AC_MSG_CHECKING(whether to include cache)
+AC_MSG_CHECKING([whether to include cache])
AC_ARG_WITH(cache,
AS_HELP_STRING([--with-cache=TYPE],
[cache support: internal/none [internal]]),
@@ -493,7 +493,7 @@ AC_ARG_WITH(cache-restore,
AS_HELP_STRING([--with-cache-restore=PATH],
[cache_restore tool: [autodetect]]),
CACHE_RESTORE_CMD=$withval, CACHE_RESTORE_CMD="autodetect")
-AC_MSG_RESULT($CACHE)
+AC_MSG_RESULT([$CACHE])
AS_CASE(["$CACHE"],
[no|none|shared], [],
@@ -505,7 +505,7 @@ dnl -- cache_check needs-check flag
AC_ARG_ENABLE(cache_check_needs_check,
AS_HELP_STRING([--disable-cache_check_needs_check],
[required if cache_check version is < 0.5]),
- CACHE_CHECK_NEEDS_CHECK=$enableval, CACHE_CHECK_NEEDS_CHECK=yes)
+ CACHE_CHECK_NEEDS_CHECK=$enableval, CACHE_CHECK_NEEDS_CHECK="yes")
# Test if necessary cache tools are available
# if not - use plain defaults and warn user
@@ -516,8 +516,8 @@ AS_CASE(["$CACHE"],
AC_PATH_TOOL(CACHE_CHECK_CMD, cache_check, [], [$PATH_SBIN])
AS_IF([test -z "$CACHE_CHECK_CMD"], [
AC_MSG_WARN([cache_check not found in path $PATH])
- CACHE_CHECK_CMD=/usr/sbin/cache_check
- CACHE_CONFIGURE_WARN=y
+ CACHE_CHECK_CMD="/usr/sbin/cache_check"
+ CACHE_CONFIGURE_WARN="y"
])
])
AS_IF([test "$CACHE_CHECK_NEEDS_CHECK" = "yes" && test "$CACHE_CONFIGURE_WARN" != "y"], [
@@ -531,14 +531,14 @@ AS_CASE(["$CACHE"],
|| test -z "$CACHE_CHECK_VSN_MINOR" \
|| test -z "$CACHE_CHECK_VSN_PATCH"], [
AC_MSG_WARN([$CACHE_CHECK_CMD: Bad version "$CACHE_CHECK_VSN" found])
- CACHE_CHECK_VERSION_WARN=y
- CACHE_CHECK_NEEDS_CHECK=no
+ CACHE_CHECK_VERSION_WARN="y"
+ CACHE_CHECK_NEEDS_CHECK="no"
], [test "$CACHE_CHECK_VSN_MAJOR" -eq 0], [
AS_IF([test "$CACHE_CHECK_VSN_MINOR" -lt 5 \
|| ( test "$CACHE_CHECK_VSN_MINOR" -eq 5 && test "$CACHE_CHECK_VSN_PATCH" -lt 4 )], [
AC_MSG_WARN([$CACHE_CHECK_CMD: Old version "$CACHE_CHECK_VSN" found])
- CACHE_CHECK_VERSION_WARN=y
- CACHE_CHECK_NEEDS_CHECK=no
+ CACHE_CHECK_VERSION_WARN="y"
+ CACHE_CHECK_NEEDS_CHECK="no"
])
AS_IF([test "$CACHE_CHECK_VSN_MINOR" -lt 7], [
AC_MSG_WARN([$CACHE_CHECK_CMD: Old version "$CACHE_CHECK_VSN" does not support new cache format V2])
@@ -550,27 +550,27 @@ AS_CASE(["$CACHE"],
AS_IF([test "$CACHE_DUMP_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_DUMP_CMD, cache_dump, [], [$PATH_SBIN])
AS_IF([test -z "$CACHE_DUMP_CMD"], [
- AC_MSG_WARN(cache_dump not found in path $PATH)
- CACHE_DUMP_CMD=/usr/sbin/cache_dump
- CACHE_CONFIGURE_WARN=y
+ AC_MSG_WARN(["cache_dump not found in path $PATH"])
+ CACHE_DUMP_CMD="/usr/sbin/cache_dump"
+ CACHE_CONFIGURE_WARN="y"
])
])
# Empty means a config way to ignore cache repairing
AS_IF([test "$CACHE_REPAIR_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_REPAIR_CMD, cache_repair, [], [$PATH_SBIN])
AS_IF([test -z "$CACHE_REPAIR_CMD"], [
- AC_MSG_WARN(cache_repair not found in path $PATH)
- CACHE_REPAIR_CMD=/usr/sbin/cache_repair
- CACHE_CONFIGURE_WARN=y
+ AC_MSG_WARN(["cache_repair not found in path $PATH"])
+ CACHE_REPAIR_CMD="/usr/sbin/cache_repair"
+ CACHE_CONFIGURE_WARN="y"
])
])
# Empty means a config way to ignore cache restoring
AS_IF([test "$CACHE_RESTORE_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_RESTORE_CMD, cache_restore, [], [$PATH_SBIN])
AS_IF([test -z "$CACHE_RESTORE_CMD"], [
- AC_MSG_WARN(cache_restore not found in path $PATH)
- CACHE_RESTORE_CMD=/usr/sbin/cache_restore
- CACHE_CONFIGURE_WARN=y
+ AC_MSG_WARN(["cache_restore not found in path $PATH"])
+ CACHE_RESTORE_CMD="/usr/sbin/cache_restore"
+ CACHE_CONFIGURE_WARN="y"
])
])
@@ -595,13 +595,13 @@ AC_DEFINE_UNQUOTED([CACHE_RESTORE_CMD], ["$CACHE_RESTORE_CMD"],
################################################################################
dnl -- cache inclusion type
-AC_MSG_CHECKING(whether to include vdo)
+AC_MSG_CHECKING([whether to include vdo])
AC_ARG_WITH(vdo,
AS_HELP_STRING([--with-vdo=TYPE],
[vdo support: internal/none [internal]]),
VDO=$withval, VDO="internal")
-AC_MSG_RESULT($VDO)
+AC_MSG_RESULT([$VDO])
AC_ARG_WITH(vdo-format,
AS_HELP_STRING([--with-vdo-format=PATH],
@@ -615,7 +615,7 @@ AS_CASE(["$VDO"],
AC_PATH_TOOL(VDO_FORMAT_CMD, vdoformat, [], [$PATH])
AS_IF([test -z "$VDO_FORMAT_CMD"], [
AC_MSG_WARN([vdoformat not found in path $PATH])
- VDO_FORMAT_CMD=/usr/bin/vdoformat
+ VDO_FORMAT_CMD="/usr/bin/vdoformat"
VDO_CONFIGURE_WARN=y
])
])],
@@ -631,23 +631,23 @@ AC_DEFINE_UNQUOTED([VDO_FORMAT_CMD], ["$VDO_FORMAT_CMD"],
# AS_HELP_STRING([--with-vdo-include=PATH],
# [vdo support: Path to utils headers: [/usr/include/vdo/utils]]),
# VDO_INCLUDE=$withval, VDO_INCLUDE="/usr/include/vdo/utils")
-#AC_MSG_RESULT($VDO_INCLUDE)
+#AC_MSG_RESULT([$VDO_INCLUDE])
#
#AC_ARG_WITH(vdo-lib,
# AS_HELP_STRING([--with-vdo-lib=PATH],
# [vdo support: Path to utils lib: [/usr/lib]]),
# VDO_LIB=$withval, VDO_LIB="/usr/lib")
-#AC_MSG_RESULT($VDO_LIB)
+#AC_MSG_RESULT([$VDO_LIB])
################################################################################
dnl -- writecache inclusion type
-AC_MSG_CHECKING(whether to include writecache)
+AC_MSG_CHECKING([whether to include writecache])
AC_ARG_WITH(writecache,
AS_HELP_STRING([--with-writecache=TYPE],
[writecache support: internal/none [internal]]),
WRITECACHE=$withval, WRITECACHE="internal")
-AC_MSG_RESULT($WRITECACHE)
+AC_MSG_RESULT([$WRITECACHE])
AS_CASE(["$WRITECACHE"],
[no|none], [],
@@ -657,13 +657,13 @@ AS_CASE(["$WRITECACHE"],
################################################################################
dnl -- integrity inclusion type
-AC_MSG_CHECKING(whether to include integrity)
+AC_MSG_CHECKING([whether to include integrity])
AC_ARG_WITH(integrity,
AS_HELP_STRING([--with-integrity=TYPE],
[integrity support: internal/none [internal]]),
INTEGRITY=$withval, INTEGRITY="internal")
-AC_MSG_RESULT($INTEGRITY)
+AC_MSG_RESULT([$INTEGRITY])
AS_CASE(["$INTEGRITY"],
[no|none], [],
@@ -683,40 +683,40 @@ AC_ARG_VAR([AIO_LIBS], [linker flags for AIO])
dnl -- Disable readline
AC_ARG_ENABLE([readline],
AS_HELP_STRING([--disable-readline], [disable readline support]),
- READLINE=$enableval, READLINE=maybe)
+ READLINE=$enableval, READLINE="maybe")
################################################################################
dnl -- Disable editline
AC_ARG_ENABLE([editline],
AS_HELP_STRING([--enable-editline], [enable editline support]),
- EDITLINE=$enableval, EDITLINE=no)
+ EDITLINE=$enableval, EDITLINE="no")
################################################################################
dnl -- Disable realtime clock support
-AC_MSG_CHECKING(whether to enable realtime support)
+AC_MSG_CHECKING([whether to enable realtime support])
AC_ARG_ENABLE(realtime,
AS_HELP_STRING([--disable-realtime], [disable realtime clock support]),
- REALTIME=$enableval, REALTIME=yes)
-AC_MSG_RESULT($REALTIME)
+ REALTIME=$enableval, REALTIME="yes")
+AC_MSG_RESULT([$REALTIME])
################################################################################
dnl -- disable OCF resource agents
-AC_MSG_CHECKING(whether to enable OCF resource agents)
+AC_MSG_CHECKING([whether to enable OCF resource agents])
AC_ARG_ENABLE(ocf,
AS_HELP_STRING([--enable-ocf],
[enable Open Cluster Framework (OCF) compliant resource agents]),
- OCF=$enableval, OCF=no)
-AC_MSG_RESULT($OCF)
+ OCF=$enableval, OCF="no")
+AC_MSG_RESULT([$OCF])
AC_ARG_WITH(ocfdir,
AS_HELP_STRING([--with-ocfdir=DIR],
[install OCF files in [PREFIX/lib/ocf/resource.d/lvm2]]),
OCFDIR=$withval, OCFDIR='${prefix}/lib/ocf/resource.d/lvm2')
################################################################################
-AC_MSG_CHECKING(for default run directory)
+AC_MSG_CHECKING([for default run directory])
RUN_DIR="/run"
test -d "/run" || RUN_DIR="/var/run"
-AC_MSG_RESULT($RUN_DIR)
+AC_MSG_RESULT([$RUN_DIR])
dnl -- Set up pidfile and run directory
AH_TEMPLATE(DEFAULT_PID_DIR)
AC_ARG_WITH(default-pid-dir,
@@ -744,12 +744,12 @@ AC_DEFINE_UNQUOTED(DEFAULT_RUN_DIR, ["$DEFAULT_RUN_DIR"],
################################################################################
dnl -- Build cluster mirror log daemon
-AC_MSG_CHECKING(whether to build cluster mirror log daemon)
+AC_MSG_CHECKING([whether to build cluster mirror log daemon])
AC_ARG_ENABLE(cmirrord,
AS_HELP_STRING([--enable-cmirrord],
[enable the cluster mirror log daemon]),
- CMIRRORD=$enableval, CMIRRORD=no)
-AC_MSG_RESULT($CMIRRORD)
+ CMIRRORD=$enableval, CMIRRORD="no")
+AC_MSG_RESULT([$CMIRRORD])
BUILD_CMIRRORD=$CMIRRORD
@@ -773,10 +773,10 @@ AS_IF([test "$BUILD_CMIRRORD" = "yes" && test "$HAVE_CPG" != "yes"], [
################################################################################
dnl -- Enable debugging
-AC_MSG_CHECKING(whether to enable debugging)
+AC_MSG_CHECKING([whether to enable debugging])
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [enable debugging]),
- DEBUG=$enableval, DEBUG=no)
-AC_MSG_RESULT($DEBUG)
+ DEBUG=$enableval, DEBUG="no")
+AC_MSG_RESULT([$DEBUG])
dnl -- Normally turn off optimisation for debug builds
AS_IF([test "$DEBUG" = "yes"], [COPTIMISE_FLAG=""], [CSCOPE_CMD=""])
@@ -791,24 +791,24 @@ AC_SUBST(HAVE_WSYNCNAND)
################################################################################
dnl -- Override optimisation
-AC_MSG_CHECKING(for C optimisation flag)
+AC_MSG_CHECKING([for C optimisation flag])
AC_ARG_WITH(optimisation,
AS_HELP_STRING([--with-optimisation=OPT],
[C optimisation flag [OPT=-O2]]),
COPTIMISE_FLAG=$withval)
-AC_MSG_RESULT($COPTIMISE_FLAG)
+AC_MSG_RESULT([$COPTIMISE_FLAG])
################################################################################
dnl -- Symbol versioning
-AC_MSG_CHECKING(whether to use symbol versioning)
+AC_MSG_CHECKING([whether to use symbol versioning])
AC_ARG_WITH(symvers,
AS_HELP_STRING([--with-symvers=STYLE],
[use symbol versioning of the shared library [default=gnu]]), [
AS_CASE(["$withval"],
[gnu|no], [symvers=$withval],
[AC_MSG_ERROR(--with-symvers parameter invalid)])],
- [symvers=gnu])
-AC_MSG_RESULT($symvers)
+ [symvers="gnu"])
+AC_MSG_RESULT([$symvers])
AS_IF([test "$GCC" = "yes" && test "$symvers" = "gnu"], [
AC_DEFINE(GNU_SYMVER, 1,
@@ -821,12 +821,12 @@ AS_IF([test "$GCC" = "yes" && test "$symvers" = "gnu"], [
################################################################################
dnl -- Enable profiling
-AC_MSG_CHECKING(whether to gather gcov profiling data)
+AC_MSG_CHECKING([whether to gather gcov profiling data])
AC_ARG_ENABLE(profiling,
AS_HELP_STRING([--enable-profiling],
[gather gcov profiling data]),
- PROFILING=$enableval, PROFILING=no)
-AC_MSG_RESULT($PROFILING)
+ PROFILING=$enableval, PROFILING="no")
+AC_MSG_RESULT([$PROFILING])
AS_IF([test "$PROFILING" = "yes"], [
COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
@@ -839,7 +839,7 @@ AS_IF([test "$PROFILING" = "yes"], [
AS_IF([test -n "$GENPNG"], [
AC_MSG_CHECKING([whether $GENPNG has all required modules])
AS_IF(["$GENPNG" --help > /dev/null 2>&1], [
- AC_MSG_RESULT(ok)
+ AC_MSG_RESULT([ok])
GENHTML="$GENHTML --frames"
], [
AC_MSG_RESULT([not supported])
@@ -857,14 +857,14 @@ AC_DEFINE_UNQUOTED(TESTSUITE_DATA, ["$(eval echo $(eval echo $TESTSUITE_DATA))"]
################################################################################
dnl -- Enable valgrind awareness of memory pools
-AC_MSG_CHECKING(whether to enable valgrind awareness of pools)
+AC_MSG_CHECKING([whether to enable valgrind awareness of pools])
AC_ARG_ENABLE(valgrind_pool,
AS_HELP_STRING([--enable-valgrind-pool],
[enable valgrind awareness of pools]),
- VALGRIND_POOL=$enableval, VALGRIND_POOL=no)
-AC_MSG_RESULT($VALGRIND_POOL)
+ VALGRIND_POOL=$enableval, VALGRIND_POOL="no")
+AC_MSG_RESULT([$VALGRIND_POOL])
-PKG_CHECK_MODULES(VALGRIND, valgrind, [HAVE_VALGRIND=yes], [
+PKG_CHECK_MODULES(VALGRIND, valgrind, [HAVE_VALGRIND="yes"], [
AS_IF([test "$VALGRIND_POOL" = "yes"], [AC_MSG_ERROR(bailing out)])
])
AC_SUBST(VALGRIND_CFLAGS)
@@ -879,12 +879,12 @@ AS_IF([test "$VALGRIND_POOL" = "yes"], [
################################################################################
dnl -- Disable devmapper
-AC_MSG_CHECKING(whether to use device-mapper)
+AC_MSG_CHECKING([whether to use device-mapper])
AC_ARG_ENABLE(devmapper,
AS_HELP_STRING([--disable-devmapper],
[disable LVM2 device-mapper interaction]),
DEVMAPPER=$enableval)
-AC_MSG_RESULT($DEVMAPPER)
+AC_MSG_RESULT([$DEVMAPPER])
AS_IF([test "$DEVMAPPER" = "yes"], [
AC_DEFINE([DEVMAPPER_SUPPORT], 1, [Define to 1 to enable LVM2 device-mapper interaction.])
@@ -892,24 +892,24 @@ AS_IF([test "$DEVMAPPER" = "yes"], [
################################################################################
dnl -- Build lvmpolld
-AC_MSG_CHECKING(whether to build lvmpolld)
+AC_MSG_CHECKING([whether to build lvmpolld])
AC_ARG_ENABLE(lvmpolld,
AS_HELP_STRING([--enable-lvmpolld],
[enable the LVM Polling Daemon]),
- LVMPOLLD=$enableval, LVMPOLLD=no)
+ LVMPOLLD=$enableval, LVMPOLLD="no")
test -n "$LVMPOLLD" && BUILD_LVMPOLLD=$LVMPOLLD
-AC_MSG_RESULT($BUILD_LVMPOLLD)
+AC_MSG_RESULT([$BUILD_LVMPOLLD])
################################################################################
BUILD_LVMLOCKD=no
dnl -- Build lvmlockdsanlock
-AC_MSG_CHECKING(whether to build lvmlockdsanlock)
+AC_MSG_CHECKING([whether to build lvmlockdsanlock])
AC_ARG_ENABLE(lvmlockd-sanlock,
AS_HELP_STRING([--enable-lvmlockd-sanlock],
[enable the LVM lock daemon using sanlock]),
- LOCKDSANLOCK=$enableval, LOCKDSANLOCK=no)
-AC_MSG_RESULT($LOCKDSANLOCK)
+ LOCKDSANLOCK=$enableval, LOCKDSANLOCK="no")
+AC_MSG_RESULT([$LOCKDSANLOCK])
BUILD_LOCKDSANLOCK=$LOCKDSANLOCK
@@ -922,12 +922,12 @@ AS_IF([test "$BUILD_LOCKDSANLOCK" = "yes"], [
################################################################################
dnl -- Build lvmlockddlm
-AC_MSG_CHECKING(whether to build lvmlockddlm)
+AC_MSG_CHECKING([whether to build lvmlockddlm])
AC_ARG_ENABLE(lvmlockd-dlm,
AS_HELP_STRING([--enable-lvmlockd-dlm],
[enable the LVM lock daemon using dlm]),
- LOCKDDLM=$enableval, LOCKDDLM=no)
-AC_MSG_RESULT($LOCKDDLM)
+ LOCKDDLM=$enableval, LOCKDDLM="no")
+AC_MSG_RESULT([$LOCKDDLM])
BUILD_LOCKDDLM=$LOCKDDLM
@@ -940,12 +940,12 @@ AS_IF([test "$BUILD_LOCKDDLM" = "yes"], [
################################################################################
dnl -- Build lvmlockddlmcontrol
-AC_MSG_CHECKING(whether to build lvmlockddlmcontrol)
+AC_MSG_CHECKING([whether to build lvmlockddlmcontrol])
AC_ARG_ENABLE(lvmlockd-dlmcontrol,
AS_HELP_STRING([--enable-lvmlockd-dlmcontrol],
[enable lvmlockd remote refresh using libdlmcontrol]),
- LOCKDDLM_CONTROL=$enableval, LOCKDDLM_CONTROL=no)
-AC_MSG_RESULT($LOCKDDLM_CONTROL)
+ LOCKDDLM_CONTROL=$enableval, LOCKDDLM_CONTROL="no")
+AC_MSG_RESULT([$LOCKDDLM_CONTROL])
BUILD_LOCKDDLM_CONTROL=$LOCKDDLM_CONTROL
@@ -958,27 +958,27 @@ AS_IF([test "$BUILD_LOCKDDLM_CONTROL" = "yes"], [
################################################################################
dnl -- Build lvmlockdidm
-AC_MSG_CHECKING(whether to build lvmlockdidm)
+AC_MSG_CHECKING([whether to build lvmlockdidm])
AC_ARG_ENABLE(lvmlockd-idm,
AS_HELP_STRING([--enable-lvmlockd-idm],
[enable the LVM lock daemon using idm]),
- LOCKDIDM=$enableval, LOCKDIDM=no)
-AC_MSG_RESULT($LOCKDIDM)
+ LOCKDIDM=$enableval, LOCKDIDM="no")
+AC_MSG_RESULT([$LOCKDIDM])
BUILD_LOCKDIDM=$LOCKDIDM
dnl -- Look for Seagate IDM libraries
AS_IF([test "$BUILD_LOCKDIDM" = "yes"], [
PKG_CHECK_MODULES(LOCKD_IDM, libseagate_ilm >= 0.1.0, [HAVE_LOCKD_IDM=yes], $bailout)
- PKG_CHECK_EXISTS(blkid >= 2.24, [HAVE_LOCKD_IDM=yes], $bailout)
+ PKG_CHECK_EXISTS(blkid >= 2.24, [HAVE_LOCKD_IDM="yes"], $bailout)
AC_DEFINE([LOCKDIDM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd IDM option.])
BUILD_LVMLOCKD=yes
])
################################################################################
dnl -- Build lvmlockd
-AC_MSG_CHECKING(whether to build lvmlockd)
-AC_MSG_RESULT($BUILD_LVMLOCKD)
+AC_MSG_CHECKING([whether to build lvmlockd])
+AC_MSG_RESULT([$BUILD_LVMLOCKD])
AS_IF([test "$BUILD_LVMLOCKD" = "yes"], [
AS_IF([test "$LVMPOLLD" = "no"], [AC_MSG_ERROR([cannot build lvmlockd with --disable-lvmpolld.])])
@@ -988,7 +988,7 @@ AS_IF([test "$BUILD_LVMLOCKD" = "yes"], [
[AS_HELP_STRING([--disable-use-lvmlockd], [disable usage of LVM lock daemon])],
[AS_IF([test "$enableval" = "yes"], [DEFAULT_USE_LVMLOCKD=1], [DEFAULT_USE_LVMLOCKD=0])],
[DEFAULT_USE_LVMLOCKD=1])
- AC_MSG_RESULT($DEFAULT_USE_LVMLOCKD)
+ AC_MSG_RESULT([$DEFAULT_USE_LVMLOCKD])
AC_DEFINE([LVMLOCKD_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd.])
AC_ARG_WITH(lvmlockd-pidfile,
@@ -1012,7 +1012,7 @@ AS_IF([test "$BUILD_LVMPOLLD" = "yes"], [
[AS_HELP_STRING([--disable-use-lvmpolld], [disable usage of LVM Poll Daemon])],
[AS_IF([test "$enableval" = "yes"], [DEFAULT_USE_LVMPOLLD=1], [DEFAULT_USE_LVMPOLLD=0])],
[DEFAULT_USE_LVMPOLLD=1])
- AC_MSG_RESULT($DEFAULT_USE_LVMPOLLD)
+ AC_MSG_RESULT([$DEFAULT_USE_LVMPOLLD])
AC_DEFINE([LVMPOLLD_SUPPORT], 1, [Define to 1 to include code that uses lvmpolld.])
AC_ARG_WITH(lvmpolld-pidfile,
@@ -1030,11 +1030,11 @@ AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMPOLLD, [$DEFAULT_USE_LVMPOLLD],
################################################################################
dnl -- Check dmfilemapd
-AC_MSG_CHECKING(whether to build dmfilemapd)
+AC_MSG_CHECKING([whether to build dmfilemapd])
AC_ARG_ENABLE(dmfilemapd, AS_HELP_STRING([--enable-dmfilemapd],
[enable the dmstats filemap daemon]),
- BUILD_DMFILEMAPD=$enableval, BUILD_DMFILEMAPD=no)
-AC_MSG_RESULT($BUILD_DMFILEMAPD)
+ BUILD_DMFILEMAPD=$enableval, BUILD_DMFILEMAPD="no")
+AC_MSG_RESULT([$BUILD_DMFILEMAPD])
AC_DEFINE([DMFILEMAPD], $BUILD_DMFILEMAPD, [Define to 1 to enable the device-mapper filemap daemon.])
dnl -- dmfilemapd requires FIEMAP
@@ -1048,32 +1048,32 @@ PKG_CHECK_EXISTS(systemd >= 205, [SYSTEMD_MIN_VERSION=205], [])
################################################################################
dnl -- Build notifydbus
PKG_CHECK_EXISTS(systemd >= 221, [SYSTEMD_MIN_VERSION=221], [])
-AC_MSG_CHECKING(whether to build notifydbus)
+AC_MSG_CHECKING([whether to build notifydbus])
AC_ARG_ENABLE(notify-dbus,
AS_HELP_STRING([--enable-notify-dbus],
[enable LVM notification using dbus]),
AS_IF([test "$enableval" = "yes" && test "$SYSTEMD_MIN_VERSION" -lt 221],
AC_MSG_ERROR([Enabling notify-dbus requires systemd >= 221]))
- NOTIFYDBUS_SUPPORT=$enableval, NOTIFYDBUS_SUPPORT=no)
-AC_MSG_RESULT($NOTIFYDBUS_SUPPORT)
+ NOTIFYDBUS_SUPPORT=$enableval, NOTIFYDBUS_SUPPORT="no")
+AC_MSG_RESULT([$NOTIFYDBUS_SUPPORT])
AS_IF([test "$NOTIFYDBUS_SUPPORT" = "yes"],
AC_DEFINE([NOTIFYDBUS_SUPPORT], 1, [Define to 1 to include code that uses dbus notification.]))
################################################################################
dnl -- Build with systemd journaling when the header file is present
-AS_IF([test "$SYSTEMD_MIN_VERSION" -ge 221], [SYSTEMD_JOURNAL_SUPPORT=maybe], [SYSTEMD_JOURNAL_SUPPORT=no])
+AS_IF([test "$SYSTEMD_MIN_VERSION" -ge 221], [SYSTEMD_JOURNAL_SUPPORT="maybe"], [SYSTEMD_JOURNAL_SUPPORT="no"])
AC_CHECK_HEADER([systemd/sd-journal.h],
- [AS_IF([test "$SYSTEMD_JOURNAL_SUPPORT" != "no"], [SYSTEMD_JOURNAL_SUPPORT=yes])],
- [SYSTEMD_JOURNAL_SUPPORT=no])
-AC_MSG_CHECKING(whether to log to systemd journal)
+ [AS_IF([test "$SYSTEMD_JOURNAL_SUPPORT" != "no"], [SYSTEMD_JOURNAL_SUPPORT="yes"])],
+ [SYSTEMD_JOURNAL_SUPPORT="no"])
+AC_MSG_CHECKING([whether to log to systemd journal])
AC_ARG_ENABLE(systemd-journal,
AS_HELP_STRING([--disable-systemd-journal],
[disable LVM systemd journaling]),
AS_IF([test "$enableval" = "yes" && test "$SYSTEMD_JOURNAL_SUPPORT" = "no"],
AC_MSG_ERROR([Enabling systemd journal requires systemd/sd-journal.h and systemd >= 221.]))
SYSTEMD_JOURNAL_SUPPORT=$enableval, [])
-AC_MSG_RESULT($SYSTEMD_JOURNAL_SUPPORT)
+AC_MSG_RESULT([$SYSTEMD_JOURNAL_SUPPORT])
AS_IF([test "$SYSTEMD_JOURNAL_SUPPORT" = "yes"],
AC_DEFINE([SYSTEMD_JOURNAL_SUPPORT], 1, [Define to 1 to include code that uses systemd journal.]))
@@ -1082,16 +1082,16 @@ AS_IF([test "$SYSTEMD_JOURNAL_SUPPORT" = "yes"],
dnl -- Build appmachineid when header file sd-id128.h is present
PKG_CHECK_EXISTS(systemd >= 234, [SYSTEMD_MIN_VERSION=234 APP_MACHINEID_SUPPORT=maybe], [APP_MACHINEID_SUPPORT=no])
AC_CHECK_HEADER([systemd/sd-id128.h],
- [AS_IF([test "$APP_MACHINEID_SUPPORT" != "no"], [APP_MACHINEID_SUPPORT=yes])],
+ [AS_IF([test "$APP_MACHINEID_SUPPORT" != "no"], [APP_MACHINEID_SUPPORT="yes"])],
[APP_MACHINEID_SUPPORT=no])
-AC_MSG_CHECKING(whether to support systemd appmachineid)
+AC_MSG_CHECKING([whether to support systemd appmachineid])
AC_ARG_ENABLE(app-machineid,
AS_HELP_STRING([--disable-app-machineid],
[disable LVM system ID using app-specific machine-id]),
AS_IF([test "$enableval" = "yes" && test "$APP_MACHINEID_SUPPORT" = "no"],
AC_MSG_ERROR([Enabling app machineid requires systemd/sd-id128.h and systemd >= 234.]))
APP_MACHINEID_SUPPORT=$enableval, [])
-AC_MSG_RESULT($APP_MACHINEID_SUPPORT)
+AC_MSG_RESULT([$APP_MACHINEID_SUPPORT])
AS_IF([test "$APP_MACHINEID_SUPPORT" = "yes"],
AC_DEFINE([APP_MACHINEID_SUPPORT], 1, [Define to 1 to include code that uses libsystemd machine-id apis.]))
@@ -1107,7 +1107,7 @@ dnl -- Enable blkid wiping functionality
AC_ARG_ENABLE(blkid_wiping,
AS_HELP_STRING([--disable-blkid_wiping],
[disable libblkid detection of signatures when wiping and use native code instead]),
- BLKID_WIPING=$enableval, BLKID_WIPING=maybe)
+ BLKID_WIPING=$enableval, BLKID_WIPING="maybe")
# TODO: possibly detect right version of blkid with BLKID_SUBLKS_FSINFO support
# so lvresize can check detected flag here
@@ -1146,18 +1146,18 @@ AS_IF([test "$BLKID_WIPING" != "no"], [
])
])
AC_MSG_CHECKING([whether to enable libblkid detection of signatures when wiping])
-AC_MSG_RESULT($BLKID_WIPING)
+AC_MSG_RESULT([$BLKID_WIPING])
AC_DEFINE_UNQUOTED(DEFAULT_USE_BLKID_WIPING, [$DEFAULT_USE_BLKID_WIPING],
[Use blkid wiping by default.])
################################################################################
dnl -- Enable udev synchronisation
-AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
+AC_MSG_CHECKING([whether to enable synchronisation with udev processing])
AC_ARG_ENABLE(udev_sync,
AS_HELP_STRING([--enable-udev_sync],
[enable synchronisation with udev processing]),
- UDEV_SYNC=$enableval, UDEV_SYNC=no)
-AC_MSG_RESULT($UDEV_SYNC)
+ UDEV_SYNC=$enableval, UDEV_SYNC="no")
+AC_MSG_RESULT([$UDEV_SYNC])
AS_IF([test "$UDEV_SYNC" = "yes"], [
PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
@@ -1169,29 +1169,29 @@ AS_IF([test "$UDEV_SYNC" = "yes"], [
])
dnl -- Enable udev rules
-AC_MSG_CHECKING(whether to enable installation of udev rules required for synchronisation)
+AC_MSG_CHECKING([whether to enable installation of udev rules required for synchronisation])
AC_ARG_ENABLE(udev_rules,
AS_HELP_STRING([--enable-udev_rules],
[install rule files needed for udev synchronisation]),
UDEV_RULES=$enableval, UDEV_RULES=$UDEV_SYNC)
-AC_MSG_RESULT($UDEV_RULES)
+AC_MSG_RESULT([$UDEV_RULES])
-AC_MSG_CHECKING(whether to enable executable path detection in udev rules)
+AC_MSG_CHECKING([whether to enable executable path detection in udev rules])
AC_ARG_ENABLE(udev_rule_exec_detection,
AS_HELP_STRING([--enable-udev-rule-exec-detection],
[enable executable path detection in udev rules]),
- UDEV_RULE_EXEC_DETECTION=$enableval, UDEV_RULE_EXEC_DETECTION=no)
-AC_MSG_RESULT($UDEV_RULE_EXEC_DETECTION)
+ UDEV_RULE_EXEC_DETECTION=$enableval, UDEV_RULE_EXEC_DETECTION="no")
+AC_MSG_RESULT([$UDEV_RULE_EXEC_DETECTION])
dnl -- Check support for built-in blkid against target udev version
AS_IF([test "$UDEV_RULE" != "no"], [
PKG_CHECK_EXISTS([libudev >= 176], [
- UDEV_HAS_BUILTIN_BLKID=yes
+ UDEV_HAS_BUILTIN_BLKID="yes"
], [
- UDEV_HAS_BUILTIN_BLKID=no
+ UDEV_HAS_BUILTIN_BLKID="no"
])
- AC_MSG_CHECKING(whether udev supports built-in blkid)
- AC_MSG_RESULT($UDEV_HAS_BUILTIN_BLKID)
+ AC_MSG_CHECKING([whether udev supports built-in blkid])
+ AC_MSG_RESULT([$UDEV_HAS_BUILTIN_BLKID])
])
################################################################################
@@ -1200,7 +1200,7 @@ AC_ARG_ENABLE(units-compat,
AS_HELP_STRING([--enable-units-compat],
[enable output compatibility with old versions that
that do not use KiB-style unit suffixes]),
- UNITS_COMPAT=$enableval, UNITS_COMPAT=no)
+ UNITS_COMPAT=$enableval, UNITS_COMPAT="no")
AS_IF([test "$UNITS_COMPAT" = "yes"], [
AC_DEFINE([DEFAULT_SI_UNIT_CONSISTENCY], 0, [Define to 0 to reinstate the pre-2.02.54 handling of unit suffixes.])
@@ -1217,11 +1217,11 @@ AS_IF([test "$DM_IOCTLS" = "yes"],
################################################################################
dnl -- Disable O_DIRECT
-AC_MSG_CHECKING(whether to enable O_DIRECT)
+AC_MSG_CHECKING([whether to enable O_DIRECT])
AC_ARG_ENABLE(o_direct,
AS_HELP_STRING([--disable-o_direct], [disable O_DIRECT]),
ODIRECT=$enableval)
-AC_MSG_RESULT($ODIRECT)
+AC_MSG_RESULT([$ODIRECT])
AS_IF([test "$ODIRECT" = "yes"], [
AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.])
@@ -1229,11 +1229,11 @@ AS_IF([test "$ODIRECT" = "yes"], [
################################################################################
dnl -- Enable cmdlib
-AC_MSG_CHECKING(whether to compile liblvm2cmd.so)
+AC_MSG_CHECKING([whether to compile liblvm2cmd.so])
AC_ARG_ENABLE(cmdlib,
AS_HELP_STRING([--enable-cmdlib], [build shared command library]),
- CMDLIB=$enableval, CMDLIB=no)
-AC_MSG_RESULT($CMDLIB)
+ CMDLIB=$enableval, CMDLIB="no")
+AC_MSG_RESULT([$CMDLIB])
AC_SUBST([LVM2CMD_LIB])
AS_IF([test "$CMDLIB" = "yes"], [
LVM2CMD_LIB="-llvm2cmd"
@@ -1243,11 +1243,11 @@ AS_IF([test "$CMDLIB" = "yes"], [
################################################################################
dnl -- Enable D-Bus service
-AC_MSG_CHECKING(whether to include Python D-Bus support)
+AC_MSG_CHECKING([whether to include Python D-Bus support])
AC_ARG_ENABLE(dbus-service,
AS_HELP_STRING([--enable-dbus-service], [install D-Bus support]),
- BUILD_LVMDBUSD=$enableval, BUILD_LVMDBUSD=no)
-AC_MSG_RESULT($BUILD_LVMDBUSD)
+ BUILD_LVMDBUSD=$enableval, BUILD_LVMDBUSD="no")
+AC_MSG_RESULT([$BUILD_LVMDBUSD])
AS_IF([test "$NOTIFYDBUS_SUPPORT" = "yes" && test "BUILD_LVMDBUSD" = "yes"],
[AC_MSG_WARN([Building D-Bus support without D-Bus notifications.])])
@@ -1274,7 +1274,7 @@ AS_IF([test "$BUILD_LVMDBUSD" = "yes"], [
PYTHON3_LIBDIRS=`"$PYTHON3_CONFIG" --libs`
PYTHON3DIR=$pythondir
AS_IF([test "$PYTHON3_BINDINGS" = "yes"], [
- PYTHON_BINDINGS=yes
+ PYTHON_BINDINGS="yes"
])
# To get this macro, install autoconf-archive package then run autoreconf
@@ -1286,44 +1286,44 @@ AS_IF([test "$BUILD_LVMDBUSD" = "yes"], [
dnl -- Enable pkg-config
AC_ARG_ENABLE(pkgconfig,
AS_HELP_STRING([--enable-pkgconfig], [install pkgconfig support]),
- PKGCONFIG=$enableval, PKGCONFIG=no)
+ PKGCONFIG=$enableval, PKGCONFIG="no")
################################################################################
dnl -- Enable installation of writable files by user
AC_ARG_ENABLE(write_install,
AS_HELP_STRING([--enable-write_install],
[install user writable files]),
- WRITE_INSTALL=$enableval, WRITE_INSTALL=no)
+ WRITE_INSTALL=$enableval, WRITE_INSTALL="no")
################################################################################
dnl -- Enable fsadm
-AC_MSG_CHECKING(whether to install fsadm)
+AC_MSG_CHECKING([whether to install fsadm])
AC_ARG_ENABLE(fsadm, AS_HELP_STRING([--disable-fsadm], [disable fsadm]),
FSADM=$enableval)
-AC_MSG_RESULT($FSADM)
+AC_MSG_RESULT([$FSADM])
################################################################################
dnl -- Enable lvm_import_vdo
-AC_MSG_CHECKING(whether to install lvm_import_vdo)
+AC_MSG_CHECKING([whether to install lvm_import_vdo])
AC_ARG_ENABLE(lvmimportvdo, AS_HELP_STRING([--disable-lvmimportvdo], [disable lvm_import_vdo]),
LVMIMPORTVDO=$enableval)
-AC_MSG_RESULT($LVMIMPORTVDO)
+AC_MSG_RESULT([$LVMIMPORTVDO])
################################################################################
dnl -- Enable blkdeactivate
-AC_MSG_CHECKING(whether to install blkdeactivate)
+AC_MSG_CHECKING([whether to install blkdeactivate])
AC_ARG_ENABLE(blkdeactivate, AS_HELP_STRING([--disable-blkdeactivate], [disable blkdeactivate]),
BLKDEACTIVATE=$enableval)
-AC_MSG_RESULT($BLKDEACTIVATE)
+AC_MSG_RESULT([$BLKDEACTIVATE])
################################################################################
dnl -- enable dmeventd handling
-AC_MSG_CHECKING(whether to use dmeventd)
+AC_MSG_CHECKING([whether to use dmeventd])
AC_ARG_ENABLE(dmeventd, AS_HELP_STRING([--enable-dmeventd],
[enable the device-mapper event daemon]),
- BUILD_DMEVENTD=$enableval, BUILD_DMEVENTD=no)
-AC_MSG_RESULT($BUILD_DMEVENTD)
+ BUILD_DMEVENTD=$enableval, BUILD_DMEVENTD="no")
+AC_MSG_RESULT([$BUILD_DMEVENTD])
dnl -- dmeventd currently requires internal mirror support
AS_IF([test "$BUILD_DMEVENTD" = "yes"], [
@@ -1355,9 +1355,9 @@ dnl -- Check for dlopen
AC_CHECK_LIB(dl, dlopen,
[AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dynamic libraries are available.])
DL_LIBS="-ldl"
- HAVE_LIBDL=yes],
+ HAVE_LIBDL="yes"],
[DL_LIBS=
- HAVE_LIBDL=no ])
+ HAVE_LIBDL="no" ])
################################################################################
dnl -- Check for shared/static conflicts
@@ -1375,11 +1375,11 @@ AC_CHECK_LIB([pthread], [pthread_mutex_lock],
################################################################################
dnl -- Disable selinux
-AC_MSG_CHECKING(whether to enable selinux support)
+AC_MSG_CHECKING([whether to enable selinux support])
AC_ARG_ENABLE(selinux,
AS_HELP_STRING([--disable-selinux], [disable selinux support]),
SELINUX=$enableval)
-AC_MSG_RESULT($SELINUX)
+AC_MSG_RESULT([$SELINUX])
################################################################################
dnl -- Check for selinux
@@ -1410,22 +1410,22 @@ AC_CACHE_CHECK([for BLKZEROOUT in sys/ioctl.h.],
[#include <sys/ioctl.h>
#include <linux/fs.h>
int bar(void) { return ioctl(0, BLKZEROOUT, 0); }]
- )], [ac_cv_have_blkzeroout=yes], [ac_cv_have_blkzeroout=no])])
+ )], [ac_cv_have_blkzeroout="yes"], [ac_cv_have_blkzeroout="no"])])
AC_ARG_ENABLE(blkzeroout,
AS_HELP_STRING([--disable-blkzeroout],
[do not use BLKZEROOUT for device zeroing]),
- BLKZEROOUT=$enableval, BLKZEROOUT=yes)
+ BLKZEROOUT=$enableval, BLKZEROOUT="yes")
-AC_MSG_CHECKING(whether to use BLKZEROOUT for device zeroing)
+AC_MSG_CHECKING([whether to use BLKZEROOUT for device zeroing])
AS_IF([test "$BLKZEROOUT" = "yes"], [
AC_IF_YES(ac_cv_have_blkzeroout,
AC_DEFINE(HAVE_BLKZEROOUT, 1,
[Define if ioctl BLKZEROOUT can be used for device zeroing.]),
- BLKZEROOUT=no)
+ BLKZEROOUT="no")
])
-AC_MSG_RESULT($BLKZEROOUT)
+AC_MSG_RESULT([$BLKZEROOUT])
################################################################################
@@ -1519,11 +1519,11 @@ package as well (which may be called readline-devel or something similar).])
################################################################################
dnl -- Internationalisation stuff
-AC_MSG_CHECKING(whether to enable internationalisation)
+AC_MSG_CHECKING([whether to enable internationalisation])
AC_ARG_ENABLE(nls,
AS_HELP_STRING([--enable-nls], [enable Native Language Support]),
- INTL=$enableval, INTL=no)
-AC_MSG_RESULT($INTL)
+ INTL=$enableval, INTL="no")
+AC_MSG_RESULT([$INTL])
AS_IF([test "$INTL" = "yes"], [
# FIXME - Move this - can be device-mapper too
@@ -1610,14 +1610,14 @@ dnl -- Ensure additional headers required
AS_IF([test "$READLINE" = "yes"], [
AC_CHECK_HEADERS(readline/readline.h readline/history.h,,hard_bailout)
])
-AC_MSG_CHECKING(whether to enable readline)
-AC_MSG_RESULT($READLINE)
+AC_MSG_CHECKING([whether to enable readline])
+AC_MSG_RESULT([$READLINE])
AS_IF([test "$EDITLINE" = "yes"], [
AC_CHECK_HEADERS(editline/readline.h,,hard_bailout)
])
-AC_MSG_CHECKING(whether to enable editline)
-AC_MSG_RESULT($EDITLINE)
+AC_MSG_CHECKING([whether to enable editline])
+AC_MSG_RESULT([$EDITLINE])
AS_IF([test "$BUILD_CMIRRORD" = "yes"], [
AC_CHECK_FUNCS(atexit,,hard_bailout)
@@ -1718,28 +1718,28 @@ AC_DEFINE_UNQUOTED(DEFAULT_SYS_DIR, ["$DEFAULT_SYS_DIR"],
AC_ARG_WITH(default-profile-subdir,
AS_HELP_STRING([--with-default-profile-subdir=SUBDIR],
[default configuration profile subdir [profile]]),
- DEFAULT_PROFILE_SUBDIR=$withval, DEFAULT_PROFILE_SUBDIR=profile)
+ DEFAULT_PROFILE_SUBDIR=$withval, DEFAULT_PROFILE_SUBDIR="profile")
AC_DEFINE_UNQUOTED(DEFAULT_PROFILE_SUBDIR, ["$DEFAULT_PROFILE_SUBDIR"],
[Name of default configuration profile subdirectory.])
AC_ARG_WITH(default-archive-subdir,
AS_HELP_STRING([--with-default-archive-subdir=SUBDIR],
[default metadata archive subdir [archive]]),
- DEFAULT_ARCHIVE_SUBDIR=$withval, DEFAULT_ARCHIVE_SUBDIR=archive)
+ DEFAULT_ARCHIVE_SUBDIR=$withval, DEFAULT_ARCHIVE_SUBDIR="archive")
AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE_SUBDIR, ["$DEFAULT_ARCHIVE_SUBDIR"],
[Name of default metadata archive subdirectory.])
AC_ARG_WITH(default-backup-subdir,
AS_HELP_STRING([--with-default-backup-subdir=SUBDIR],
[default metadata backup subdir [backup]]),
- DEFAULT_BACKUP_SUBDIR=$withval, DEFAULT_BACKUP_SUBDIR=backup)
+ DEFAULT_BACKUP_SUBDIR=$withval, DEFAULT_BACKUP_SUBDIR="backup")
AC_DEFINE_UNQUOTED(DEFAULT_BACKUP_SUBDIR, ["$DEFAULT_BACKUP_SUBDIR"],
[Name of default metadata backup subdirectory.])
AC_ARG_WITH(default-cache-subdir,
AS_HELP_STRING([--with-default-cache-subdir=SUBDIR],
[default metadata cache subdir [cache]]),
- DEFAULT_CACHE_SUBDIR=$withval, DEFAULT_CACHE_SUBDIR=cache)
+ DEFAULT_CACHE_SUBDIR=$withval, DEFAULT_CACHE_SUBDIR="cache")
AC_DEFINE_UNQUOTED(DEFAULT_CACHE_SUBDIR, ["$DEFAULT_CACHE_SUBDIR"],
[Name of default metadata cache subdirectory.])
@@ -1752,39 +1752,39 @@ AC_ARG_WITH(default-locking-dir,
AS_HELP_STRING([--with-default-locking-dir=DIR],
[default locking directory [autodetect_lock_dir/lvm]]),
DEFAULT_LOCK_DIR=$withval,
- [AC_MSG_CHECKING(for default lock directory)
+ [AC_MSG_CHECKING([for default lock directory])
DEFAULT_LOCK_DIR="$DEFAULT_SYS_LOCK_DIR/lvm"
- AC_MSG_RESULT($DEFAULT_LOCK_DIR)])
+ AC_MSG_RESULT([$DEFAULT_LOCK_DIR])])
AC_DEFINE_UNQUOTED(DEFAULT_LOCK_DIR, ["$DEFAULT_LOCK_DIR"],
[Name of default locking directory.])
################################################################################
dnl -- which kernel interface to use (ioctl only)
-AC_MSG_CHECKING(for kernel interface choice)
+AC_MSG_CHECKING([for kernel interface choice])
AC_ARG_WITH(interface,
AS_HELP_STRING([--with-interface=IFACE],
[choose kernel interface (ioctl) [ioctl]]),
- interface=$withval, interface=ioctl)
-test "$interface" != ioctl && AC_MSG_ERROR([--with-interface=ioctl required. fs no longer supported.])
-AC_MSG_RESULT($interface)
+ interface=$withval, interface="ioctl")
+test "$interface" != "ioctl" && AC_MSG_ERROR([--with-interface=ioctl required. fs no longer supported.])
+AC_MSG_RESULT([$interface])
################################################################################
-read DM_LIB_VERSION < "$srcdir"/VERSION_DM 2>/dev/null || DM_LIB_VERSION=Unknown
+read DM_LIB_VERSION < "$srcdir"/VERSION_DM 2>/dev/null || DM_LIB_VERSION="Unknown"
AC_DEFINE_UNQUOTED(DM_LIB_VERSION, "$DM_LIB_VERSION", [Library version])
-DM_LIB_PATCHLEVEL=`cat "$srcdir"/VERSION_DM | $AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}'`
+DM_LIB_PATCHLEVEL=$(cat "$srcdir"/VERSION_DM | $AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2,$3}')
read VER < "$srcdir"/VERSION 2>/dev/null || VER=Unknown
LVM_VERSION=\"$VER\"
-LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.* (//;s/).*//'`\""
-VER=`echo "$VER" | $AWK '{print $1}'`
-LVM_RELEASE="\"`echo "$VER" | $AWK -F '-' '{print $2}'`\""
-VER=`echo "$VER" | $AWK -F '-' '{print $1}'`
-LVM_MAJOR=`echo "$VER" | $AWK -F '.' '{print $1}'`
-LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'`
-LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[[(.]]' '{print $3}'`
-LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
+LVM_RELEASE_DATE="\"$(echo $VER | $SED 's/.* (//;s/).*//')\""
+VER=$(echo "$VER" | $AWK '{print $1}')
+LVM_RELEASE="\"$(echo "$VER" | $AWK -F '-' '{print $2}')\""
+VER=$(echo "$VER" | $AWK -F '-' '{print $1}')
+LVM_MAJOR=$(echo "$VER" | $AWK -F '.' '{print $1}')
+LVM_MINOR=$(echo "$VER" | $AWK -F '.' '{print $2}')
+LVM_PATCHLEVEL=$(echo "$VER" | $AWK -F '[[(.]]' '{print $3}')
+LVM_LIBAPI=$(echo "$VER" | $AWK -F '[[()]]' '{print $2}')
AC_DEFINE_UNQUOTED(LVM_CONFIGURE_LINE, "$CONFIGURE_LINE", [configure command line used])
@@ -2041,5 +2041,5 @@ AS_IF([test -n "$VDO_CONFIGURE_WARN"],
AS_IF([test -n "$LVM_NEEDS_LIBAIO_WARN"],
[AC_MSG_WARN([Only libdm part can be build without libaio: make [[install_]]device-mapper])])
-AS_IF([test "$ODIRECT" != yes],
+AS_IF([test "$ODIRECT" != "yes"],
[AC_MSG_WARN([O_DIRECT disabled: low-memory pvmove may lock up])])
3 months, 4 weeks
main - configure.ac: remove some lvmetad leftovers
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=042fbd43d25f4cc69ce...
Commit: 042fbd43d25f4cc69ceec1aea4d0658bec54b6e3
Parent: 1fb5107eea2182415eef50ba7bec0fdf7600659c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Feb 8 16:30:40 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 17:50:27 2023 +0100
configure.ac: remove some lvmetad leftovers
Remove unused parts of configure and udev rules since lvmetad is gone.
---
configure.ac | 24 --------
udev/69-dm-lvm-metad.rules.in | 126 ------------------------------------------
udev/Makefile.in | 10 +---
3 files changed, 1 insertion(+), 159 deletions(-)
diff --git a/configure.ac b/configure.ac
index 95bc44b32..907391406 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1150,30 +1150,6 @@ AC_MSG_RESULT($BLKID_WIPING)
AC_DEFINE_UNQUOTED(DEFAULT_USE_BLKID_WIPING, [$DEFAULT_USE_BLKID_WIPING],
[Use blkid wiping by default.])
-################################################################################
-dnl -- Enable udev-systemd protocol to instantiate a service for background jobs
-dnl -- Requires systemd version 205 at least (including support for systemd-run)
-AC_ARG_ENABLE(udev-systemd-background-jobs,
- AS_HELP_STRING([--disable-udev-systemd-background-jobs],
- [disable udev-systemd protocol to instantiate a service for background job]),
- UDEV_SYSTEMD_BACKGROUND_JOBS=$enableval,
- UDEV_SYSTEMD_BACKGROUND_JOBS=maybe)
-
-AS_IF([test "$UDEV_SYSTEMD_BACKGROUND_JOBS" != "no"], [
- AS_IF([test "$SYSTEMD_MIN_VERSION" -ge 205], [
- UDEV_SYSTEMD_BACKGROUND_JOBS=yes
- ], [
- AS_IF([test "$UDEV_SYSTEMD_BACKGROUND_JOBS" = "maybe"], [
- UDEV_SYSTEMD_BACKGROUND_JOBS=no
- ], [
- AC_MSG_ERROR([bailing out... systemd >= 205 is required])
- ])
- ])
-])
-
-AC_MSG_CHECKING(whether to use udev-systemd protocol for jobs in background)
-AC_MSG_RESULT($UDEV_SYSTEMD_BACKGROUND_JOBS)
-
################################################################################
dnl -- Enable udev synchronisation
AC_MSG_CHECKING(whether to enable synchronisation with udev processing)
diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in
deleted file mode 100644
index aec13f039..000000000
--- a/udev/69-dm-lvm-metad.rules.in
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
-#
-# This file is part of LVM2.
-
-# Udev rules for LVM.
-#
-# This rule requires blkid to be called on block devices before so only devices
-# used as LVM PVs are processed (ID_FS_TYPE="LVM2_member" or "LVM1_member").
-
-SUBSYSTEM!="block", GOTO="lvm_end"
-(LVM_EXEC_RULE)
-
-ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="lvm_end"
-
-# Detect removed PV label by comparing previous ID_FS_TYPE value with current one.
-ENV{.ID_FS_TYPE_NEW}="$env{ID_FS_TYPE}"
-IMPORT{db}="ID_FS_TYPE"
-ENV{ID_FS_TYPE}=="LVM2_member|LVM1_member", ENV{.ID_FS_TYPE_NEW}!="LVM2_member|LVM1_member", ENV{LVM_PV_GONE}="1"
-ENV{ID_FS_TYPE}="$env{.ID_FS_TYPE_NEW}"
-ENV{LVM_PV_GONE}=="1", GOTO="lvm_scan"
-
-# Only process devices already marked as a PV - this requires blkid to be called before.
-ENV{ID_FS_TYPE}!="LVM2_member|LVM1_member", GOTO="lvm_end"
-ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"
-
-ACTION=="remove", GOTO="lvm_scan"
-
-# Create /dev/disk/by-id/lvm-pv-uuid-<PV_UUID> symlink for each PV
-ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-id/lvm-pv-uuid-$env{ID_FS_UUID_ENC}"
-
-# If the PV is a special device listed below, scan only if the device is
-# properly activated. These devices are not usable after an ADD event,
-# but they require an extra setup and they are ready after a CHANGE event.
-# Also support coldplugging with ADD event but only if the device is already
-# properly activated.
-# This logic should be eventually moved to rules where those particular
-# devices are processed primarily (MD and loop).
-
-# DM device:
-KERNEL!="dm-[0-9]*", GOTO="next"
-ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", ENV{DM_ACTIVATION}=="1", GOTO="lvm_scan"
-GOTO="lvm_end"
-
-# MD device:
-LABEL="next"
-KERNEL!="md[0-9]*", GOTO="next"
-IMPORT{db}="LVM_MD_PV_ACTIVATED"
-ACTION=="add", ENV{LVM_MD_PV_ACTIVATED}=="1", GOTO="lvm_scan"
-ACTION=="change", ENV{LVM_MD_PV_ACTIVATED}!="1", TEST=="md/array_state", ENV{LVM_MD_PV_ACTIVATED}="1", GOTO="lvm_scan"
-ACTION=="add", KERNEL=="md[0-9]*p[0-9]*", GOTO="lvm_scan"
-ENV{LVM_MD_PV_ACTIVATED}!="1", ENV{SYSTEMD_READY}="0"
-GOTO="lvm_end"
-
-# Loop device:
-LABEL="next"
-KERNEL!="loop[0-9]*", GOTO="next"
-ACTION=="add", ENV{LVM_LOOP_PV_ACTIVATED}=="1", GOTO="lvm_scan"
-ACTION=="change", ENV{LVM_LOOP_PV_ACTIVATED}!="1", TEST=="loop/backing_file", ENV{LVM_LOOP_PV_ACTIVATED}="1", GOTO="lvm_scan"
-ENV{LVM_LOOP_PV_ACTIVATED}!="1", ENV{SYSTEMD_READY}="0"
-GOTO="lvm_end"
-
-# If the PV is not a special device listed above, scan only if necessary.
-# For "systemd_background" mode, systemd takes care of this by activating
-# the lvm2-pvscan@.service only once.
-LABEL="next"
-ACTION!="(PVSCAN_ACTION)", GOTO="lvm_end"
-
-LABEL="lvm_scan"
-
-ENV{SYSTEMD_READY}="1"
-
-# The method for invoking pvscan is selected at build time with the option
-# --(enable|disable)-udev-systemd-background-jobs to "configure".
-# On modern distributions with recent systemd, it's "systemd_background";
-# on others, "direct_pvscan".
-GOTO="(PVSCAN_RULE)"
-
-LABEL="systemd_background"
-
-# The table below summarises the situations in which we reach the LABEL="lvm_scan"
-# in the "systemd_background" case.
-# Marked by X, X* means only if the special dev is properly set up.
-# The artificial ADD is supported for coldplugging. We avoid running the pvscan
-# on artificial CHANGE so there's no unexpected autoactivation when WATCH rule fires.
-# N.B. MD and loop never actually reaches lvm_scan on REMOVE as the PV label is gone
-# within a CHANGE event (these are caught by the "LVM_PV_GONE" rule at the beginning).
-#
-# In this case, we simply set up the dependency between the device and the pvscan
-# job using SYSTEMD_ALIAS (which sets up a simplified device identifier that
-# allows using "BindsTo" in the systemd unit file) and SYSTEMD_WANTS (which tells
-# systemd to start the pvscan job once the device is ready).
-# We need to set these variables for both "add" and "change" events, otherwise
-# systemd may loose information about the device/unit dependencies.
-#
-# | real ADD | real CHANGE | artificial ADD | artificial CHANGE | REMOVE
-# =============================================================================
-# DM | | X | X* | | X
-# MD | | X | X* | |
-# loop | | X | X* | |
-# other | X | X | X | | X
-ACTION!="remove", ENV{LVM_PV_GONE}=="1", RUN+="(BINDIR)/systemd-run (LVM_EXEC)/lvm pvscan --cache $major:$minor", GOTO="lvm_end"
-ENV{SYSTEMD_ALIAS}="/dev/block/$major:$minor"
-ENV{SYSTEMD_WANTS}+="lvm2-pvscan@$major:$minor.service"
-GOTO="lvm_end"
-
-# FIXME: this mode is not used and should be removed.
-LABEL="direct_pvscan"
-
-# The table below summarises the situations in which we reach the LABEL="lvm_scan"
-# for the "direct_pvscan" case.
-# Marked by X, X* means only if the special dev is properly set up.
-# The artificial ADD is supported for coldplugging. We avoid running the pvscan
-# on artificial CHANGE so there's no unexpected autoactivation when WATCH rule fires.
-#
-# In this case, we need to make sure that pvscan is not invoked spuriously, therefore
-# we invoke it only for "add" events for "other" devices.
-#
-# | real ADD | real CHANGE | artificial ADD | artificial CHANGE | REMOVE
-# =============================================================================
-# DM | | X | X* | | X
-# MD | | X | X* | |
-# loop | | X | X* | |
-# other | X | | X | | X
-RUN+="(LVM_EXEC)/lvm pvscan --cache --aay --autoactivation event --major $major --minor $minor", ENV{LVM_SCANNED}="1"
-
-LABEL="lvm_end"
diff --git a/udev/Makefile.in b/udev/Makefile.in
index e777dda16..106fca113 100644
--- a/udev/Makefile.in
+++ b/udev/Makefile.in
@@ -43,16 +43,8 @@ else
BLKID_RULE=IMPORT{program}=\"${SBIN}\/blkid -o udev -p \$$tempnode\"
endif
-ifeq ("@UDEV_SYSTEMD_BACKGROUND_JOBS@", "yes")
-PVSCAN_RULE=systemd_background
-PVSCAN_ACTION=add|change
-else
-PVSCAN_RULE=direct_pvscan
-PVSCAN_ACTION=add
-endif
-
%.rules: $(srcdir)/%.rules.in
- $(Q) $(SED) -e "s+(DM_DIR)+$(DM_DIR)+;s+(BINDIR)+$(BINDIR)+;s+(BLKID_RULE)+$(BLKID_RULE)+;s+(PVSCAN_RULE)+$(PVSCAN_RULE)+;s+(PVSCAN_ACTION)+$(PVSCAN_ACTION)+;s+(DM_EXEC_RULE)+$(DM_EXEC_RULE)+;s+(DM_EXEC)+$(DM_EXEC)+;s+(LVM_EXEC_RULE)+$(LVM_EXEC_RULE)+;s+(LVM_EXEC)+$(LVM_EXEC)+;" $< >$@
+ $(Q) $(SED) -e "s+(DM_DIR)+$(DM_DIR)+;s+(BINDIR)+$(BINDIR)+;s+(BLKID_RULE)+$(BLKID_RULE)+;s+(DM_EXEC_RULE)+$(DM_EXEC_RULE)+;s+(DM_EXEC)+$(DM_EXEC)+;s+(LVM_EXEC_RULE)+$(LVM_EXEC_RULE)+;s+(LVM_EXEC)+$(LVM_EXEC)+;" $< >$@
%_install: %.rules
@echo " [INSTALL] $<"
3 months, 4 weeks
main - lvresize: better detection of BLKID_SUBLKS_FSINFO
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1fb5107eea2182415ee...
Commit: 1fb5107eea2182415eef50ba7bec0fdf7600659c
Parent: cf204ce55ea892ffaa4ff63dac548145544679fb
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Feb 8 14:39:43 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 17:50:27 2023 +0100
lvresize: better detection of BLKID_SUBLKS_FSINFO
Use configure detection instead of trying to directly include
blkid.h inside lvresize.c - where we do not pass in BLKID_CFLAGS
and since we actually do not need to use blkid there, introeduce
test variable HAVE_BLKID_SUBLKS_FSINFO and avoid trying to
use blkid.h in this place - this also fixes builing problem for
systems without blkid.h.
---
configure.ac | 25 ++++++++++++++++++++++++-
include/configure.h.in | 3 +++
tools/lvresize.c | 4 +---
3 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4ddf0a430..95bc44b32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1109,9 +1109,30 @@ AC_ARG_ENABLE(blkid_wiping,
[disable libblkid detection of signatures when wiping and use native code instead]),
BLKID_WIPING=$enableval, BLKID_WIPING=maybe)
+# TODO: possibly detect right version of blkid with BLKID_SUBLKS_FSINFO support
+# so lvresize can check detected flag here
+#
DEFAULT_USE_BLKID_WIPING=0
+AS_IF([test "$BLKID_WIPING" != "no"], [blkdir_version=">= 2.24"], [blkid_version=""])
+
+PKG_CHECK_MODULES([BLKID], [blkid $blkid_version ], [
+ HAVE_BLKID=1
+
+ AC_CACHE_CHECK([for blkdid.h supports SUBLKS_FSINFO.],
+ [ac_cv_have_blkid_sublks_fsinfo],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <blkid/blkid.h>
+#ifndef BLKID_SUBLKS_FSINFO
+#error BLKID_SUBLKS_FSINFO is missing
+#endif])],
+ [ac_cv_have_blkid_sublks_fsinfo="yes"], [ac_cv_have_blkid_sublks_fsinfo="no"])])
+
+ AC_IF_YES(ac_cv_have_blkid_sublks_fsinfo,
+ AC_DEFINE(HAVE_BLKID_SUBLKS_FSINFO, 1,
+ [Define if blkid.h has BLKID_SUBLKS_FSINFO]))
+])
+
AS_IF([test "$BLKID_WIPING" != "no"], [
- PKG_CHECK_MODULES([BLKID], [blkid >= 2.24], [
+ AS_IF([test "$HAVE_BLKID" = 1], [
BLKID_WIPING=yes
BLKID_PC="blkid"
DEFAULT_USE_BLKID_WIPING=1
@@ -1858,6 +1879,8 @@ AC_SUBST(FSADM)
AC_SUBST(FSADM_PATH)
AC_SUBST(LVRESIZE_FS_HELPER_PATH)
AC_SUBST(BLKDEACTIVATE)
+AC_SUBST(HAVE_BLKID)
+AC_SUBST(HAVE_BLKID_SUBLKS_FSINFO)
AC_SUBST(HAVE_LIBDL)
AC_SUBST(HAVE_REALTIME)
AC_SUBST(HAVE_VALGRIND)
diff --git a/include/configure.h.in b/include/configure.h.in
index e7abca2f1..fb5625156 100644
--- a/include/configure.h.in
+++ b/include/configure.h.in
@@ -154,6 +154,9 @@
/* Define to 1 if you have the `atexit' function. */
#undef HAVE_ATEXIT
+/* Define if blkid.h has BLKID_SUBLKS_FSINFO */
+#undef HAVE_BLKID_SUBLKS_FSINFO
+
/* Define if ioctl BLKZEROOUT can be used for device zeroing. */
#undef HAVE_BLKZEROOUT
diff --git a/tools/lvresize.c b/tools/lvresize.c
index f3cee8322..fc66bf0b8 100644
--- a/tools/lvresize.c
+++ b/tools/lvresize.c
@@ -15,8 +15,6 @@
#include "tools.h"
-#include <blkid/blkid.h>
-
static int _lvresize_params(struct cmd_context *cmd, struct lvresize_params *lp)
{
const char *type_str = arg_str_value(cmd, type_ARG, NULL);
@@ -98,7 +96,7 @@ static int _lvresize_params(struct cmd_context *cmd, struct lvresize_params *lp)
return 0;
}
-#ifdef BLKID_SUBLKS_FSINFO
+#ifdef HAVE_BLKID_SUBLKS_FSINFO
/*
* When the libblkid fs info feature is available, use the
* the newer fs resizing capabability unless the older
3 months, 4 weeks
main - configure.ac: only use `AS_CASE` for conditional blocks
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cf204ce55ea892ffaa4...
Commit: cf204ce55ea892ffaa4ff63dac548145544679fb
Parent: 583cb699cfc76237c5daf1165f599af05c4295dd
Author: David Seifert <soap(a)gentoo.org>
AuthorDate: Sun Nov 27 15:35:07 2022 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 17:50:27 2023 +0100
configure.ac: only use `AS_CASE` for conditional blocks
Like `AS_IF([...])`, `AS_CASE` bubbles nested `AC_REQUIRE()` to the
top-level.
---
configure.ac | 213 +++++++++++++++++++++++++----------------------------------
1 file changed, 91 insertions(+), 122 deletions(-)
diff --git a/configure.ac b/configure.ac
index b29e676bb..4ddf0a430 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,8 +28,8 @@ dnl -- Get system type
AC_CANONICAL_TARGET([])
AS_IF([test -z "$CFLAGS"], [COPTIMISE_FLAG="-O2"])
-case "$host_os" in
- linux*)
+AS_CASE(["$host_os"],
+ [linux*], [
# equivalent to -rdynamic
ELDFLAGS="-Wl,--export-dynamic"
# FIXME Generate list and use --dynamic-list=.dlopen.sym
@@ -43,9 +43,8 @@ case "$host_os" in
SELINUX=yes
FSADM=yes
LVMIMPORTVDO=yes
- BLKDEACTIVATE=yes
- ;;
- darwin*)
+ BLKDEACTIVATE=yes],
+ [darwin*], [
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
ELDFLAGS=
CLDWHOLEARCHIVE="-all_load"
@@ -57,12 +56,8 @@ case "$host_os" in
SELINUX=no
FSADM=no
LVMIMPORTVDO=no
- BLKDEACTIVATE=no
- ;;
- *)
- CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"
- ;;
-esac
+ BLKDEACTIVATE=no],
+ [CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"])
################################################################################
dnl -- Checks for programs.
@@ -106,12 +101,9 @@ AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h \
AC_CHECK_HEADERS(termios.h sys/statvfs.h sys/timerfd.h sys/vfs.h linux/magic.h linux/fiemap.h)
AC_CHECK_HEADERS(libaio.h,LVM_NEEDS_LIBAIO_WARN=,LVM_NEEDS_LIBAIO_WARN=y)
-case "$host_os" in
- linux*)
- AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;;
- darwin*)
- AC_CHECK_HEADERS(machine/endian.h sys/disk.h,,AC_MSG_ERROR(bailing out)) ;;
-esac
+AS_CASE(["$host_os"],
+ [linux*], [AC_CHECK_HEADERS([asm/byteorder.h linux/fs.h malloc.h], [], [AC_MSG_ERROR(bailing out)])],
+ [darwin*], [AC_CHECK_HEADERS([machine/endian.h sys/disk.h], [], [AC_MSG_ERROR(bailing out)])])
################################################################################
dnl -- Check for typedefs, structures, and compiler characteristics.
@@ -270,11 +262,10 @@ AC_ARG_WITH(device-nodes-on,
AS_HELP_STRING([--with-device-nodes-on=ON],
[create nodes on resume or create [ON=resume]]),
ADD_NODE=$withval, ADD_NODE=resume)
-case "$ADD_NODE" in
- resume) add_on=DM_ADD_NODE_ON_RESUME;;
- create) add_on=DM_ADD_NODE_ON_CREATE;;
- *) AC_MSG_ERROR([--with-device-nodes-on parameter invalid]);;
-esac
+AS_CASE(["$ADD_NODE"],
+ [resume], [add_on=DM_ADD_NODE_ON_RESUME],
+ [create], [add_on=DM_ADD_NODE_ON_CREATE],
+ [AC_MSG_ERROR([--with-device-nodes-on parameter invalid])])
AC_MSG_RESULT(on $ADD_NODE)
AC_DEFINE_UNQUOTED([DEFAULT_DM_ADD_NODE], $add_on, [Define default node creation behavior with dmsetup create])
@@ -284,10 +275,9 @@ AC_MSG_CHECKING(default for use_devicesfile)
AC_ARG_WITH(default-use-devices-file,
AS_HELP_STRING([--with-default-use-devices-file], [default for lvm.conf devices/use_devicesfile = [0]]),
DEFAULT_USE_DEVICES_FILE=$withval, DEFAULT_USE_DEVICES_FILE=0)
-case "$DEFAULT_USE_DEVICES_FILE" in
- 0|1);;
- *) AC_MSG_ERROR([--with-default-use-devices-file parameter invalid]);;
-esac
+AS_CASE(["$DEFAULT_USE_DEVICES_FILE"],
+ [0|1], [],
+ [AC_MSG_ERROR([--with-default-use-devices-file parameter invalid])])
AC_MSG_RESULT($DEFAULT_USE_DEVICES_FILE)
AC_DEFINE_UNQUOTED(DEFAULT_USE_DEVICES_FILE, [$DEFAULT_USE_DEVICES_FILE],
[Default for lvm.conf use_devicesfile.])
@@ -297,12 +287,11 @@ AC_ARG_WITH(default-name-mangling,
AS_HELP_STRING([--with-default-name-mangling=MANGLING],
[default name mangling: auto/none/hex [auto]]),
MANGLING=$withval, MANGLING=auto)
-case "$MANGLING" in
- auto) mangling=DM_STRING_MANGLING_AUTO;;
- no|none|disabled) mangling=DM_STRING_MANGLING_NONE;;
- hex) mangling=DM_STRING_MANGLING_HEX;;
- *) AC_MSG_ERROR([--with-default-name-mangling parameter invalid]);;
-esac
+AS_CASE(["$MANGLING"],
+ [auto], [mangling=DM_STRING_MANGLING_AUTO],
+ [no|none|disabled], [mangling=DM_STRING_MANGLING_NONE],
+ [hex], [mangling=DM_STRING_MANGLING_HEX],
+ [AC_MSG_ERROR([--with-default-name-mangling parameter invalid])])
AC_MSG_RESULT($MANGLING)
AC_DEFINE_UNQUOTED([DEFAULT_DM_NAME_MANGLING], $mangling, [Define default name mangling behaviour])
@@ -315,12 +304,11 @@ AC_ARG_WITH(snapshots,
SNAPSHOTS=$withval, SNAPSHOTS=internal)
AC_MSG_RESULT($SNAPSHOTS)
-case "$SNAPSHOTS" in
- no|none|shared) ;;
- internal) AC_DEFINE([SNAPSHOT_INTERNAL], 1,
- [Define to 1 to include built-in support for snapshots.]) ;;
- *) AC_MSG_ERROR([--with-snapshots parameter invalid]) ;;
-esac
+AS_CASE(["$SNAPSHOTS"],
+ [no|none|shared], [],
+ [internal], [
+ AC_DEFINE([SNAPSHOT_INTERNAL], 1, [Define to 1 to include built-in support for snapshots.])],
+ [AC_MSG_ERROR([--with-snapshots parameter invalid])])
################################################################################
dnl -- mirrors inclusion type
@@ -331,12 +319,11 @@ AC_ARG_WITH(mirrors,
MIRRORS=$withval, MIRRORS=internal)
AC_MSG_RESULT($MIRRORS)
-case "$MIRRORS" in
- no|none|shared) ;;
- internal) AC_DEFINE([MIRRORED_INTERNAL], 1,
- [Define to 1 to include built-in support for mirrors.]) ;;
- *) AC_MSG_ERROR([--with-mirrors parameter invalid]) ;;
-esac
+AS_CASE(["$MIRRORS"],
+ [no|none|shared], [],
+ [internal], [
+ AC_DEFINE([MIRRORED_INTERNAL], 1, [Define to 1 to include built-in support for mirrors.])],
+ [AC_MSG_ERROR([--with-mirrors parameter invalid])])
################################################################################
dnl -- raid inclusion type
@@ -360,12 +347,11 @@ AC_DEFINE_UNQUOTED([DEFAULT_RAID10_SEGTYPE], ["$DEFAULT_RAID10_SEGTYPE"],
################################################################################
AC_ARG_WITH(default-sparse-segtype,
- AS_HELP_STRING([--with-default-sparse-segtype=TYPE],
- [default sparse segtype: thin/snapshot [thin]]),
- [ case "$withval" in
- thin|snapshot) DEFAULT_SPARSE_SEGTYPE=$withval ;;
- *) AC_MSG_ERROR(--with-default-sparse-segtype parameter invalid) ;;
- esac], DEFAULT_SPARSE_SEGTYPE="thin")
+ AS_HELP_STRING([--with-default-sparse-segtype=TYPE], [default sparse segtype: thin/snapshot [thin]]), [
+ AS_CASE(["$withval"],
+ [thin|snapshot], [DEFAULT_SPARSE_SEGTYPE=$withval],
+ [AC_MSG_ERROR([--with-default-sparse-segtype parameter invalid])])
+ ], [DEFAULT_SPARSE_SEGTYPE="thin"])
################################################################################
dnl -- thin provisioning
@@ -393,13 +379,12 @@ AC_ARG_WITH(thin-restore,
AC_MSG_RESULT($THIN)
-case "$THIN" in
- no|none) test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;;
- shared) ;;
- internal) AC_DEFINE([THIN_INTERNAL], 1,
- [Define to 1 to include built-in support for thin provisioning.]) ;;
- *) AC_MSG_ERROR([--with-thin parameter invalid ($THIN)]) ;;
-esac
+AS_CASE(["$THIN"],
+ [no|none], [test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot"],
+ [shared], [],
+ [internal], [
+ AC_DEFINE([THIN_INTERNAL], 1, [Define to 1 to include built-in support for thin provisioning.])],
+ [AC_MSG_ERROR([--with-thin parameter invalid ($THIN)])])
AC_DEFINE_UNQUOTED([DEFAULT_SPARSE_SEGTYPE], ["$DEFAULT_SPARSE_SEGTYPE"],
[Default segtype used for sparse volumes.])
@@ -412,8 +397,8 @@ AC_ARG_ENABLE(thin_check_needs_check,
# Test if necessary thin tools are available
# if not - use plain defaults and warn user
-case "$THIN" in
- internal|shared)
+AS_CASE(["$THIN"],
+ [internal|shared], [
# Empty means a config way to ignore thin checking
AS_IF([test "$THIN_CHECK_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_CHECK_CMD, thin_check, [], [$PATH_SBIN])
@@ -471,8 +456,7 @@ case "$THIN" in
AS_IF([test "$THIN_CHECK_NEEDS_CHECK" = "yes"], [
AC_DEFINE([THIN_CHECK_NEEDS_CHECK], 1, [Define to 1 if the external 'thin_check' tool requires the --clear-needs-check-flag option])
])
- ;;
-esac
+])
AC_DEFINE_UNQUOTED([THIN_CHECK_CMD], ["$THIN_CHECK_CMD"],
[The path to 'thin_check', if available.])
@@ -511,11 +495,11 @@ AC_ARG_WITH(cache-restore,
CACHE_RESTORE_CMD=$withval, CACHE_RESTORE_CMD="autodetect")
AC_MSG_RESULT($CACHE)
-case "$CACHE" in
- no|none|shared) ;;
- internal) AC_DEFINE([CACHE_INTERNAL], 1, [Define to 1 to include built-in support for cache.]) ;;
- *) AC_MSG_ERROR([--with-cache parameter invalid]) ;;
-esac
+AS_CASE(["$CACHE"],
+ [no|none|shared], [],
+ [internal], [
+ AC_DEFINE([CACHE_INTERNAL], 1, [Define to 1 to include built-in support for cache.])],
+ [AC_MSG_ERROR([--with-cache parameter invalid])])
dnl -- cache_check needs-check flag
AC_ARG_ENABLE(cache_check_needs_check,
@@ -525,8 +509,8 @@ AC_ARG_ENABLE(cache_check_needs_check,
# Test if necessary cache tools are available
# if not - use plain defaults and warn user
-case "$CACHE" in
- internal|shared)
+AS_CASE(["$CACHE"],
+ [internal|shared], [
# Empty means a config way to ignore cache checking
AS_IF([test "$CACHE_CHECK_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_CHECK_CMD, cache_check, [], [$PATH_SBIN])
@@ -595,8 +579,7 @@ case "$CACHE" in
AS_IF([test "$CACHE_CHECK_NEEDS_CHECK" = "yes"], [
AC_DEFINE([CACHE_CHECK_NEEDS_CHECK], 1, [Define to 1 if the external 'cache_check' tool requires the --clear-needs-check-flag option])
])
- ;;
-esac
+])
AC_DEFINE_UNQUOTED([CACHE_CHECK_CMD], ["$CACHE_CHECK_CMD"],
[The path to 'cache_check', if available.])
@@ -624,21 +607,19 @@ AC_ARG_WITH(vdo-format,
AS_HELP_STRING([--with-vdo-format=PATH],
[vdoformat tool: [autodetect]]),
VDO_FORMAT_CMD=$withval, VDO_FORMAT_CMD="autodetect")
-case "$VDO" in
- no|none) ;;
- internal)
- AC_DEFINE([VDO_INTERNAL], 1, [Define to 1 to include built-in support for vdo.])
- AS_IF([test "$VDO_FORMAT_CMD" = "autodetect"], [
- AC_PATH_TOOL(VDO_FORMAT_CMD, vdoformat, [], [$PATH])
- AS_IF([test -z "$VDO_FORMAT_CMD"], [
- AC_MSG_WARN([vdoformat not found in path $PATH])
- VDO_FORMAT_CMD=/usr/bin/vdoformat
- VDO_CONFIGURE_WARN=y
- ])
- ])
- ;;
- *) AC_MSG_ERROR([--with-vdo parameter invalid]) ;;
-esac
+AS_CASE(["$VDO"],
+ [no|none], [],
+ [internal], [
+ AC_DEFINE([VDO_INTERNAL], 1, [Define to 1 to include built-in support for vdo.])
+ AS_IF([test "$VDO_FORMAT_CMD" = "autodetect"], [
+ AC_PATH_TOOL(VDO_FORMAT_CMD, vdoformat, [], [$PATH])
+ AS_IF([test -z "$VDO_FORMAT_CMD"], [
+ AC_MSG_WARN([vdoformat not found in path $PATH])
+ VDO_FORMAT_CMD=/usr/bin/vdoformat
+ VDO_CONFIGURE_WARN=y
+ ])
+ ])],
+ [AC_MSG_ERROR([--with-vdo parameter invalid])])
AC_DEFINE_UNQUOTED([VDO_FORMAT_CMD], ["$VDO_FORMAT_CMD"],
[The path to 'vdoformat', if available.])
@@ -668,13 +649,11 @@ AC_ARG_WITH(writecache,
AC_MSG_RESULT($WRITECACHE)
-case "$WRITECACHE" in
- no|none) ;;
- internal)
- AC_DEFINE([WRITECACHE_INTERNAL], 1, [Define to 1 to include built-in support for writecache.])
- ;;
- *) AC_MSG_ERROR([--with-writecache parameter invalid]) ;;
-esac
+AS_CASE(["$WRITECACHE"],
+ [no|none], [],
+ [internal], [
+ AC_DEFINE([WRITECACHE_INTERNAL], 1, [Define to 1 to include built-in support for writecache.])],
+ [AC_MSG_ERROR([--with-writecache parameter invalid])])
################################################################################
dnl -- integrity inclusion type
@@ -686,13 +665,11 @@ AC_ARG_WITH(integrity,
AC_MSG_RESULT($INTEGRITY)
-case "$INTEGRITY" in
- no|none) ;;
- internal)
- AC_DEFINE([INTEGRITY_INTERNAL], 1, [Define to 1 to include built-in support for integrity.])
- ;;
- *) AC_MSG_ERROR([--with-integrity parameter invalid]) ;;
-esac
+AS_CASE(["$INTEGRITY"],
+ [no|none], [],
+ [internal], [
+ AC_DEFINE([INTEGRITY_INTERNAL], 1, [Define to 1 to include built-in support for integrity.])],
+ [AC_MSG_ERROR([--with-integrity parameter invalid])])
################################################################################
# Allow users to override default location for libaio
@@ -825,23 +802,21 @@ AC_MSG_RESULT($COPTIMISE_FLAG)
dnl -- Symbol versioning
AC_MSG_CHECKING(whether to use symbol versioning)
AC_ARG_WITH(symvers,
- AS_HELP_STRING([--with-symvers=STYLE],
- [use symbol versioning of the shared library [default=gnu]]),
- [ case "$withval" in
- gnu|no) symvers=$withval ;;
- *) AC_MSG_ERROR(--with-symvers parameter invalid) ;;
- esac], symvers=gnu)
+ AS_HELP_STRING([--with-symvers=STYLE],
+ [use symbol versioning of the shared library [default=gnu]]), [
+ AS_CASE(["$withval"],
+ [gnu|no], [symvers=$withval],
+ [AC_MSG_ERROR(--with-symvers parameter invalid)])],
+ [symvers=gnu])
AC_MSG_RESULT($symvers)
AS_IF([test "$GCC" = "yes" && test "$symvers" = "gnu"], [
AC_DEFINE(GNU_SYMVER, 1,
[Define to use GNU versioning in the shared library.])
- case "$host_os" in
- linux*)
+ AS_CASE(["$host_os"],
+ [linux*], [
CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym"
- LDDEPS="$LDDEPS .export.sym"
- ;;
- esac
+ LDDEPS="$LDDEPS .export.sym"])
])
################################################################################
@@ -1010,12 +985,9 @@ AS_IF([test "$BUILD_LVMLOCKD" = "yes"], [
AS_IF([test "$BUILD_LVMPOLLD" = "no"], [BUILD_LVMPOLLD=yes; AC_MSG_WARN([Enabling lvmpolld - required by lvmlockd.])])
AC_MSG_CHECKING([defaults for use_lvmlockd])
AC_ARG_ENABLE(use_lvmlockd,
- AS_HELP_STRING([--disable-use-lvmlockd],
- [disable usage of LVM lock daemon]),
- [case ${enableval} in
- yes) DEFAULT_USE_LVMLOCKD=1 ;;
- *) DEFAULT_USE_LVMLOCKD=0 ;;
- esac], DEFAULT_USE_LVMLOCKD=1)
+ [AS_HELP_STRING([--disable-use-lvmlockd], [disable usage of LVM lock daemon])],
+ [AS_IF([test "$enableval" = "yes"], [DEFAULT_USE_LVMLOCKD=1], [DEFAULT_USE_LVMLOCKD=0])],
+ [DEFAULT_USE_LVMLOCKD=1])
AC_MSG_RESULT($DEFAULT_USE_LVMLOCKD)
AC_DEFINE([LVMLOCKD_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd.])
@@ -1037,12 +1009,9 @@ dnl -- Check lvmpolld
AS_IF([test "$BUILD_LVMPOLLD" = "yes"], [
AC_MSG_CHECKING([defaults for use_lvmpolld])
AC_ARG_ENABLE(use_lvmpolld,
- AS_HELP_STRING([--disable-use-lvmpolld],
- [disable usage of LVM Poll Daemon]),
- [case ${enableval} in
- yes) DEFAULT_USE_LVMPOLLD=1 ;;
- *) DEFAULT_USE_LVMPOLLD=0 ;;
- esac], DEFAULT_USE_LVMPOLLD=1)
+ [AS_HELP_STRING([--disable-use-lvmpolld], [disable usage of LVM Poll Daemon])],
+ [AS_IF([test "$enableval" = "yes"], [DEFAULT_USE_LVMPOLLD=1], [DEFAULT_USE_LVMPOLLD=0])],
+ [DEFAULT_USE_LVMPOLLD=1])
AC_MSG_RESULT($DEFAULT_USE_LVMPOLLD)
AC_DEFINE([LVMPOLLD_SUPPORT], 1, [Define to 1 to include code that uses lvmpolld.])
3 months, 4 weeks
main - configure.ac: only use `AS_IF` for conditional blocks
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=583cb699cfc76237c5d...
Commit: 583cb699cfc76237c5daf1165f599af05c4295dd
Parent: d456c1f3c509f8a033f3ec5830caaf44e830b644
Author: David Seifert <soap(a)gentoo.org>
AuthorDate: Sun Nov 27 15:35:06 2022 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 17:50:27 2023 +0100
configure.ac: only use `AS_IF` for conditional blocks
`AS_IF([...])` is more portable, as it respects macro expansions of
`AC_REQUIRE()`.
This is recommended Autoconf best practice, since in nested
conditionals, it is generally unknowable whether some macro invokes
`AC_REQUIRE()` deep down:
https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Comm...
As a result, the hacky `pkg_config_init` function is not needed
anymore, since any `PKG_*` invocation will ensure that
`PKG_PROG_PKG_CONFIG` will have been called, due to the fact that
`AC_REQUIRE()` will trickle up.
---
configure.ac | 476 +++++++++++++++++++++++++++++------------------------------
1 file changed, 237 insertions(+), 239 deletions(-)
diff --git a/configure.ac b/configure.ac
index f2cf48d8e..b29e676bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -415,62 +415,62 @@ AC_ARG_ENABLE(thin_check_needs_check,
case "$THIN" in
internal|shared)
# Empty means a config way to ignore thin checking
- if test "$THIN_CHECK_CMD" = "autodetect"; then
+ AS_IF([test "$THIN_CHECK_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_CHECK_CMD, thin_check, [], [$PATH_SBIN])
- if test -z "$THIN_CHECK_CMD"; then
+ AS_IF([test -z "$THIN_CHECK_CMD"], [
AC_MSG_WARN([thin_check not found in path $PATH])
THIN_CHECK_CMD=/usr/sbin/thin_check
THIN_CONFIGURE_WARN=y
- fi
- fi
- if test "$THIN_CHECK_NEEDS_CHECK" = yes && test "$THIN_CONFIGURE_WARN" != y ; then
+ ])
+ ])
+ AS_IF([test "$THIN_CHECK_NEEDS_CHECK" = "yes" && test "$THIN_CONFIGURE_WARN" != "y"], [
THIN_CHECK_VSN=`"$THIN_CHECK_CMD" -V 2>/dev/null`
THIN_CHECK_VSN_MAJOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}'`
THIN_CHECK_VSN_MINOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}'`
- if test -z "$THIN_CHECK_VSN_MAJOR" || test -z "$THIN_CHECK_VSN_MINOR"; then
+ AS_IF([test -z "$THIN_CHECK_VSN_MAJOR" || test -z "$THIN_CHECK_VSN_MINOR"], [
AC_MSG_WARN([$THIN_CHECK_CMD: Bad version "$THIN_CHECK_VSN" found])
THIN_CHECK_VERSION_WARN=y
THIN_CHECK_NEEDS_CHECK=no
- elif test "$THIN_CHECK_VSN_MAJOR" -eq 0 && test "$THIN_CHECK_VSN_MINOR" -lt 3; then
+ ], [test "$THIN_CHECK_VSN_MAJOR" -eq 0 && test "$THIN_CHECK_VSN_MINOR" -lt 3], [
AC_MSG_WARN([$THIN_CHECK_CMD: Old version "$THIN_CHECK_VSN" found])
THIN_CHECK_VERSION_WARN=y
THIN_CHECK_NEEDS_CHECK=no
- fi
- fi
+ ])
+ ])
# Empty means a config way to ignore thin dumping
- if test "$THIN_DUMP_CMD" = "autodetect"; then
+ AS_IF([test "$THIN_DUMP_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_DUMP_CMD, thin_dump, [], [$PATH_SBIN])
- test -z "$THIN_DUMP_CMD" && {
+ AS_IF([test -z "$THIN_DUMP_CMD"], [
AC_MSG_WARN(thin_dump not found in path $PATH)
THIN_DUMP_CMD=/usr/sbin/thin_dump
THIN_CONFIGURE_WARN=y
- }
- fi
+ ])
+ ])
# Empty means a config way to ignore thin repairing
- if test "$THIN_REPAIR_CMD" = "autodetect"; then
+ AS_IF([test "$THIN_REPAIR_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_REPAIR_CMD, thin_repair, [], [$PATH_SBIN])
- test -z "$THIN_REPAIR_CMD" && {
+ AS_IF([test -z "$THIN_REPAIR_CMD"], [
AC_MSG_WARN(thin_repair not found in path $PATH)
THIN_REPAIR_CMD=/usr/sbin/thin_repair
THIN_CONFIGURE_WARN=y
- }
- fi
+ ])
+ ])
# Empty means a config way to ignore thin restoring
- if test "$THIN_RESTORE_CMD" = "autodetect"; then
+ AS_IF([test "$THIN_RESTORE_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_RESTORE_CMD, thin_restore, [], [$PATH_SBIN])
- test -z "$THIN_RESTORE_CMD" && {
+ AS_IF([test -z "$THIN_RESTORE_CMD"], [
AC_MSG_WARN(thin_restore not found in path $PATH)
THIN_RESTORE_CMD=/usr/sbin/thin_restore
THIN_CONFIGURE_WARN=y
- }
- fi
+ ])
+ ])
AC_MSG_CHECKING([whether thin_check supports the needs-check flag])
AC_MSG_RESULT([$THIN_CHECK_NEEDS_CHECK])
- if test "$THIN_CHECK_NEEDS_CHECK" = yes; then
+ AS_IF([test "$THIN_CHECK_NEEDS_CHECK" = "yes"], [
AC_DEFINE([THIN_CHECK_NEEDS_CHECK], 1, [Define to 1 if the external 'thin_check' tool requires the --clear-needs-check-flag option])
- fi
+ ])
;;
esac
@@ -528,73 +528,73 @@ AC_ARG_ENABLE(cache_check_needs_check,
case "$CACHE" in
internal|shared)
# Empty means a config way to ignore cache checking
- if test "$CACHE_CHECK_CMD" = "autodetect"; then
+ AS_IF([test "$CACHE_CHECK_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_CHECK_CMD, cache_check, [], [$PATH_SBIN])
- if test -z "$CACHE_CHECK_CMD"; then
+ AS_IF([test -z "$CACHE_CHECK_CMD"], [
AC_MSG_WARN([cache_check not found in path $PATH])
CACHE_CHECK_CMD=/usr/sbin/cache_check
CACHE_CONFIGURE_WARN=y
- fi
- fi
- if test "$CACHE_CHECK_NEEDS_CHECK" = yes && test "$CACHE_CONFIGURE_WARN" != y ; then
+ ])
+ ])
+ AS_IF([test "$CACHE_CHECK_NEEDS_CHECK" = "yes" && test "$CACHE_CONFIGURE_WARN" != "y"], [
$CACHE_CHECK_CMD -V 2>/dev/null >conftest.tmp
read -r CACHE_CHECK_VSN < conftest.tmp
IFS=.- read -r CACHE_CHECK_VSN_MAJOR CACHE_CHECK_VSN_MINOR CACHE_CHECK_VSN_PATCH LEFTOVER < conftest.tmp
rm -f conftest.tmp
# Require version >= 0.5.4 for --clear-needs-check-flag
- if test -z "$CACHE_CHECK_VSN_MAJOR" \
+ AS_IF([test -z "$CACHE_CHECK_VSN_MAJOR" \
|| test -z "$CACHE_CHECK_VSN_MINOR" \
- || test -z "$CACHE_CHECK_VSN_PATCH"; then
+ || test -z "$CACHE_CHECK_VSN_PATCH"], [
AC_MSG_WARN([$CACHE_CHECK_CMD: Bad version "$CACHE_CHECK_VSN" found])
CACHE_CHECK_VERSION_WARN=y
CACHE_CHECK_NEEDS_CHECK=no
- elif test "$CACHE_CHECK_VSN_MAJOR" -eq 0 ; then
- if test "$CACHE_CHECK_VSN_MINOR" -lt 5 \
- || ( test "$CACHE_CHECK_VSN_MINOR" -eq 5 && test "$CACHE_CHECK_VSN_PATCH" -lt 4 ); then
+ ], [test "$CACHE_CHECK_VSN_MAJOR" -eq 0], [
+ AS_IF([test "$CACHE_CHECK_VSN_MINOR" -lt 5 \
+ || ( test "$CACHE_CHECK_VSN_MINOR" -eq 5 && test "$CACHE_CHECK_VSN_PATCH" -lt 4 )], [
AC_MSG_WARN([$CACHE_CHECK_CMD: Old version "$CACHE_CHECK_VSN" found])
CACHE_CHECK_VERSION_WARN=y
CACHE_CHECK_NEEDS_CHECK=no
- fi
- if test "$CACHE_CHECK_VSN_MINOR" -lt 7 ; then
+ ])
+ AS_IF([test "$CACHE_CHECK_VSN_MINOR" -lt 7], [
AC_MSG_WARN([$CACHE_CHECK_CMD: Old version "$CACHE_CHECK_VSN" does not support new cache format V2])
CACHE_CHECK_VERSION_WARN=y
- fi
- fi
- fi
+ ])
+ ])
+ ])
# Empty means a config way to ignore cache dumping
- if test "$CACHE_DUMP_CMD" = "autodetect"; then
+ AS_IF([test "$CACHE_DUMP_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_DUMP_CMD, cache_dump, [], [$PATH_SBIN])
- test -z "$CACHE_DUMP_CMD" && {
+ AS_IF([test -z "$CACHE_DUMP_CMD"], [
AC_MSG_WARN(cache_dump not found in path $PATH)
CACHE_DUMP_CMD=/usr/sbin/cache_dump
CACHE_CONFIGURE_WARN=y
- }
- fi
+ ])
+ ])
# Empty means a config way to ignore cache repairing
- if test "$CACHE_REPAIR_CMD" = "autodetect"; then
+ AS_IF([test "$CACHE_REPAIR_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_REPAIR_CMD, cache_repair, [], [$PATH_SBIN])
- test -z "$CACHE_REPAIR_CMD" && {
+ AS_IF([test -z "$CACHE_REPAIR_CMD"], [
AC_MSG_WARN(cache_repair not found in path $PATH)
CACHE_REPAIR_CMD=/usr/sbin/cache_repair
CACHE_CONFIGURE_WARN=y
- }
- fi
+ ])
+ ])
# Empty means a config way to ignore cache restoring
- if test "$CACHE_RESTORE_CMD" = "autodetect"; then
+ AS_IF([test "$CACHE_RESTORE_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_RESTORE_CMD, cache_restore, [], [$PATH_SBIN])
- test -z "$CACHE_RESTORE_CMD" && {
+ AS_IF([test -z "$CACHE_RESTORE_CMD"], [
AC_MSG_WARN(cache_restore not found in path $PATH)
CACHE_RESTORE_CMD=/usr/sbin/cache_restore
CACHE_CONFIGURE_WARN=y
- }
- fi
+ ])
+ ])
AC_MSG_CHECKING([whether cache_check supports the needs-check flag])
AC_MSG_RESULT([$CACHE_CHECK_NEEDS_CHECK])
- if test "$CACHE_CHECK_NEEDS_CHECK" = yes; then
+ AS_IF([test "$CACHE_CHECK_NEEDS_CHECK" = "yes"], [
AC_DEFINE([CACHE_CHECK_NEEDS_CHECK], 1, [Define to 1 if the external 'cache_check' tool requires the --clear-needs-check-flag option])
- fi
+ ])
;;
esac
@@ -628,14 +628,14 @@ case "$VDO" in
no|none) ;;
internal)
AC_DEFINE([VDO_INTERNAL], 1, [Define to 1 to include built-in support for vdo.])
- if test "$VDO_FORMAT_CMD" = "autodetect"; then
+ AS_IF([test "$VDO_FORMAT_CMD" = "autodetect"], [
AC_PATH_TOOL(VDO_FORMAT_CMD, vdoformat, [], [$PATH])
- if test -z "$VDO_FORMAT_CMD"; then
+ AS_IF([test -z "$VDO_FORMAT_CMD"], [
AC_MSG_WARN([vdoformat not found in path $PATH])
VDO_FORMAT_CMD=/usr/bin/vdoformat
VDO_CONFIGURE_WARN=y
- fi
- fi
+ ])
+ ])
;;
*) AC_MSG_ERROR([--with-vdo parameter invalid]) ;;
esac
@@ -735,19 +735,6 @@ AC_ARG_WITH(ocfdir,
[install OCF files in [PREFIX/lib/ocf/resource.d/lvm2]]),
OCFDIR=$withval, OCFDIR='${prefix}/lib/ocf/resource.d/lvm2')
-################################################################################
-dnl -- Init pkg-config with dummy invokation:
-dnl -- this is required because PKG_CHECK_MODULES macro is expanded
-dnl -- to initialize the pkg-config environment only at the first invokation,
-dnl -- that would be conditional in this configure.in.
-pkg_config_init() {
- if test "$PKGCONFIG_INIT" != 1; then
- PKG_CHECK_MODULES(PKGCONFIGINIT, pkgconfiginit, [],
- [AC_MSG_RESULT([pkg-config initialized])])
- PKGCONFIG_INIT=1
- fi
-}
-
################################################################################
AC_MSG_CHECKING(for default run directory)
RUN_DIR="/run"
@@ -791,7 +778,7 @@ BUILD_CMIRRORD=$CMIRRORD
################################################################################
dnl -- cmirrord pidfile
-if test "$BUILD_CMIRRORD" = yes; then
+AS_IF([test "$BUILD_CMIRRORD" = "yes"], [
AC_ARG_WITH(cmirrord-pidfile,
AS_HELP_STRING([--with-cmirrord-pidfile=PATH],
[cmirrord pidfile [PID_DIR/cmirrord.pid]]),
@@ -799,17 +786,13 @@ if test "$BUILD_CMIRRORD" = yes; then
CMIRRORD_PIDFILE="$DEFAULT_PID_DIR/cmirrord.pid")
AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE, ["$CMIRRORD_PIDFILE"],
[Path to cmirrord pidfile.])
-fi
+])
################################################################################
dnl -- Look for corosync libraries if required.
-if test "$BUILD_CMIRRORD" = yes; then
- pkg_config_init
-
- if test "$HAVE_CPG" != yes; then
- PKG_CHECK_MODULES(CPG, libcpg)
- fi
-fi
+AS_IF([test "$BUILD_CMIRRORD" = "yes" && test "$HAVE_CPG" != "yes"], [
+ PKG_CHECK_MODULES([CPG], [libcpg])
+])
################################################################################
dnl -- Enable debugging
@@ -819,11 +802,7 @@ AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [enable debugging]),
AC_MSG_RESULT($DEBUG)
dnl -- Normally turn off optimisation for debug builds
-if test "$DEBUG" = yes; then
- COPTIMISE_FLAG=
-else
- CSCOPE_CMD=
-fi
+AS_IF([test "$DEBUG" = "yes"], [COPTIMISE_FLAG=""], [CSCOPE_CMD=""])
dnl -- Check if compiler supports -Wjump-misses-init
AC_TRY_CCFLAG([-Wjump-misses-init], [HAVE_WJUMP], [], [])
@@ -854,7 +833,7 @@ AC_ARG_WITH(symvers,
esac], symvers=gnu)
AC_MSG_RESULT($symvers)
-if test "$GCC" = "yes" && test "$symvers" = "gnu" ; then
+AS_IF([test "$GCC" = "yes" && test "$symvers" = "gnu"], [
AC_DEFINE(GNU_SYMVER, 1,
[Define to use GNU versioning in the shared library.])
case "$host_os" in
@@ -863,7 +842,7 @@ if test "$GCC" = "yes" && test "$symvers" = "gnu" ; then
LDDEPS="$LDDEPS .export.sym"
;;
esac
-fi
+])
################################################################################
dnl -- Enable profiling
@@ -874,24 +853,26 @@ AC_ARG_ENABLE(profiling,
PROFILING=$enableval, PROFILING=no)
AC_MSG_RESULT($PROFILING)
-if test "$PROFILING" = yes; then
+AS_IF([test "$PROFILING" = "yes"], [
COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage"
AC_PATH_TOOL(LCOV, lcov)
AC_PATH_TOOL(GENHTML, genhtml)
- test -z "$LCOV" -o -z "$GENHTML" && AC_MSG_ERROR([lcov and genhtml are required for profiling])
+ AS_IF([test -z "$LCOV" || test -z "$GENHTML"], [
+ AC_MSG_ERROR([lcov and genhtml are required for profiling])
+ ])
AC_PATH_TOOL(GENPNG, genpng)
- if test -n "$GENPNG"; then
+ AS_IF([test -n "$GENPNG"], [
AC_MSG_CHECKING([whether $GENPNG has all required modules])
- if "$GENPNG" --help > /dev/null 2>&1 ; then
+ AS_IF(["$GENPNG" --help > /dev/null 2>&1], [
AC_MSG_RESULT(ok)
GENHTML="$GENHTML --frames"
- else
+ ], [
AC_MSG_RESULT([not supported])
AC_MSG_WARN([GD.pm perl module is not installed])
GENPNG=
- fi
- fi
-fi
+ ])
+ ])
+])
################################################################################
dnl -- Set LVM2 testsuite data
@@ -908,17 +889,18 @@ AC_ARG_ENABLE(valgrind_pool,
VALGRIND_POOL=$enableval, VALGRIND_POOL=no)
AC_MSG_RESULT($VALGRIND_POOL)
-pkg_config_init
-PKG_CHECK_MODULES(VALGRIND, valgrind, [HAVE_VALGRIND=yes], [if test x$VALGRIND_POOL = xyes; then AC_MSG_ERROR(bailing out); fi])
+PKG_CHECK_MODULES(VALGRIND, valgrind, [HAVE_VALGRIND=yes], [
+ AS_IF([test "$VALGRIND_POOL" = "yes"], [AC_MSG_ERROR(bailing out)])
+])
AC_SUBST(VALGRIND_CFLAGS)
-if test x$HAVE_VALGRIND = xyes; then
+AS_IF([test "$HAVE_VALGRIND" = "yes"], [
AC_DEFINE([HAVE_VALGRIND], 1, [valgrind.h found])
-fi
+])
-if test x$VALGRIND_POOL = xyes; then
+AS_IF([test "$VALGRIND_POOL" = "yes"], [
AC_DEFINE([VALGRIND_POOL], 1, [Enable a valgrind aware build of pool])
-fi
+])
################################################################################
dnl -- Disable devmapper
@@ -929,9 +911,9 @@ AC_ARG_ENABLE(devmapper,
DEVMAPPER=$enableval)
AC_MSG_RESULT($DEVMAPPER)
-if test "$DEVMAPPER" = yes; then
+AS_IF([test "$DEVMAPPER" = "yes"], [
AC_DEFINE([DEVMAPPER_SUPPORT], 1, [Define to 1 to enable LVM2 device-mapper interaction.])
-fi
+])
################################################################################
dnl -- Build lvmpolld
@@ -957,11 +939,11 @@ AC_MSG_RESULT($LOCKDSANLOCK)
BUILD_LOCKDSANLOCK=$LOCKDSANLOCK
dnl -- Look for sanlock libraries
-if test "$BUILD_LOCKDSANLOCK" = yes; then
+AS_IF([test "$BUILD_LOCKDSANLOCK" = "yes"], [
PKG_CHECK_MODULES(LOCKD_SANLOCK, libsanlock_client >= 3.3.0, [HAVE_LOCKD_SANLOCK=yes], $bailout)
AC_DEFINE([LOCKDSANLOCK_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd sanlock option.])
BUILD_LVMLOCKD=yes
-fi
+])
################################################################################
dnl -- Build lvmlockddlm
@@ -975,11 +957,11 @@ AC_MSG_RESULT($LOCKDDLM)
BUILD_LOCKDDLM=$LOCKDDLM
dnl -- Look for dlm libraries
-if test "$BUILD_LOCKDDLM" = yes; then
+AS_IF([test "$BUILD_LOCKDDLM" = "yes"], [
PKG_CHECK_MODULES(LOCKD_DLM, libdlm, [HAVE_LOCKD_DLM=yes], $bailout)
AC_DEFINE([LOCKDDLM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm option.])
BUILD_LVMLOCKD=yes
-fi
+])
################################################################################
dnl -- Build lvmlockddlmcontrol
@@ -993,11 +975,11 @@ AC_MSG_RESULT($LOCKDDLM_CONTROL)
BUILD_LOCKDDLM_CONTROL=$LOCKDDLM_CONTROL
dnl -- Look for libdlmcontrol libraries
-if test "$BUILD_LOCKDDLM_CONTROL" = yes; then
+AS_IF([test "$BUILD_LOCKDDLM_CONTROL" = "yes"], [
PKG_CHECK_MODULES(LOCKD_DLM_CONTROL, libdlmcontrol >= 3.2, [HAVE_LOCKD_DLM_CONTROL=yes], $bailout)
AC_DEFINE([LOCKDDLM_CONTROL_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm control option.])
BUILD_LVMLOCKD=yes
-fi
+])
################################################################################
dnl -- Build lvmlockdidm
@@ -1011,21 +993,21 @@ AC_MSG_RESULT($LOCKDIDM)
BUILD_LOCKDIDM=$LOCKDIDM
dnl -- Look for Seagate IDM libraries
-if test "$BUILD_LOCKDIDM" = yes; then
+AS_IF([test "$BUILD_LOCKDIDM" = "yes"], [
PKG_CHECK_MODULES(LOCKD_IDM, libseagate_ilm >= 0.1.0, [HAVE_LOCKD_IDM=yes], $bailout)
PKG_CHECK_EXISTS(blkid >= 2.24, [HAVE_LOCKD_IDM=yes], $bailout)
AC_DEFINE([LOCKDIDM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd IDM option.])
BUILD_LVMLOCKD=yes
-fi
+])
################################################################################
dnl -- Build lvmlockd
AC_MSG_CHECKING(whether to build lvmlockd)
AC_MSG_RESULT($BUILD_LVMLOCKD)
-if test "$BUILD_LVMLOCKD" = yes; then
- AS_IF([test "$LVMPOLLD" = no], [AC_MSG_ERROR([cannot build lvmlockd with --disable-lvmpolld.])])
- AS_IF([test "$BUILD_LVMPOLLD" = no], [BUILD_LVMPOLLD=yes; AC_MSG_WARN([Enabling lvmpolld - required by lvmlockd.])])
+AS_IF([test "$BUILD_LVMLOCKD" = "yes"], [
+ AS_IF([test "$LVMPOLLD" = "no"], [AC_MSG_ERROR([cannot build lvmlockd with --disable-lvmpolld.])])
+ AS_IF([test "$BUILD_LVMPOLLD" = "no"], [BUILD_LVMPOLLD=yes; AC_MSG_WARN([Enabling lvmpolld - required by lvmlockd.])])
AC_MSG_CHECKING([defaults for use_lvmlockd])
AC_ARG_ENABLE(use_lvmlockd,
AS_HELP_STRING([--disable-use-lvmlockd],
@@ -1044,15 +1026,15 @@ if test "$BUILD_LVMLOCKD" = yes; then
LVMLOCKD_PIDFILE="$DEFAULT_PID_DIR/lvmlockd.pid")
AC_DEFINE_UNQUOTED(LVMLOCKD_PIDFILE, ["$LVMLOCKD_PIDFILE"],
[Path to lvmlockd pidfile.])
-else
+], [
DEFAULT_USE_LVMLOCKD=0
-fi
+])
AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMLOCKD, [$DEFAULT_USE_LVMLOCKD],
[Use lvmlockd by default.])
################################################################################
dnl -- Check lvmpolld
-if test "$BUILD_LVMPOLLD" = yes; then
+AS_IF([test "$BUILD_LVMPOLLD" = "yes"], [
AC_MSG_CHECKING([defaults for use_lvmpolld])
AC_ARG_ENABLE(use_lvmpolld,
AS_HELP_STRING([--disable-use-lvmpolld],
@@ -1071,9 +1053,9 @@ if test "$BUILD_LVMPOLLD" = yes; then
LVMPOLLD_PIDFILE="$DEFAULT_PID_DIR/lvmpolld.pid")
AC_DEFINE_UNQUOTED(LVMPOLLD_PIDFILE, ["$LVMPOLLD_PIDFILE"],
[Path to lvmpolld pidfile.])
-else
+], [
DEFAULT_USE_LVMPOLLD=0
-fi
+])
AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMPOLLD, [$DEFAULT_USE_LVMPOLLD],
[Use lvmpolld by default.])
@@ -1087,12 +1069,11 @@ AC_MSG_RESULT($BUILD_DMFILEMAPD)
AC_DEFINE([DMFILEMAPD], $BUILD_DMFILEMAPD, [Define to 1 to enable the device-mapper filemap daemon.])
dnl -- dmfilemapd requires FIEMAP
-if test "$BUILD_DMFILEMAPD" = yes; then
+AS_IF([test "$BUILD_DMFILEMAPD" = "yes"], [
AC_CHECK_HEADER([linux/fiemap.h], , [AC_MSG_ERROR(--enable-dmfilemapd requires fiemap.h)])
-fi
+])
SYSTEMD_MIN_VERSION=0
-pkg_config_init
PKG_CHECK_EXISTS(systemd >= 205, [SYSTEMD_MIN_VERSION=205], [])
################################################################################
@@ -1102,54 +1083,54 @@ AC_MSG_CHECKING(whether to build notifydbus)
AC_ARG_ENABLE(notify-dbus,
AS_HELP_STRING([--enable-notify-dbus],
[enable LVM notification using dbus]),
- AS_IF([test "$enableval" = yes && test "$SYSTEMD_MIN_VERSION" -lt 221],
+ AS_IF([test "$enableval" = "yes" && test "$SYSTEMD_MIN_VERSION" -lt 221],
AC_MSG_ERROR([Enabling notify-dbus requires systemd >= 221]))
NOTIFYDBUS_SUPPORT=$enableval, NOTIFYDBUS_SUPPORT=no)
AC_MSG_RESULT($NOTIFYDBUS_SUPPORT)
-AS_IF([test "$NOTIFYDBUS_SUPPORT" = yes],
+AS_IF([test "$NOTIFYDBUS_SUPPORT" = "yes"],
AC_DEFINE([NOTIFYDBUS_SUPPORT], 1, [Define to 1 to include code that uses dbus notification.]))
################################################################################
dnl -- Build with systemd journaling when the header file is present
AS_IF([test "$SYSTEMD_MIN_VERSION" -ge 221], [SYSTEMD_JOURNAL_SUPPORT=maybe], [SYSTEMD_JOURNAL_SUPPORT=no])
AC_CHECK_HEADER([systemd/sd-journal.h],
- [AS_IF([test "$SYSTEMD_JOURNAL_SUPPORT" != no], [SYSTEMD_JOURNAL_SUPPORT=yes])],
+ [AS_IF([test "$SYSTEMD_JOURNAL_SUPPORT" != "no"], [SYSTEMD_JOURNAL_SUPPORT=yes])],
[SYSTEMD_JOURNAL_SUPPORT=no])
AC_MSG_CHECKING(whether to log to systemd journal)
AC_ARG_ENABLE(systemd-journal,
AS_HELP_STRING([--disable-systemd-journal],
[disable LVM systemd journaling]),
- AS_IF([test "$enableval" = yes && test "$SYSTEMD_JOURNAL_SUPPORT" = no],
+ AS_IF([test "$enableval" = "yes" && test "$SYSTEMD_JOURNAL_SUPPORT" = "no"],
AC_MSG_ERROR([Enabling systemd journal requires systemd/sd-journal.h and systemd >= 221.]))
SYSTEMD_JOURNAL_SUPPORT=$enableval, [])
AC_MSG_RESULT($SYSTEMD_JOURNAL_SUPPORT)
-AS_IF([test "$SYSTEMD_JOURNAL_SUPPORT" = yes],
+AS_IF([test "$SYSTEMD_JOURNAL_SUPPORT" = "yes"],
AC_DEFINE([SYSTEMD_JOURNAL_SUPPORT], 1, [Define to 1 to include code that uses systemd journal.]))
################################################################################
dnl -- Build appmachineid when header file sd-id128.h is present
PKG_CHECK_EXISTS(systemd >= 234, [SYSTEMD_MIN_VERSION=234 APP_MACHINEID_SUPPORT=maybe], [APP_MACHINEID_SUPPORT=no])
AC_CHECK_HEADER([systemd/sd-id128.h],
- [AS_IF([test "$APP_MACHINEID_SUPPORT" != no], [APP_MACHINEID_SUPPORT=yes])],
+ [AS_IF([test "$APP_MACHINEID_SUPPORT" != "no"], [APP_MACHINEID_SUPPORT=yes])],
[APP_MACHINEID_SUPPORT=no])
AC_MSG_CHECKING(whether to support systemd appmachineid)
AC_ARG_ENABLE(app-machineid,
AS_HELP_STRING([--disable-app-machineid],
[disable LVM system ID using app-specific machine-id]),
- AS_IF([test "$enableval" = yes && test "$APP_MACHINEID_SUPPORT" = no],
+ AS_IF([test "$enableval" = "yes" && test "$APP_MACHINEID_SUPPORT" = "no"],
AC_MSG_ERROR([Enabling app machineid requires systemd/sd-id128.h and systemd >= 234.]))
APP_MACHINEID_SUPPORT=$enableval, [])
AC_MSG_RESULT($APP_MACHINEID_SUPPORT)
-AS_IF([test "$APP_MACHINEID_SUPPORT" = yes],
+AS_IF([test "$APP_MACHINEID_SUPPORT" = "yes"],
AC_DEFINE([APP_MACHINEID_SUPPORT], 1, [Define to 1 to include code that uses libsystemd machine-id apis.]))
dnl -- Look for libsystemd libraries if needed
-AS_IF([test "$NOTIFYDBUS_SUPPORT" = yes || test "$SYSTEMD_JOURNAL_SUPPORT" = yes || test "$APP_MACHINEID_SUPPORT" = yes ] ,[
- pkg_config_init
- PKG_CHECK_MODULES(SYSTEMD, [systemd], [SYSTEMD_LIBS="-lsystemd"], $bailout) ])
+AS_IF([test "$NOTIFYDBUS_SUPPORT" = "yes" || test "$SYSTEMD_JOURNAL_SUPPORT" = "yes" || test "$APP_MACHINEID_SUPPORT" = "yes"], [
+ PKG_CHECK_MODULES(SYSTEMD, [systemd], [SYSTEMD_LIBS="-lsystemd"], $bailout)
+])
################################################################################
@@ -1160,19 +1141,20 @@ AC_ARG_ENABLE(blkid_wiping,
BLKID_WIPING=$enableval, BLKID_WIPING=maybe)
DEFAULT_USE_BLKID_WIPING=0
-if test "$BLKID_WIPING" != no; then
- pkg_config_init
- PKG_CHECK_MODULES(BLKID, blkid >= 2.24,
- [ BLKID_WIPING=yes
- BLKID_PC="blkid"
- DEFAULT_USE_BLKID_WIPING=1
- AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
- ], [if test "$BLKID_WIPING" = maybe; then
- BLKID_WIPING=no
- else
- AC_MSG_ERROR([bailing out... blkid library >= 2.24 is required])
- fi])
-fi
+AS_IF([test "$BLKID_WIPING" != "no"], [
+ PKG_CHECK_MODULES([BLKID], [blkid >= 2.24], [
+ BLKID_WIPING=yes
+ BLKID_PC="blkid"
+ DEFAULT_USE_BLKID_WIPING=1
+ AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
+ ], [
+ AS_IF([test "$BLKID_WIPING" = "maybe"], [
+ BLKID_WIPING=no
+ ], [
+ AC_MSG_ERROR([bailing out... blkid library >= 2.24 is required])
+ ])
+ ])
+])
AC_MSG_CHECKING([whether to enable libblkid detection of signatures when wiping])
AC_MSG_RESULT($BLKID_WIPING)
AC_DEFINE_UNQUOTED(DEFAULT_USE_BLKID_WIPING, [$DEFAULT_USE_BLKID_WIPING],
@@ -1187,13 +1169,17 @@ AC_ARG_ENABLE(udev-systemd-background-jobs,
UDEV_SYSTEMD_BACKGROUND_JOBS=$enableval,
UDEV_SYSTEMD_BACKGROUND_JOBS=maybe)
-if test "$UDEV_SYSTEMD_BACKGROUND_JOBS" != no; then
- AS_IF([test "$SYSTEMD_MIN_VERSION" -ge 205],
- UDEV_SYSTEMD_BACKGROUND_JOBS=yes,
- AS_IF([test "$UDEV_SYSTEMD_BACKGROUND_JOBS" = maybe],
- [UDEV_SYSTEMD_BACKGROUND_JOBS=no],
- [AC_MSG_ERROR([bailing out... systemd >= 205 is required])]))
-fi
+AS_IF([test "$UDEV_SYSTEMD_BACKGROUND_JOBS" != "no"], [
+ AS_IF([test "$SYSTEMD_MIN_VERSION" -ge 205], [
+ UDEV_SYSTEMD_BACKGROUND_JOBS=yes
+ ], [
+ AS_IF([test "$UDEV_SYSTEMD_BACKGROUND_JOBS" = "maybe"], [
+ UDEV_SYSTEMD_BACKGROUND_JOBS=no
+ ], [
+ AC_MSG_ERROR([bailing out... systemd >= 205 is required])
+ ])
+ ])
+])
AC_MSG_CHECKING(whether to use udev-systemd protocol for jobs in background)
AC_MSG_RESULT($UDEV_SYSTEMD_BACKGROUND_JOBS)
@@ -1207,15 +1193,14 @@ AC_ARG_ENABLE(udev_sync,
UDEV_SYNC=$enableval, UDEV_SYNC=no)
AC_MSG_RESULT($UDEV_SYNC)
-if test "$UDEV_SYNC" = yes; then
- pkg_config_init
+AS_IF([test "$UDEV_SYNC" = "yes"], [
PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1,
[Define to 1 if udev_device_get_is_initialized is available.]))
LIBS=$ac_check_lib_save_LIBS
-fi
+])
dnl -- Enable udev rules
AC_MSG_CHECKING(whether to enable installation of udev rules required for synchronisation)
@@ -1233,16 +1218,15 @@ AC_ARG_ENABLE(udev_rule_exec_detection,
AC_MSG_RESULT($UDEV_RULE_EXEC_DETECTION)
dnl -- Check support for built-in blkid against target udev version
-if test "$UDEV_RULE" != no ; then
- AC_MSG_CHECKING(whether udev supports built-in blkid)
- pkg_config_init
- if $("$PKG_CONFIG" --atleast-version=176 libudev); then
+AS_IF([test "$UDEV_RULE" != "no"], [
+ PKG_CHECK_EXISTS([libudev >= 176], [
UDEV_HAS_BUILTIN_BLKID=yes
- else
+ ], [
UDEV_HAS_BUILTIN_BLKID=no
- fi
+ ])
+ AC_MSG_CHECKING(whether udev supports built-in blkid)
AC_MSG_RESULT($UDEV_HAS_BUILTIN_BLKID)
-fi
+])
################################################################################
dnl -- Compatible units suffix mode
@@ -1252,9 +1236,9 @@ AC_ARG_ENABLE(units-compat,
that do not use KiB-style unit suffixes]),
UNITS_COMPAT=$enableval, UNITS_COMPAT=no)
-if test "$UNITS_COMPAT" = yes; then
+AS_IF([test "$UNITS_COMPAT" = "yes"], [
AC_DEFINE([DEFAULT_SI_UNIT_CONSISTENCY], 0, [Define to 0 to reinstate the pre-2.02.54 handling of unit suffixes.])
-fi
+])
################################################################################
dnl -- Disable ioctl
@@ -1262,7 +1246,7 @@ AC_ARG_ENABLE(ioctl,
AS_HELP_STRING([--disable-ioctl],
[disable ioctl calls to device-mapper in the kernel]),
DM_IOCTLS=$enableval)
-AS_IF([test "$DM_IOCTLS" = yes],
+AS_IF([test "$DM_IOCTLS" = "yes"],
[AC_DEFINE([DM_IOCTLS], 1, [Define to enable ioctls calls to kernel])])
################################################################################
@@ -1273,9 +1257,9 @@ AC_ARG_ENABLE(o_direct,
ODIRECT=$enableval)
AC_MSG_RESULT($ODIRECT)
-if test "$ODIRECT" = yes; then
+AS_IF([test "$ODIRECT" = "yes"], [
AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.])
-fi
+])
################################################################################
dnl -- Enable cmdlib
@@ -1285,9 +1269,11 @@ AC_ARG_ENABLE(cmdlib,
CMDLIB=$enableval, CMDLIB=no)
AC_MSG_RESULT($CMDLIB)
AC_SUBST([LVM2CMD_LIB])
-test "$CMDLIB" = yes \
- && LVM2CMD_LIB=-llvm2cmd \
- || LVM2CMD_LIB=
+AS_IF([test "$CMDLIB" = "yes"], [
+ LVM2CMD_LIB="-llvm2cmd"
+], [
+ LVM2CMD_LIB=""
+])
################################################################################
dnl -- Enable D-Bus service
@@ -1296,13 +1282,13 @@ AC_ARG_ENABLE(dbus-service,
AS_HELP_STRING([--enable-dbus-service], [install D-Bus support]),
BUILD_LVMDBUSD=$enableval, BUILD_LVMDBUSD=no)
AC_MSG_RESULT($BUILD_LVMDBUSD)
-AS_IF([test "$NOTIFYDBUS_SUPPORT" = yes && test "BUILD_LVMDBUSD" = yes],
+AS_IF([test "$NOTIFYDBUS_SUPPORT" = "yes" && test "BUILD_LVMDBUSD" = "yes"],
[AC_MSG_WARN([Building D-Bus support without D-Bus notifications.])])
################################################################################
dnl -- Enable Python dbus library
-if test "$BUILD_LVMDBUSD" = yes; then
+AS_IF([test "$BUILD_LVMDBUSD" = "yes"], [
unset am_cv_pathless_PYTHON ac_cv_path_PYTHON am_cv_python_platform
unset am_cv_python_pythondir am_cv_python_version am_cv_python_pyexecdir
unset ac_cv_path_PYTHON_CONFIG ac_cv_path_ac_pt_PYTHON_CONFIG
@@ -1311,18 +1297,24 @@ if test "$BUILD_LVMDBUSD" = yes; then
python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 ])
AM_PATH_PYTHON([3])
PYTHON3=$PYTHON
- test -z "$PYTHON3" && AC_MSG_ERROR([python3 is required for --enable-python3_bindings or --enable-dbus-service but cannot be found])
+ AS_IF([test -z "$PYTHON3"], [
+ AC_MSG_ERROR([python3 is required for --enable-python3_bindings or --enable-dbus-service but cannot be found])
+ ])
AC_PATH_TOOL(PYTHON3_CONFIG, python3-config)
- test -z "$PYTHON3_CONFIG" && AC_MSG_ERROR([python3 headers are required for --enable-python3_bindings or --enable-dbus-service but cannot be found])
+ AS_IF([test -z "$PYTHON3_CONFIG"], [
+ AC_MSG_ERROR([python3 headers are required for --enable-python3_bindings or --enable-dbus-service but cannot be found])
+ ])
PYTHON3_INCDIRS=`"$PYTHON3_CONFIG" --includes`
PYTHON3_LIBDIRS=`"$PYTHON3_CONFIG" --libs`
PYTHON3DIR=$pythondir
- test "$PYTHON3_BINDINGS" = yes && PYTHON_BINDINGS=yes
+ AS_IF([test "$PYTHON3_BINDINGS" = "yes"], [
+ PYTHON_BINDINGS=yes
+ ])
# To get this macro, install autoconf-archive package then run autoreconf
AX_PYTHON_MODULE([pyudev], [Required], python3)
AX_PYTHON_MODULE([dbus], [Required], python3)
-fi
+])
################################################################################
dnl -- Enable pkg-config
@@ -1368,16 +1360,16 @@ AC_ARG_ENABLE(dmeventd, AS_HELP_STRING([--enable-dmeventd],
AC_MSG_RESULT($BUILD_DMEVENTD)
dnl -- dmeventd currently requires internal mirror support
-if test "$BUILD_DMEVENTD" = yes; then
- if test "$MIRRORS" != internal; then
+AS_IF([test "$BUILD_DMEVENTD" = "yes"], [
+ AS_IF([test "$MIRRORS" != "internal"], [
AC_MSG_ERROR([--enable-dmeventd currently requires --with-mirrors=internal])
- fi
- if test "$CMDLIB" = no; then
+ ])
+ AS_IF([test "$CMDLIB" = "no"], [
AC_MSG_ERROR([--enable-dmeventd requires --enable-cmdlib to be used as well])
- fi
+ ])
AC_DEFINE([DMEVENTD], 1, [Define to 1 to enable the device-mapper event daemon.])
-fi
+])
################################################################################
dnl -- getline included in recent libc
@@ -1403,9 +1395,9 @@ AC_CHECK_LIB(dl, dlopen,
################################################################################
dnl -- Check for shared/static conflicts
-if ( test "$LVM1" = shared || test "$POOL" = shared ) && test "$STATIC_LINK" = yes; then
+AS_IF([( test "$LVM1" = "shared" || test "$POOL" = "shared" ) && test "$STATIC_LINK" = "yes"], [
AC_MSG_ERROR([Features cannot be 'shared' when building statically])
-fi
+])
################################################################################
AC_CHECK_LIB(m, log10,
@@ -1425,7 +1417,7 @@ AC_MSG_RESULT($SELINUX)
################################################################################
dnl -- Check for selinux
-if test "$SELINUX" = yes; then
+AS_IF([test "$SELINUX" = "yes"], [
AC_CHECK_LIB([sepol], [sepol_check_context], [
AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
SELINUX_LIBS="-lsepol"])
@@ -1441,7 +1433,7 @@ if test "$SELINUX" = yes; then
SELINUX_LIBS=
SELINUX_PC=
HAVE_SELINUX=no ])
-fi
+])
################################################################################
dnl -- Check BLKZEROOUT support
@@ -1461,12 +1453,12 @@ AC_ARG_ENABLE(blkzeroout,
BLKZEROOUT=$enableval, BLKZEROOUT=yes)
AC_MSG_CHECKING(whether to use BLKZEROOUT for device zeroing)
-if test "$BLKZEROOUT" = yes; then
+AS_IF([test "$BLKZEROOUT" = "yes"], [
AC_IF_YES(ac_cv_have_blkzeroout,
AC_DEFINE(HAVE_BLKZEROOUT, 1,
[Define if ioctl BLKZEROOUT can be used for device zeroing.]),
BLKZEROOUT=no)
-fi
+])
AC_MSG_RESULT($BLKZEROOUT)
@@ -1474,18 +1466,18 @@ AC_MSG_RESULT($BLKZEROOUT)
dnl -- Check for realtime clock support
RT_LIBS=
HAVE_REALTIME=no
-if test "$REALTIME" = yes; then
+AS_IF([test "$REALTIME" = "yes"], [
AC_CHECK_FUNCS([clock_gettime], HAVE_REALTIME=yes)
- AS_IF([test "$HAVE_REALTIME" != yes], [ # try again with -lrt
+ AS_IF([test "$HAVE_REALTIME" != "yes"], [ # try again with -lrt
AC_CHECK_LIB([rt], [clock_gettime], RT_LIBS="-lrt"; HAVE_REALTIME=yes)])
- if test "$HAVE_REALTIME" = yes; then
+ AS_IF([test "$HAVE_REALTIME" = "yes"], [
AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.])
- else
+ ], [
AC_MSG_WARN(Disabling realtime clock)
- fi
-fi
+ ])
+])
dnl Check if the system has struct stat st_ctim.
AC_CACHE_CHECK([for struct stat has st_ctim.],
@@ -1505,21 +1497,21 @@ AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getop
################################################################################
dnl -- Check for editline
-if test "$EDITLINE" = yes; then
+AS_IF([test "$EDITLINE" = "yes"], [
PKG_CHECK_MODULES([EDITLINE], [libedit], [
AC_DEFINE([EDITLINE_SUPPORT], 1,
[Define to 1 to include the LVM editline shell.])], AC_MSG_ERROR(
[libedit could not be found which is required for the --enable-editline option.])
)
-fi
+])
################################################################################
dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
-if test "$READLINE" != no; then
+AS_IF([test "$READLINE" != "no"], [
lvm_saved_libs=$LIBS
AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib],
READLINE_LIBS=$ac_cv_search_tgetent, [
- if test "$READLINE" = yes; then
+ AS_IF([test "$READLINE" = "yes"], [
AC_MSG_ERROR(
[termcap could not be found which is required for the
--enable-readline option (which is enabled by default). Either disable readline
@@ -1529,7 +1521,8 @@ Note: if you are using precompiled packages you will also need the development
package as well (which may be called termcap-devel or something similar).
Note: (n)curses also seems to work as a substitute for termcap. This was
not found either - but you could try installing that as well.])
- fi])
+ ])
+ ])
dnl -- Old systems may need extra termcap dependency explicitly in LIBS
AC_CHECK_LIB([readline], [readline], [
AC_DEFINE([READLINE_SUPPORT], 1,
@@ -1543,7 +1536,7 @@ Note: (n)curses also seems to work as a substitute for termcap. This was
READLINE_LIBS="-lreadline $READLINE_LIBS"
]) ], [
READLINE_LIBS=
- if test "$READLINE" = yes; then
+ AS_IF([test "$READLINE" = "yes"], [
AC_MSG_ERROR(
[GNU Readline could not be found which is required for the
--enable-readline option (which is enabled by default). Either disable readline
@@ -1551,11 +1544,12 @@ support with --disable-readline or download and install readline from:
ftp.gnu.org/gnu/readline
Note: if you are using precompiled packages you will also need the development
package as well (which may be called readline-devel or something similar).])
- fi ])
+ ])
+ ])
LIBS="$READLINE_LIBS $lvm_saved_libs"
AC_CHECK_FUNCS([rl_completion_matches])
LIBS=$lvm_saved_libs
-fi
+])
################################################################################
dnl -- Internationalisation stuff
@@ -1565,7 +1559,7 @@ AC_ARG_ENABLE(nls,
INTL=$enableval, INTL=no)
AC_MSG_RESULT($INTL)
-if test "$INTL" = yes; then
+AS_IF([test "$INTL" = "yes"], [
# FIXME - Move this - can be device-mapper too
INTL_PACKAGE="lvm2"
AC_PATH_TOOL(MSGFMT, msgfmt)
@@ -1579,7 +1573,7 @@ if test "$INTL" = yes; then
AC_DEFINE_UNQUOTED([INTL_PACKAGE], ["$INTL_PACKAGE"], [Internalization package])
# double eval needed ${datarootdir} -> ${prefix}/share -> real path
AC_DEFINE_UNQUOTED([LOCALEDIR], ["$(eval echo $(eval echo $localedir))"], [Locale-dependent data])
-fi
+])
################################################################################
dnl -- FIXME: need to switch to regular option here --sysconfdir
@@ -1626,16 +1620,19 @@ dnl -- Get the systemd system unit dir value from pkg_config automatically if va
dnl -- This follows the recommendation for systemd integration best practices mentioned in daemon(7) manpage.
AC_ARG_WITH(systemdsystemunitdir,
AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
- [systemd service files in DIR]),
- systemdsystemunitdir=$withval,
- pkg_config_init
- pkg_systemdsystemunitdir=$("$PKG_CONFIG" --variable=systemdsystemunitdir systemd))
-
-test -n "$pkg_systemdsystemunitdir" && systemdsystemunitdir=$pkg_systemdsystemunitdir
-test -z "$systemdsystemunitdir" && systemdsystemunitdir='${exec_prefix}/lib/systemd/system';
+ [systemd service files in DIR]))
+
+AS_IF([test -z "$with_systemdsystemunitdir"], [
+ PKG_CHECK_VAR([systemdsystemunitdir], [systemd], [systemdsystemunitdir], [], [
+ systemdsystemunitdir='${exec_prefix}/lib/systemd/system'
+ ])
+], [
+ systemdsystemunitdir="$with_systemdsystemunitdir"
+])
-systemdutildir=$("$PKG_CONFIG" --variable=systemdutildir systemd)
-test -z "$systemdutildir" && systemdutildir='${exec_prefix}/lib/systemd';
+PKG_CHECK_VAR([systemdutildir], [systemd], [systemdutildir], [], [
+ systemdutildir='${exec_prefix}/lib/systemd'
+])
################################################################################
AC_ARG_WITH(tmpfilesdir,
@@ -1644,58 +1641,59 @@ AC_ARG_WITH(tmpfilesdir,
tmpfilesdir=$withval, tmpfilesdir='${prefix}/lib/tmpfiles.d')
################################################################################
dnl -- Ensure additional headers required
-if test "$READLINE" = yes; then
+AS_IF([test "$READLINE" = "yes"], [
AC_CHECK_HEADERS(readline/readline.h readline/history.h,,hard_bailout)
-fi
+])
AC_MSG_CHECKING(whether to enable readline)
AC_MSG_RESULT($READLINE)
-if test "$EDITLINE" = yes; then
+AS_IF([test "$EDITLINE" = "yes"], [
AC_CHECK_HEADERS(editline/readline.h,,hard_bailout)
-fi
+])
AC_MSG_CHECKING(whether to enable editline)
AC_MSG_RESULT($EDITLINE)
-if test "$BUILD_CMIRRORD" = yes; then
+AS_IF([test "$BUILD_CMIRRORD" = "yes"], [
AC_CHECK_FUNCS(atexit,,hard_bailout)
-fi
+])
-if test "$BUILD_LVMLOCKD" = yes; then
- AS_IF([test "$HAVE_REALTIME" != yes], [AC_MSG_ERROR([Realtime clock support is mandatory for lvmlockd.])])
+AS_IF([test "$BUILD_LVMLOCKD" = "yes"], [
+ AS_IF([test "$HAVE_REALTIME" != "yes"], [
+ AC_MSG_ERROR([Realtime clock support is mandatory for lvmlockd.])])
AC_CHECK_FUNCS(strtoull,,hard_bailout)
-fi
+])
-if test "$BUILD_LVMPOLLD" = yes; then
+AS_IF([test "$BUILD_LVMPOLLD" = "yes"], [
AC_CHECK_FUNCS(strpbrk,,hard_bailout)
AC_FUNC_STRERROR_R
-fi
+])
-if test "$BUILD_DMEVENTD" = yes; then
+AS_IF([test "$BUILD_DMEVENTD" = "yes"], [
AC_CHECK_HEADERS(arpa/inet.h,,hard_bailout)
-fi
+])
-if test "$HAVE_LIBDL" = yes; then
+AS_IF([test "$HAVE_LIBDL" = "yes"], [
AC_CHECK_HEADERS(dlfcn.h,,hard_bailout)
-fi
+])
-if test "$INTL" = yes; then
+AS_IF([test "$INTL" = "yes"], [
AC_CHECK_HEADERS(libintl.h,,hard_bailout)
-fi
+])
-if test "$UDEV_SYNC" = yes; then
+AS_IF([test "$UDEV_SYNC" = "yes"], [
AC_CHECK_HEADERS(sys/ipc.h sys/sem.h,,hard_bailout)
-fi
+])
-if test "$BUILD_DMFILEMAPD" = yes; then
+AS_IF([test "$BUILD_DMFILEMAPD" = "yes"], [
AC_CHECK_HEADERS([sys/inotify.h],,hard_bailout)
-fi
+])
################################################################################
AC_PATH_TOOL(MODPROBE_CMD, modprobe, [], [$PATH_SBIN])
-if test -n "$MODPROBE_CMD"; then
+AS_IF([test -n "$MODPROBE_CMD"], [
AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
-fi
+])
SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))"
@@ -1721,7 +1719,7 @@ AC_DEFINE_UNQUOTED(LVRESIZE_FS_HELPER_PATH, ["$LVRESIZE_FS_HELPER_PATH"], [Path
################################################################################
dnl -- dmeventd pidfile and executable path
-if test "$BUILD_DMEVENTD" = yes; then
+AS_IF([test "$BUILD_DMEVENTD" = "yes"], [
AC_ARG_WITH(dmeventd-pidfile,
AS_HELP_STRING([--with-dmeventd-pidfile=PATH],
[dmeventd pidfile [PID_DIR/dmeventd.pid]]),
@@ -1729,9 +1727,9 @@ if test "$BUILD_DMEVENTD" = yes; then
DMEVENTD_PIDFILE="$DEFAULT_PID_DIR/dmeventd.pid")
AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE, ["$DMEVENTD_PIDFILE"],
[Path to dmeventd pidfile.])
-fi
+])
-if test "$BUILD_DMEVENTD" = yes; then
+AS_IF([test "$BUILD_DMEVENTD" = "yes"], [
AC_ARG_WITH(dmeventd-path,
AS_HELP_STRING([--with-dmeventd-path=PATH],
[dmeventd path [EPREFIX/sbin/dmeventd]]),
@@ -1739,7 +1737,7 @@ if test "$BUILD_DMEVENTD" = yes; then
DMEVENTD_PATH="$SBINDIR/dmeventd")
AC_DEFINE_UNQUOTED(DMEVENTD_PATH, ["$DMEVENTD_PATH"],
[Path to dmeventd binary.])
-fi
+])
################################################################################
dnl -- various defaults
3 months, 4 weeks
main - configure.ac: use only portable POSIX shell
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d456c1f3c509f8a033f...
Commit: d456c1f3c509f8a033f3ec5830caaf44e830b644
Parent: 631762d6db1390487694e6b7ae1de885911458b2
Author: David Seifert <soap(a)gentoo.org>
AuthorDate: Sun Nov 27 15:35:05 2022 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 17:50:27 2023 +0100
configure.ac: use only portable POSIX shell
`[[ ... ]]` only works in bash, and not in POSIX sh, specifically
dash fails on this, which is a popular alternative to bash for running
configure scripts.
test's `-a` and `-o` options are considered obsolescent by POSIX,
because they interact badly with expressions and can become ambiguous
depending on string arguments:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
`==` only works in bash.
---
configure.ac | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index f39c87d08..f2cf48d8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,7 +206,7 @@ AC_PREFIX_DEFAULT(/usr)
################################################################################
dnl -- Clear default exec_prefix - install into /sbin rather than /usr/sbin
-test "$exec_prefix" = NONE -a "$prefix" = NONE && exec_prefix=""
+test "$exec_prefix" = "NONE" && test "$prefix" = "NONE" && exec_prefix=""
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
@@ -428,11 +428,11 @@ case "$THIN" in
THIN_CHECK_VSN_MAJOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}'`
THIN_CHECK_VSN_MINOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}'`
- if test -z "$THIN_CHECK_VSN_MAJOR" -o -z "$THIN_CHECK_VSN_MINOR"; then
+ if test -z "$THIN_CHECK_VSN_MAJOR" || test -z "$THIN_CHECK_VSN_MINOR"; then
AC_MSG_WARN([$THIN_CHECK_CMD: Bad version "$THIN_CHECK_VSN" found])
THIN_CHECK_VERSION_WARN=y
THIN_CHECK_NEEDS_CHECK=no
- elif test "$THIN_CHECK_VSN_MAJOR" -eq 0 -a "$THIN_CHECK_VSN_MINOR" -lt 3; then
+ elif test "$THIN_CHECK_VSN_MAJOR" -eq 0 && test "$THIN_CHECK_VSN_MINOR" -lt 3; then
AC_MSG_WARN([$THIN_CHECK_CMD: Old version "$THIN_CHECK_VSN" found])
THIN_CHECK_VERSION_WARN=y
THIN_CHECK_NEEDS_CHECK=no
@@ -551,7 +551,7 @@ case "$CACHE" in
CACHE_CHECK_NEEDS_CHECK=no
elif test "$CACHE_CHECK_VSN_MAJOR" -eq 0 ; then
if test "$CACHE_CHECK_VSN_MINOR" -lt 5 \
- || test "$CACHE_CHECK_VSN_MINOR" -eq 5 -a "$CACHE_CHECK_VSN_PATCH" -lt 4; then
+ || ( test "$CACHE_CHECK_VSN_MINOR" -eq 5 && test "$CACHE_CHECK_VSN_PATCH" -lt 4 ); then
AC_MSG_WARN([$CACHE_CHECK_CMD: Old version "$CACHE_CHECK_VSN" found])
CACHE_CHECK_VERSION_WARN=y
CACHE_CHECK_NEEDS_CHECK=no
@@ -803,7 +803,7 @@ fi
################################################################################
dnl -- Look for corosync libraries if required.
-if [[ "$BUILD_CMIRRORD" = yes ]]; then
+if test "$BUILD_CMIRRORD" = yes; then
pkg_config_init
if test "$HAVE_CPG" != yes; then
@@ -1403,8 +1403,7 @@ AC_CHECK_LIB(dl, dlopen,
################################################################################
dnl -- Check for shared/static conflicts
-if [[ \( "$LVM1" = shared -o "$POOL" = shared \
- \) -a "$STATIC_LINK" = yes ]]; then
+if ( test "$LVM1" = shared || test "$POOL" = shared ) && test "$STATIC_LINK" = yes; then
AC_MSG_ERROR([Features cannot be 'shared' when building statically])
fi
@@ -1506,7 +1505,7 @@ AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getop
################################################################################
dnl -- Check for editline
-if test "$EDITLINE" == yes; then
+if test "$EDITLINE" = yes; then
PKG_CHECK_MODULES([EDITLINE], [libedit], [
AC_DEFINE([EDITLINE_SUPPORT], 1,
[Define to 1 to include the LVM editline shell.])], AC_MSG_ERROR(
3 months, 4 weeks
main - metadata-exported.h: correcting definition
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=631762d6db139048769...
Commit: 631762d6db1390487694e6b7ae1de885911458b2
Parent: e3534d0f68c698532101eea211ece52b7aee315c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 10 17:48:28 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 17:50:27 2023 +0100
metadata-exported.h: correcting definition
Fixing minor mismatch between definition and declaration of
update_thin_pool_params().
---
lib/metadata/metadata-exported.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h
index a27345781..ded0389b1 100644
--- a/lib/metadata/metadata-exported.h
+++ b/lib/metadata/metadata-exported.h
@@ -896,7 +896,7 @@ int update_thin_pool_params(struct cmd_context *cmd,
uint32_t pool_data_extents,
uint32_t *pool_metadata_extents,
struct logical_volume *metadata_lv,
- unsigned *crop_metadata,
+ thin_crop_metadata_t *crop_metadata,
int *chunk_size_calc_method, uint32_t *chunk_size,
thin_discards_t *discards, thin_zero_t *zero_new_blocks);
3 months, 4 weeks
main - lvm: fix typos
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e3534d0f68c69853210...
Commit: e3534d0f68c698532101eea211ece52b7aee315c
Parent: a1a1439215f56335a06ae5ac6ca73b5e0d734760
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Feb 9 17:05:01 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 17:50:27 2023 +0100
lvm: fix typos
Patch aec5e573afe610070eb2c6bed675d2a7c0efc7e8 was fixing some
of typos only in generated file, but they need to be fixed in
the source files.
---
daemons/lvmlockd/lvmlockd-core.c | 2 +-
lib/cache/lvmcache.c | 2 +-
lib/config/config_settings.h | 12 ++++++------
tools/args.h | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c
index b2e98efa3..eb4334dcd 100644
--- a/daemons/lvmlockd/lvmlockd-core.c
+++ b/daemons/lvmlockd/lvmlockd-core.c
@@ -1279,7 +1279,7 @@ static int res_lock(struct lockspace *ls, struct resource *r, struct action *act
* be invalidated. When we need to invalidate the lvmetad
* cache, but don't have a usable r_version from the lvb,
* send lvmetad new_version 0 which causes it to invalidate
- * the VG metdata without comparing against the currently
+ * the VG metadata without comparing against the currently
* cached VG seqno.
*/
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index ec32b3be9..b8a9eac25 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -2271,7 +2271,7 @@ int lvmcache_update_vgname_and_id(struct cmd_context *cmd, struct lvmcache_info
* vginfo/info. PVs that don't hold VG metadata weren't attached to the vginfo
* during label scan, and PVs with outdated metadata (claiming to be in the VG,
* but not listed in the latest metadata) were attached to the vginfo, but
- * shouldn't be. After vg_read() gets the full metdata in the form of a 'vg',
+ * shouldn't be. After vg_read() gets the full metadata in the form of a 'vg',
* this function is called to fix up the lvmcache representation of the VG
* using the 'vg'.
*/
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 699b40bd0..9d19a554e 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -824,7 +824,7 @@ cfg(allocation_vdo_max_discard_CFG, "vdo_max_discard", allocation_CFG_SECTION, C
"The default and minimum is 1. The maximum is UINT_MAX / 4096.\n")
cfg(allocation_vdo_pool_header_size_CFG, "vdo_pool_header_size", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_POOL_HEADER_SIZE_KB, vsn(2, 3, 12), NULL, 0, NULL,
- "Specified the emptry header size in KiB at the front and end of vdo pool device.\n")
+ "Specified the empty header size in KiB at the front and end of vdo pool device.\n")
cfg(log_report_command_log_CFG, "report_command_log", log_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED | CFG_DISALLOW_INTERACTIVE, CFG_TYPE_BOOL, DEFAULT_COMMAND_LOG_REPORT, vsn(2, 2, 158), NULL, 0, NULL,
"Enable or disable LVM log reporting.\n"
@@ -947,7 +947,7 @@ cfg(backup_archive_CFG, "archive", backup_CFG_SECTION, CFG_DEFAULT_COMMENTED, CF
"Think very hard before turning this off.\n")
cfg_runtime(backup_archive_dir_CFG, "archive_dir", backup_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, vsn(1, 0, 0), 0, NULL,
- "Location of the metdata archive files.\n"
+ "Location of the metadata archive files.\n"
"Remember to back up this directory regularly!\n")
cfg(backup_retain_min_CFG, "retain_min", backup_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_ARCHIVE_NUMBER, vsn(1, 0, 0), NULL, 0, NULL,
@@ -1382,11 +1382,11 @@ cfg(activation_use_linear_target_CFG, "use_linear_target", activation_CFG_SECTIO
cfg(activation_reserved_stack_CFG, "reserved_stack", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_RESERVED_STACK, vsn(1, 0, 0), NULL, 0, NULL,
"Stack size in KiB to reserve for use while devices are suspended.\n"
- "Insufficent reserve risks I/O deadlock during device suspension.\n")
+ "Insufficient reserve risks I/O deadlock during device suspension.\n")
cfg(activation_reserved_memory_CFG, "reserved_memory", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_RESERVED_MEMORY, vsn(1, 0, 0), NULL, 0, NULL,
"Memory size in KiB to reserve for use while devices are suspended.\n"
- "Insufficent reserve risks I/O deadlock during device suspension.\n")
+ "Insufficient reserve risks I/O deadlock during device suspension.\n")
cfg(activation_process_priority_CFG, "process_priority", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_PROCESS_PRIORITY, vsn(1, 0, 0), NULL, 0, NULL,
"Nice value used while devices are suspended.\n"
@@ -1512,7 +1512,7 @@ cfg(activation_raid_fault_policy_CFG, "raid_fault_policy", activation_CFG_SECTIO
"This includes LVs that have the following segment types:\n"
"raid1, raid4, raid5*, and raid6*.\n"
"If a device in the LV fails, the policy determines the steps\n"
- "performed by dmeventd automatically, and the steps perfomed by the\n"
+ "performed by dmeventd automatically, and the steps performed by the\n"
"manual command lvconvert --repair --use-policies.\n"
"Automatic handling requires dmeventd to be monitoring the LV.\n"
"#\n"
@@ -1534,7 +1534,7 @@ cfg_runtime(activation_mirror_image_fault_policy_CFG, "mirror_image_fault_policy
"(copies) and a mirror log. A disk log ensures that a mirror LV does\n"
"not need to be re-synced (all copies made the same) every time a\n"
"machine reboots or crashes. If a device in the LV fails, this policy\n"
- "determines the steps perfomed by dmeventd automatically, and the steps\n"
+ "determines the steps performed by dmeventd automatically, and the steps\n"
"performed by the manual command lvconvert --repair --use-policies.\n"
"Automatic handling requires dmeventd to be monitoring the LV.\n"
"#\n"
diff --git a/tools/args.h b/tools/args.h
index a7a0dd3d9..5819bb84e 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -507,7 +507,7 @@ arg(mknodes_ARG, '\0', "mknodes", 0, 0, 0,
arg(monitor_ARG, '\0', "monitor", bool_VAL, 0, 0,
"Start (yes) or stop (no) monitoring an LV with dmeventd.\n"
"dmeventd monitors kernel events for an LV, and performs\n"
- "automated maintenance for the LV in reponse to specific events.\n"
+ "automated maintenance for the LV in response to specific events.\n"
"See \\fBdmeventd\\fP(8) for more information.\n")
arg(nameprefixes_ARG, '\0', "nameprefixes", 0, 0, 0,
3 months, 4 weeks