diff --git a/opal/mca/crs/criu/configure.m4 b/opal/mca/crs/criu/configure.m4 index a37b5e4e83..9b7dcbc594 100644 --- a/opal/mca/crs/criu/configure.m4 +++ b/opal/mca/crs/criu/configure.m4 @@ -8,7 +8,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. # Copyright (c) 2014 Hochschule Esslingen. All rights reserved. # @@ -22,6 +22,7 @@ # MCA_crs_criu_CONFIG([action-if-found], [action-if-not-found]) # ----------------------------------------------------------- AC_DEFUN([MCA_opal_crs_criu_CONFIG],[ + OPAL_VAR_SCOPE_PUSH([check_crs_criu_good check_crs_criu_dir_msg check_crs_criu_libdir_msg check_crs_criu_dir check_crs_criu_libdir]) AC_CONFIG_FILES([opal/mca/crs/criu/Makefile]) AC_ARG_WITH([criu], @@ -33,26 +34,10 @@ AC_DEFUN([MCA_opal_crs_criu_CONFIG],[ [Search for CRIU libraries in DIR])]) OMPI_CHECK_WITHDIR([criu-libdir], [$with_criu_libdir], [libcriu.*]) - check_crs_criu_good="no" - - # If we do not want FT, don't compile this component - # - # If we wanted CRIU, but did not specify the FT option, - # error out with a warning for the user - AS_IF([test "$opal_want_ft_cr" = "0"], - [$2 - check_crs_criu_good="no" - AS_IF([test ! -z "$with_criu" -a "$with_criu" != "no"], - [AC_MSG_WARN([CRIU support requested, but FT support not requested. You need to specify the --with-ft=cr configure option.]) - AC_MSG_ERROR([Aborting.])]) - ], - [check_crs_criu_good="yes"]) - - # If we do not want CRIU, then do not compile it - AS_IF([test "$with_criu" = "no" -o "$check_crs_criu_good" = "no"], - [$2 - check_crs_criu_good="no"], - [check_crs_criu_good="yes"]) + # If we do not want FT or CRIU, don't compile this component + AS_IF([test "$opal_want_ft_cr" = "1" && test "$with_criu" = "yes"], + [check_crs_criu_good=yes], + [check_crs_criu_good=no]) # Defaults check_crs_criu_dir_msg="compiler default" @@ -61,7 +46,7 @@ AC_DEFUN([MCA_opal_crs_criu_CONFIG],[ check_crs_criu_libdir="" # Determine the search paths for the headers and libraries - AS_IF([test "$check_crs_criu_good" != "yes"], [$2], + AS_IF([test $check_crs_criu_good = yes], [AS_IF([test ! -z "$with_criu" -a "$with_criu" != "yes"], [check_crs_criu_dir="$with_criu" check_crs_criu_dir_msg="$with_criu (from --with-criu)"]) @@ -70,7 +55,7 @@ AC_DEFUN([MCA_opal_crs_criu_CONFIG],[ check_crs_criu_libdir_msg="$with_criu_libdir (from --with-criu-libdir)"]) ]) - AS_IF([test "$check_crs_criu_good" != "yes"], [$2], + AS_IF([test $check_crs_criu_good = yes], [AC_MSG_CHECKING([for CRIU dir]) AC_MSG_RESULT([$check_crs_criu_dir_msg]) AC_MSG_CHECKING([for CRIU library dir]) @@ -91,15 +76,16 @@ AC_DEFUN([MCA_opal_crs_criu_CONFIG],[ crs_criu_LDFLAGS="$LDFLAGS $crs_criu_check_LDFLAGS" crs_criu_LIBS="$LIBS $crs_criu_check_LIBS" - AS_IF([test "$check_crs_criu_good" = "yes"], + AS_IF([test $check_crs_criu_good = yes], [ AC_SUBST([crs_criu_CFLAGS]) AC_SUBST([crs_criu_CPPFLAGS]) AC_SUBST([crs_criu_LDFLAGS]) AC_SUBST([crs_criu_LIBS]) $1], - [AS_IF([test ! -z "$with_criu" -a "$with_criu" != "no"], - [AC_MSG_WARN([CRIU support requested but not found. Perhaps you need to specify the location of the CRIU libraries.]) + [AS_IF([test ! -z "$with_criu" && test "$with_criu" != "no"], + [AC_MSG_WARN([CRIU support requested but not found. Perhaps you need to enable FT support, or specify the location of the CRIU libraries...?]) AC_MSG_ERROR([Aborting.])]) $2]) + OPAL_VAR_SCOPE_POP ])dnl