1
1

Clean up variables used in configure with OPAL_VAR_SCOPE.

This is helpful in the work for #3694: ensure that many places that
eventually end up in configure don't overly-pollute the global shell
variable space (because debugging accidental shell variable pollution
can be a real pain).

Refs trac:3694

This commit was SVN r29830.

The following Trac tickets were found above:
  Ticket 3694 --> https://svn.open-mpi.org/trac/ompi/ticket/3694
Этот коммит содержится в:
Jeff Squyres 2013-12-06 23:40:34 +00:00
родитель bb6908c9f0
Коммит 3bd9c603ff
15 изменённых файлов: 58 добавлений и 19 удалений

Просмотреть файл

@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved. dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved. dnl All rights reserved.
dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
dnl dnl
dnl Additional copyrights may follow dnl Additional copyrights may follow
@ -26,6 +26,7 @@ dnl
# in LIBS) then lib is added to LIBS. If func is not in lib, then # in LIBS) then lib is added to LIBS. If func is not in lib, then
# LIBS is not modified. # LIBS is not modified.
AC_DEFUN([OMPI_CHECK_FUNC_LIB],[ AC_DEFUN([OMPI_CHECK_FUNC_LIB],[
OPAL_VAR_SCOPE_PUSH([LIBS_save])
AS_VAR_PUSHDEF([ompi_var], [ompi_cv_func_lib_$1_$2])dnl AS_VAR_PUSHDEF([ompi_var], [ompi_cv_func_lib_$1_$2])dnl
AC_CACHE_CHECK([if we need -l$2 for $1], AC_CACHE_CHECK([if we need -l$2 for $1],
ompi_var, ompi_var,
@ -45,4 +46,5 @@ AC_DEFUN([OMPI_CHECK_FUNC_LIB],[
# so will check in -l$2 if we decided we needed it above # so will check in -l$2 if we decided we needed it above
AC_CHECK_FUNCS([$1], $3, $4) AC_CHECK_FUNCS([$1], $3, $4)
AS_VAR_POPDEF([ompi_var])dnl AS_VAR_POPDEF([ompi_var])dnl
OPAL_VAR_SCOPE_POP
]) ])

Просмотреть файл

@ -2,6 +2,7 @@
# #
# Copyright (c) 2011 Mellanox Technologies. All rights reserved. # Copyright (c) 2011 Mellanox Technologies. All rights reserved.
# Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
# Additional copyrights may follow # Additional copyrights may follow
@ -15,6 +16,8 @@
# LDFLAGS, LIBS} as needed and runs action-if-found if there is # LDFLAGS, LIBS} as needed and runs action-if-found if there is
# support, otherwise executes action-if-not-found # support, otherwise executes action-if-not-found
AC_DEFUN([OMPI_CHECK_FCA],[ AC_DEFUN([OMPI_CHECK_FCA],[
OPAL_VAR_SCOPE_PUSH([ompi_check_fca_dir ompi_check_fca_libdir ompi_check_fca_incdir ompi_check_fca_libs ompi_check_fca_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
AC_ARG_WITH([fca], AC_ARG_WITH([fca],
[AC_HELP_STRING([--with-fca(=DIR)], [AC_HELP_STRING([--with-fca(=DIR)],
[Build fca (Mellanox Fabric Collective Accelerator) support, searching for libraries in DIR])]) [Build fca (Mellanox Fabric Collective Accelerator) support, searching for libraries in DIR])])
@ -61,5 +64,7 @@ AC_DEFUN([OMPI_CHECK_FCA],[
[AS_IF([test ! -z "$with_fca" -a "$with_fca" != "no"], [AS_IF([test ! -z "$with_fca" -a "$with_fca" != "no"],
[AC_MSG_ERROR([FCA support requested but not found. Aborting])]) [AC_MSG_ERROR([FCA support requested but not found. Aborting])])
$3]) $3])
OPAL_VAR_SCOPE_POP
]) ])

Просмотреть файл

@ -2,6 +2,7 @@
# #
# Copyright (c) 2011 Mellanox Technologies. All rights reserved. # Copyright (c) 2011 Mellanox Technologies. All rights reserved.
# Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
# Additional copyrights may follow # Additional copyrights may follow
@ -15,6 +16,8 @@
# LDFLAGS, LIBS} as needed and runs action-if-found if there is # LDFLAGS, LIBS} as needed and runs action-if-found if there is
# support, otherwise executes action-if-not-found # support, otherwise executes action-if-not-found
AC_DEFUN([OMPI_CHECK_HCOLL],[ AC_DEFUN([OMPI_CHECK_HCOLL],[
OPAL_VAR_SCOPE_PUSH([ompi_check_hcoll_dir ompi_hcoll_libdir ompi_check_hcoll_incdir ompi_check_hcoll_libs ompi_check_hcoll_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
AC_ARG_WITH([hcoll], AC_ARG_WITH([hcoll],
[AC_HELP_STRING([--with-hcoll(=DIR)], [AC_HELP_STRING([--with-hcoll(=DIR)],
[Build hcoll (Mellanox Hierarchical Collectives) support, searching for libraries in DIR])]) [Build hcoll (Mellanox Hierarchical Collectives) support, searching for libraries in DIR])])
@ -63,5 +66,7 @@ AC_DEFUN([OMPI_CHECK_HCOLL],[
[AS_IF([test ! -z "$with_hcoll" -a "$with_hcoll" != "no"], [AS_IF([test ! -z "$with_hcoll" -a "$with_hcoll" != "no"],
[AC_MSG_ERROR([HCOLL support requested but not found. Aborting])]) [AC_MSG_ERROR([HCOLL support requested but not found. Aborting])])
$3]) $3])
OPAL_VAR_SCOPE_POP
]) ])

Просмотреть файл

@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved. dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved. dnl All rights reserved.
dnl Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
dnl dnl
@ -23,7 +23,6 @@ dnl
# ---------------------------------------------------- # ----------------------------------------------------
AC_DEFUN([OMPI_FORTRAN_CHECK_REAL16_C_EQUIV],[ AC_DEFUN([OMPI_FORTRAN_CHECK_REAL16_C_EQUIV],[
unset happy unset happy
unset CFLAGS_save
OPAL_VAR_SCOPE_PUSH([happy define_value msg CFLAGS_save]) OPAL_VAR_SCOPE_PUSH([happy define_value msg CFLAGS_save])
AS_VAR_PUSHDEF([real16_matches_c_var], [ompi_cv_real16_c_equiv]) AS_VAR_PUSHDEF([real16_matches_c_var], [ompi_cv_real16_c_equiv])

Просмотреть файл

@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved. dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved. dnl All rights reserved.
dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2010-2013 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
dnl dnl
dnl Additional copyrights may follow dnl Additional copyrights may follow
@ -164,6 +164,7 @@ AS_IF([test "x$enable_wrapper_rpath" = "xyes"],
# ld-specific option). These flags are more social than # ld-specific option). These flags are more social than
# DT_RPATH -- they can be overridden by LD_LIBRARY_PATH (where # DT_RPATH -- they can be overridden by LD_LIBRARY_PATH (where
# a regular DT_RPATH cannot). # a regular DT_RPATH cannot).
OPAL_VAR_SCOPE_PUSH([LDFLAGS_save])
AC_MSG_CHECKING([if linker supports RUNPATH (vs. RPATH)]) AC_MSG_CHECKING([if linker supports RUNPATH (vs. RPATH)])
LDFLAGS_save=$LDFLAGS LDFLAGS_save=$LDFLAGS
LDFLAGS="$LDFLAGS $rpath_args -Wl,--enable-new-dtags" LDFLAGS="$LDFLAGS $rpath_args -Wl,--enable-new-dtags"
@ -176,5 +177,6 @@ AS_IF([test "x$enable_wrapper_rpath" = "xyes"],
AC_LANG_POP([C]) AC_LANG_POP([C])
LDFLAGS=$LDFLAGS_save LDFLAGS=$LDFLAGS_save
AC_MSG_RESULT([$msg]) AC_MSG_RESULT([$msg])
OPAL_VAR_SCOPE_POP
]) ])
])dnl ])dnl

Просмотреть файл

@ -13,7 +13,7 @@ dnl All rights reserved.
dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights
dnl reserved. dnl reserved.
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
dnl dnl
dnl Additional copyrights may follow dnl Additional copyrights may follow
@ -50,7 +50,7 @@ AC_DEFUN_ONCE([_OMPI_SETUP_FC_COMPILER],[
# General Fortran compiler setup # General Fortran compiler setup
AC_DEFUN([OMPI_SETUP_FC],[ AC_DEFUN([OMPI_SETUP_FC],[
OPAL_VAR_SCOPE_PUSH([ompi_fc_happy]) OPAL_VAR_SCOPE_PUSH([ompi_fc_happy LDFLAGS_save fc_version])
# Force the intro banner to be displayed first # Force the intro banner to be displayed first
AC_REQUIRE([_OMPI_SETUP_FC_BANNER]) AC_REQUIRE([_OMPI_SETUP_FC_BANNER])

Просмотреть файл

@ -9,7 +9,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved. dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved. dnl All rights reserved.
dnl Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
dnl dnl
dnl Additional copyrights may follow dnl Additional copyrights may follow
@ -32,6 +32,8 @@ AC_DEFUN([OPAL_CHECK_PTHREAD_PIDS],[
# #
AC_MSG_CHECKING([if threads have different pids (pthreads on linux)]) AC_MSG_CHECKING([if threads have different pids (pthreads on linux)])
OPAL_VAR_SCOPE_PUSH([CFLAGS_save CPPFLAGS_save LDFLAGS_save LIBS_save MSG])
CFLAGS_save="$CFLAGS" CFLAGS_save="$CFLAGS"
CFLAGS="$CFLAGS $THREAD_CFLAGS" CFLAGS="$CFLAGS $THREAD_CFLAGS"
CPPFLAGS_save="$CPPFLAGS" CPPFLAGS_save="$CPPFLAGS"
@ -107,4 +109,4 @@ AS_IF([test "$OPAL_THREADS_HAVE_DIFFERENT_PIDS" = "1"],
# if pthreads is not available, then the system does not have an insane threads # if pthreads is not available, then the system does not have an insane threads
# model # model
# #
unset MSG])dnl OPAL_VAR_SCOPE_POP])dnl

Просмотреть файл

@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2006 The Regents of the University of California. dnl Copyright (c) 2004-2006 The Regents of the University of California.
dnl All rights reserved. dnl All rights reserved.
dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2012 Los Alamos National Security, LLC. All rights dnl Copyright (c) 2012 Los Alamos National Security, LLC. All rights
dnl reserved. dnl reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
@ -337,6 +337,7 @@ AC_DEFUN([_OMPI_PROG_CC],[
# #
# Check for the compiler # Check for the compiler
# #
OPAL_VAR_SCOPE_PUSH([ompi_cflags_save dummy ompi_cc_arvgv0])
ompi_cflags_save="$CFLAGS" ompi_cflags_save="$CFLAGS"
AC_PROG_CC AC_PROG_CC
BASECC="`basename $CC`" BASECC="`basename $CC`"
@ -346,4 +347,5 @@ AC_DEFUN([_OMPI_PROG_CC],[
ompi_cc_argv0=[$]2 ompi_cc_argv0=[$]2
OPAL_WHICH([$ompi_cc_argv0], [OPAL_CC_ABSOLUTE]) OPAL_WHICH([$ompi_cc_argv0], [OPAL_CC_ABSOLUTE])
AC_SUBST(OPAL_CC_ABSOLUTE) AC_SUBST(OPAL_CC_ABSOLUTE)
OPAL_VAR_SCOPE_POP
]) ])

Просмотреть файл

@ -34,6 +34,7 @@ AC_DEFUN([OPAL_SETUP_JAVA_BANNER],[
AC_DEFUN([OPAL_SETUP_JAVA],[ AC_DEFUN([OPAL_SETUP_JAVA],[
AC_REQUIRE([OPAL_SETUP_JAVA_BANNER]) AC_REQUIRE([OPAL_SETUP_JAVA_BANNER])
OPAL_VAR_SCOPE_PUSH([orte_java_happy bad found dir jnih PATH_save CPPFLAGS_save])
AC_ARG_ENABLE(java, AC_ARG_ENABLE(java,
AC_HELP_STRING([--enable-java], AC_HELP_STRING([--enable-java],
[Enable Java-based support in the system - use this option to disable all Java-based compiler tests (default: enabled)])) [Enable Java-based support in the system - use this option to disable all Java-based compiler tests (default: enabled)]))
@ -202,5 +203,5 @@ AC_DEFUN([OPAL_SETUP_JAVA],[
AC_DEFINE_UNQUOTED([OPAL_HAVE_JAVA_SUPPORT], [$HAVE_JAVA_SUPPORT], [do we have Java support]) AC_DEFINE_UNQUOTED([OPAL_HAVE_JAVA_SUPPORT], [$HAVE_JAVA_SUPPORT], [do we have Java support])
AM_CONDITIONAL(OPAL_HAVE_JAVA_SUPPORT, test "$opal_java_happy" = "yes") AM_CONDITIONAL(OPAL_HAVE_JAVA_SUPPORT, test "$opal_java_happy" = "yes")
OPAL_VAR_SCOPE_POP
]) ])

Просмотреть файл

@ -9,7 +9,7 @@ dnl Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved. dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved. dnl All rights reserved.
dnl Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights dnl Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
dnl reserved. dnl reserved.
@ -145,6 +145,8 @@ AC_DEFUN([OPAL_SETUP_LIBLTDL],[
# Setup to build the internal copy of libltdl # Setup to build the internal copy of libltdl
# #
AC_DEFUN([_OPAL_SETUP_LIBLTDL_INTERNAL],[ AC_DEFUN([_OPAL_SETUP_LIBLTDL_INTERNAL],[
OPAL_VAR_SCOPE_PUSH([CFLAGS_save CPPFLAGS_save])
ompi_subdir_args="$ompi_subdir_args --enable-ltdl-convenience --disable-ltdl-install" ompi_subdir_args="$ompi_subdir_args --enable-ltdl-convenience --disable-ltdl-install"
if test "$enable_shared" = "yes"; then if test "$enable_shared" = "yes"; then
ompi_subdir_args="$ompi_subdir_args --enable-shared" ompi_subdir_args="$ompi_subdir_args --enable-shared"
@ -192,4 +194,6 @@ AC_DEFUN([_OPAL_SETUP_LIBLTDL_INTERNAL],[
AC_MSG_ERROR([Cannot continue]) AC_MSG_ERROR([Cannot continue])
fi fi
CFLAGS="$CFLAGS_save" CFLAGS="$CFLAGS_save"
OPAL_VAR_SCOPE_POP
])dnl ])dnl

Просмотреть файл

@ -10,7 +10,7 @@
# University of Stuttgart. All rights reserved. # University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California. # Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved. # All rights reserved.
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2006-2013 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
# Additional copyrights may follow # Additional copyrights may follow
@ -21,6 +21,7 @@
# ORTE_CHECK_TM_LIBS_FLAGS(prefix, [LIBS or LDFLAGS]) # ORTE_CHECK_TM_LIBS_FLAGS(prefix, [LIBS or LDFLAGS])
# --------------------------------------------------- # ---------------------------------------------------
AC_DEFUN([ORTE_CHECK_TM_LIBS_FLAGS],[ AC_DEFUN([ORTE_CHECK_TM_LIBS_FLAGS],[
OPAL_VAR_SCOPE_PUSH([orte_check_tm_flags])
orte_check_tm_flags=`$orte_check_tm_pbs_config --libs` orte_check_tm_flags=`$orte_check_tm_pbs_config --libs`
for orte_check_tm_val in $orte_check_tm_flags; do for orte_check_tm_val in $orte_check_tm_flags; do
if test "`echo $orte_check_tm_val | cut -c1-2`" = "-l"; then if test "`echo $orte_check_tm_val | cut -c1-2`" = "-l"; then
@ -33,12 +34,14 @@ AC_DEFUN([ORTE_CHECK_TM_LIBS_FLAGS],[
fi fi
fi fi
done done
OPAL_VAR_SCOPE_POP
]) ])
# ORTE_CHECK_TM(prefix, [action-if-found], [action-if-not-found]) # ORTE_CHECK_TM(prefix, [action-if-found], [action-if-not-found])
# -------------------------------------------------------- # --------------------------------------------------------
AC_DEFUN([ORTE_CHECK_TM],[ AC_DEFUN([ORTE_CHECK_TM],[
OPAL_VAR_SCOPE_PUSH([orte_check_tm_found orte_check_tm_happy orte_check_tm_dir orte_check_tm_pbs_config LDFLAGS_save CPPFLAGS_save LIBS_save])
AC_ARG_WITH([tm], AC_ARG_WITH([tm],
[AC_HELP_STRING([--with-tm(=DIR)], [AC_HELP_STRING([--with-tm(=DIR)],
[Build TM (Torque, PBSPro, and compatible) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) [Build TM (Torque, PBSPro, and compatible) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
@ -142,4 +145,6 @@ AC_DEFUN([ORTE_CHECK_TM],[
[AS_IF([test ! -z "$with_tm" -a "$with_tm" != "no"], [AS_IF([test ! -z "$with_tm" -a "$with_tm" != "no"],
[AC_MSG_ERROR([TM support requested but not found. Aborting])]) [AC_MSG_ERROR([TM support requested but not found. Aborting])])
$3]) $3])
OPAL_VAR_SCOPE_POP
]) ])

Просмотреть файл

@ -76,13 +76,14 @@ AS_IF([test "$host" != "$target"],
AC_MSG_WARN([Cross-compiling is only partially supported]) AC_MSG_WARN([Cross-compiling is only partially supported])
AC_MSG_WARN([Proceed at your own risk!])]) AC_MSG_WARN([Proceed at your own risk!])])
# AC_USE_SYSTEM_EXTENSIONS alters CFLAGS (e.g., adds -g -O2) # AC_USE_SYSTEM_EXTENSIONS alters CFLAGS (e.g., adds -g -O2)
OPAL_VAR_SCOPE_PUSH([CFLAGS_save])
CFLAGS_save=$CFLAGS CFLAGS_save=$CFLAGS
AC_USE_SYSTEM_EXTENSIONS AC_USE_SYSTEM_EXTENSIONS
# AC_USE_SYSTEM_EXTENSIONS will modify CFLAGS if nothing was in there # AC_USE_SYSTEM_EXTENSIONS will modify CFLAGS if nothing was in there
# beforehand. We don't want that. So if there was nothing in # beforehand. We don't want that. So if there was nothing in
# CFLAGS, put nothing back in there. # CFLAGS, put nothing back in there.
AS_IF([test -z "$CFLAGS_save"], [CFLAGS=]) AS_IF([test -z "$CFLAGS_save"], [CFLAGS=])
CFLAGS_save= OPAL_VAR_SCOPE_POP
# #
# Init automake # Init automake
@ -455,6 +456,7 @@ OMPI_C_GET_ALIGNMENT(size_t, OPAL_ALIGNMENT_SIZE_T)
# <stdbool.h> or any other help) # <stdbool.h> or any other help)
# #
OPAL_VAR_SCOPE_PUSH([MSG])
AC_MSG_CHECKING(for C bool type) AC_MSG_CHECKING(for C bool type)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_INCLUDES_DEFAULT], AC_INCLUDES_DEFAULT],
@ -464,11 +466,13 @@ AC_DEFINE_UNQUOTED(OPAL_NEED_C_BOOL, $OPAL_NEED_C_BOOL,
[Whether the C compiler supports "bool" without any other help (such as <stdbool.h>)]) [Whether the C compiler supports "bool" without any other help (such as <stdbool.h>)])
AC_MSG_RESULT([$MSG]) AC_MSG_RESULT([$MSG])
AC_CHECK_SIZEOF(_Bool) AC_CHECK_SIZEOF(_Bool)
OPAL_VAR_SCOPE_POP
# #
# Check for other compiler characteristics # Check for other compiler characteristics
# #
OPAL_VAR_SCOPE_PUSH([CFLAGS_save])
if test "$GCC" = "yes"; then if test "$GCC" = "yes"; then
# gcc 2.96 will emit oodles of warnings if you use "inline" with # gcc 2.96 will emit oodles of warnings if you use "inline" with
@ -487,7 +491,7 @@ if test "$GCC" = "yes"; then
# This also works nicely for gcc 3.x because "inline" will work on # This also works nicely for gcc 3.x because "inline" will work on
# the first check, and all is fine. :-) # the first check, and all is fine. :-)
CFLAGS_save="$CFLAGS" CFLAGS_save=$CFLAGS
CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY -Werror -ansi" CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY -Werror -ansi"
fi fi
AC_C_INLINE AC_C_INLINE
@ -501,8 +505,9 @@ if test "x$ompi_cv_c_compiler_vendor" != "xmicrosoft"; then
fi fi
OMPI_C_WEAK_SYMBOLS OMPI_C_WEAK_SYMBOLS
if test "$GCC" = "yes"; then if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS_save" CFLAGS=$CFLAGS_save
fi fi
OPAL_VAR_SCOPE_POP
if test "x$CC" = "xicc"; then if test "x$CC" = "xicc"; then
OMPI_CHECK_ICC_VARARGS OMPI_CHECK_ICC_VARARGS
@ -653,6 +658,7 @@ AC_CHECK_HEADERS([net/if.h], [], [],
# above). If we do have it, then check to see if it actually works. # above). If we do have it, then check to see if it actually works.
# Define OPAL_USE_STDBOOL_H as approrpaite. # Define OPAL_USE_STDBOOL_H as approrpaite.
AC_CHECK_HEADERS([stdbool.h], [have_stdbool_h=1], [have_stdbool_h=0]) AC_CHECK_HEADERS([stdbool.h], [have_stdbool_h=1], [have_stdbool_h=0])
OPAL_VAR_SCOPE_PUSH([MSG])
AC_MSG_CHECKING([if <stdbool.h> works]) AC_MSG_CHECKING([if <stdbool.h> works])
if test "$have_stdbool_h" = "1"; then if test "$have_stdbool_h" = "1"; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
@ -669,6 +675,7 @@ fi
AC_DEFINE_UNQUOTED(OPAL_USE_STDBOOL_H, $OPAL_USE_STDBOOL_H, AC_DEFINE_UNQUOTED(OPAL_USE_STDBOOL_H, $OPAL_USE_STDBOOL_H,
[Whether to use <stdbool.h> or not]) [Whether to use <stdbool.h> or not])
AC_MSG_RESULT([$MSG]) AC_MSG_RESULT([$MSG])
OPAL_VAR_SCOPE_POP
# checkpoint results # checkpoint results
AC_CACHE_SAVE AC_CACHE_SAVE
@ -703,6 +710,7 @@ AC_CHECK_DECLS([AF_UNSPEC, PF_UNSPEC, AF_INET6, PF_INET6],
#endif]) #endif])
# SA_RESTART in signal.h # SA_RESTART in signal.h
OPAL_VAR_SCOPE_PUSH([MSG])
AC_MSG_CHECKING([if SA_RESTART defined in signal.h]) AC_MSG_CHECKING([if SA_RESTART defined in signal.h])
AC_EGREP_CPP(yes, [ AC_EGREP_CPP(yes, [
#include <signal.h> #include <signal.h>
@ -712,6 +720,7 @@ AC_EGREP_CPP(yes, [
AC_DEFINE_UNQUOTED(OPAL_HAVE_SA_RESTART, $VALUE, AC_DEFINE_UNQUOTED(OPAL_HAVE_SA_RESTART, $VALUE,
[Whether we have SA_RESTART in <signal.h> or not]) [Whether we have SA_RESTART in <signal.h> or not])
AC_MSG_RESULT([$MSG]) AC_MSG_RESULT([$MSG])
OPAL_VAR_SCOPE_POP
AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [ AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [
#include <sys/types.h> #include <sys/types.h>

Просмотреть файл

@ -10,7 +10,7 @@
# University of Stuttgart. All rights reserved. # University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California. # Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved. # All rights reserved.
# Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2007-2013 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008-2011 Mellanox Technologies. All rights reserved. # Copyright (c) 2008-2011 Mellanox Technologies. All rights reserved.
# Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013 NVIDIA Corporation. All rights reserved. # Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
@ -37,7 +37,7 @@ AC_DEFUN([MCA_ompi_btl_openib_POST_CONFIG], [
AC_DEFUN([MCA_ompi_btl_openib_CONFIG],[ AC_DEFUN([MCA_ompi_btl_openib_CONFIG],[
AC_CONFIG_FILES([ompi/mca/btl/openib/Makefile]) AC_CONFIG_FILES([ompi/mca/btl/openib/Makefile])
OPAL_VAR_SCOPE_PUSH([cpcs have_threads]) OPAL_VAR_SCOPE_PUSH([cpcs have_threads LDFLAGS_save LIBS_save])
cpcs="oob" cpcs="oob"
OMPI_CHECK_OPENFABRICS([btl_openib], OMPI_CHECK_OPENFABRICS([btl_openib],

Просмотреть файл

@ -82,6 +82,8 @@ EOF
# [action-if-cant-compile]) # [action-if-cant-compile])
# ------------------------------------------------ # ------------------------------------------------
AC_DEFUN([MCA_opal_event_libevent2021_CONFIG],[ AC_DEFUN([MCA_opal_event_libevent2021_CONFIG],[
OPAL_VAR_SCOPE_PUSH([CFLAGS_save CPPFLAGS_save file event_args libevent_happy])
AC_CONFIG_FILES([opal/mca/event/libevent2021/Makefile]) AC_CONFIG_FILES([opal/mca/event/libevent2021/Makefile])
basedir="opal/mca/event/libevent2021" basedir="opal/mca/event/libevent2021"
@ -178,5 +180,6 @@ AC_DEFUN([MCA_opal_event_libevent2021_CONFIG],[
$1], $1],
[$2 [$2
OPAL_HAVE_WORKING_EVENTOPS=0]) OPAL_HAVE_WORKING_EVENTOPS=0])
unset file
OPAL_VAR_SCOPE_POP
]) ])

Просмотреть файл

@ -67,7 +67,7 @@ AC_DEFUN([MCA_opal_hwloc_hwloc172_CONFIG],[
AC_CONFIG_FILES([opal/mca/hwloc/hwloc172/Makefile]) AC_CONFIG_FILES([opal/mca/hwloc/hwloc172/Makefile])
OPAL_VAR_SCOPE_PUSH([HWLOC_VERSION opal_hwloc_hwloc172_save_CPPFLAGS opal_hwloc_hwloc172_save_LDFLAGS opal_hwloc_hwloc172_save_LIBS opal_hwloc_hwloc172_save_cairo opal_hwloc_hwloc172_save_xml opal_hwloc_hwloc172_basedir opal_hwloc_hwloc172_file opal_hwloc_hwloc172_save_cflags]) OPAL_VAR_SCOPE_PUSH([HWLOC_VERSION opal_hwloc_hwloc172_save_CPPFLAGS opal_hwloc_hwloc172_save_LDFLAGS opal_hwloc_hwloc172_save_LIBS opal_hwloc_hwloc172_save_cairo opal_hwloc_hwloc172_save_xml opal_hwloc_hwloc172_basedir opal_hwloc_hwloc172_file opal_hwloc_hwloc172_save_cflags CPPFLAGS_save])
# default to this component not providing support # default to this component not providing support
opal_hwloc_hwloc172_basedir=opal/mca/hwloc/hwloc172 opal_hwloc_hwloc172_basedir=opal/mca/hwloc/hwloc172