Simplification to the CRIU configure.m4 script:
* Remove redundant/unnecessary uses of $2 * Change a bunch of logic from negative to positive * Use OPAL_VAR_SCOPE_PUSH/POP to help reduce env var usage * Only use "" in test statements with strings that require sanitization * Removed redundant AC_MSG_WARN/ERROR. There's now only one check at the bottom for whether the component is "good" or not. We'll AC_MSG_WARN/ERROR in that one location. Thanks to Jeff Squyres for this patch. This commit was SVN r30739.
Этот коммит содержится в:
родитель
7c1802e933
Коммит
14ba81d166
@ -8,7 +8,7 @@
|
|||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# Copyright (c) 2004-2006 The Regents of the University of California.
|
# Copyright (c) 2004-2006 The Regents of the University of California.
|
||||||
# All rights reserved.
|
# 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) 2011 Oak Ridge National Labs. All rights reserved.
|
||||||
# Copyright (c) 2014 Hochschule Esslingen. 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])
|
# MCA_crs_criu_CONFIG([action-if-found], [action-if-not-found])
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
AC_DEFUN([MCA_opal_crs_criu_CONFIG],[
|
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_CONFIG_FILES([opal/mca/crs/criu/Makefile])
|
||||||
|
|
||||||
AC_ARG_WITH([criu],
|
AC_ARG_WITH([criu],
|
||||||
@ -33,26 +34,10 @@ AC_DEFUN([MCA_opal_crs_criu_CONFIG],[
|
|||||||
[Search for CRIU libraries in DIR])])
|
[Search for CRIU libraries in DIR])])
|
||||||
OMPI_CHECK_WITHDIR([criu-libdir], [$with_criu_libdir], [libcriu.*])
|
OMPI_CHECK_WITHDIR([criu-libdir], [$with_criu_libdir], [libcriu.*])
|
||||||
|
|
||||||
check_crs_criu_good="no"
|
# 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"],
|
||||||
# If we do not want FT, don't compile this component
|
[check_crs_criu_good=yes],
|
||||||
#
|
[check_crs_criu_good=no])
|
||||||
# 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"])
|
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
check_crs_criu_dir_msg="compiler default"
|
check_crs_criu_dir_msg="compiler default"
|
||||||
@ -61,7 +46,7 @@ AC_DEFUN([MCA_opal_crs_criu_CONFIG],[
|
|||||||
check_crs_criu_libdir=""
|
check_crs_criu_libdir=""
|
||||||
|
|
||||||
# Determine the search paths for the headers and libraries
|
# 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"],
|
[AS_IF([test ! -z "$with_criu" -a "$with_criu" != "yes"],
|
||||||
[check_crs_criu_dir="$with_criu"
|
[check_crs_criu_dir="$with_criu"
|
||||||
check_crs_criu_dir_msg="$with_criu (from --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)"])
|
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_CHECKING([for CRIU dir])
|
||||||
AC_MSG_RESULT([$check_crs_criu_dir_msg])
|
AC_MSG_RESULT([$check_crs_criu_dir_msg])
|
||||||
AC_MSG_CHECKING([for CRIU library dir])
|
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_LDFLAGS="$LDFLAGS $crs_criu_check_LDFLAGS"
|
||||||
crs_criu_LIBS="$LIBS $crs_criu_check_LIBS"
|
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_CFLAGS])
|
||||||
AC_SUBST([crs_criu_CPPFLAGS])
|
AC_SUBST([crs_criu_CPPFLAGS])
|
||||||
AC_SUBST([crs_criu_LDFLAGS])
|
AC_SUBST([crs_criu_LDFLAGS])
|
||||||
AC_SUBST([crs_criu_LIBS])
|
AC_SUBST([crs_criu_LIBS])
|
||||||
$1],
|
$1],
|
||||||
[AS_IF([test ! -z "$with_criu" -a "$with_criu" != "no"],
|
[AS_IF([test ! -z "$with_criu" && test "$with_criu" != "no"],
|
||||||
[AC_MSG_WARN([CRIU support requested but not found. Perhaps you need to specify the location of the CRIU libraries.])
|
[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.])])
|
AC_MSG_ERROR([Aborting.])])
|
||||||
$2])
|
$2])
|
||||||
|
|
||||||
|
OPAL_VAR_SCOPE_POP
|
||||||
])dnl
|
])dnl
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user