1
1

* 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.
Этот коммит содержится в:
Jeff Squyres 2008-08-01 11:41:08 +00:00
родитель e1501f2c9c
Коммит 1a3045ff81
3 изменённых файлов: 21 добавлений и 24 удалений

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

@ -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! # sysconf(), but does not have _SC_NPROCESSORS_ONLN. Doh!
AC_MSG_CHECKING([for _SC_NPROCESSORS_ONLN]) AC_MSG_CHECKING([for _SC_NPROCESSORS_ONLN])
AC_TRY_COMPILE([#include <unistd.h>], AC_COMPILE_IFELSE(AC_LANG_SOURCE([[#include <unistd.h>
[(void)sysconf(_SC_NPROCESSORS_ONLN);], ]],[[int i = _SN_NPROCESSORS_ONLN;]]),
[MSG=yes VALUE=1], [MSG=no VALUE=0]) [MSG=yes OMPI_HAVE__SC_NPROCESSORS_ONLN=1],
AC_DEFINE_UNQUOTED(OPAL_HAVE__SC_NPROCESSORS_ONLN, $VALUE, [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]) [Whether we have the _SC_NPROCESSORS_ONLN])
AC_MSG_RESULT([$MSG]) AC_MSG_RESULT([$MSG])

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

@ -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 Cisco, Inc. All rights reserved. # Copyright (c) 2007-2008 Cisco, Inc. All rights reserved.
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
@ -22,18 +22,12 @@
# MCA_paffinity_darwin_CONFIG([action-if-found], [action-if-not-found]) # MCA_paffinity_darwin_CONFIG([action-if-found], [action-if-not-found])
# ----------------------------------------------------------- # -----------------------------------------------------------
AC_DEFUN([MCA_paffinity_darwin_CONFIG],[ AC_DEFUN([MCA_paffinity_darwin_CONFIG],[
OMPI_VAR_SCOPE_PUSH([happy])
# check to see if we have <mach/mach_host.h> # check to see if we have <mach/mach_host.h>
# as this is a Darwin-specific thing # as this is a Darwin-specific thing
AC_CHECK_HEADER([mach/mach_host.h], [happy=yes], [happy=no]) AC_CHECK_HEADER([mach/mach_host.h], [happy=yes], [happy=no])
if test "$happy" = "yes"; then AS_IF([test "$happy" = "yes"], [$1], [$2])
AC_MSG_RESULT([$happy ]) OMPI_VAR_SCOPE_POP
fi
if test "$happy" = "yes"; then
$1
else
$2
fi
])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) 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 (c) 2008 Sun Microsystems, Inc. All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
@ -22,17 +22,18 @@
# MCA_paffinity_posix_CONFIG([action-if-found], [action-if-not-found]) # MCA_paffinity_posix_CONFIG([action-if-found], [action-if-not-found])
# ----------------------------------------------------------- # -----------------------------------------------------------
AC_DEFUN([MCA_paffinity_posix_CONFIG],[ 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]) AC_CHECK_HEADER([unistd.h], [happy=yes], [happy=no])
if test "$happy" = "yes"; then # Check to see if we have _SC_NPROCESSORS_ONLN
AC_MSG_RESULT([$happy ]) AS_IF([test "$happy" = "yes"],
fi [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 AS_IF([test "$happy" = "yes"], [$1], [$2])
$1 OMPI_VAR_SCOPE_POP
else
$2
fi
])dnl ])dnl