From ecb8f6ed3cce6c07afeeb438bbcbef9f226d3a1b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 19 Oct 2012 01:49:11 -0400 Subject: [PATCH] clean up io-failure-emulation logic a bit Use standard autoconf macros rather than open coding the logic. Signed-off-by: Mike Frysinger Signed-off-by: Jeff Mahoney --- configure.ac | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 8f280a6..14d7563 100644 --- a/configure.ac +++ b/configure.ac @@ -98,12 +98,11 @@ fi dnl Never enable this. It is for debugging only AC_ARG_ENABLE(io-failure-emulation, -[ --enable-io-failure-emulation Never use that. It is for debugging only], -[ if test "$enableval" = "yes" ; then - echo -e "\nCarefull! IO failure emulation is ON\n" - AC_DEFINE(IO_FAILURE_EMULATION, 1, [gets set when configure --enable-io-failure-emulation]) - fi -]) + [AS_HELP_STRING([--enable-io-failure-emulation], [Never use this. It is for debugging only])]) +if test "$enable_io_failure_emulation" = "yes" ; then + AC_MSG_WARN([Careful! IO failure emulation is ON]) + AC_DEFINE(IO_FAILURE_EMULATION, 1, [gets set when configure --enable-io-failure-emulation]) +fi if test "x$ac_cv_wno_unused_parameter_flag" = xyes; then CFLAGS="$CFLAGS -Wno-unused-parameter"