mirror of
git://sourceware.org/git/lvm2.git
synced 2025-10-07 15:33:21 +03:00
tests: support thin_restore configurable
Currently this tool is used only in tests.
This commit is contained in:
126
configure
vendored
126
configure
vendored
@@ -767,6 +767,7 @@ PKGCONFIGINIT_CFLAGS
|
||||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG
|
||||
THIN_RESTORE_CMD
|
||||
THIN_REPAIR_CMD
|
||||
THIN_DUMP_CMD
|
||||
THIN_CHECK_CMD
|
||||
@@ -869,6 +870,7 @@ with_thin
|
||||
with_thin_check
|
||||
with_thin_dump
|
||||
with_thin_repair
|
||||
with_thin_restore
|
||||
enable_thin_check_needs_check
|
||||
with_cache
|
||||
enable_readline
|
||||
@@ -1655,6 +1657,8 @@ Optional Packages:
|
||||
--with-thin-check=PATH thin_check tool: [[autodetect]]
|
||||
--with-thin-dump=PATH thin_dump tool: [[autodetect]]
|
||||
--with-thin-repair=PATH thin_repair tool: [[autodetect]]
|
||||
--with-thin-restore=PATH
|
||||
thin_restore tool: [[autodetect]]
|
||||
--with-cache=TYPE cache support: internal/shared/none [[TYPE=none]]
|
||||
--with-ocfdir=DIR install OCF files in DIR
|
||||
[[PREFIX/lib/ocf/resource.d/lvm2]]
|
||||
@@ -7197,6 +7201,14 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-thin-restore was given.
|
||||
if test "${with_thin_restore+set}" = set; then :
|
||||
withval=$with_thin_restore; THIN_RESTORE_CMD=$withval
|
||||
else
|
||||
THIN_RESTORE_CMD="autodetect"
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $THIN" >&5
|
||||
$as_echo "$THIN" >&6; }
|
||||
|
||||
@@ -7558,6 +7570,113 @@ $as_echo "$as_me: WARNING: thin_repair not found in path $PATH" >&2;}
|
||||
THIN_CONFIGURE_WARN=y
|
||||
}
|
||||
fi
|
||||
# Empty means a config way to ignore thin checking
|
||||
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
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_THIN_RESTORE_CMD+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $THIN_RESTORE_CMD in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_THIN_RESTORE_CMD="$THIN_RESTORE_CMD" # 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
|
||||
test -z "$as_dir" && as_dir=.
|
||||
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_THIN_RESTORE_CMD="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$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
|
||||
THIN_RESTORE_CMD=$ac_cv_path_THIN_RESTORE_CMD
|
||||
if test -n "$THIN_RESTORE_CMD"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $THIN_RESTORE_CMD" >&5
|
||||
$as_echo "$THIN_RESTORE_CMD" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_path_THIN_RESTORE_CMD"; then
|
||||
ac_pt_THIN_RESTORE_CMD=$THIN_RESTORE_CMD
|
||||
# Extract the first word of "thin_restore", so it can be a program name with args.
|
||||
set dummy thin_restore; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_ac_pt_THIN_RESTORE_CMD+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $ac_pt_THIN_RESTORE_CMD in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_ac_pt_THIN_RESTORE_CMD="$ac_pt_THIN_RESTORE_CMD" # 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
|
||||
test -z "$as_dir" && as_dir=.
|
||||
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_ac_pt_THIN_RESTORE_CMD="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$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
|
||||
ac_pt_THIN_RESTORE_CMD=$ac_cv_path_ac_pt_THIN_RESTORE_CMD
|
||||
if test -n "$ac_pt_THIN_RESTORE_CMD"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_THIN_RESTORE_CMD" >&5
|
||||
$as_echo "$ac_pt_THIN_RESTORE_CMD" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_pt_THIN_RESTORE_CMD" = x; then
|
||||
THIN_RESTORE_CMD=""
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
THIN_RESTORE_CMD=$ac_pt_THIN_RESTORE_CMD
|
||||
fi
|
||||
else
|
||||
THIN_RESTORE_CMD="$ac_cv_path_THIN_RESTORE_CMD"
|
||||
fi
|
||||
|
||||
test -z "$THIN_RESTORE_CMD" && {
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thin_restore not found in path $PATH" >&5
|
||||
$as_echo "$as_me: WARNING: thin_restore not found in path $PATH" >&2;}
|
||||
THIN_RESTORE_CMD=/usr/sbin/thin_restore
|
||||
THIN_CONFIGURE_WARN=y
|
||||
}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -7589,6 +7708,12 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define THIN_RESTORE_CMD "$THIN_RESTORE_CMD"
|
||||
_ACEOF
|
||||
|
||||
|
||||
################################################################################
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include cache" >&5
|
||||
$as_echo_n "checking whether to include cache... " >&6; }
|
||||
@@ -11527,6 +11652,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
|
Reference in New Issue
Block a user