1
1
openmpi/configure.ac

571 строка
15 KiB
Plaintext
Исходник Обычный вид История

2003-11-22 19:36:58 +03:00
# -*- shell-script -*-
#
# $HEADER$
2003-11-22 19:36:58 +03:00
#
############################################################################
# Initialization, version number, and other random setup/init stuff
############################################################################
# Init autoconf
AC_INIT(./src/mpi/interface/c/init.c)
2003-11-22 19:36:58 +03:00
AC_PREREQ(2.52)
AC_CONFIG_AUX_DIR(./config)
# Get the version of LAM that we are installing
LAM_GET_VERSION($srcdir/config, $srcdir/VERSION, LAM)
AC_DEFINE_UNQUOTED(LAM_MAJOR_VERSION, $LAM_MAJOR_VERSION,
[Major LAM version])
AC_DEFINE_UNQUOTED(LAM_MINOR_VERSION, $LAM_MINOR_VERSION,
[Minor LAM version])
AC_DEFINE_UNQUOTED(LAM_RELEASE_VERSION, $LAM_RELEASE_VERSION,
[Release LAM version])
AC_DEFINE_UNQUOTED(LAM_ALPHA_VERSION, $LAM_ALPHA_VERSION,
[Alpha LAM version])
AC_DEFINE_UNQUOTED(LAM_BETA_VERSION, $LAM_BETA_VERSION,
[Beta LAM version])
AC_DEFINE_UNQUOTED(LAM_CVS_VERSION, $LAM_CVS_VERSION,
[CVS LAM version])
AC_DEFINE_UNQUOTED(LAM_VERSION, "$LAM_VERSION",
[Overall LAM version number])
AC_SUBST(LAM_MAJOR_VERSION)
AC_SUBST(LAM_MINOR_VERSION)
AC_SUBST(LAM_RELEASE_VERSION)
AC_SUBST(LAM_ALPHA_VERSION)
AC_SUBST(LAM_BETA_VERSION)
AC_SUBST(LAM_CVS_VERSION)
AC_SUBST(LAM_VERSION)
2003-11-22 19:36:58 +03:00
#
# Start it up
#
LAM_CONFIGURE_SETUP
lam_show_title "Configuring LAM version $LAM_VERSION"
lam_show_subtitle "Initialization, setup"
2003-11-22 19:36:58 +03:00
#
# Init automake
# The third argument to AM_INIT_AUTOMAKE surpresses the PACKAGE and
# VERSION macors
#
AM_INIT_AUTOMAKE(lam, $LAM_VERSION, 'no')
2003-11-22 19:36:58 +03:00
LAM_TOP_BUILDDIR="`pwd`"
AC_SUBST(LAM_TOP_BUILDDIR)
2003-11-22 19:36:58 +03:00
cd "$srcdir"
LAM_TOP_SRCDIR="`pwd`"
AC_SUBST(LAM_TOP_SRCDIR)
cd "$LAM_TOP_BUILDDIR"
2003-11-22 19:36:58 +03:00
AC_MSG_NOTICE([builddir: $LAM_TOP_BUILDDIR])
AC_MSG_NOTICE([srcdir: $LAM_TOP_SRCDIR])
if test "$LAM_TOP_BUILDDIR" != "$LAM_TOP_SRCDIR"; then
2003-11-22 19:36:58 +03:00
AC_MSG_NOTICE([Detected VPATH build])
fi
# Setup the top of the src/include/lam_config.h file
2003-11-22 19:36:58 +03:00
AH_TOP([/* -*- c -*-
*
* $HEADER$
2003-11-22 19:36:58 +03:00
*
* Function: - OS, CPU and compiler dependent configuration
*/
#ifndef LAM_CONFIG_H
#define LAM_CONFIG_H
])
AH_BOTTOM([
#include "lam_config_bottom.h"
#endif /* LAM_CONFIG_H */
2003-11-22 19:36:58 +03:00
])
# What kind of machine are we on?
AC_CANONICAL_HOST
############################################################################
# Configuration options
############################################################################
LAM_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.
#
lam_enable_shared="$enable_shared"
lam_enable_static="$enable_static"
2003-11-22 19:36:58 +03:00
AM_DISABLE_SHARED
AM_ENABLE_STATIC
############################################################################
# Check for compilers and preprocessors
############################################################################
##################################
# C compiler characteristics
##################################
LAM_SETUP_CC
2003-11-22 19:36:58 +03:00
# force ANSI prototypes
# check for STDC
# check for some types
AC_CHECK_TYPES(long long)
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)
2003-11-22 19:36:58 +03:00
# check for type sizes
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(void *)
2003-11-22 19:36:58 +03:00
# check for type alignments
AC_C_INLINE
AC_C_RESTRICT
AC_CHECK_HEADERS(stdbool.h)
LAM_C_WEAK_SYMBOLS
2003-11-22 19:36:58 +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
LAM_C_HAVE_WEAK_SYMBOLS=0
fi
if test "$WANT_MPI_PROFILING" = "1"; then
if test "$LAM_C_HAVE_WEAK_SYMBOLS" = "1"; then
LAM_PROFILING_COMPILE_SEPARATELY=0
else
LAM_PROFILING_COMPILE_SEPARATELY=1
fi
else
LAM_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 AM_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 "$LAM_PROFILING_COMPILE_SEPARATELY" = 1)
AM_CONDITIONAL(WANT_PMPI_BINDINGS_LAYER,
test "$WANT_MPI_PROFILING" = 1)
AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY,
test "$LAM_PROFILING_COMPILE_SEPARATELY" = 1)
AC_DEFINE_UNQUOTED(LAM_WANT_MPI_PROFILING, $WANT_MPI_PROFILING,
[Whether we want MPI profiling or not])
AC_DEFINE_UNQUOTED(LAM_HAVE_WEAK_SYMBOLS, $LAM_C_HAVE_WEAK_SYMBOLS,
[Wehther we have weak symbols or not])
2003-11-22 19:36:58 +03:00
##################################
# C++ compiler characteristics
##################################
LAM_SETUP_CXX
2003-11-22 19:36:58 +03:00
# check for STL
# check for bool (and corresponding C type)
# check for true/false
# check for type sizes
# check for type alignments
# check for template repository
2003-11-22 19:36:58 +03:00
##################################
# Fortran
##################################
LAM_SETUP_F77
if test -n "$F77"; then
LAM_F77_FIND_EXT_SYMBOL_CONVENTION($F77)
fi
LAM_SETUP_F90
2003-11-22 19:36:58 +03:00
##################################
# Header files
##################################
# snprintf declaration
# gethostname declaration
# headers:
# stropts.h grh.h netinet/tcp.h sys/select.h sys/resource.h pty.h util.h
# rpc/types.h rpc/xdr.h sched.h strings.h
# SA_RESTART in signal.h
# sa_len in struct sockaddr
# union semun in sys/sem.h
##################################
# Libraries
##################################
# -lsocket
# -lnsl
# -lutil (openpty)
# openpty
# atexit
# getcwd
# snprintf
# atoll
# strtoll
# yield
# sched_yield
# vscanf
#
# Make sure we can copy va_lists (need check declared, not linkable)
#
AC_CHECK_DECL(va_copy, LAM_HAVE_VA_COPY=1, LAM_HAVE_VA_COPY=0,
[#include <stdarg.h>])
AC_DEFINE_UNQUOTED(LAM_HAVE_VA_COPY, $LAM_HAVE_VA_COPY,
[Whether we have va_copy or not])
AC_CHECK_DECL(__va_copy, LAM_HAVE_UNDERSCORE_VA_COPY=1,
LAM_HAVE_UNDERSCORE_VA_COPY=0, [#include <stdarg.h>])
AC_DEFINE_UNQUOTED(LAM_HAVE_UNDERSCORE_VA_COPY, $LAM_HAVE_UNDERSCORE_VA_COPY,
[Whether we have __va_copy or not])
2003-11-22 19:36:58 +03:00
##################################
# System-specific tests
##################################
lam_show_title "System-specific tests"
2003-11-22 19:36:58 +03:00
# all: endian
# all: SYSV semaphores
# all: SYSV shared memory
# all: thread flavor
# all: size of FD_SET
# all: FD passing (or not!!)
# all: BSD vs. SYSV ptys
# all: sizeof struct stat members
# all: type of getsockopt optlen
# all: type of recvfrom optlen
#
# Check out what thread support we have
#
LAM_CONFIG_THREADS
#
# File system case sensitivity
#
LAM_CASE_SENSITIVE_FS_SETUP
2003-11-22 19:36:58 +03:00
# AIX: FIONBIO in sys/ioctl.h
# glibc: memcpy
##################################
# MCA
##################################
lam_show_title "MPI Component Architecture (MCA) setup"
AC_MSG_CHECKING([for subdir args])
LAM_CONFIG_SUBDIR_ARGS([lam_subdir_args])
AC_MSG_RESULT([$lam_subdir_args])
LAM_MCA
2003-11-22 19:36:58 +03:00
############################################################################
# Libtool: part two
# (after C compiler setup)
############################################################################
lam_show_title "Libtool / libltdl configuration"
2003-11-22 19:36: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).
AC_LIBLTDL_CONVENIENCE(src/mca/libltdl)
AC_SUBST(LTDLINCL)
AC_SUBST(LIBLTDL)
AC_LIBTOOL_DLOPEN
2003-11-22 19:36:58 +03:00
AM_PROG_LIBTOOL
# 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
# the output libtool library "liblamltdl", so add -llamltdl here.
# 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]
#
# Finally, make liblamltdl follow the same shared/static convention
# that was user for the main LAM libraries. So manually examine
# $enable_shared and $enable_static and pass down the corresponding
# flags.
lam_show_subtitle "GNU libltdl setup"
lam_subdir_args="$lam_subdir_args --enable-ltdl-convenience --disable-ltdl-install"
if test "$enable_shared" = "yes"; then
lam_subdir_args="$lam_subdir_args --enable-shared"
else
lam_subdir_args="$lam_subdir_args --disable-shared"
fi
if test "$enable_static" = "yes"; then
lam_subdir_args="$lam_subdir_args --enable-static"
else
lam_subdir_args="$lam_subdir_args --disable-static"
fi
LAM_CONFIG_SUBDIR(src/mca/libltdl, [$lam_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 src/mca/libltdl/Makefile | cut -d= -f2-`"
LAM_CHECK_LINKER_FLAGS([src/mca/libltdl/libtool], [-export-dynamic $flags])
WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS $extra_ldflags"
LDFLAGS="-export-dynamic $LDFLAGS"
else
LIBLTDL_SUBDIR=
LIBLTDL_LTLIB=
WANT_LIBLTDL=0
fi
AC_SUBST(LIBLTDL_SUBDIR)
AC_SUBST(LIBLTDL_LTLIB)
AM_CONDITIONAL(WANT_LIBLTDL, test "$WANT_LIBLTDL" = "1")
AC_DEFINE_UNQUOTED(LAM_WANT_LIBLTDL, $WANT_LIBLTDL,
[Whether to include support for libltdl or not])
2003-11-22 19:36:58 +03:00
############################################################################
# final wrapper compiler config
############################################################################
lam_show_title "Final top-level LAM configuration"
2003-11-22 19:36:58 +03:00
#
# This is needed for VPATH builds, so that it will -I the appropriate
# include directory (don't know why automake doesn't do this
# automatically). We delayed doing it until now just so that
# '-I$(top_srcdir)' doesn't show up in any of the configure output --
# purely aesthetic.
#
CPPFLAGS='-I$(top_srcdir)/src -I$(top_srcdir)/src/include'" $CPPFLAGS"
CXXCPPFLAGS='-I$(top_srcdir)/src -I$(top_srcdir)/src/include'" $CXXCPPFLAGS"
2003-11-22 19:36:58 +03:00
#
# Adding WRAPPER_* flags so that extra flags needed for wrappper compilers
#
# WRAPPER_EXTRA_CFLAGS
#
LAM_UNIQ(WRAPPER_EXTRA_CFLAGS)
AC_SUBST(WRAPPER_EXTRA_CFLAGS)
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CFLAGS, "$WRAPPER_EXTRA_CFLAGS",
[Additional CFLAGS to pass through the wrapper compilers])
#
# WRAPPER_EXTRA_CXXFLAGS
#
LAM_UNIQ(WRAPPER_EXTRA_CXXFLAGS)
AC_SUBST(WRAPPER_EXTRA_CXXFLAGS)
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CXXFLAGS, "$WRAPPER_EXTRA_CXXFLAGS",
[Additional CXXFLAGS to pass through the wrapper compilers])
#
# WRAPPER_EXTRA_FFLAGS
#
LAM_UNIQ(WRAPPER_EXTRA_FFLAGS)
AC_SUBST(WRAPPER_EXTRA_FFLAGS)
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FFLAGS, "$WRAPPER_EXTRA_FFLAGS",
[Additional FFLAGS to pass through the wrapper compilers])
#
# WRAPPER_EXTRA_LDFLAGS
#
LAM_UNIQ(WRAPPER_EXTRA_LDFLAGS)
AC_SUBST(WRAPPER_EXTRA_LDFLAGS)
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LDFLAGS, "$WRAPPER_EXTRA_LDFLAGS",
[Additional LDFLAGS to pass through the wrapper compilers])
#
# WRAPPER_EXTRA_LIBS
#
AC_SUBST(WRAPPER_EXTRA_LIBS)
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LIBS, "$WRAPPER_EXTRA_LIBS",
[Additional LIBS to pass through the wrapper compilers])
2003-11-22 19:36:58 +03:00
#
# Delayed the substitution of CFLAGS and CXXFLAGS until now because
# they may have been modified throughout the course of this script.
#
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(CXXCPPFLAGS)
AC_SUBST(FFLAGS)
############################################################################
# Party on
############################################################################
lam_show_subtitle "Final output"
2003-11-22 19:36:58 +03:00
AM_CONFIG_HEADER([src/include/lam_config.h])
2003-11-22 19:36:58 +03:00
AC_CONFIG_FILES([
Makefile
config/Makefile
src/Makefile
src/include/Makefile
src/lam/Makefile
src/lam/ctnetwork/Makefile
src/lam/lfc/Makefile
src/lam/mem/Makefile
src/lam/os/Makefile
src/lam/os/cygwin/Makefile
src/lam/os/darwin/Makefile
src/lam/os/darwin/ppc_32/Makefile
src/lam/os/darwin/ppc_64/Makefile
src/lam/os/irix/Makefile
src/lam/os/irix/sn0/Makefile
src/lam/os/linux/Makefile
src/lam/os/linux/alpha/Makefile
src/lam/os/linux/i686/Makefile
src/lam/os/linux/ia64/Makefile
src/lam/os/linux/x86_64/Makefile
src/lam/os/tru64/Makefile
src/lam/runtime/Makefile
src/lam/threads/Makefile
src/lam/util/Makefile
2003-11-22 19:36:58 +03:00
src/mpi/Makefile
src/mpi/attribute/Makefile
src/mpi/communicator/Makefile
src/mpi/datatype/Makefile
src/mpi/errhandler/Makefile
src/mpi/group/Makefile
src/mpi/info/Makefile
src/mpi/interface/Makefile
src/mpi/interface/c/Makefile
src/mpi/interface/c/profile/Makefile
src/mpi/interface/cxx/Makefile
src/mpi/interface/f77/Makefile
src/mpi/interface/f77/profile/Makefile
src/mpi/interface/f90/Makefile
src/mpi/op/Makefile
src/mpi/proc/Makefile
src/mpi/request/Makefile
src/mpi/runtime/Makefile
src/mca/Makefile
src/mca/lam/Makefile
src/mca/lam/base/Makefile
src/mca/lam/common_lam/Makefile
src/mca/lam/common_lam/base/Makefile
src/mca/lam/oob/Makefile
src/mca/lam/oob/base/Makefile
src/mca/lam/pcm/Makefile
src/mca/lam/pcm/base/Makefile
src/mca/lam/registry/Makefile
src/mca/lam/registry/base/Makefile
src/mca/mpi/Makefile
src/mca/mpi/base/Makefile
src/mca/mpi/coll/Makefile
src/mca/mpi/coll/base/Makefile
src/mca/mpi/common_mpi/Makefile
src/mca/mpi/common_mpi/base/Makefile
src/mca/mpi/io/Makefile
src/mca/mpi/io/base/Makefile
src/mca/mpi/one/Makefile
src/mca/mpi/one/base/Makefile
src/mca/mpi/pml/Makefile
src/mca/mpi/pml/base/Makefile
src/mca/mpi/ptl/Makefile
src/mca/mpi/ptl/base/Makefile
src/mca/mpi/topo/Makefile
src/mca/mpi/topo/base/Makefile
2003-11-22 19:36:58 +03:00
src/tools/Makefile
src/tools/mpirun/Makefile
2003-11-22 19:36:58 +03:00
src/tools/wrappers/Makefile
test/Makefile
test/support/Makefile
test/lam/Makefile
test/lam/lfc/Makefile
2003-11-22 19:36:58 +03:00
test/unit/Makefile
test/unit/lam/Makefile
test/unit/lam/oob_cofs/Makefile
test/unit/lam/util/Makefile
2003-11-22 19:36:58 +03:00
test/unit/mpi/Makefile
test/unit/mpi/communicator/Makefile
test/unit/mpi/datatype/Makefile
])
AC_OUTPUT