2003-11-22 19:36:58 +03:00
# -*- shell-script -*-
#
2006-01-22 01:53:16 +03:00
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
2005-11-05 22:57:48 +03:00
# 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.
2006-03-04 16:59:14 +03:00
# Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
2004-11-28 23:09:25 +03:00
# University of Stuttgart. All rights reserved.
2005-03-24 15:43:37 +03:00
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
2006-04-11 07:33:38 +04:00
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
2004-11-22 04:38:40 +03:00
# $COPYRIGHT$
#
# Additional copyrights may follow
#
2004-01-07 10:49:23 +03:00
# $HEADER$
2003-11-22 19:36:58 +03:00
#
############################################################################
# Initialization, version number, and other random setup/init stuff
############################################################################
# Init autoconf
2005-09-07 09:54:53 +04:00
# 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])
2004-02-14 09:02:04 +03:00
AC_PREREQ(2.58)
2006-05-07 23:19:37 +04:00
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
2003-11-22 19:36:58 +03:00
2005-07-28 19:48:46 +04:00
# Get our platform support file. This has to be done very, very early
# because it twiddles random bits of autoconf
OMPI_LOAD_PLATFORM
2005-09-07 09:54:53 +04:00
#
# Init automake
#
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define])
2005-09-16 06:49:31 +04:00
# Make configure depend on the VERSION file, since it's used in AC_INIT
2005-09-07 09:54:53 +04:00
AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
2006-01-22 01:53:16 +03:00
#
# Start it up
#
OMPI_CONFIGURE_SETUP
ompi_show_title "Configuring Open MPI"
ompi_show_subtitle "Checking versions"
2004-06-07 19:33:53 +04:00
# Get the version of OMPI that we are installing
2006-03-12 07:35:01 +03:00
OMPI_SAVE_VERSION([OMPI], [Open MPI], [$srcdir/VERSION],
[ompi/include/ompi/version.h])
2006-03-12 07:43:59 +03:00
OMPI_SAVE_VERSION([ORTE], [Open Run-Time Environment], [$srcdir/VERSION],
2006-03-12 07:35:01 +03:00
[orte/include/orte/version.h])
OMPI_SAVE_VERSION([OPAL], [Open Portable Access Layer], [$srcdir/VERSION],
[opal/include/opal/version.h])
2004-06-07 19:33:53 +04:00
2005-09-07 09:54:53 +04:00
# 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
2005-09-27 06:06:05 +04:00
# to change the major.minor.release{greek}) into the configure
2006-03-12 07:35:01 +03:00
# 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"
2005-09-07 09:54:53 +04:00
PACKAGE_STRING="${PACKAGE_NAME} ${PACKAGE_VERSION}"
VERSION="${PACKAGE_VERSION}"
2004-06-07 19:33:53 +04:00
ompi_show_subtitle "Initialization, setup"
2003-11-22 19:36:58 +03:00
2004-08-19 23:27:15 +04:00
#
# GNU C and autotools are inconsistent about whether this is defined
# so let's make it true everywhere for now...
#
AC_GNU_SOURCE
2004-06-07 19:33:53 +04:00
OMPI_TOP_BUILDDIR="`pwd`"
AC_SUBST(OMPI_TOP_BUILDDIR)
2003-11-22 19:36:58 +03:00
cd "$srcdir"
2004-06-07 19:33:53 +04:00
OMPI_TOP_SRCDIR="`pwd`"
AC_SUBST(OMPI_TOP_SRCDIR)
cd "$OMPI_TOP_BUILDDIR"
2003-11-22 19:36:58 +03:00
2004-06-07 19:33:53 +04: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 19:36:58 +03:00
AC_MSG_NOTICE([Detected VPATH build])
fi
2006-02-12 04:33:29 +03:00
# Setup the top of the opal/include/opal_config.h file
2003-11-22 19:36:58 +03:00
AH_TOP([/* -*- c -*-
*
2004-11-22 04:38:40 +03:00
* 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.
2004-11-28 23:09:25 +03:00
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
2005-03-24 15:43:37 +03:00
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
2004-11-22 04:38:40 +03:00
* $COPYRIGHT$
*
* Additional copyrights may follow
*
2004-01-07 17:55:23 +03:00
* $HEADER$
2003-11-22 19:36:58 +03:00
*
* Function: - OS, CPU and compiler dependent configuration
*/
2006-02-12 04:33:29 +03:00
#ifndef OPAL_CONFIG_H
#define OPAL_CONFIG_H
2003-12-22 19:29:21 +03:00
])
AH_BOTTOM([
2006-02-12 04:33:29 +03:00
#include "opal_config_bottom.h"
#endif /* OPAL_CONFIG_H */
2003-11-22 19:36:58 +03:00
])
2004-08-02 04:24:22 +04:00
# Other basic setup stuff (shared with components)
2003-11-22 19:36:58 +03:00
2004-06-07 19:33:53 +04:00
OMPI_BASIC_SETUP
2003-11-22 19:36:58 +03:00
2004-06-07 19:33:53 +04: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 19:36:58 +03:00
############################################################################
# Configuration options
############################################################################
2004-06-07 19:33:53 +04:00
OMPI_CONFIGURE_OPTIONS
2003-11-22 19:36:58 +03: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.
#
2004-06-07 19:33:53 +04:00
ompi_enable_shared="$enable_shared"
ompi_enable_static="$enable_static"
2004-07-01 20:25:44 +04:00
AM_ENABLE_SHARED
AM_DISABLE_STATIC
2003-11-22 19:36:58 +03:00
2005-10-28 03:23:08 +04:00
OMPI_SETUP_WRAPPER_INIT
2005-04-18 20:38:27 +04:00
2003-11-22 19:36:58 +03:00
############################################################################
# Check for compilers and preprocessors
############################################################################
2004-06-07 19:33:53 +04:00
ompi_show_title "Compiler and preprocessor tests"
2003-11-22 19:36:58 +03:00
##################################
# C compiler characteristics
##################################
2004-06-07 19:33:53 +04:00
OMPI_SETUP_CC
2003-11-22 19:36:58 +03:00
2005-12-18 01:29:12 +03: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" )
2004-02-13 21:05:49 +03:00
#
# Check for some types
#
2004-01-09 04:17:00 +03:00
AC_CHECK_TYPES(long long)
2004-04-24 00:52:42 +04:00
AC_CHECK_TYPES(long double)
2004-01-09 04:17:00 +03:00
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)
2004-10-14 00:47:52 +04:00
AC_CHECK_TYPES(mode_t)
2004-02-13 21:05:49 +03:00
2005-05-12 05:42:24 +04:00
2004-02-13 21:05:49 +03:00
#
# Check for type sizes
#
2004-01-09 04:17:00 +03:00
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
2004-04-24 00:52:42 +04:00
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
2004-06-29 04:02:25 +04:00
AC_CHECK_SIZEOF(float)
AC_CHECK_SIZEOF(double)
2004-01-09 04:17:00 +03:00
AC_CHECK_SIZEOF(void *)
2005-04-05 06:32:36 +04:00
AC_CHECK_SIZEOF(size_t)
2004-02-13 21:05:49 +03:00
#
# Check for type alignments
#
2004-06-07 19:33:53 +04:00
OMPI_C_GET_ALIGNMENT(char, OMPI_ALIGNMENT_CHAR)
OMPI_C_GET_ALIGNMENT(short, OMPI_ALIGNMENT_SHORT)
OMPI_C_GET_ALIGNMENT(wchar_t, OMPI_ALIGNMENT_WCHAR)
OMPI_C_GET_ALIGNMENT(int, OMPI_ALIGNMENT_INT)
OMPI_C_GET_ALIGNMENT(long, OMPI_ALIGNMENT_LONG)
2004-04-24 00:52:42 +04:00
if test $ac_cv_type_long_long = yes; then
2004-06-07 19:33:53 +04:00
OMPI_C_GET_ALIGNMENT(long long, OMPI_ALIGNMENT_LONG_LONG)
2004-04-24 00:52:42 +04:00
fi
2004-06-07 19:33:53 +04:00
OMPI_C_GET_ALIGNMENT(float, OMPI_ALIGNMENT_FLOAT)
OMPI_C_GET_ALIGNMENT(double, OMPI_ALIGNMENT_DOUBLE)
2004-04-24 00:52:42 +04:00
if test $ac_cv_type_long_double = yes; then
2004-06-07 19:33:53 +04:00
OMPI_C_GET_ALIGNMENT(long double, OMPI_ALIGNMENT_LONG_DOUBLE)
2004-04-24 00:52:42 +04:00
fi
2004-06-07 19:33:53 +04:00
OMPI_C_GET_ALIGNMENT(void *, OMPI_ALIGNMENT_VOID_P)
2004-02-13 21:05:49 +03:00
2004-10-23 00:30:59 +04:00
#
# 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;]]),
[OMPI_NEED_C_BOOL=0 MSG=yes],[OMPI_NEED_C_BOOL=1 MSG=no])
AC_DEFINE_UNQUOTED(OMPI_NEED_C_BOOL, $OMPI_NEED_C_BOOL,
[Whether the C compiler supports "bool" without any other help (such as <stdbool.h>)])
AC_MSG_RESULT([$MSG])
2004-02-13 21:05:49 +03:00
#
# Check for other compiler characteristics
#
2004-01-07 10:49:23 +03:00
2004-06-15 21:10:47 +04:00
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
2003-12-22 19:29:21 +03:00
AC_C_INLINE
2004-01-14 20:35:41 +03:00
AC_C_RESTRICT
2004-06-07 19:33:53 +04:00
OMPI_C_WEAK_SYMBOLS
2004-06-15 21:10:47 +04:00
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS_save"
fi
2003-11-22 19:36:58 +03:00
2005-05-10 13:09:04 +04:00
if test "x$CC" = "xicc"; then
OMPI_CHECK_ICC_VARARGS
fi
2004-01-08 16:36:14 +03:00
# 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
2004-06-07 19:33:53 +04:00
OMPI_C_HAVE_WEAK_SYMBOLS=0
2004-01-08 16:36:14 +03:00
fi
if test "$WANT_MPI_PROFILING" = "1"; then
2004-06-07 19:33:53 +04:00
if test "$OMPI_C_HAVE_WEAK_SYMBOLS" = "1"; then
OMPI_PROFILING_COMPILE_SEPARATELY=0
2004-01-08 16:36:14 +03:00
else
2004-06-07 19:33:53 +04:00
OMPI_PROFILING_COMPILE_SEPARATELY=1
2004-01-08 16:36:14 +03:00
fi
else
2004-06-07 19:33:53 +04:00
OMPI_PROFILING_COMPILE_SEPARATELY=0
2004-01-08 16:36:14 +03:00
fi
2004-06-29 04:02:25 +04:00
2004-01-15 04:11:59 +03:00
#
2004-06-29 04:02:25 +04:00
# 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.
2004-01-15 04:11:59 +03:00
# 1. MPI_* bindings are needed if:
# - Profiling is not required
# - Profiling is required but weak symbols are not
# supported
2004-06-29 04:02:25 +04:00
# 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
2004-01-15 04:11:59 +03:00
#
2004-06-29 04:02:25 +04:00
2004-01-15 04:11:59 +03:00
AM_CONDITIONAL(WANT_MPI_BINDINGS_LAYER,
2004-06-07 19:33:53 +04:00
test "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
2004-01-15 04:11:59 +03:00
AM_CONDITIONAL(WANT_PMPI_BINDINGS_LAYER,
test "$WANT_MPI_PROFILING" = 1)
2004-01-08 18:51:54 +03:00
AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY,
2004-06-07 19:33:53 +04:00
test "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
AC_DEFINE_UNQUOTED(OMPI_ENABLE_MPI_PROFILING, $WANT_MPI_PROFILING,
2004-01-08 18:51:54 +03:00
[Whether we want MPI profiling or not])
2004-06-07 19:33:53 +04:00
AC_DEFINE_UNQUOTED(OMPI_HAVE_WEAK_SYMBOLS, $OMPI_C_HAVE_WEAK_SYMBOLS,
2004-01-08 18:51:54 +03:00
[Wehther we have weak symbols or not])
2004-01-08 16:36:14 +03:00
2004-01-07 10:49:23 +03:00
2003-11-22 19:36:58 +03:00
##################################
# C++ compiler characteristics
##################################
2004-06-07 19:33:53 +04:00
OMPI_SETUP_CXX
2003-11-22 19:36:58 +03:00
# check for type sizes
2004-02-13 21:05:49 +03:00
2005-12-15 07:19:16 +03:00
AC_LANG_PUSH(C++)
2004-02-13 21:05:49 +03:00
AC_CHECK_SIZEOF(bool)
2003-11-22 19:36:58 +03:00
# check for type alignments
2004-02-13 21:05:49 +03:00
2004-06-07 19:33:53 +04:00
OMPI_C_GET_ALIGNMENT(bool, OMPI_ALIGNMENT_CXX_BOOL)
2005-12-15 07:19:16 +03:00
AC_LANG_POP(C++)
2003-11-22 19:36:58 +03:00
2004-07-14 18:11:03 +04: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])
2004-01-07 10:49:23 +03:00
2005-01-27 04:39:55 +03:00
##################################
# Assembler Configuration
##################################
ompi_show_subtitle "Assembler"
AM_PROG_AS
OMPI_CONFIG_ASM
2003-11-22 19:36:58 +03:00
##################################
# Fortran
##################################
2006-02-12 18:11:36 +03:00
#-----------
# Fortran 77
#-----------
2004-06-07 19:33:53 +04:00
OMPI_SETUP_F77
2006-01-13 07:08:40 +03:00
OMPI_F77_FIND_EXT_SYMBOL_CONVENTION
2004-06-28 23:56:21 +04:00
2005-05-20 03:56:02 +04:00
# 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.
2006-01-13 07:08:40 +03:00
OMPI_F77_CHECK([LOGICAL], [yes], [char, int, int32_t], [-1])
OMPI_F77_CHECK([INTEGER], [yes],
[int32_t, int, int64_r, 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*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])
OMPI_F77_CHECK([DOUBLE PRECISION], [yes],
[float, double, long double], [-1])
OMPI_F77_CHECK([COMPLEX], [yes], [], [-1])
2005-05-20 03:56:02 +04:00
# 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:
2004-06-29 04:02:25 +04:00
#
2005-05-20 03:56:02 +04:00
# 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
2005-05-10 13:09:04 +04:00
2006-01-13 07:08:40 +03:00
OMPI_F77_CHECK([COMPLEX*8], [no], [], [8])
OMPI_F77_CHECK([COMPLEX*16], [no], [], [16])
OMPI_F77_CHECK([COMPLEX*32], [no], [], [32])
2004-03-17 02:54:51 +03:00
2004-10-24 01:08:12 +04:00
# 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
- Implement correct Fortran Logical-handling in f77/f90 interface in
case of:
sizeof(MPI_Flogical) != sizeof (int)
and
Fortran value of .TRUE. != 1
as is often the case.
- Check in configure the value of .TRUE., the C-type coresponding to
logical and check, that fortran compiler does not do something strange
with arrays of logicals
- Convert all occurrences of logicals in the fortran wrappers, only
in case it is needed.
*Please note* Implementation of MPI_Cart_sub needed special treatment.
- Output these value in ompi_info -a
- Clean up the prototypes_mpi.h to just have a single definition and
thereby deleting the necessity for prototypes_pmpi.h
- configured, compiled and tested with F90-program, which uses
MPI_Cart_create and MPI_Cart_get:
linux ia32, gcc (no testing, as no f90)
linux ia32, gcc --disable-mpi-f77 --disable-mpi-f90 (had a bug there)
linux ia32, icc-8.1
linux opteron, gcc-3.3.5, pgcc, pathccx/pathf90 (tested just
pgi-compiler)
linux em64t, gcc, icc-8.1 (tested just icc)
This commit was SVN r8254.
2005-11-24 19:52:35 +03:00
#
# 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
2004-04-14 03:05:31 +04:00
#
2004-06-29 04:02:25 +04:00
# 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.
#
2004-04-14 03:05:31 +04:00
# 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
2004-06-29 04:02:25 +04:00
# 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
2004-04-14 03:05:31 +04:00
#
AM_CONDITIONAL(WANT_MPI_F77_BINDINGS_LAYER,
2004-09-15 13:15:50 +04:00
test \( "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1 \) -a "$OMPI_WANT_F77_BINDINGS" = 1)
2004-04-14 03:05:31 +04:00
AM_CONDITIONAL(WANT_PMPI_F77_BINDINGS_LAYER,
2004-06-07 19:33:53 +04:00
test "$OMPI_WANT_F77_BINDINGS" = 1 -a "$WANT_MPI_PROFILING" = 1)
2004-03-28 14:02:38 +04:00
2006-02-12 18:11:36 +03:00
#-----------
# Fortran 90
#-----------
2005-01-08 00:21:46 +03:00
2004-06-07 19:33:53 +04:00
OMPI_SETUP_F90
2003-11-22 19:36:58 +03:00
2006-02-12 18:11:36 +03: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
2006-02-14 16:05:37 +03:00
OMPI_F90_CHECK([LOGICAL])
2006-02-12 18:11:36 +03:00
# INTEGER and friends
2006-02-14 16:05:37 +03:00
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])
2006-02-12 18:11:36 +03:00
# REAL, DOUBLE PRECISION, REAL*4, *8, *16
2006-02-14 16:05:37 +03:00
OMPI_F90_CHECK([REAL])
OMPI_F90_CHECK([REAL*4], [4], [1])
OMPI_F90_CHECK([REAL*8], [8], [1])
OMPI_F90_CHECK([REAL*16], [16], [1])
2006-02-27 08:19:13 +03:00
OMPI_F90_CHECK([DOUBLE PRECISION])
2006-02-12 18:11:36 +03:00
# COMPLEX, DOUBLE COMPLEX, COMPLEX*8, *16, *32
2006-02-14 16:05:37 +03:00
OMPI_F90_CHECK([COMPLEX])
2006-02-27 08:19:13 +03:00
OMPI_F90_CHECK([COMPLEX*8], [8])
OMPI_F90_CHECK([COMPLEX*16], [16])
OMPI_F90_CHECK([COMPLEX*32], [32])
OMPI_F90_CHECK([DOUBLE COMPLEX])
2006-02-12 18:11:36 +03:00
AC_SUBST(OMPI_F90_IKINDS)
AC_SUBST(OMPI_F90_RKINDS)
AC_SUBST(OMPI_F90_CKINDS)
2006-04-11 07:33:38 +04:00
# 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)
2005-07-26 21:23:24 +04:00
2006-02-12 18:11:36 +03:00
# 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!])
2005-01-08 00:21:46 +03:00
fi
2005-07-26 21:23:24 +04:00
AC_SUBST(OMPI_MPI_ADDRESS_KIND)
2006-04-11 07:33:38 +04:00
# 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)
2005-07-09 22:52:53 +04:00
# checkpoint results
AC_CACHE_SAVE
2003-11-22 19:36:58 +03:00
##################################
# Header files
##################################
2004-06-07 19:33:53 +04:00
ompi_show_title "Header file tests"
2004-03-28 14:52:58 +04:00
2005-04-16 01:18:20 +04:00
AC_CHECK_HEADERS([alloca.h aio.h arpa/inet.h dirent.h \
2006-03-11 05:35:40 +03:00
dlfcn.h execinfo.h err.h fcntl.h grp.h inttypes.h libgen.h \
libutil.h netdb.h netinet/in.h netinet/tcp.h \
2005-04-16 01:18:20 +04:00
poll.h pthread.h pty.h pwd.h sched.h stdint.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 \
sys/stat.h sys/statvfs.h sys/time.h sys/tree.h \
sys/types.h sys/uio.h sys/utsname.h sys/wait.h syslog.h \
2006-03-11 05:35:40 +03:00
time.h termios.h ulimit.h unistd.h util.h utmp.h malloc.h])
2004-09-29 23:42:16 +04:00
2006-01-12 06:19:37 +03:00
# Needed to work around Darwin requiring sys/socket.h for
# net/if.h
AC_CHECK_HEADERS([net/if.h], [], [],
[#include <stdio.h>
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
])
2004-08-05 15:12:25 +04:00
# Note that sometimes we have <stdbool.h>, but it doesn't work (e.g.,
# have both Portland and GNU installed; using pgcc will find GNU's
# <stdbool.h>, which all it does -- by standard -- is define "bool" to
# "_Bool" [see
# http://www.opengroup.org/onlinepubs/009695399/basedefs/stdbool.h.html],
# and Portland has no idea what to do with _Bool).
# So first figure out if we have <stdbool.h> (i.e., check the value of
# the macro HAVE_STDBOOL_H from the result of AC_CHECK_HEADERS,
# above). If we do have it, then check to see if it actually works.
# Define OMPI_USE_STDBOOL_H as approrpaite.
2004-09-29 23:42:16 +04:00
AC_CHECK_HEADERS([stdbool.h], [have_stdbool_h=1], [have_stdbool_h=0])
2004-08-05 15:12:25 +04:00
AC_MSG_CHECKING([if <stdbool.h> works])
if test "$have_stdbool_h" = "1"; then
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
AC_INCLUDES_DEFAULT
#if HAVE_STDBOOL_H
#include <stdbool.h>
#endif]],
[[bool bar, foo = true; bar = foo;]]),
[OMPI_USE_STDBOOL_H=1 MSG=yes],[OMPI_USE_STDBOOL_H=0 MSG=no])
else
OMPI_USE_STDBOOL_H=0
MSG="no (don't have <stdbool.h>)"
fi
AC_DEFINE_UNQUOTED(OMPI_USE_STDBOOL_H, $OMPI_USE_STDBOOL_H,
[Whether to use <stdbool.h> or not])
AC_MSG_RESULT([$MSG])
2003-11-22 19:36:58 +03:00
2005-07-09 22:52:53 +04:00
# checkpoint results
AC_CACHE_SAVE
2003-11-22 19:36:58 +03:00
2005-07-13 08:16:03 +04:00
##################################
# Types
##################################
ompi_show_title "Type tests"
# Size of pid_t
AC_CHECK_SIZEOF(pid_t)
AC_CHECK_TYPES([socklen_t], [AC_DEFINE([HAVE_SOCKLEN_T], [1],
[Whether we have socklen_t or not])],
[], [AC_INCLUDES_DEFAULT
#include <sys/socket.h>])
AC_CHECK_TYPES([struct sockaddr_in], [], [], [AC_INCLUDES_DEFAULT
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif])
# SA_RESTART in signal.h
AC_MSG_CHECKING([if SA_RESTART defined in signal.h])
AC_EGREP_CPP(yes, [
#include <signal.h>
#ifdef SA_RESTART
yes
#endif ], [MSG=yes VALUE=1], [MSG=no VALUE=0])
AC_DEFINE_UNQUOTED(OMPI_HAVE_SA_RESTART, $VALUE,
[Whether we have SA_RESTART in <signal.h> or not])
AC_MSG_RESULT([$MSG])
# sa_len in struct sockaddr
AC_MSG_CHECKING([for sa_len in struct sockaddr])
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
[MSG=yes VALUE=1], [MSG=no VALUE=0])
AC_DEFINE_UNQUOTED(OMPI_HAVE_SA_LEN, $VALUE,
[Whether we have the sa_len struct in <sys/socket.h> or not])
AC_MSG_RESULT([$MSG])
AC_CHECK_MEMBERS([struct dirent.d_type], [], [], [
#include <sys/types.h>
#include <dirent.h>])
AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include <signal.h>])
2005-12-15 03:51:28 +03:00
AC_CHECK_MEMBERS([siginfo_t.si_band],,,[#include <signal.h>])
2005-07-13 08:16:03 +04:00
# checkpoint results
AC_CACHE_SAVE
2003-11-22 19:36:58 +03:00
##################################
# Libraries
##################################
2004-06-07 19:33:53 +04:00
ompi_show_title "Library and Function tests"
2004-03-28 14:02:38 +04:00
2006-01-16 04:48:03 +03:00
AC_CHECK_LIB([util], [openpty])
2005-08-25 01:24:17 +04:00
2006-01-16 04:48:03 +03:00
AC_CHECK_LIB([nsl], [gethostbyname])
2005-08-25 01:24:17 +04:00
2006-01-16 04:48:03 +03:00
AC_CHECK_LIB([socket], [socket])
# Solaris has sched_yeild in -lrt, usually in libc
OMPI_CHECK_FUNC_LIB([sched_yield], [rt])
# FreeBSD has backtrace in -lexecinfo, usually in libc
OMPI_CHECK_FUNC_LIB([backtrace], [execinfo])
# IRIX has dirname in -lgen, usually in libc
OMPI_CHECK_FUNC_LIB([dirname], [gen])
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
OMPI_CHECK_FUNC_LIB([ceil], [m])
2005-08-25 01:24:17 +04:00
2006-04-01 09:46:15 +04:00
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf openpty isatty htonl ntohl htons ntohs getpwuid fork waitpid execve pipe ptsname setsid mmap mallopt tcgetpgrp])
2004-08-11 02:41:17 +04:00
2004-01-14 09:39:55 +03:00
#
# Make sure we can copy va_lists (need check declared, not linkable)
#
2004-06-07 19:33:53 +04:00
AC_CHECK_DECL(va_copy, OMPI_HAVE_VA_COPY=1, OMPI_HAVE_VA_COPY=0,
2004-01-14 09:39:55 +03:00
[#include <stdarg.h>])
2004-06-07 19:33:53 +04:00
AC_DEFINE_UNQUOTED(OMPI_HAVE_VA_COPY, $OMPI_HAVE_VA_COPY,
2004-01-14 09:39:55 +03:00
[Whether we have va_copy or not])
2004-06-07 19:33:53 +04:00
AC_CHECK_DECL(__va_copy, OMPI_HAVE_UNDERSCORE_VA_COPY=1,
OMPI_HAVE_UNDERSCORE_VA_COPY=0, [#include <stdarg.h>])
AC_DEFINE_UNQUOTED(OMPI_HAVE_UNDERSCORE_VA_COPY, $OMPI_HAVE_UNDERSCORE_VA_COPY,
2004-01-14 09:39:55 +03:00
[Whether we have __va_copy or not])
2004-10-29 23:14:11 +04:00
AC_CHECK_DECLS(__func__)
2005-07-09 22:52:53 +04:00
# checkpoint results
AC_CACHE_SAVE
2003-11-22 19:36:58 +03:00
##################################
# System-specific tests
##################################
2004-06-07 19:33:53 +04:00
ompi_show_title "System-specific tests"
2004-06-29 04:02:25 +04:00
2004-01-19 04:33:03 +03:00
#
# Test to determine type of MPI_Offset. This is searched in the following order
# int64_t, long long, long, int. If none of these are 8 bytes, then we should
# search for int32_t, long long, long, int.
#
MPI_OFFSET_TYPE="not found"
2004-12-08 01:40:37 +03:00
MPI_OFFSET_DATATYPE="not found"
2004-01-19 04:33:03 +03:00
AC_MSG_CHECKING([checking for type of MPI_Offset])
clean up the OMPI_BUILDING #define. Rather than being defined to 1 if
we are part of the source tree and not defined otherwise, we are going
with an always defined if ompi_config.h is included policy. If
ompi_config.h is included before mpi.h or before OMPI_BUILDING is set,
it will set OMPI_BUILDING to 1 and enable all the internal code that
is in ompi_config_bottom.h. Otherwise, it will only include the
system configuration data (enough for defining the C and C++ interfaces
to MPI, but not perturbing the user environment).
This should fix the problems with bool and the like that the Eclipse
folks were seeing. It also cleans up some build system hacks that
we had along the way.
Also, don't use int64_t as the default size of MPI_Offset, because it
requires us including stdint.h in mpi.h, which is something we really
shouldn't be doing.
And finally, fix a ROMIO Makefile that didn't set -DOMPI_BUILDING=1,
as ROMIO includes mpi.h, but not ompi_config.h
This commit was SVN r5430.
2005-04-19 07:51:20 +04:00
if test "$ac_cv_type_long_long" = "yes" -a "$ac_cv_sizeof_long_long" = 8; then
2004-01-19 04:33:03 +03:00
MPI_OFFSET_TYPE="long long"
2004-12-08 01:40:37 +03:00
MPI_OFFSET_DATATYPE=MPI_LONG_LONG
MPI_OFFSET_SIZE=8
2005-01-30 22:35:02 +03:00
elif test "$ac_cv_type_long" = "yes" -a "$ac_cv_sizeof_long" = 8; then
2004-01-19 04:33:03 +03:00
MPI_OFFSET_TYPE="long"
2004-12-08 01:40:37 +03:00
MPI_OFFSET_DATATYPE=MPI_LONG
MPI_OFFSET_SIZE=8
2005-01-30 22:35:02 +03:00
elif test "ac_cv_sizeof_int" = 8; then
2004-01-19 04:33:03 +03:00
MPI_OFFSET_TYPE=int
2004-12-08 01:40:37 +03:00
MPI_OFFSET_DATATYPE=MPI_INT
MPI_OFFSET_SIZE=8
2005-01-30 22:35:02 +03:00
elif test "$ac_cv_type_long_long" = "yes" -a "$ac_cv_sizeof_long_long" = 4; then
2004-01-19 04:33:03 +03:00
MPI_OFFSET_TYPE="long long"
2004-12-08 01:40:37 +03:00
MPI_OFFSET_DATATYPE=MPI_LONG_LONG
MPI_OFFSET_SIZE=4
2005-01-30 22:35:02 +03:00
elif test "$ac_cv_type_long" = "yes" -a "$ac_cv_sizeof_long" = 4; then
2004-01-19 04:33:03 +03:00
MPI_OFFSET_TYPE="long"
2004-12-08 01:40:37 +03:00
MPI_OFFSET_DATATYPE=MPI_LONG
MPI_OFFSET_SIZE=4
2005-01-30 22:35:02 +03:00
elif test "ac_cv_sizeof_int" = 4; then
2004-01-19 04:33:03 +03:00
MPI_OFFSET_TYPE=int
2004-12-08 01:40:37 +03:00
MPI_OFFSET_DATATYPE=MPI_INT
MPI_OFFSET_SIZE=4
2004-01-17 01:16:25 +03:00
fi
2004-01-19 04:33:03 +03:00
AC_MSG_RESULT([$MPI_OFFSET_TYPE])
2004-12-08 01:40:37 +03:00
if test "$MPI_OFFSET_TYPE" = "not found"; then
AC_MSG_WARN([*** Unable to find the right definition for MPI_Offset])
2004-01-19 04:33:03 +03:00
AC_MSG_ERROR([Cannot continue])
2004-01-17 01:16:25 +03:00
fi
2005-11-30 06:16:24 +03:00
AC_DEFINE_UNQUOTED(OMPI_MPI_OFFSET_TYPE, $MPI_OFFSET_TYPE, [Type of MPI_Offset -- has to be defined here and typedef'ed later because mpi.h does not get AC SUBST's])
2004-01-19 04:33:03 +03:00
2004-12-08 01:40:37 +03:00
#
# If we haven't already, figure out an MPI datatype that corresponds
clean up the OMPI_BUILDING #define. Rather than being defined to 1 if
we are part of the source tree and not defined otherwise, we are going
with an always defined if ompi_config.h is included policy. If
ompi_config.h is included before mpi.h or before OMPI_BUILDING is set,
it will set OMPI_BUILDING to 1 and enable all the internal code that
is in ompi_config_bottom.h. Otherwise, it will only include the
system configuration data (enough for defining the C and C++ interfaces
to MPI, but not perturbing the user environment).
This should fix the problems with bool and the like that the Eclipse
folks were seeing. It also cleans up some build system hacks that
we had along the way.
Also, don't use int64_t as the default size of MPI_Offset, because it
requires us including stdint.h in mpi.h, which is something we really
shouldn't be doing.
And finally, fix a ROMIO Makefile that didn't set -DOMPI_BUILDING=1,
as ROMIO includes mpi.h, but not ompi_config.h
This commit was SVN r5430.
2005-04-19 07:51:20 +04:00
# to the back-end C type of MPI_Offset.
2004-12-08 01:40:37 +03:00
#
AC_MSG_CHECKING([checking for an MPI datatype for MPI_Offset])
AC_MSG_RESULT([$MPI_OFFSET_DATATYPE])
if test "$MPI_OFFSET_DATATYPE" = "not found"; then
AC_MSG_WARN([*** Unable to find an MPI datatype corresponding to MPI_Offset])
AC_MSG_ERROR([Cannot continue])
fi
AC_DEFINE_UNQUOTED(OMPI_OFFSET_DATATYPE, $MPI_OFFSET_DATATYPE, [MPI datatype corresponding to MPI_Offset])
2004-01-17 01:16:25 +03:00
2003-11-22 19:36:58 +03:00
# all: endian
2004-10-14 16:55:34 +04:00
2006-03-04 16:59:14 +03:00
AC_C_BIGENDIAN
2004-10-14 16:55:34 +04:00
2005-06-27 03:11:37 +04:00
OMPI_CHECK_BROKEN_QSORT
2003-11-22 19:36:58 +03:00
# all: SYSV semaphores
# all: SYSV shared memory
# all: size of FD_SET
# all: sizeof struct stat members
# all: type of getsockopt optlen
# all: type of recvfrom optlen
2004-01-09 08:08:31 +03:00
2004-01-14 10:06:57 +03:00
#
# Check out what thread support we have
#
2004-06-07 19:33:53 +04:00
OMPI_CONFIG_THREADS
2004-03-17 06:04:44 +03:00
CFLAGS="$CFLAGS $THREAD_CFLAGS"
CXXFLAGS="$CXXFLAGS $THREAD_CXXFLAGS"
CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS"
CXXCPPFLAGS="$CXXCPPFLAGS $THREAD_CXXCPPFLAGS"
LDFLAGS="$LDFLAGS $THREAD_LDFLAGS"
LIBS="$LIBS $THREAD_LIBS"
2006-01-16 04:48:03 +03:00
WRAPPER_EXTRA_CPPFLAGS="$WRAPPER_EXTRA_CPPFLAGS $THREAD_CPPFLAGS"
2004-03-17 06:04:44 +03:00
WRAPPER_EXTRA_CFLAGS="$WRAPPER_EXTRA_CFLAGS $THREAD_CFLAGS"
WRAPPER_EXTRA_CXXFLAGS="$WRAPPER_EXTRA_CXXFLAGS $THREAD_CXXFLAGS"
WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $THREAD_FFLAGS"
2004-03-28 14:02:38 +04:00
WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $THREAD_FFLAGS"
2004-03-17 06:04:44 +03:00
WRAPPER_EXTRA_LDFLAGS="$WRAPPER_EXTRA_LDFLAGS $THREAD_LDFLAGS"
2006-01-16 04:48:03 +03:00
# no need to update WRAPPER_EXTRA_LIBS - we'll get it from LT later
2004-01-14 10:06:57 +03:00
2004-02-13 06:58:56 +03:00
#
# What is the local equivalent of "ln -s"
#
AC_PROG_LN_S
2004-08-05 18:01:45 +04:00
#
2004-08-16 03:55:10 +04:00
# We need as and lex
2004-08-05 18:01:45 +04:00
#
2004-08-16 03:55:10 +04:00
AM_PROG_AS
2004-08-05 18:01:45 +04:00
AM_PROG_LEX
2004-09-05 21:45:59 +04:00
# If we don't have GNU Flex and we don't have a generated .c file
2004-08-26 20:17:20 +04:00
# (distribution tarballs will have the .c file included, but SVN
2004-09-05 21:45:59 +04:00
# checkouts will not), then error. Must have GNU Flex -- other
# versions of Lex are not workable (all things being equal, since this
# is *only* required for developers, we decided that it really was not
# worth it to be portable between different versions of lex ;-).
if test -z "$LEX" -o -n "`echo $LEX | grep missing`" -o \
"`basename $LEX`" != "flex"; then
2005-07-04 06:38:44 +04:00
if test ! -f "$srcdir/opal/util/show_help_lex.c"; then
2004-09-05 21:45:59 +04:00
AC_MSG_WARN([*** Could not find GNU Flex on your system.])
AC_MSG_WARN([*** GNU Flex required for developer builds of Open MPI.])
AC_MSG_WARN([*** Other versions of Lex are not supported.])
AC_MSG_WARN([*** YOU DO NOT NEED FLEX FOR DISTRIBUTION TARBALLS!])
AC_MSG_WARN([*** If you absolutely cannot install GNU Flex on this system])
AC_MSG_WARN([*** consider using a distribution tarball, or generate the])
AC_MSG_WARN([*** following files on another system (using Flex) and])
AC_MSG_WARN([*** copy them here:])
for lfile in `find . -name \*.l -print`; do
cfile="`echo $lfile | cut -d. -f-2`"
AC_MSG_WARN([*** $cfile.c])
done
2004-08-26 20:17:20 +04:00
AC_MSG_ERROR([Cannot continue])
fi
fi
2004-01-09 11:25:18 +03:00
#
2004-01-09 08:08:31 +03:00
# File system case sensitivity
2004-01-09 11:25:18 +03:00
#
2004-01-09 08:08:31 +03:00
2004-06-07 19:33:53 +04:00
OMPI_CASE_SENSITIVE_FS_SETUP
2003-11-22 19:36:58 +03:00
# AIX: FIONBIO in sys/ioctl.h
# glibc: memcpy
2005-07-09 22:52:53 +04:00
# checkpoint results
AC_CACHE_SAVE
2003-11-22 19:36:58 +03:00
2004-01-12 00:35:37 +03:00
##################################
# MCA
##################################
2004-12-08 01:40:37 +03:00
ompi_show_title "Modular Component Architecture (MCA) setup"
2004-01-12 00:35:37 +03:00
AC_MSG_CHECKING([for subdir args])
2004-06-07 19:33:53 +04:00
OMPI_CONFIG_SUBDIR_ARGS([ompi_subdir_args])
AC_MSG_RESULT([$ompi_subdir_args])
2004-01-12 00:35:37 +03:00
2004-06-07 19:33:53 +04:00
OMPI_MCA
2004-01-12 00:35:37 +03:00
2005-07-09 22:52:53 +04:00
# checkpoint results
AC_CACHE_SAVE
2004-01-12 00:35:37 +03:00
2004-01-16 04:31:50 +03:00
############################################################################
2004-06-07 19:33:53 +04:00
# Final top-level OMPI configuration
2004-01-16 04:31:50 +03:00
############################################################################
2004-06-07 19:33:53 +04:00
ompi_show_title "Final top-level OMPI configuration"
2004-01-16 04:31:50 +03:00
2004-02-12 21:54:06 +03:00
############################################################################
# Libevent setup
############################################################################
2004-06-07 19:33:53 +04:00
ompi_show_subtitle "Libevent 3rd party event handler"
2004-02-12 21:54:06 +03:00
CFLAGS_save="$CFLAGS"
2004-06-07 19:33:53 +04:00
CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY"
OMPI_SETUP_LIBEVENT
2004-02-12 21:54:06 +03:00
CFLAGS="$CFLAGS_save"
2003-11-22 19:36:58 +03:00
############################################################################
# Libtool: part two
# (after C compiler setup)
############################################################################
2004-06-07 19:33:53 +04:00
ompi_show_subtitle "Libtool configuration"
2003-11-22 19:36:58 +03:00
2004-01-15 02:50:58 +03:00
# Use convenience libltdl for the moment, because we need to force the
# use of the newest libltdl (i.e., the one that ships with libtool
# 1.5) because it has support for a lot more things than older
# versions of libtool (which are generally installed by default).
2005-07-14 22:05:30 +04:00
AS_IF([test "$OMPI_ENABLE_DLOPEN_SUPPORT" = "1"],
[AC_LIBLTDL_CONVENIENCE(opal/libltdl)
AC_LIBTOOL_DLOPEN])
2004-01-15 02:50:58 +03:00
AC_SUBST(LTDLINCL)
AC_SUBST(LIBLTDL)
2003-11-22 19:36:58 +03:00
AM_PROG_LIBTOOL
2004-01-15 02:50:58 +03:00
# AC_CONFIG_SUBDIRS appears to be broken for non-gcc compilers (i.e.,
# passing precious variables down to the sub-configure).
#
# Note that we also did some magic scripty-foo in autogen.sh to rename
2004-06-07 19:33:53 +04:00
# the output libtool library "libompi_ltdl", so add -lompi_ltdl here.
2004-01-15 02:50:58 +03:00
# This is because so many systems have older versions of libltdl
# installed very early in ld.so's search path; if we installed our own
# libltdl in some non-standard path (e.g., $HOME/local or even
# /usr/local), the libltdl in /usr/lib might get found first. And if
# it's older -- or just not matching the version that we need, Bad
# Things happen. [sigh]
#
2004-06-07 19:33:53 +04:00
# Finally, make libompi_ltdl follow the same shared/static convention
# that was user for the main OMPI libraries. So manually examine
2004-01-15 02:50:58 +03:00
# $enable_shared and $enable_static and pass down the corresponding
# flags.
2004-06-07 19:33:53 +04:00
ompi_show_subtitle "GNU libltdl setup"
2004-01-15 02:50:58 +03:00
2005-07-14 22:05:30 +04:00
if test "$OMPI_ENABLE_DLOPEN_SUPPORT" = "1" ; then
ompi_subdir_args="$ompi_subdir_args --enable-ltdl-convenience --disable-ltdl-install"
if test "$enable_shared" = "yes"; then
ompi_subdir_args="$ompi_subdir_args --enable-shared"
else
ompi_subdir_args="$ompi_subdir_args --disable-shared"
fi
if test "$enable_static" = "yes"; then
ompi_subdir_args="$ompi_subdir_args --enable-static"
else
ompi_subdir_args="$ompi_subdir_args --disable-static"
fi
2004-01-15 02:50:58 +03:00
2005-07-14 22:05:30 +04:00
CFLAGS_save="$CFLAGS"
CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY"
OMPI_CONFIG_SUBDIR(opal/libltdl, [$ompi_subdir_args], [HAPPY=1], [HAPPY=0])
if test "$HAPPY" = "1"; then
LIBLTDL_SUBDIR=libltdl
LIBLTDL_LTLIB=libltdl/libltdlc.la
WANT_LIBLTDL=1
# Arrgh. This is gross. But I can't think of any other way to do
# it. :-(
flags="`egrep ^LIBADD_DL opal/libltdl/Makefile | cut -d= -f2-`"
OMPI_CHECK_LINKER_FLAGS([opal/libltdl/libtool], [-export-dynamic $flags])
WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS $extra_ldflags"
LDFLAGS="-export-dynamic $LDFLAGS"
else
2005-11-30 17:00:31 +03:00
AC_MSG_ERROR([Failed to build GNU libltdl. This usually means that something
is incorrectly setup with your environment. There may be useful information in
opal/libltdl/config.log. You can also disable GNU libltdl (which will disable
dynamic shared object loading) by configuring with --disable-dlopen.])
2005-07-14 22:05:30 +04:00
fi
CFLAGS="$CFLAGS_save"
2006-01-16 04:48:03 +03:00
OPAL_LTDL_CPPFLAGS='-I$(top_srcdir)/opal/libltdl'
2004-01-15 02:50:58 +03:00
else
2005-07-14 22:05:30 +04:00
AC_MSG_WARN([libltdl support disabled (by --disable-dlopen)])
2004-01-15 02:50:58 +03:00
LIBLTDL_SUBDIR=
LIBLTDL_LTLIB=
WANT_LIBLTDL=0
2006-01-16 04:48:03 +03:00
OPAL_LTDL_CPPFLAGS=
# append instead of prepend, since LIBS are going to be system
# type things needed by everyone. Normally, libltdl will push
# these into LIBS, but since we've disabled libltdl, we need
# to do it here.
WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS $LIBS"
2004-01-15 02:50:58 +03:00
fi
2005-07-14 22:05:30 +04:00
2004-01-15 02:50:58 +03:00
AC_SUBST(LIBLTDL_SUBDIR)
AC_SUBST(LIBLTDL_LTLIB)
2005-09-01 16:16:36 +04:00
# Have a variable that can be used to indicate where ltdl.h lives. Do
# this specifically so that we get the included ltdl.h (which we know
# will work properly with the compiled code, including libltdl), not
# the system one (which is likely to be far too old and buggy).
AC_SUBST(OPAL_LTDL_CPPFLAGS)
2006-01-16 04:48:03 +03:00
AM_CONDITIONAL(WANT_LIBLTDL, test "$WANT_LIBLTDL" = "1")
AC_DEFINE_UNQUOTED(OMPI_WANT_LIBLTDL, $WANT_LIBLTDL,
[Whether to include support for libltdl or not])
2003-11-22 19:36:58 +03:00
############################################################################
2005-10-28 03:23:08 +04:00
# final compiler config
2003-11-22 19:36:58 +03:00
############################################################################
2005-10-28 03:23:08 +04:00
ompi_show_subtitle "Compiler flags"
2003-11-22 19:36:58 +03:00
#
# This is needed for VPATH builds, so that it will -I the appropriate
2005-09-01 16:16:36 +04:00
# include directory. We delayed doing it until now just so that
2003-11-22 19:36:58 +03:00
# '-I$(top_srcdir)' doesn't show up in any of the configure output --
# purely aesthetic.
#
2006-02-12 04:33:29 +03:00
# Because opal_config.h, orte_config.h, and ompi_config.h are all
# created by AC_CONFIG_HEADERS, we don't need to -I the builddir for
# <project>/include. If we VPATH building, we do need to include the
# source directories, however.
2005-09-01 16:16:36 +04:00
#
2006-02-12 04:33:29 +03:00
if test "$OMPI_TOP_BUILDDIR" != "$OMPI_TOP_SRCDIR"; then
2006-03-07 11:49:59 +03:00
CPPFLAGS='-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal/include -I$(top_srcdir)/orte/include -I$(top_srcdir)/ompi/include'" $CPPFLAGS"
CXXCPPFLAGS='-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal/include -I$(top_srcdir)/orte/include -I$(top_srcdir)/ompi/include'" $CXXCPPFLAGS"
2006-02-12 04:33:29 +03:00
else
2006-03-07 11:49:59 +03:00
CPPFLAGS='-I$(top_srcdir)'" $CPPFLAGS"
CXXCPPFLAGS='-I$(top_srcdir)'" $CXXCPPFLAGS"
2006-02-12 04:33:29 +03:00
fi
2003-11-22 19:36:58 +03:00
2005-09-01 14:37:20 +04:00
#
# Do a final process of the CFLAGS to make a WITHOUT_OPTFLAGS version.
# We need this so that we can guarantee to build the TotalView stuff
# with -g and nothing else.
#
OMPI_MAKE_STRIPPED_FLAGS($CFLAGS)
CFLAGS_WITHOUT_OPTFLAGS="$s_result"
if test "$with_tv_debug_flags" != ""; then
TOTALVIEW_DEBUG_FLAGS="$with_tv_debug_flags"
else
TOTALVIEW_DEBUG_FLAGS="-g"
fi
AC_MSG_CHECKING([which of CFLAGS are ok for TotalView modules])
AC_MSG_RESULT([$CFLAGS_WITHOUT_OPTFLAGS])
AC_MSG_CHECKING([extra CFLAGS for TotalView modules])
AC_MSG_RESULT([$TOTALVIEW_DEBUG_FLAGS])
AC_SUBST(CFLAGS_WITHOUT_OPTFLAGS)
AC_SUBST(TOTALVIEW_DEBUG_FLAGS)
2005-02-08 08:06:15 +03:00
2004-01-19 04:41:40 +03:00
#
# Delayed the substitution of CFLAGS and CXXFLAGS until now because
# they may have been modified throughout the course of this script.
#
2003-11-22 19:36:58 +03:00
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(CXXCPPFLAGS)
AC_SUBST(FFLAGS)
2004-03-28 14:02:38 +04:00
AC_SUBST(FCFLAGS)
2003-11-22 19:36:58 +03:00
2005-10-28 03:23:08 +04:00
############################################################################
# final wrapper compiler config
############################################################################
ompi_show_subtitle "Wrapper compiler flags"
OMPI_SETUP_WRAPPER_FINAL
2003-11-22 19:36:58 +03:00
############################################################################
# Party on
############################################################################
2004-06-07 19:33:53 +04:00
ompi_show_subtitle "Final output"
2003-11-22 19:36:58 +03:00
2006-03-12 07:35:01 +03:00
OMPI_INSTALL_DIRS(opal/include/opal/install_dirs.h)
2006-02-12 04:33:29 +03:00
AM_CONFIG_HEADER([opal/include/opal_config.h orte/include/orte_config.h ompi/include/ompi_config.h ompi/include/mpi.h])
2003-11-22 19:36:58 +03:00
AC_CONFIG_FILES([
Makefile
config/Makefile
2005-08-22 01:04:52 +04:00
contrib/Makefile
2004-08-30 14:44:30 +04:00
2005-07-02 18:29:45 +04:00
opal/Makefile
2006-02-12 04:33:29 +03:00
opal/etc/Makefile
opal/include/Makefile
2005-07-02 18:29:45 +04:00
opal/asm/Makefile
opal/event/Makefile
opal/event/compat/Makefile
opal/event/compat/sys/Makefile
opal/util/Makefile
2006-01-16 04:48:03 +03:00
opal/util/keyval/Makefile
2005-07-02 18:29:45 +04:00
opal/mca/base/Makefile
2006-01-16 04:48:03 +03:00
opal/tools/wrappers/Makefile
opal/tools/wrappers/opalcc-wrapper-data.txt
opal/tools/wrappers/opalc++-wrapper-data.txt
2005-07-02 18:29:45 +04:00
2005-07-02 18:44:41 +04:00
orte/Makefile
2006-02-12 04:33:29 +03:00
orte/include/Makefile
orte/etc/Makefile
2005-07-02 18:44:41 +04:00
2005-07-02 18:29:45 +04:00
orte/tools/console/Makefile
orte/tools/orted/Makefile
orte/tools/orteprobe/Makefile
orte/tools/orterun/Makefile
2005-07-02 19:40:49 +04:00
orte/tools/openmpi/Makefile
2006-01-16 04:48:03 +03:00
orte/tools/wrappers/Makefile
orte/tools/wrappers/ortecc-wrapper-data.txt
orte/tools/wrappers/ortec++-wrapper-data.txt
2005-07-02 18:29:45 +04:00
2005-07-02 19:40:49 +04:00
ompi/Makefile
2006-02-12 04:33:29 +03:00
ompi/etc/Makefile
ompi/include/Makefile
Bring over changes from the /tmp/fortran-stuff series:
- Make the F90 bindings compile and link properly with gfortran 4.0,
4.1, Intel 9.0, PGI 6.1, Sun (don't know version offhand -- the most
current as of this writing, I think), and NAG 5.2, although some
have limitations (e.g., NAG can't seem to handle the medium and
large sizes)
- Building the F90 "small" module size is now the default, even for
developers
- Split up mpif.h into multiple files because parts of it were toxic
to the F90 bindings
- Properly specify unsized/unshaped arrays to make the bindings work
on all known compilers
- Make ompi_info show Fortran 90 bindings size
- XML somewhat lags the generated scripts as of this commit, but
functionality was my main goal -- the XML can be updated later (if
at all).
This commit was SVN r10118.
2006-05-30 18:37:41 +04:00
ompi/include/mpif-config.h
2005-07-02 18:29:45 +04:00
2006-03-15 06:35:30 +03:00
ompi/datatype/Makefile
2005-09-01 00:35:15 +04:00
ompi/debuggers/Makefile
2005-07-02 18:29:45 +04:00
ompi/mpi/Makefile
ompi/mpi/c/Makefile
ompi/mpi/c/profile/Makefile
ompi/mpi/cxx/Makefile
ompi/mpi/f77/Makefile
ompi/mpi/f77/profile/Makefile
ompi/mpi/f90/Makefile
ompi/mpi/f90/fortran_kinds.sh
ompi/mpi/f90/fortran_sizes.h
ompi/mpi/f90/scripts/Makefile
ompi/tools/ompi_info/Makefile
ompi/tools/wrappers/Makefile
2006-01-21 05:05:58 +03:00
ompi/tools/wrappers/mpicc-wrapper-data.txt
ompi/tools/wrappers/mpic++-wrapper-data.txt
ompi/tools/wrappers/mpif77-wrapper-data.txt
ompi/tools/wrappers/mpif90-wrapper-data.txt
2005-07-02 18:29:45 +04:00
2005-03-22 07:25:01 +03:00
test/Makefile
test/asm/Makefile
test/class/Makefile
2006-02-07 06:32:36 +03:00
test/dss/Makefile
2005-03-22 07:25:01 +03:00
test/mca/Makefile
test/mca/gpr/Makefile
2006-02-07 06:32:36 +03:00
test/mca/gpr/remote/Makefile
2005-03-22 07:25:01 +03:00
test/mca/ns/Makefile
test/mca/oob/Makefile
2005-04-02 00:17:49 +04:00
test/mca/ras/Makefile
2005-03-22 07:25:01 +03:00
test/mca/rds/Makefile
2005-04-02 00:17:49 +04:00
test/mca/rmaps/Makefile
2006-02-07 06:32:36 +03:00
test/mca/rmgr/Makefile
2005-05-01 04:47:35 +04:00
test/mca/schema/Makefile
2006-02-07 06:32:36 +03:00
test/mca/soh/Makefile
2005-08-10 02:40:42 +04:00
test/memory/Makefile
2005-03-22 07:25:01 +03:00
test/runtime/Makefile
test/support/Makefile
test/threads/Makefile
test/util/Makefile
2006-03-23 08:53:38 +03:00
test/peruse/Makefile
2006-05-22 10:12:43 +04:00
test/datatype/Makefile
2003-11-22 19:36:58 +03:00
])
AC_OUTPUT