1
1
openmpi/configure.ac

1403 lines
45 KiB
Plaintext
Raw Normal View History

2003-11-22 16:36:58 +00:00
# -*- shell-script -*-
#
# Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
- As proposed in RFC and telcon, warn the user about deprecated functionality (per MPI-2.1). This warning can be toggled using --enable-mpi-interface-warning (default OFF), but can be selectively turned on passing mpicc -DOMPI_WANT_MPI_INTERFACE_WARNING Using icc, gcc < 4.5, warnings (such as in mpi2basic_tests) show: type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated (declared at /home/../usr/include/mpi.h:1379) Using gcc-4.5 (gcc-svn) these show up as: type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated (declared at /home/../usr/include/mpi.h:1379): MPI_Type_hvector is superseded by MPI_Type_create_hvector in MPI-2.0 Jeff and I propose to turn such warnings on with Open MPI-1.7 by default. - Detection of user-level compiler is handled using the preprocessor checks of GASnet's other/portable_platform.h (thanks to Paul Hargrove and Dan Bonachea) adapted into ompi/include/mpi_portable_platform.h (see comments). The OMPI-build time detection is output (Familyname and Version) with ompi_info. This functionality (actually any upcoming __attribute__) are turned off, if a different compiler (and version) is being detected. - Note, that any warnings regarding (user-compiler!=build-compiler) as discussed in the RFC are _not_ included for now. - Tested on Linux with --enable-mpi-interface-warning on Linux, gcc-4.5 (deprecated w/ specific msg) Linux, gcc-4.3 (deprecated w/o specific msg) Linux, pathscale 3.1 (deprecated w/o specific msg) Linux, icc-11.0 (deprecated w/o specific msg) Linux, PGI-8.0.6 accepts __deprecated__ but does not issue a warning, further investigation needed... This commit was SVN r21262.
2009-05-22 04:39:43 +00:00
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
# reserved.
- As proposed in RFC and telcon, warn the user about deprecated functionality (per MPI-2.1). This warning can be toggled using --enable-mpi-interface-warning (default OFF), but can be selectively turned on passing mpicc -DOMPI_WANT_MPI_INTERFACE_WARNING Using icc, gcc < 4.5, warnings (such as in mpi2basic_tests) show: type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated (declared at /home/../usr/include/mpi.h:1379) Using gcc-4.5 (gcc-svn) these show up as: type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated (declared at /home/../usr/include/mpi.h:1379): MPI_Type_hvector is superseded by MPI_Type_create_hvector in MPI-2.0 Jeff and I propose to turn such warnings on with Open MPI-1.7 by default. - Detection of user-level compiler is handled using the preprocessor checks of GASnet's other/portable_platform.h (thanks to Paul Hargrove and Dan Bonachea) adapted into ompi/include/mpi_portable_platform.h (see comments). The OMPI-build time detection is output (Familyname and Version) with ompi_info. This functionality (actually any upcoming __attribute__) are turned off, if a different compiler (and version) is being detected. - Note, that any warnings regarding (user-compiler!=build-compiler) as discussed in the RFC are _not_ included for now. - Tested on Linux with --enable-mpi-interface-warning on Linux, gcc-4.5 (deprecated w/ specific msg) Linux, gcc-4.3 (deprecated w/o specific msg) Linux, pathscale 3.1 (deprecated w/o specific msg) Linux, icc-11.0 (deprecated w/o specific msg) Linux, PGI-8.0.6 accepts __deprecated__ but does not issue a warning, further investigation needed... This commit was SVN r21262.
2009-05-22 04:39:43 +00:00
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
2003-11-22 16:36:58 +00:00
#
############################################################################
# Initialization, version number, and other random setup/init stuff
############################################################################
# Init autoconf
# We don't have the version number to put in here yet, and we can't
# call OMPI_GET_VERSION (etc.) before AC_INIT. So use the shell
# version.
AC_INIT([Open MPI],
[m4_normalize(esyscmd([config/ompi_get_version.sh VERSION --base]))],
[http://www.open-mpi.org/community/help/], [openmpi])
AC_PREREQ(2.60)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
2003-11-22 16:36:58 +00:00
# Get our platform support file. This has to be done very, very early
# because it twiddles random bits of autoconf
OMPI_LOAD_PLATFORM
#
# Init automake
#
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.10 tar-ustar])
m4_pattern_allow([m4_ifval])
# Make configure depend on the VERSION file, since it's used in AC_INIT
AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
#
# Start it up
#
OMPI_CONFIGURE_SETUP
ompi_show_title "Configuring Open MPI"
ompi_show_subtitle "Checking versions"
# Get the version of OMPI that we are installing
OMPI_SAVE_VERSION([OMPI], [Open MPI], [$srcdir/VERSION],
[ompi/include/ompi/version.h])
2006-03-12 04:43:59 +00:00
OMPI_SAVE_VERSION([ORTE], [Open Run-Time Environment], [$srcdir/VERSION],
[orte/include/orte/version.h])
OMPI_SAVE_VERSION([OPAL], [Open Portable Access Layer], [$srcdir/VERSION],
[opal/include/opal/version.h])
- As proposed in RFC and telcon, warn the user about deprecated functionality (per MPI-2.1). This warning can be toggled using --enable-mpi-interface-warning (default OFF), but can be selectively turned on passing mpicc -DOMPI_WANT_MPI_INTERFACE_WARNING Using icc, gcc < 4.5, warnings (such as in mpi2basic_tests) show: type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated (declared at /home/../usr/include/mpi.h:1379) Using gcc-4.5 (gcc-svn) these show up as: type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated (declared at /home/../usr/include/mpi.h:1379): MPI_Type_hvector is superseded by MPI_Type_create_hvector in MPI-2.0 Jeff and I propose to turn such warnings on with Open MPI-1.7 by default. - Detection of user-level compiler is handled using the preprocessor checks of GASnet's other/portable_platform.h (thanks to Paul Hargrove and Dan Bonachea) adapted into ompi/include/mpi_portable_platform.h (see comments). The OMPI-build time detection is output (Familyname and Version) with ompi_info. This functionality (actually any upcoming __attribute__) are turned off, if a different compiler (and version) is being detected. - Note, that any warnings regarding (user-compiler!=build-compiler) as discussed in the RFC are _not_ included for now. - Tested on Linux with --enable-mpi-interface-warning on Linux, gcc-4.5 (deprecated w/ specific msg) Linux, gcc-4.3 (deprecated w/o specific msg) Linux, pathscale 3.1 (deprecated w/o specific msg) Linux, icc-11.0 (deprecated w/o specific msg) Linux, PGI-8.0.6 accepts __deprecated__ but does not issue a warning, further investigation needed... This commit was SVN r21262.
2009-05-22 04:39:43 +00:00
AM_CONFIG_HEADER([opal/include/opal_config.h orte/include/orte_config.h ompi/include/ompi_config.h ompi/include/mpi.h ompi/include/mpi_portable_platform.h])
# override/fixup the version numbers set by AC_INIT, since on
# developer builds, there's no good way to know what the version is
# before running configure :(. We only use the base version number
# (ie, no svn r numbers) for the version set in AC_INIT. This will
# always match reality because we add the VERSION file (the only way
# to change the major.minor.release{greek}) into the configure
# dependencies. PACKAGE_VERSION the AC_DEFINE doesn't change once set
# the first time -- AC_INIT's input (so it doesn't have an r number in
# it). PACKAGE_VERSION the AC_SUBST can be rewritten along the way,
# and we'd like it to have the r number in it so that it shows up in
# the tarball name, so it is set to the full version here.
PACKAGE_VERSION="$OPAL_VERSION"
PACKAGE_STRING="${PACKAGE_NAME} ${PACKAGE_VERSION}"
VERSION="${PACKAGE_VERSION}"
ompi_show_subtitle "Initialization, setup"
2003-11-22 16:36:58 +00:00
OMPI_TOP_BUILDDIR="`pwd`"
AC_SUBST(OMPI_TOP_BUILDDIR)
2003-11-22 16:36:58 +00:00
cd "$srcdir"
OMPI_TOP_SRCDIR="`pwd`"
AC_SUBST(OMPI_TOP_SRCDIR)
cd "$OMPI_TOP_BUILDDIR"
2003-11-22 16:36:58 +00:00
AC_MSG_NOTICE([builddir: $OMPI_TOP_BUILDDIR])
AC_MSG_NOTICE([srcdir: $OMPI_TOP_SRCDIR])
if test "$OMPI_TOP_BUILDDIR" != "$OMPI_TOP_SRCDIR"; then
2003-11-22 16:36:58 +00:00
AC_MSG_NOTICE([Detected VPATH build])
fi
# Setup the top of the opal/include/opal_config.h file
2003-11-22 16:36:58 +00:00
AH_TOP([/* -*- c -*-
*
* Copyright (c) 2004-2005 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
2003-11-22 16:36:58 +00:00
*
* Function: - OS, CPU and compiler dependent configuration
2003-11-22 16:36:58 +00:00
*/
#ifndef OPAL_CONFIG_H
#define OPAL_CONFIG_H
])
AH_BOTTOM([
#include "opal_config_bottom.h"
#endif /* OPAL_CONFIG_H */
2003-11-22 16:36:58 +00:00
])
- massive change for module<-->component name fixes throughout the code base. - many (most) mca type names have "component" or "module" in them, as relevant, just to further distinguish the difference between component data/actions and module data/actions. All developers are encouraged to perpetuate this convention when you create types that are specific to a framework, component, or module - did very little to entire framework (just the basics to make it compile) because it's just about to be almost entirely replaced - ditto for io / romio - did not work on elan or ib components; have to commit and then convert those on a different machine with the right libraries and headers - renamed a bunch of *_module.c files to *_component.c and *module*c to *component*c (a few still remain, e.g., ptl/ib, ptl/elan, etc.) - modified autogen/configure/build process to match new filenames (e.g., output static-components.h instead of static-modules.h) - removed DOS-style cr/lf stuff in ns/ns.h - added newline to end of file src/util/numtostr.h - removed some redundant error checking in the top-level topo functions - added a few {} here and there where people "forgot" to put them in for 1 line blocks ;-) - removed a bunch of MPI_* types from mca header files (replaced with corresponding ompi_* types) - all the ptl components had version numbers in their structs; removed - converted a few more elements in the MCA base to use the OBJ interface -- removed some old manual reference counting kruft This commit was SVN r1830.
2004-08-02 00:24:22 +00:00
# Other basic setup stuff (shared with components)
2003-11-22 16:36:58 +00:00
OMPI_BASIC_SETUP
2003-11-22 16:36:58 +00:00
top_ompi_srcdir="$OMPI_TOP_SRCDIR"
AC_SUBST(top_ompi_srcdir)
top_ompi_builddir="$OMPI_TOP_BUILDDIR"
AC_SUBST(top_ompi_builddir)
2003-11-22 16:36:58 +00:00
############################################################################
# Configuration options
############################################################################
OMPI_CONFIGURE_OPTIONS
2003-11-22 16:36:58 +00:00
if test "$enable_binaries" = "no" -a "$enable_dist" = "yes"; then
AC_MSG_WARN([--disable-binaries is incompatible with --enable dist])
AC_MSG_ERROR([Cannot continue])
fi
2003-11-22 16:36:58 +00:00
############################################################################
# Libtool: part one
# (before C compiler setup)
############################################################################
#
# Part one of libtool magic. Enable static so that we have the --with
# tests done up here and can check for OS. Save the values of
# $enable_static and $enable_shared before setting the defaults,
# because if the user specified --[en|dis]able-[static|shared] on the
# command line, they'll already be set. In this way, we can tell if
# the user requested something or if the default was set here.
#
ompi_enable_shared="$enable_shared"
ompi_enable_static="$enable_static"
AM_ENABLE_SHARED
AM_DISABLE_STATIC
2003-11-22 16:36:58 +00:00
OMPI_SETUP_WRAPPER_INIT
##################################
# Check for known incompatibility
##################################
# Do *not* print a message that we're checking the OS because this
# test is *not* meant to be an all-inclusive "if it passes this test,
# then configure must succeed" test. This test is *only* mean to
# screen out the versions of OS X where we know OMPI will cause kernel
# panics because of bad implementations of pty's. See
# https://svn.open-mpi.org/trac/ompi/ticket/1637 for details.
# We do not support OS X before version 10.4 (Tiger)
case $host_os in
# Corresponds to OS X 10.0 - 10.3 (additional [] quoting for m4)
darwin[[4567]]*)
AC_MSG_WARN([Open MPI does not support OS X prior to version 10.4 (Tiger)])
AC_MSG_ERROR([Cannot continue])
esac
2003-11-22 16:36:58 +00:00
############################################################################
# Check for compilers and preprocessors
############################################################################
ompi_show_title "Compiler and preprocessor tests"
2003-11-22 16:36:58 +00:00
##################################
# C compiler characteristics
##################################
OMPI_SETUP_CC
2003-11-22 16:36:58 +00:00
# If we build on a windows environment with the windows compiler and linker
# then we need some translation functions from the opal/win32 directory.
AM_CONDITIONAL(OMPI_NEED_WINDOWS_REPLACEMENTS,
test "$ompi_cv_c_compiler_vendor" = "microsoft" )
# Do all Interix detections if necessary
OMPI_INTERIX
# Does the compiler support "ident"-like constructs?
OMPI_CHECK_IDENT([CC], [CFLAGS], [c], [C])
#
# Check for some types
#
AC_CHECK_TYPES(long long)
AC_CHECK_TYPES(long double)
AC_CHECK_TYPES(int8_t)
AC_CHECK_TYPES(uint8_t)
AC_CHECK_TYPES(int16_t)
AC_CHECK_TYPES(uint16_t)
AC_CHECK_TYPES(int32_t)
AC_CHECK_TYPES(uint32_t)
AC_CHECK_TYPES(int64_t)
AC_CHECK_TYPES(uint64_t)
AC_CHECK_TYPES(intptr_t)
AC_CHECK_TYPES(uintptr_t)
AC_CHECK_TYPES(mode_t)
AC_CHECK_TYPES(ssize_t)
AC_CHECK_TYPES(ptrdiff_t)
#
# Check for type sizes
#
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
if test $ac_cv_type_long_long = yes; then
AC_CHECK_SIZEOF(long long)
fi
if test $ac_cv_type_long_double = yes; then
AC_CHECK_SIZEOF(long double)
fi
AC_CHECK_SIZEOF(float)
AC_CHECK_SIZEOF(double)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(size_t)
if test $ac_cv_type_ssize_t = yes ; then
AC_CHECK_SIZEOF(ssize_t)
fi
if test $ac_cv_type_ptrdiff_t = yes; then
AC_CHECK_SIZEOF(ptrdiff_t)
fi
#
# Check for type alignments
#
OMPI_C_GET_ALIGNMENT(char, OPAL_ALIGNMENT_CHAR)
OMPI_C_GET_ALIGNMENT(short, OPAL_ALIGNMENT_SHORT)
OMPI_C_GET_ALIGNMENT(wchar_t, OMPI_ALIGNMENT_WCHAR)
OMPI_C_GET_ALIGNMENT(int, OPAL_ALIGNMENT_INT)
OMPI_C_GET_ALIGNMENT(long, OPAL_ALIGNMENT_LONG)
if test $ac_cv_type_long_long = yes; then
OMPI_C_GET_ALIGNMENT(long long, OPAL_ALIGNMENT_LONG_LONG)
fi
OMPI_C_GET_ALIGNMENT(float, OMPI_ALIGNMENT_FLOAT)
OMPI_C_GET_ALIGNMENT(double, OMPI_ALIGNMENT_DOUBLE)
if test $ac_cv_type_long_double = yes; then
OMPI_C_GET_ALIGNMENT(long double, OPAL_ALIGNMENT_LONG_DOUBLE)
fi
OMPI_C_GET_ALIGNMENT(void *, OMPI_ALIGNMENT_VOID_P)
#
# Does the C compiler native support "bool"? (i.e., without
# <stdbool.h> or any other help)
#
AC_MSG_CHECKING(for C bool type)
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
AC_INCLUDES_DEFAULT]],
[[bool bar, foo = true; bar = foo;]]),
[OPAL_NEED_C_BOOL=0 MSG=yes],[OPAL_NEED_C_BOOL=1 MSG=no])
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>)])
AC_MSG_RESULT([$MSG])
#
# Check for other compiler characteristics
#
if test "$GCC" = "yes"; then
# gcc 2.96 will emit oodles of warnings if you use "inline" with
# -pedantic (which we do in developer builds). However,
# "__inline__" is ok. So we have to force gcc to select the
# right one. If you use -pedantic, the AC_C_INLINE test will fail
# (because it names a function foo() -- without the (void)). So
# we turn off all the picky flags, turn on -ansi mode (which is
# implied by -pedantic), and set warnings to be errors. Hence,
# this does the following (for 2.96):
#
# - causes the check for "inline" to emit a warning, which then
# fails
# - checks for __inline__, which then emits no error, and works
#
# This also works nicely for gcc 3.x because "inline" will work on
# the first check, and all is fine. :-)
CFLAGS_save="$CFLAGS"
CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY -Werror -ansi"
fi
AC_C_INLINE
# Microsoft compilers support 2 versions of restrict. One for functions, and
# one for variables. The problem is that they don't have an equivalent
# syntax, and the autoconf restrict detection is unable to detect them
# correctly. It detect the restrict keyword as __restrict which break the
# rules for function syntax which is declspec(restrict).
if test "x$ompi_cv_c_compiler_vendor" != "xmicrosoft"; then
AC_C_RESTRICT
fi
OMPI_C_WEAK_SYMBOLS
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS_save"
fi
2003-11-22 16:36:58 +00:00
if test "x$CC" = "xicc"; then
OMPI_CHECK_ICC_VARARGS
fi
# If we want the profiling layer:
# - If the C compiler has weak symbols, use those.
# - If not, then set to compile the code again with #define's in a
# separate directory.
if test "$WANT_WEAK_SYMBOLS" = "0"; then
OPAL_C_HAVE_WEAK_SYMBOLS=0
fi
if test "$WANT_MPI_PROFILING" = "1"; then
if test "$OPAL_C_HAVE_WEAK_SYMBOLS" = "1"; then
OMPI_PROFILING_COMPILE_SEPARATELY=0
else
OMPI_PROFILING_COMPILE_SEPARATELY=1
fi
else
OMPI_PROFILING_COMPILE_SEPARATELY=0
fi
#
# There are 2 layers to the MPI Language binidings One layer generates
# MPI_* bindings. The other layer generates PMPI_* bindings. The
# following conditions determine whether each (or both) these layers
# are built.
# 1. MPI_* bindings are needed if:
# - Profiling is not required
# - Profiling is required but weak symbols are not
# supported
# 2. PMPI_* bindings are needed if profiling is required. Hence we
# define 2 conditionals which tell us whether each of these layers
# need to be built or NOT
#
AM_CONDITIONAL(WANT_MPI_BINDINGS_LAYER,
test "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
AM_CONDITIONAL(WANT_PMPI_BINDINGS_LAYER,
test "$WANT_MPI_PROFILING" = 1)
AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY,
test "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
AC_DEFINE_UNQUOTED(OMPI_ENABLE_MPI_PROFILING, $WANT_MPI_PROFILING,
[Whether we want MPI profiling or not])
AC_DEFINE_UNQUOTED(OPAL_HAVE_WEAK_SYMBOLS, $OPAL_C_HAVE_WEAK_SYMBOLS,
[Whether we have weak symbols or not])
2003-11-22 16:36:58 +00:00
##################################
# C++ compiler characteristics
##################################
OMPI_SETUP_CXX
2003-11-22 16:36:58 +00:00
# Does the compiler support "ident"-like constructs?
OMPI_CHECK_IDENT([CXX], [CXXFLAGS], [cc], [C++])
2003-11-22 16:36:58 +00:00
# check for type sizes
AC_LANG_PUSH(C++)
AC_CHECK_SIZEOF(bool)
2003-11-22 16:36:58 +00:00
# check for type alignments
OMPI_C_GET_ALIGNMENT(bool, OMPI_ALIGNMENT_CXX_BOOL)
AC_LANG_POP(C++)
2003-11-22 16:36:58 +00:00
# check if we want C++ support
AM_CONDITIONAL(WANT_MPI_CXX_BINDINGS,
test "$WANT_MPI_CXX_SUPPORT" = 1)
AC_DEFINE_UNQUOTED(OMPI_WANT_CXX_BINDINGS, $WANT_MPI_CXX_SUPPORT,
[Whether we want MPI cxx support or not])
##################################
# Only after setting up both
# C and C++ check compiler attributes.
##################################
OMPI_CHECK_ATTRIBUTES
- As proposed in RFC and telcon, warn the user about deprecated functionality (per MPI-2.1). This warning can be toggled using --enable-mpi-interface-warning (default OFF), but can be selectively turned on passing mpicc -DOMPI_WANT_MPI_INTERFACE_WARNING Using icc, gcc < 4.5, warnings (such as in mpi2basic_tests) show: type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated (declared at /home/../usr/include/mpi.h:1379) Using gcc-4.5 (gcc-svn) these show up as: type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated (declared at /home/../usr/include/mpi.h:1379): MPI_Type_hvector is superseded by MPI_Type_create_hvector in MPI-2.0 Jeff and I propose to turn such warnings on with Open MPI-1.7 by default. - Detection of user-level compiler is handled using the preprocessor checks of GASnet's other/portable_platform.h (thanks to Paul Hargrove and Dan Bonachea) adapted into ompi/include/mpi_portable_platform.h (see comments). The OMPI-build time detection is output (Familyname and Version) with ompi_info. This functionality (actually any upcoming __attribute__) are turned off, if a different compiler (and version) is being detected. - Note, that any warnings regarding (user-compiler!=build-compiler) as discussed in the RFC are _not_ included for now. - Tested on Linux with --enable-mpi-interface-warning on Linux, gcc-4.5 (deprecated w/ specific msg) Linux, gcc-4.3 (deprecated w/o specific msg) Linux, pathscale 3.1 (deprecated w/o specific msg) Linux, icc-11.0 (deprecated w/o specific msg) Linux, PGI-8.0.6 accepts __deprecated__ but does not issue a warning, further investigation needed... This commit was SVN r21262.
2009-05-22 04:39:43 +00:00
OPAL_CHECK_COMPILER_VERSION_ID
##################################
# Assembler Configuration
##################################
ompi_show_subtitle "Assembler"
AM_PROG_AS
OMPI_CONFIG_ASM
2003-11-22 16:36:58 +00:00
##################################
# Fortran
##################################
#-----------
# Fortran 77
#-----------
OMPI_SETUP_F77
# This allows us to mark bogus types, but still have them be a valid
# [sentinel] value
AC_DEFINE([ompi_fortran_bogus_type_t], [int],
[A bogus type that allows us to have sentinel type values that are still valid])
# We want to set the #define's for all of these, so invoke the macros
# regardless of whether we have F77 support or not.
OMPI_F77_CHECK([LOGICAL], [yes],
[char, int32_t, int, int64_t, long long, long], [-1])
OMPI_F77_CHECK([LOGICAL*1], [yes],
[char, int8_t, short, int32_t, int, int64_t, long long, long], [1])
OMPI_F77_CHECK([LOGICAL*2], [yes],
[short, int16_t, int32_t, int, int64_t, long long, long], [2])
OMPI_F77_CHECK([LOGICAL*4], [yes],
[int32_t, int, int64_t, long long, long], [4])
OMPI_F77_CHECK([LOGICAL*8], [yes],
[int, int64_t, long long, long], [8])
OMPI_F77_CHECK([INTEGER], [yes],
[int32_t, int, int64_t, long long, long], [-1])
OMPI_F77_CHECK([INTEGER*1], [no],
[char, int8_t, short, int, int64_t, long long, long], [1])
OMPI_F77_CHECK([INTEGER*2], [no],
[short, int16_t, int32_t, int, int64_t, long long, long], [2])
OMPI_F77_CHECK([INTEGER*4], [no],
[int32_t, int, int64_t, long long, long], [4])
OMPI_F77_CHECK([INTEGER*8], [no],
[int, int64_t, long long, long], [8])
OMPI_F77_CHECK([INTEGER*16], [no],
[int, int64_t, long long, long], [16])
OMPI_F77_CHECK([REAL], [yes],
[float, double, long double], [-1])
OMPI_F77_CHECK([REAL*2], [no],
[float, double, long double], [2])
OMPI_F77_CHECK([REAL*4], [no],
[float, double, long double], [4])
OMPI_F77_CHECK([REAL*8], [no],
[float, double, long double], [8])
OMPI_F77_CHECK([REAL*16], [no],
[float, double, long double], [16])
# In some compilers, the bit representation of REAL*16 is not the same
# as the C counterpart that we found. If this is the case, then we
# want to disable reduction support for MPI_REAL16 (per ticket #1603).
OMPI_F77_CHECK_REAL16_C_EQUIV
OMPI_F77_CHECK([DOUBLE PRECISION], [yes],
[float, double, long double], [-1])
OMPI_F77_CHECK([COMPLEX], [yes], [], [-1])
# The complex*N tests are a bit different (note: the complex tests are
# the same as all the rest, because complex is a composite of two
# reals, which we *have* to have. It's only the complex*N tests that
# are different). The fortran complex types are composites of the
# real*(N/2) types. So for us to support complex*N, two conditions
# must be true:
#
# a) we must support real*(N/2) (i.e., compiler supports it and we
# have a back-end C type for it)
# b) compiler supports complex*N
OMPI_F77_CHECK([COMPLEX*8], [no], [], [8])
OMPI_F77_CHECK([COMPLEX*16], [no], [], [16])
OMPI_F77_CHECK([COMPLEX*32], [no], [], [32])
# Regardless of whether we have fortran bindings, or even a fortran
# compiler, get the max value for a fortran MPI handle (this macro
# handles the case where we don't have a fortran compiler).
OMPI_F77_GET_FORTRAN_HANDLE_MAX
#
# Check for Fortran compilers value of TRUE and for the correct assumption
# on LOGICAL for conversion into what C considers to be a true value
#
OMPI_F77_GET_VALUE_TRUE
OMPI_F77_CHECK_LOGICAL_ARRAY
#
# There are 2 layers to the MPI f77 layer. The only extra thing that
# determine f77 bindings is that fortran can be disabled by user. In
# such cases, we need to not build the target at all. One layer
# generates MPI_f77* bindings. The other layer generates PMPI_f77*
# bindings. The following conditions determine whether each (or both)
# these layers are built.
#
# Superceeding clause:
# - fortran77 bindings should be enabled, else everything is
# disabled
# 1. MPI_f77* bindings are needed if:
# - Profiling is not required
# - Profiling is required but weak symbols are not
# supported
# 2. PMPI_* bindings are needed if profiling is required. Hence we
# define 2 conditionals which tell us whether each of these layers
# need to be built or NOT
#
AM_CONDITIONAL(WANT_MPI_F77_BINDINGS_LAYER,
test \( "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1 \) -a "$OMPI_WANT_F77_BINDINGS" = 1)
AM_CONDITIONAL(WANT_PMPI_F77_BINDINGS_LAYER,
test "$OMPI_WANT_F77_BINDINGS" = 1 -a "$WANT_MPI_PROFILING" = 1)
#-----------
# Fortran 90
#-----------
OMPI_SETUP_F90
2003-11-22 16:36:58 +00:00
# Look for the fortran module compiler flag
OMPI_F90_FIND_MODULE_INCLUDE_FLAG
# Look for all the types
OMPI_F90_IKINDS=""
OMPI_F90_RKINDS=""
OMPI_F90_CKINDS=""
# LOGICAL and friends
OMPI_F90_CHECK([LOGICAL])
OMPI_F90_CHECK([LOGICAL*1], [1])
OMPI_F90_CHECK([LOGICAL*2], [2])
OMPI_F90_CHECK([LOGICAL*4], [4])
OMPI_F90_CHECK([LOGICAL*8], [8])
# INTEGER and friends
OMPI_F90_CHECK([INTEGER])
OMPI_F90_CHECK([INTEGER*1], [1])
OMPI_F90_CHECK([INTEGER*2], [2])
OMPI_F90_CHECK([INTEGER*4], [4])
OMPI_F90_CHECK([INTEGER*8], [8])
OMPI_F90_CHECK([INTEGER*16], [16])
# REAL, DOUBLE PRECISION, REAL*4, *8, *16
OMPI_F90_CHECK([REAL])
OMPI_F90_CHECK([REAL*2], [2])
OMPI_F90_CHECK([REAL*4], [4])
OMPI_F90_CHECK([REAL*8], [8])
OMPI_F90_CHECK([REAL*16], [16])
OMPI_F90_CHECK([DOUBLE PRECISION])
# COMPLEX, DOUBLE COMPLEX, COMPLEX*8, *16, *32
OMPI_F90_CHECK([COMPLEX])
OMPI_F90_CHECK([COMPLEX*8], [8])
OMPI_F90_CHECK([COMPLEX*16], [16])
OMPI_F90_CHECK([COMPLEX*32], [32])
OMPI_F90_CHECK([DOUBLE COMPLEX])
AC_SUBST(OMPI_F90_IKINDS)
AC_SUBST(OMPI_F90_RKINDS)
AC_SUBST(OMPI_F90_CKINDS)
# get kind value for Fortran MPI_INTEGER_KIND (corresponding to
# whatever is the same size as a F77 INTEGER -- for the
# most-likely-will-never-occur case where F77 INTEGER is smaller than
# an F90 INTEGER; see MPI-2 4.12.6.5
if test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "2"; then
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 4, OMPI_MPI_INTEGER_KIND)
elif test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "4"; then
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 9, OMPI_MPI_INTEGER_KIND)
elif test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "8"; then
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 18, OMPI_MPI_INTEGER_KIND)
elif test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "16"; then
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 19, OMPI_MPI_INTEGER_KIND)
AC_MSG_ERROR([Cannot support Fortran MPI_INTEGER_KIND!])
fi
AC_SUBST(OMPI_MPI_INTEGER_KIND)
# get kind value for Fortran MPI_ADDRESS_KIND (corresponding to
# whatever is big enough to hold (void*))
if test $ac_cv_sizeof_void_p = 2 ; then
OMPI_F90_GET_INT_KIND(MPI_ADDRESS_KIND, 4, OMPI_MPI_ADDRESS_KIND)
elif test $ac_cv_sizeof_void_p = 4 ; then
OMPI_F90_GET_INT_KIND(MPI_ADDRESS_KIND, 9, OMPI_MPI_ADDRESS_KIND)
elif test $ac_cv_sizeof_void_p = 8 ; then
OMPI_F90_GET_INT_KIND(MPI_ADDRESS_KIND, 18, OMPI_MPI_ADDRESS_KIND)
elif test $ac_cv_sizeof_void_p = 16 ; then
OMPI_F90_GET_INT_KIND(MPI_ADDRESS_KIND, 19, OMPI_MPI_ADDRESS_KIND)
else
AC_MSG_ERROR([Cannot support Fortran MPI_ADDRESS_KIND!])
fi
AC_SUBST(OMPI_MPI_ADDRESS_KIND)
# get kind value for Fortran MPI_OFFSET_KIND (corresponding to INTEGER*8)
OMPI_F90_GET_INT_KIND(MPI_OFFSET_KIND, 18, OMPI_MPI_OFFSET_KIND)
AC_SUBST(OMPI_MPI_OFFSET_KIND)
* Rewrite ompi_mca.m4 to use m4_defined lists of projects (ompi, orte, etc.), frameworks, and components without configure scripts instead of hard-coded shell variables (for projects and frameworks) and shell variable building (for components). * Add 3rd category of component configuration (in addition to configure scripts and no-configured components): configure.m4 components. These components can only be built as part of OMPI (like no-configure), but can provide an m4 file that is run as part of the main configure script. These macros can set whether the component should be built, along with just about any other configuration wanted. More care must be taken compared to configure components, as doing things like setting variables or calling AC_MSG_ERROR now affects the top-level configure script (so calling AC_MSG_ERROR if your component can't configure probably isn't what you want) * Added support to autogen.sh for the configure.m4-style components, as well as building up the m4_define lists ompi_mca.m4 now expects * Updated a number of macros to be more config.cache friendly (both so that config.cache can be used and so the test can be quickly run multiple times in the same configrue script): - ompi_config_asm - c_weak_symbols - c_get_alignment * Added new macros to be shared when configuring components: - ompi_objc.m4 (this actually provides AC_PROG_OBJC - don't ask...) - ompi_check_xgrid - ompi_check_tm - ompi_check_bproc * Updated a number of components to use configure.m4 instead of configure.stub - btl portals - io romio - tm ras and pls - bjs, lsf_bproc ras and bproc_seed pls - xgrid ras and pls - null iof (used by tm) This commit was SVN r6412.
2005-07-09 18:52:53 +00:00
# checkpoint results
AC_CACHE_SAVE
2003-11-22 16:36:58 +00:00
##################################
# Header files
##################################
ompi_show_title "Header file tests"
AC_CHECK_HEADERS([alloca.h aio.h arpa/inet.h dirent.h \
dlfcn.h execinfo.h err.h fcntl.h grp.h inttypes.h libgen.h \
libutil.h memory.h netdb.h netinet/in.h netinet/tcp.h \
poll.h pthread.h pty.h pwd.h sched.h stdint.h \
stdlib.h string.h strings.h stropts.h sys/fcntl.h sys/ipc.h \
sys/ioctl.h sys/mman.h sys/param.h sys/queue.h \
sys/resource.h sys/select.h sys/socket.h sys/sockio.h \
stdarg.h sys/stat.h sys/statvfs.h sys/time.h sys/tree.h \
sys/types.h sys/uio.h net/uio.h sys/utsname.h sys/wait.h syslog.h \
time.h termios.h ulimit.h unistd.h util.h utmp.h malloc.h \
ifaddrs.h sys/sysctl.h crt_externs.h regex.h \
ioLib.h sockLib.h hostLib.h shlwapi.h sys/synch.h])
# Needed to work around Darwin requiring sys/socket.h for
# net/if.h
AC_CHECK_HEADERS([net/if.h], [], [],
[#include <stdio.h>