b29b852281
config/ directory. We split them apart a while ago in the hopes that it would simplify things, but it didn't really (e.g., because there were still some ompi/opal .m4 files in the top-level config/ directory, resulting in developer confusion where any given m4 macro was defined). So this commit consolidates them back into the top-level directory for simplicity. There's still (at least) two changes that would be nice to make: 1. Split any generated .m4 file (e.g., autogen-generated .m4 files) into a separate directory somewhere so that a top-level -Iconfig/ will only get our explicitly defined macros, not the autogen stuff (e.g., with libevent2019 needing to get the visibility macro, but NOT all the autogen-generated inclusion of component configure.m4 files). 1. Change configure to be of the form: {{{ # ...a small amount of preamble/setup... OPAL_SETUP m4_ifdef([project_orte], [ORTE_SETUP]) m4_ifdef([project_ompi], [OMPI_SETUP]) # ...a small amount of finishing stuff... }}} I doubt we'll ever get anything as clean as that, but that would be the goal to shoot for. This commit was SVN r27704.
44 строки
1.7 KiB
Bash
44 строки
1.7 KiB
Bash
# -*- shell-script -*-
|
|
#
|
|
# Copyright (c) 2009 IBM Corporation. All rights reserved.
|
|
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
|
# $COPYRIGHT$
|
|
#
|
|
# Additional copyrights may follow
|
|
#
|
|
# $HEADER$
|
|
#
|
|
|
|
# This macro checks to ensure that the compiler properly supports
|
|
# offsetof(). The PGI compilers had a problem with this macro in some
|
|
# versions of their compiler on some platforms (e.g., 9.0-1 on
|
|
# x86_64). The workaround is to use -DNO_PGI_OFFSET in these cases.
|
|
# A bug report was submitted to PGI support in late June 2009; the
|
|
# problem was apparently a trivial typo in one of their header files
|
|
# and should be fixed in subsequent releases (e.g., 9.0-2?).
|
|
|
|
AC_DEFUN([OPAL_CHECK_OFFSETOF],[
|
|
OPAL_VAR_SCOPE_PUSH([have_offsetof_msg])
|
|
|
|
AC_MSG_CHECKING(for functional offsetof macro)
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include<stddef.h>]],
|
|
[[struct foo {int a, b;}; size_t offset = offsetof(struct foo, b); ]])],
|
|
[have_offsetof_msg="yes"], [have_offsetof_msg="no"])
|
|
if test "$have_offsetof_msg" = "no"; then
|
|
CPPFLAGS="$CPPFLAGS -DNO_PGI_OFFSET"
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include<stddef.h>]],
|
|
[[struct foo {int a, b;}; size_t offset = offsetof(struct foo, b); ]])],
|
|
[have_offsetof_msg="yes"], [have_offsetof_msg="no"])
|
|
|
|
if test "$have_offsetof_msg" = "no"; then
|
|
AC_MSG_RESULT([$have_offsetof_msg])
|
|
AC_MSG_WARN([Your compiler does not support offsetof macro])
|
|
AC_MSG_ERROR([Configure: Cannot continue])
|
|
fi
|
|
fi
|
|
|
|
AC_MSG_RESULT([$have_offsetof_msg])
|
|
OPAL_VAR_SCOPE_POP
|
|
])dnl
|
|
|