1
1
openmpi/config/mca_configure.ac
Jeff Squyres 97bed7c0d4 Building MCA components as DSOs is now the default. Use
--disable-mca-dso to build MCA components statically as part of
libmpi, or --enable-mca-dso=LIST to only build some components as DSOs
(see ./configure --help for more details).

This commit was SVN r1521.
2004-06-30 22:11:32 +00:00

248 строки
7.0 KiB
Bash

# -*- shell-script -*-
#
# $HEADER$
#
############################################################################
# Initialization, version number, and other random setup/init stuff
############################################################################
# Init autoconf
AC_INIT(@PARAM_INIT_FILE@)
AC_PREREQ(2.57)
AC_CONFIG_AUX_DIR(@PARAM_CONFIG_AUX_DIR@)
# Establish the top-level OMPI directory
top_ompi_srcdir='$(top_srcdir)/../../../..'
top_ompi_builddir='$(top_builddir)/../../../..'
AC_SUBST(top_ompi_srcdir)
AC_SUBST(top_ompi_builddir)
# Get the version of @MCA_TYPE@ @MCA_MODULE_NAME@ that we are installing.
if test -n "@PARAM_VERSION_FILE@" -a -f "@PARAM_VERSION_FILE@"; then
OMPI_GET_VERSION($srcdir/../../../../config, @PARAM_VERSION_FILE@,
@PARAM_VAR_PREFIX@)
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MAJOR_VERSION,
$@PARAM_VAR_PREFIX@_MAJOR_VERSION,
[Major OMPI MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MINOR_VERSION,
$@PARAM_VAR_PREFIX@_MINOR_VERSION,
[Minor OMPI MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_RELEASE_VERSION,
$@PARAM_VAR_PREFIX@_RELEASE_VERSION,
[Release OMPI MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_ALPHA_VERSION,
$@PARAM_VAR_PREFIX@_ALPHA_VERSION,
[Alpha OMPI MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_BETA_VERSION,
$@PARAM_VAR_PREFIX@_BETA_VERSION,
[Beta OMPI MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_CVS_VERSION,
$@PARAM_VAR_PREFIX@_CVS_VERSION,
[CVS OMPI MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_VERSION,
"$@PARAM_VAR_PREFIX@_VERSION",
[Overall OMPI MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version number])
version_string="version $@PARAM_VAR_PREFIX@_VERSION"
else
version_string=""
fi
#
# Start it up
#
OMPI_CONFIGURE_SETUP
ompi_show_title "Configuring MCA @MCA_TYPE@ @MCA_MODULE_NAME@ module $version_string"
ompi_show_subtitle "Initialization, setup"
#
# Init automake
# The third argument to AM_INIT_AUTOMAKE surpresses the PACKAGE and
# VERSION macors
#
AM_INIT_AUTOMAKE(@PARAM_AM_NAME@, $@PARAM_VAR_PREFIX@_VERSION, 'no')
# Setup the top-level MCA module config.h file
AH_TOP([/* -*- c -*-
*
* $HEADER$
*
* OMPI/MPI configuation header file.
* MCA @MCA_TYPE@: @MCA_MODULE_NAME@ module
*/
#ifndef @PARAM_VAR_PREFIX@_CONFIG_H
#define @PARAM_VAR_PREFIX@_CONFIG_H
])
AH_BOTTOM([#endif /* _@PARAM_VAR_PREFIX@_CONFIG_H */])
#
# Do the normal basics of setup:
# - set CLEANFILES
# - figure out the host type
# - set the default prefix
#
OMPI_BASIC_SETUP
#
# Check to see if the user wants this @MCA_TYPE@ to be the default
#
AC_MSG_CHECKING([if want the @MCA_MODULE_NAME@ @MCA_TYPE@ to be the default])
want_default=0
result=no
AC_ARG_WITH(@PROCESSED_MCA_TYPE@,
AC_HELP_STRING([--with-@PROCESSED_MCA_TYPE@=name],
[if name is "@MCA_MODULE_NAME@", the @MCA_MODULE_NAME@ @MCA_TYPE@ will be the default]))
if test "$with_@PROCESSED_MCA_TYPE@" = "@MCA_MODULE_NAME@"; then
want_default=1
result=yes
fi
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_DEFAULT, $want_default,
[Whether the @MCA_MODULE_NAME@ @MCA_TYPE@ is the default @PROCESSED_MCA_TYPE@ or not])
AC_MSG_RESULT([$result])
#
# Check and see if the user wants this module built as a run-time
# loadable module. Acceptable combinations:
#
# [default -- no option]
# --with-modules
# --with-modules=[.+,]*MODULE_TYPE[.+,]*
# --with-modules=[.+,]*MODULE_TYPE-MODULE_NAME[.+,]*
# --without-modules
#
AC_MSG_CHECKING([if want module to be run-time loadable])
AC_ARG_WITH(modules,
AC_HELP_STRING([--with-modules=name],
[if name is "@MCA_TYPE@-@MCA_MODULE_NAME@", then @MCA_MODULE_NAME@ will be compiled as a loadable module (if supported on this platform). This directly implies "--enable-shared=@MCA_TYPE@-@MCA_MODULE_NAME@ --disable-static=@MCA_TYPE@-@MCA_MODULE_NAME@"]))
# Manual conversion of $kind to its generic name (e.g., crmpi->cr,
# crompi->cr).
case "@MCA_TYPE@" in
crmpi)
generic_type="cr"
;;
crompi)
generic_type="cr"
;;
*)
generic_type="@MCA_TYPE@"
;;
esac
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE=0
msg=no
if test "$with_modules" = "yes" -o \
"$with_modules" = "@MCA_TYPE@" -o "$with_modules" = "$generic_type"; then
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE=1
msg=yes
elif test "$with_modules" != "no"; then
ifs_save="$IFS"
IFS="${IFS}$PATH_SEPARATOR,"
for module in $with_modules; do
if test "$module" = "@MCA_TYPE@-@MCA_MODULE_NAME@" -o \
"$module" = "@MCA_TYPE@" -o "$module" = "$generic_type"; then
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE=1
msg=yes
fi
done
IFS="$ifs_save"
fi
AC_MSG_RESULT([$msg])
unset msg
#
# Part one of libtool magic
#
AM_ENABLE_SHARED
AM_DISABLE_STATIC
#
# Now, if we're building the run-time loadable module, bypass those
# defaults and reset them to shared=yes, static=no.
#
if test "$BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE" = "1"; then
enable_shared=yes
enable_static=no
fi
###########################################################################
# Check for compilers and preprocessors
############################################################################
##################################
# Compiler characteristics
##################################
@C_COMPILER_SETUP@
@CXX_COMPILER_SETUP@
##################################
# @MCA_TYPE@ @MCA_MODULE_NAME@ module specific setup
##################################
if test "$OMPI_WANT_DIST" = "no"; then
@CONFIGURE_STUB_MACRO@
else
@CONFIGURE_DIST_STUB_MACRO@
fi
#
# 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_ompi_srcdir)/src -I$(top_ompi_srcdir)/include -I$(top_ompi_builddir)/src'" $CPPFLAGS"
CXXCPPFLAGS='-I$(top_ompi_srcdir)/src -I$(top_ompi_srcdir)/include -I$(top_ompi_builddir)/src'" $CXXCPPFLAGS"
#
# Delayed the substitution of these until now because they may have
# been modified throughout the course of this script.
#
AC_SUBST(CPPFLAGS)
############################################################################
# libtool magic
############################################################################
ompi_show_subtitle "GNU libtool setup"
AM_PROG_LIBTOOL
AM_CONDITIONAL(OMPI_BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_DSO,
test "$BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE" = "1")
############################################################################
# Party on
############################################################################
ompi_show_subtitle "Final output"
AM_CONFIG_HEADER([@PARAM_CONFIG_HEADER_FILE@])
AC_CONFIG_FILES([@PARAM_CONFIG_FILES@])
AC_OUTPUT