1
1
openmpi/config/oshmem_setup_profiling.m4
Jeff Squyres 36b315db2d oshmem configury: tighten up the pshmem checks
Make the checks for macro weak symbols be equivalent to the checks for
weak symbols.

Also fix up several OSHMEM configure checks:

* fix an errant AC_MSG_REQUEST
* don't check for profiling ability during configure options checks.
  Instead, defer it to later, when we have weak symbol check results.
* don't directly call _FOO macros from the top level
* make setting up OSHMEM profiling similar to MPI profiling: create
  OSHMEM_SETUP_PROFILING macro
* cache the results of checking for macro weak symbols (for parity
  with the weak symbol check -- although we should really
  revisit/audit the whole cache-checking scheme throughout all m4
  code; it may well be inconsistently used)
* add some more [] m4 quoting, even in the original C weak symbols test
* style: fix some whitespace errors

Refs trac:4868

This commit was SVN r32590.

The following Trac tickets were found above:
  Ticket 4868 --> https://svn.open-mpi.org/trac/ompi/ticket/4868
2014-08-23 10:50:14 +00:00

46 строки
1.8 KiB
Bash

# -*- shell-script -*-
#
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
AC_DEFUN([OSHMEM_SETUP_PROFILING],[
opal_show_subtitle "OpenSHMEM profiling"
AC_MSG_CHECKING([if pshmem will be enabled])
AS_IF([test "$enable_oshmem" != "no" && \
test "$enable_oshmem_profile" != "no"],
[AS_IF([test "$OPAL_C_HAVE_WEAK_SYMBOLS" -eq 1 && \
test "$OPAL_C_HAVE_MACRO_WEAK_SYMBOLS" -eq 1],
[ # We want OSHMEM and we have all the required weak
# symbol support
oshmem_profiling_support=1
AC_MSG_RESULT([yes (weak symbols supported)])],
[ # We want OSHMEM, but we do NOT have all the
# required weak symbol support
oshmem_profiling_support=0
AC_MSG_RESULT([no (weak symbols not supported)])
AS_IF([test "$OPAL_C_HAVE_WEAK_SYMBOLS" -eq 0],
[AC_MSG_WARN([Weak symbols not supported by compiler])])
AS_IF([test "$OPAL_C_HAVE_MACRO_WEAK_SYMBOLS" -eq 0],
[AC_MSG_WARN([Macro weak symbols not supported by compiler])])
AC_MSG_WARN([OpenSHMEM profiling is disabled.])
AS_IF(["$enable_oshmem_profile" = "yes" -a
$oshmem_profiling_support -eq 0],
[AC_MSG_WARN([OpenSHMEM profiling requested but cannot be enabled])
AC_MSG_ERROR([Cannot continue])])
])
],[
# We do not want OSHMEM, so disable profiling
oshmem_profiling_support=0
AC_MSG_RESULT([no (OpenSHMEM disabled)])
])
AM_CONDITIONAL([OSHMEM_PROFILING], [test $oshmem_profiling_support -eq 1])
]) dnl