* Remove some extraneous AC_MSG_RESULT's
* Make the results of the top-level configure.ac test for _SC_NPROCESSORS_ONLN be cached so that we can check for it elsewhere (e.g., opal/mca/paffinity/posix/configure.m4) * Update top-level configure.ac test for _SC_NPROCESSORS_ONLN: stamp out another AC_TRY_COMPILE * Ensure paffinity:posix doesn't even try to compile if we don't have _SC_NPROCESSORS_ONLN * Minor style updates This commit was SVN r19118.
Этот коммит содержится в:
родитель
e1501f2c9c
Коммит
1a3045ff81
10
configure.ac
10
configure.ac
@ -879,10 +879,12 @@ AC_DEFINE_UNQUOTED(OMPI_OFFSET_DATATYPE, $MPI_OFFSET_DATATYPE, [MPI datatype cor
|
||||
# sysconf(), but does not have _SC_NPROCESSORS_ONLN. Doh!
|
||||
|
||||
AC_MSG_CHECKING([for _SC_NPROCESSORS_ONLN])
|
||||
AC_TRY_COMPILE([#include <unistd.h>],
|
||||
[(void)sysconf(_SC_NPROCESSORS_ONLN);],
|
||||
[MSG=yes VALUE=1], [MSG=no VALUE=0])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE__SC_NPROCESSORS_ONLN, $VALUE,
|
||||
AC_COMPILE_IFELSE(AC_LANG_SOURCE([[#include <unistd.h>
|
||||
]],[[int i = _SN_NPROCESSORS_ONLN;]]),
|
||||
[MSG=yes OMPI_HAVE__SC_NPROCESSORS_ONLN=1],
|
||||
[MSG=no OMPI_HAVE__SC_NPROCESSORS_ONLN=0])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE__SC_NPROCESSORS_ONLN,
|
||||
$OMPI_HAVE__SC_NPROCESSORS_ONLN,
|
||||
[Whether we have the _SC_NPROCESSORS_ONLN])
|
||||
AC_MSG_RESULT([$MSG])
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2007 Cisco, Inc. All rights reserved.
|
||||
# Copyright (c) 2007-2008 Cisco, Inc. All rights reserved.
|
||||
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
@ -22,18 +22,12 @@
|
||||
# MCA_paffinity_darwin_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
AC_DEFUN([MCA_paffinity_darwin_CONFIG],[
|
||||
OMPI_VAR_SCOPE_PUSH([happy])
|
||||
# check to see if we have <mach/mach_host.h>
|
||||
# as this is a Darwin-specific thing
|
||||
AC_CHECK_HEADER([mach/mach_host.h], [happy=yes], [happy=no])
|
||||
|
||||
if test "$happy" = "yes"; then
|
||||
AC_MSG_RESULT([$happy ])
|
||||
fi
|
||||
|
||||
if test "$happy" = "yes"; then
|
||||
$1
|
||||
else
|
||||
$2
|
||||
fi
|
||||
AS_IF([test "$happy" = "yes"], [$1], [$2])
|
||||
OMPI_VAR_SCOPE_POP
|
||||
])dnl
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2007 Cisco, Inc. All rights reserved.
|
||||
# Copyright (c) 2007-2008 Cisco, Inc. All rights reserved.
|
||||
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
@ -22,17 +22,18 @@
|
||||
# MCA_paffinity_posix_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
AC_DEFUN([MCA_paffinity_posix_CONFIG],[
|
||||
#check to see if we have <unistd.h>
|
||||
OMPI_VAR_SCOPE_PUSH([happy])
|
||||
# Check to see if we have <unistd.h>
|
||||
AC_CHECK_HEADER([unistd.h], [happy=yes], [happy=no])
|
||||
|
||||
if test "$happy" = "yes"; then
|
||||
AC_MSG_RESULT([$happy ])
|
||||
fi
|
||||
# Check to see if we have _SC_NPROCESSORS_ONLN
|
||||
AS_IF([test "$happy" = "yes"],
|
||||
[AC_MSG_CHECKING([for _SC_NPROCESSORS_ONLN])
|
||||
AS_IF([test "$OMPI_HAVE__SC_NPROCESSORS_ONLN" = "1"],
|
||||
[happy=yes], [happy=no])
|
||||
AC_MSG_RESULT([(cached) $happy])])
|
||||
|
||||
if test "$happy" = "yes"; then
|
||||
$1
|
||||
else
|
||||
$2
|
||||
fi
|
||||
AS_IF([test "$happy" = "yes"], [$1], [$2])
|
||||
OMPI_VAR_SCOPE_POP
|
||||
])dnl
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user