1
1

Overhauls to autogen.sh and configure.ac (and related m4 files) to build

MCA modules.

This commit was SVN r273.
Этот коммит содержится в:
Jeff Squyres 2004-01-11 21:35:37 +00:00
родитель 39643b1e24
Коммит 6684bad5da
11 изменённых файлов: 1563 добавлений и 121 удалений

Просмотреть файл

@ -18,9 +18,12 @@ sinclude(config/f77_find_ext_symbol_convention.m4)
sinclude(config/lam_case_sensitive_fs_setup.m4)
sinclude(config/lam_check_optflags.m4)
sinclude(config/lam_config_subdir.m4)
sinclude(config/lam_config_subdir_args.m4)
sinclude(config/lam_configure_options.m4)
sinclude(config/lam_functions.m4)
sinclude(config/lam_get_version.m4)
sinclude(config/lam_mca.m4)
sinclude(config/lam_setup_cc.m4)
sinclude(config/lam_setup_cxx.m4)
sinclude(config/lam_setup_f77.m4)

Просмотреть файл

@ -247,12 +247,218 @@ find_and_delete() {
}
##############################################################################
#
# run_gnu_tools - run the GNU tools on a given directory
#
# INPUT:
# - directory to run in
# - LAM top directory
#
# OUTPUT:
# none
#
# SIDE EFFECTS:
# - skips directories with .lam_no_gnu .lam_ignore
# - uses provided autogen.sh if available
#
##############################################################################
run_gnu_tools() {
rgt_dir="$1"
rgt_lam_topdir="$2"
rgt_cur_dir="`pwd`"
if test -d "$rgt_dir"; then
cd "$rgt_dir"
# See if the package doesn't want us to set it up
if test -f .lam_no_gnu; then
cat <<EOF
*** Found .lam_no_gnu file -- skipping GNU setup in:
*** `pwd`
EOF
elif test -f .lam_ignore; then
cat <<EOF
*** Found .lam_ignore file -- skipping entire tree:
*** `pwd`
EOF
elif test "$rgt_dir" != "." -a -x autogen.sh; then
cat <<EOF
*** Found custom autogen.sh file in:
*** `pwd`
EOF
./autogen.sh
else
cat <<EOF
*** Running GNU tools in directory:
*** `pwd`
EOF
# Sanity check to ensure that there's a configure.in or
# configure.ac file here, or if there's a configure.params
# file and we need to run make_configure.pl.
if test -f configure.params -a \
-x "$rgt_lam_topdir/config/mca_make_configure.pl"; then
echo "--> Found configure.params. Running mca_make_configure.pl"
"$rgt_lam_topdir/config/mca_make_configure.pl" \
--lamdir "$rgt_lam_topdir" \
--moduledir "`pwd`"
happy=1
file=configure.ac
elif test -f configure.in; then
happy=1
file=configure.in
elif test -f configure.ac; then
happy=1
file=configure.ac
else
echo "---> Err... there's no configure.in or configure.ac file in this directory"
echo "---> I'm confused, so I'm going to abort"
exit 1
fi
unset happy
# Find and delete the GNU helper script files
find_and_delete config.guess
find_and_delete config.sub
find_and_delete depcomp
find_and_delete install-sh
find_and_delete ltconfig
find_and_delete ltmain.sh
find_and_delete missing
find_and_delete mkinstalldirs
find_and_delete libtool
# Run the GNU tools
run_and_check $lam_aclocal
if test "`grep AC_CONFIG_HEADER $file`" != "" -o \
"`grep AM_CONFIG_HEADER $file`" != ""; then
run_and_check $lam_autoheader
fi
run_and_check $lam_autoconf
# We only need the libltdl stuff for the top-level
# configure, not any of the SSI modules.
if test -d src/include/mpi.h; then
rm -rf libltdl src/mca/libltdl src/mca/ltdl.h
run_and_check $lam_libtoolize --automake --copy --ltdl
mv libltdl src/mca
echo "Adjusting libltdl for LAM :-("
echo " -- adding sym link for src/mca/ltdl.h"
cd src/mca
ln -s libltdl/ltdl.h ltdl.h
cd ../..
echo " -- patching for argz bugfix in libtool 1.5"
cd src/mca/libltdl
patch -p0 <<EOF
--- ltdl.c.old 2003-11-26 16:42:17.000000000 -0500
+++ ltdl.c 2003-12-03 17:06:27.000000000 -0500
@@ -682,7 +682,7 @@
/* This probably indicates a programmer error, but to preserve
semantics, scan back to the start of an entry if BEFORE points
into the middle of it. */
- while ((before >= *pargz) && (before[-1] != LT_EOS_CHAR))
+ while ((before > *pargz) && (before[-1] != LT_EOS_CHAR))
--before;
{
EOF
cd ../../..
echo " -- patching configure for broken -c/-o compiler test"
sed -e 's/chmod -w \./#LAM\/MPI FIX: chmod -w ./' \
configure > configure.new
mv configure.new configure
chmod a+x configure
else
run_and_check $lam_libtoolize --automake --copy
fi
run_and_check $lam_automake --foreign -a --copy --include-deps
fi
# Go back to the original directory
cd "$rgt_cur_dir"
fi
unset rgt_dir rgt_cur_dir
}
##############################################################################
#
# run_global - run the config in the top LAM dir and all MCA modules
#
# INPUT:
# none
#
# OUTPUT:
# none
#
# SIDE EFFECTS:
#
##############################################################################
run_global() {
# Run the config in the top-level directory
run_gnu_tools . .
# Now run the config in every directory in src/mca/[lam|mpi]/*/*
# that has a configure.in or configure.ac script
rg_cwd="`pwd`"
echo $rg_cwd
for type in src/mca/lam/* src/mca/mpi/*; do
if test -d "$type"; then
for module in "$type"/*; do
if test -d "$module"; then
if test -f "$module/configure.in" -o \
-f "$module/configure.params" -o \
-f "$module/configure.ac"; then
run_gnu_tools "$module" "$rg_cwd"
fi
fi
done
fi
done
unset type module
}
##############################################################################
#
# main - do the real work...
#
##############################################################################
# announce
echo "[Checking] command line parameters"
# Check the command line to see if we should run the whole shebang, or
# just in this current directory.
want_local=no
lamdir=
for arg in $*; do
case $arg in
-l) want_local=yes ;;
-lamdir|--lamdir|-lam|--lam) lamdir="$1" ;;
*) ;;
esac
done
# announce
echo "[Checking] prerequisites"
@ -262,20 +468,28 @@ if test ! -d CVS ; then
This doesn't look like a developer copy of LAM/MPI. You probably do not
want to run autogen.sh - it is normally not needed for a release source
tree. Giving you 2 seconds to reconsider and kill me.
tree. Giving you 5 seconds to reconsider and kill me.
EOF
sleep 2
sleep 5
fi
# make sure we are at the top of the tree
if test -f VERSION -a -f configure.ac -a -f src/mpi/interface/c/init.c ; then
bad=0
# figure out if we're at the top level of the LAM tree, a module's
# top-level directory, or somewhere else.
if test -f VERSION -a -f configure.ac -a -f src/include/mpi.h ; then
# Top level of LAM tree
lamdir="`pwd`"
elif test -f configure.in -o -f configure.ac -o -f configure.params ; then
# Top level of a module directory
want_local=yes
if test -z "$lamdir"; then
lamdir="../../../../.."
fi
else
cat <<EOF
You must run this script from the top-level LAM directory.
You must run this script from either the top level of the LAM
directory tree or the top-level of an MCA module directory tree.
EOF
exit 1
@ -288,32 +502,12 @@ find_app "autoconf"
find_app "libtoolize"
find_app "automake"
# Find and delete the GNU helper script files
find_and_delete config.guess
find_and_delete config.sub
find_and_delete depcomp
find_and_delete install-sh
find_and_delete ltconfig
find_and_delete ltmain.sh
find_and_delete missing
find_and_delete mkinstalldirs
find_and_delete libtool
# Run the GNU tools
run_and_check $lam_aclocal
if test "`grep AC_CONFIG_HEADER configure.ac`" != "" -o \
"`grep AM_CONFIG_HEADER configure.ac`" != ""; then
run_and_check $lam_autoheader
# do the work
if test "$want_local" = "yes"; then
run_gnu_tools . $lamdir
else
run_global
fi
run_and_check $lam_autoconf
echo "[Patching] configure for broken libtool -c/-o compiler test"
sed -e 's/chmod -w \./#LAM\/MPI FIX: chmod -w ./' \
configure > configure.new
mv configure.new configure
chmod a+x configure
run_and_check $lam_libtoolize --automake --copy
run_and_check $lam_automake --foreign -a --copy --include-deps
# All done
exit 0

Просмотреть файл

@ -5,18 +5,23 @@
include $(top_srcdir)/config/Makefile.options
EXTRA_DIST = \
cxx_find_template_parameters.m4 \
cxx_find_template_repository.m4 \
cxx_find_exception_flags.m4 \
cxx_have_exceptions.m4 \
lam_case_sensitive_fs_setup.m4 \
lam_check_optflags.m4 \
lam_configure_options.m4 \
lam_functions.m4 \
lam_get_version.m4 \
lam_get_version.sh \
lam_setup_cc.m4 \
lam_setup_cxx.m4 \
lam_setup_f77.m4 \
lam_setup_f90.m4
EXTRA_DIST = \
c_weak_symbols.m4 \
cxx_find_template_parameters.m4 \
cxx_find_template_repository.m4 \
cxx_find_exception_flags.m4 \
cxx_have_exceptions.m4 \
f77_find_ext_symbol_convention.m4 \
lam_case_sensitive_fs_setup.m4 \
lam_check_optflags.m4 \
lam_config_subdir.m4 \
lam_config_subdir_args.m4 \
lam_configure_options.m4 \
lam_functions.m4 \
lam_get_version.m4 \
lam_get_version.sh \
lam_mca.m4 \
lam_setup_cc.m4 \
lam_setup_cxx.m4 \
lam_setup_f77.m4 \
lam_setup_f90.m4

140
config/lam_config_subdir.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,140 @@
dnl -*- shell-script -*-
dnl
dnl $HEADER$
dnl
AC_DEFUN(LAM_CONFIG_SUBDIR,[
AC_REQUIRE([LAM_CONFIG_SUBDIR_ARGS])
#
# Invoke configure in a specific subdirectory.
#
# $1 is the directory to invoke in
# $2 is the list of arguments to pass
# $3 is actions to execute upon success
# $4 is actions to execute upon failure
#
subdir_dir="$1"
subdir_args="$2"
subdir_success="$3"
subdir_failure="$4"
#
# Sanity checks
#
if test "$subdir_dir" != ":" -a -d $srcdir/$subdir_dir; then
AC_MSG_NOTICE([LAM configuring in $subdir_dir])
#
# Gotta check where srcdir is for VPATH builds. If srcdir is not
# ., then we need to mkdir the subdir. Otherwise, we can just cd
# into it.
#
case $srcdir in
.)
;;
*)
{ case $subdir_dir in
[[\\/]]* | ?:[[\\/]]* ) total_dir=;;
*) total_dir=.;;
esac
temp=$subdir_dir
for dir_part in `IFS='/\\'; set X $temp; shift; echo "$[@]"`; do
case $dir_part in
# Skip DOS drivespec
?:) total_dir=$dir_part ;;
*) total_dir=$total_dir/$dir_part
test -d "$total_dir" ||
mkdir "$total_dir" ||
AC_MSG_ERROR([cannot create $subdir_dir])
;;
esac
done; }
if test -d ./$subdir_dir; then :;
else
AC_MSG_ERROR([cannot create `pwd`/$subdir_dir])
fi
;;
esac
#
# Move into the target directory
#
subdir_parent=`pwd`
cd $subdir_dir
#
# Make a "../" for each directory in $subdir_dir.
#
subdir_dots=`[echo $subdir_dir | sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g]'`
#
# Construct the --srcdir argument
#
case $srcdir in
.)
# In place
subdir_srcdir="$srcdir"
;;
[[\\/]* | ?:[\\/]*] )
# Absolute path
subdir_srcdir="$srcdir/$subdir_dir"
;;
*)
# Relative path
subdir_srcdir="$subdir_dots$srcdir/$subdir_dir"
;;
esac
#
# Construct the --cache-file argument
#
case $cache_file in
[[\\/]* | ?:[\\/]*] )
# Absolute path
subdir_cache_file="$cache_file"
;;
*)
# Relative path
subdir_cache_file="$subdir_dots$cache_file"
;;
esac
#
# Invoke the configure script in the subdirectory
#
export CFLAGS CPPFLAGS
export CXXFLAGS CXXCPPFLAGS
export FFLAGS
export LDFLAGS LIBS
sub_configure="$SHELL '$subdir_srcdir/configure'"
AC_MSG_NOTICE([running $sub_configure $subdir_args --cache-file=$subdir_cache_file --srcdir=$subdir_srcdir])
eval $sub_configure $subdir_args \
--cache-file=$subdir_cache_file --srcdir=$subdir_srcdir
if test "$?" = "0"; then
eval $subdir_success
AC_MSG_NOTICE([$sub_configure succeeded for $subdir_dir])
else
eval $subdir_failure
AC_MSG_NOTICE([$sub_configure *failed* for $subdir_dir])
fi
#
# Go back to the topdir
#
cd $subdir_parent
fi
#
# Clean up
#
unset subdir_parent sub_configure subdir_dir subdir_srcdir subdir_cache_file
unset subdir_args subdir_dots total_dir dir_part temp])dnl

57
config/lam_config_subdir_args.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,57 @@
dnl -*- shell-script -*-
dnl
dnl $HEADER$
dnl
AC_DEFUN(LAM_CONFIG_SUBDIR_ARGS,[
#
# Invoke configure in subdirectories.
#
# $1 is the name of the variable to assign the output to
#
#
# Make a list of command line args --eliminate the --srcdir and
# --cache-file args, because we need to replace them with our own
# values when invoking the sub-configure script.
#
subdirs_args=
subdirs_skip=no
for subdirs_arg in $ac_configure_args; do
if test "$subdirs_skip" = "yes"; then
subdirs_skip=no
else
case $subdirs_arg in
-cache-file | --cache-file | -cache | --cache)
subdirs_skip=yes
;;
--config-cache | -C)
;;
-cache-file=* | --cache-file=*)
;;
-srcdir | --srcdir)
subdirs_skip=yes
;;
-srcdir=* | --srcdir=*)
;;
*)
subdirs_args="$subdirs_args $subdirs_arg"
;;
esac
fi
done
#
# Assign the output
#
subdirs_str="$1="'"'"$subdirs_args"'"'
eval $subdirs_str
#
# Clean up
#
unset subdirs_str subdirs_skip subdirs_args subdirs_arg])dnl

Просмотреть файл

@ -41,6 +41,124 @@ LAM_CONFIGURE_DATE="`date`"
CLEANFILES="*~ .\#*"
AC_SUBST(CLEANFILES)])dnl
dnl #######################################################################
dnl #######################################################################
dnl #######################################################################
AC_DEFUN(LAM_BASIC_SETUP,[
#
# Save some stats about this build
#
LAM_CONFIGURE_USER="`whoami`"
LAM_CONFIGURE_HOST="`hostname | head -n 1`"
LAM_CONFIGURE_DATE="`date`"
#
# Make automake clean emacs ~ files for "make clean"
#
CLEANFILES="*~"
AC_SUBST(CLEANFILES)
#
# This is useful later
#
AC_CANONICAL_HOST
#
# See if we can find an old installation of LAM to overwrite
#
# Stupid autoconf 2.54 has a bug in AC_PREFIX_PROGRAM -- if lamclean
# is not found in the path and the user did not specify --prefix,
# we'll get a $prefix of "."
lam_prefix_save="$prefix"
AC_PREFIX_PROGRAM(lamclean)
if test "$prefix" = "."; then
prefix="$lam_prefix_save"
fi
unset lam_prefix_save
#
# Basic sanity checking; we can't install to a relative path
#
case "$prefix" in
/*/bin)
prefix="`dirname $prefix`"
echo installing to directory \"$prefix\"
;;
/*)
echo installing to directory \"$prefix\"
;;
NONE)
echo installing to directory \"$ac_default_prefix\"
;;
*)
AC_MSG_ERROR(prefix \"$prefix\" must be an absolute directory path)
;;
esac
# Allow the --enable-dist flag to be passed in
AC_ARG_ENABLE(dist,
AC_HELP_STRING([--enable-dist],
[guarantee that that the "dist" make target will be functional, although may not guarantee that any other make target will be functional.]),
LAM_WANT_DIST=yes, LAM_WANT_DIST=no)
if test "$LAM_WANT_DIST" = "yes"; then
AC_MSG_WARN([Configuring in 'make dist' mode])
AC_MSG_WARN([Most make targets may be non-functional!])
fi])dnl
dnl #######################################################################
dnl #######################################################################
dnl #######################################################################
AC_DEFUN(LAM_LOG_MSG,[
# 1 is the message
# 2 is whether to put a prefix or not
if test -n "$2"; then
echo "configure:__oline__: $1" >&5
else
echo $1 >&5
fi])dnl
dnl #######################################################################
dnl #######################################################################
dnl #######################################################################
AC_DEFUN(LAM_LOG_FILE,[
# 1 is the filename
if test -n "$1" -a -f "$1"; then
cat $1 >&5
fi])dnl
dnl #######################################################################
dnl #######################################################################
dnl #######################################################################
AC_DEFUN(LAM_LOG_COMMAND,[
# 1 is the command
# 2 is actions to do if success
# 3 is actions to do if fail
echo "configure:__oline__: $1" >&5
$1 1>&5 2>&1
lam_status=$?
LAM_LOG_MSG([\$? = $lam_status], 1)
if test "$lam_status" = "0"; then
unset lam_status
$2
else
unset lam_status
$3
fi])dnl
dnl #######################################################################
dnl #######################################################################
dnl #######################################################################
AC_DEFUN(LAM_UNIQ,[

382
config/lam_mca.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,382 @@
dnl -*- shell-script -*-
dnl
dnl $HEADER$
dnl
AC_DEFUN(LAM_MCA,[
# Find which modules should be built as run-time loadable modules
# Acceptable combinations:
#
# --with-modules
# --with-modules=[.+,]*MODULE_TYPE[.+,]*
# --with-modules=[.+,]*MODULE_TYPE-MODULE_NAME[.+,]*
# --without-modules
#
AC_MSG_CHECKING([which modules should be run-time loadable])
AC_ARG_WITH(modules,
AC_HELP_STRING([--with-modules=LIST],
[comma-separated list of types and/or type-module pairs of modules that will be built as run-time loadable modules (as opposed to statically linked in LAM/MPI (if supported on this platform). This directly implies "--enable-shared=LIST and --disable-static=LIST".]))
if test "$with_modules" = "" -o "$with_modules" = "no"; then
LOADABLE_MODULE_all=0
msg=none
elif test "$with_modules" = "yes"; then
LOADABLE_MODULE_all=1
msg=all
else
LOADABLE_MODULE_all=0
ifs_save="$IFS"
IFS="${IFS}$PATH_SEPARATOR,"
msg=
for module in $with_modules; do
str="`echo LOADABLE_MODULE_$module=1 | sed s/-/_/g`"
eval $str
msg="$module $msg"
done
IFS="$ifs_save"
fi
AC_MSG_RESULT([$msg])
unset msg
# First, build a list of the types of MCAs that we have. This is more
# of a sanity check than anything else -- the names of the various
# types are regulated by LAM.
types="lam/oob lam/pcm lam/registry mpi/coll mpi/io mpi/one mpi/pml mpi/ptl mpi/topo"
AC_MSG_CHECKING([for MCA types])
file=conftest_mca_list.$$
rm -f $file
touch $file
for type in $types; do
type_dir="$srcdir/src/mca/$type"
found=0
for module in $type_dir/*; do
if test -d $module -a -x $module/configure -a ! -f $module/.lam_ignore; then
found=1
fi
done
if test "$found" = "1"; then
echo $type >> $file
fi
done
# m4 weirdness: must also do the echo after the sort, or we get a
# string with newlines in it
found_types="`sort $file`"
found_types="`echo $found_types`"
rm -f $file
AC_MSG_RESULT([$found_types])
# Now determine the modules in each of the types. This is a little
# redundant and could be combined into the loop above, but we separate
# it out for clarity. The extern statements and array of pointers to
# the module global structs are written to a file for each type that
# is #include'd in the flue file for each type.
for type in $found_types; do
all_modules=
static_modules=
dynamic_modules=
static_ltlibs=
# Separate into subtypes
library="`echo $type | cut -d/ -f1`"
type="`echo $type | cut -d/ -f2`"
# Ensure that the directory where the #include file is to live
# exists. Need to do this for VPATH builds, because the directory
# may not exist yet.
outdir=src/mca/$library/$type/base
total_dir="."
for dir_part in `IFS='/\\'; set X $outdir; shift; echo "$[@]"`; do
total_dir=$total_dir/$dir_part
test -d "$total_dir" ||
mkdir "$total_dir" ||
AC_MSG_ERROR([cannot create $total_dir])
done
# Also ensure that the dynamic-mca base directory exists
total_dir="."
dyndir=src/mca/dynamic-$library/$type
for dir_part in `IFS='/\\'; set X $dyndir; shift; echo "$[@]"`; do
total_dir=$total_dir/$dir_part
test -d "$total_dir" ||
mkdir "$total_dir" ||
AC_MSG_ERROR([cannot create $total_dir])
done
# Remove any previous generated #include files
outfile=$outdir/static-modules.h
rm -f $outfile $outfile.struct $outfile.extern \
$file.all $file.static $file.dyanmic
touch $outfile.struct $outfile.extern \
$file.all $file.static $file.dynamic
# Manual conversion of $type to its generic name (e.g., crmpi->cr,
# crlam->cr).
# JMS Fix this
case "$type" in
crmpi)
generic_type="cr"
;;
crlam)
generic_type="cr"
;;
*)
generic_type="$type"
;;
esac
# Go through all the module directories and find valid modules
for module in $srcdir/src/mca/$library/$type/*; do
FOUND=0
HAPPY=0
m="`basename $module`"
if test -d $module -a -x $module/configure -a \
! -f $module/.lam_ignore; then
# We found one!
FOUND=1
# Remove any possible sym link in the mca-dynamic tree
rm -f src/mca/dyanmica-$library/$type/$m
# If we're skipping MCA, look at the results from last
# time
cachefile="src/mca/$library/$type/$m/.lam_configure_results_cache"
if test "$skipmca" = "1"; then
AC_MSG_WARN([Llama-specific function to skip configuring MCA module!])
if test -f "$cachefile"; then
HAPPY="`grep SUCCESS $cachefile | cut -d= -f2`"
else
AC_MSG_WARN([Cannot find result of previous configure of])
AC_MSG_WARN([module $library/$type/$m.])
AC_MSG_WARN([You must run configure without skipmca at least once.])
AC_MSG_ERROR([Cannot continue.])
fi
else
LAM_CONFIG_SUBDIR([src/mca/$library/$type/$m],
[$lam_subdir_args],
[HAPPY=1], [HAPPY=0])
rm -f "$cachefile"
echo "SUCCESS=$HAPPY" > "$cachefile"
fi
fi
# See if it dropped an output file for us to pick up some
# shell variables in.
infile="src/mca/$library/$type/$m/post_configure.sh"
# Did we find a valid module, and did its configure run
# successfully?
if test "$HAPPY" = "1"; then
# Add this subdir to the mast list of all MCA module subdirs
echo $m >> $file.all
# Is this module going to built staic or shared?
str="SHARED_TYPE=\$LOADABLE_MODULE_$type"
eval $str
str="SHARED_GENERIC_TYPE=\$LOADABLE_MODULE_$generic_type"
eval $str
str="SHARED_MODULE=\$LOADABLE_MODULE_${type}_$m"
eval $str
# If we're doing skipmca, then look at the results from
# last time
shared_mode_override=static
if test "$skipmca" = "1"; then
shared_mode_override="`grep COMPILE_MODE $cachefile | cut -d= -f2`"
fi
# Setup for either shared or static
if test "$shared_mode_override" = "dynamic" -o \
"$SHARED_TYPE" = "1" -o \
"$SHARED_GENERIC_TYPE" = "1" -o \
"$SHARED_MODULE" = "1" -o \
"$LOADABLE_MODULE_all" = "1"; then
compile_mode="dynamic"
echo $m >> $file.dynamic
$LN_S "$LAM_TOP_BUILDDIR/src/mca/$library/$type/$m" \
"src/mca/dynamic-$library/$type/$m"
else
static_ltlibs="$m/libmca_${library}_${type}_${m}.la $static_ltlibs"
echo "extern const mca_base_module_t mca_${type}_${m}_module;" >> $outfile.extern
echo " &mca_${type}_${m}_module, " >> $outfile.struct
compile_mode="static"
echo $m >> $file.static
fi
if test "$skipmca" != "1"; then
echo "COMPILE_MODE=$compile_mode" >> "$cachefile"
fi
# Output pretty results
AC_MSG_NOTICE([+++ MCA module $type:$m compile: yes])
AC_MSG_NOTICE([+++ MCA module $type:$m mode: $compile_mode])
# If there's an output file, add the values to
# scope_EXTRA_flags.
if test -f $infile; then
# First check for the ABORT tag
line="`grep ABORT= $infile | cut -d= -f2-`"
if test -n "$line" -a "$line" != "no"; then
AC_MSG_WARN([MCA module configure script told me to abort])
AC_MSG_ERROR([cannot continue])
fi
# Now check for the rest of the tags
for scope in LIBLAM LIBMPI WRAPPER; do
for flags in CFLAGS CXXFLAGS FFLAGS LDFLAGS LIBS; do
var="${scope}_EXTRA_${flags}"
line="`grep $var= $infile | cut -d= -f2-`"
if test -n "$line"; then
str="$var="'"$'"$var $line"'"'
eval $str
fi
done
done
fi
echo ""
elif test "$FOUND" = "1"; then
AC_MSG_NOTICE([--- MCA module $type:$m compile: no])
echo ""
# If this module was requested as the default for this
# type, then abort.
str="foo="'"$'"with_$type"'"'
eval $str
str="bar="'"$'"with_$generic_type"'"'
eval $str
if test "$foo" = "$m" -o "$bar" = "$m"; then
AC_MSG_WARN([MCA module "$m" failed to configure properly])
AC_MSG_WARN([This module was selected as the default])
AC_MSG_ERROR([Cannot continue])
exit 1
fi
fi
done
# m4 weirdness: must also do the echo after the sort, or we get a
# string with newlines in it
all_modules="`sort $file.all`"
all_modules="`echo $all_modules`"
static_modules="`sort $file.static`"
static_modules="`echo $static_modules`"
dynamic_modules="`sort $file.dynamic`"
dynamic_modules="`echo $dynamic_modules`"
rm -f $file $file.all $file.static $file.dynamic
# Create the final .h file that will be included in the type's
# top-level glue. This lists all the static modules.
cat > $outfile <<EOF
/*
* \$HEADER\$
*/
`cat $outfile.extern`
const mca_base_module_t *mca_${type}_static_modules[[]] = {
`cat $outfile.struct`
NULL
};
EOF
rm -f $outfile.struct $outfile.extern
# Save the results for the Makefile.am's. Note the whacky shell
# script escaping that is necessary because $modules may be
# multiple words, but we also need to substitute on ${type}...
foo="MCA_${type}_ALL_SUBDIRS"'="$all_modules"'
eval "$foo"
foo="MCA_${type}_STATIC_SUBDIRS"'="$static_modules"'
eval "$foo"
foo="MCA_${type}_DYNAMIC_SUBDIRS"'="$dynamic_modules"'
eval "$foo"
foo="MCA_${type}_STATIC_LTLIBS"'="$static_ltlibs"'
eval "$foo"
done
unset foo type m modules structs outfile outdir total_dir file \
all_modules static_modules dynamic_modules static_ltlibs
# Grumble. It seems that AC_SUBST and AC_DEFINE don't let you
# substitue on a variable name that contains a variable (e.g.,
# LAM_MCA_$type_SUBDIRS). So we have to do this manually. :-(
# LAM types
AC_SUBST(MCA_oob_ALL_SUBDIRS)
AC_SUBST(MCA_oob_STATIC_SUBDIRS)
AC_SUBST(MCA_oob_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_oob_STATIC_LTLIBS)
AC_SUBST(MCA_pcm_ALL_SUBDIRS)
AC_SUBST(MCA_pcm_STATIC_SUBDIRS)
AC_SUBST(MCA_pcm_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_pcm_STATIC_LTLIBS)
AC_SUBST(MCA_registry_ALL_SUBDIRS)
AC_SUBST(MCA_registry_STATIC_SUBDIRS)
AC_SUBST(MCA_registry_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_registry_STATIC_LTLIBS)
# MPI types
AC_SUBST(MCA_coll_ALL_SUBDIRS)
AC_SUBST(MCA_coll_STATIC_SUBDIRS)
AC_SUBST(MCA_coll_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_coll_STATIC_LTLIBS)
AC_SUBST(MCA_io_ALL_SUBDIRS)
AC_SUBST(MCA_io_STATIC_SUBDIRS)
AC_SUBST(MCA_io_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_io_STATIC_LTLIBS)
AC_SUBST(MCA_one_ALL_SUBDIRS)
AC_SUBST(MCA_one_STATIC_SUBDIRS)
AC_SUBST(MCA_one_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_one_STATIC_LTLIBS)
AC_SUBST(MCA_pml_ALL_SUBDIRS)
AC_SUBST(MCA_pml_STATIC_SUBDIRS)
AC_SUBST(MCA_pml_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_pml_STATIC_LTLIBS)
AC_SUBST(MCA_ptl_ALL_SUBDIRS)
AC_SUBST(MCA_ptl_STATIC_SUBDIRS)
AC_SUBST(MCA_ptl_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_ptl_STATIC_LTLIBS)
AC_SUBST(MCA_topo_ALL_SUBDIRS)
AC_SUBST(MCA_topo_STATIC_SUBDIRS)
AC_SUBST(MCA_topo_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_topo_STATIC_LTLIBS)
])

41
config/mca_acinclude.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,41 @@
dnl -*- shell-script -*-
dnl
dnl $HEADER$
dnl
dnl
dnl Tests provided by LAM
dnl General tests
dnl
sinclude(../../../../../config/lam_functions.m4)
sinclude(../../../../../config/lam_get_version.m4)
dnl
dnl C compiler tests
dnl
sinclude(../../../../../config/lam_setup_cc.m4)
sinclude(../../../../../config/lam_check_optflags.m4)
dnl
dnl C++ compiler tests
dnl
sinclude(../../../../../config/lam_setup_cxx.m4)
sinclude(../../../../../config/cxx_find_template_repository.m4)
sinclude(../../../../../config/cxx_find_template_parameters.m4)
dnl
dnl Macro to allow SSI configure.stub files to [effectively] sinclude
dnl other m4 files
dnl
define([LAM_INCLUDE], [sinclude($1)])dnl
dnl
dnl This will be replaced with sinclude(configure.stub) if it exists
dnl for that module, or a blank line if it does not.
dnl
@CONFIGURE_STUB_SINCLUDE@

238
config/mca_configure.ac Обычный файл
Просмотреть файл

@ -0,0 +1,238 @@
# -*- 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 LAM directory
top_lam_srcdir='$(top_srcdir)/../../../../..'
top_lam_builddir='$(top_builddir)/../../../../..'
AC_SUBST(top_lam_srcdir)
AC_SUBST(top_lam_builddir)
# Get the version of @MCA_TYPE@ @MCA_MODULE_NAME@ that we are installing.
LAM_GET_VERSION($srcdir/../../../../../config, @PARAM_VERSION_FILE@,
@PARAM_VAR_PREFIX@)
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MAJOR_VERSION,
$@PARAM_VAR_PREFIX@_MAJOR_VERSION,
[Major LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MINOR_VERSION,
$@PARAM_VAR_PREFIX@_MINOR_VERSION,
[Minor LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_RELEASE_VERSION,
$@PARAM_VAR_PREFIX@_RELEASE_VERSION,
[Release LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_ALPHA_VERSION,
$@PARAM_VAR_PREFIX@_ALPHA_VERSION,
[Alpha LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_BETA_VERSION,
$@PARAM_VAR_PREFIX@_BETA_VERSION,
[Beta LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_CVS_VERSION,
$@PARAM_VAR_PREFIX@_CVS_VERSION,
[CVS LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version])
AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_VERSION,
"$@PARAM_VAR_PREFIX@_VERSION",
[Overall LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version number])
#
# Start it up
#
LAM_CONFIGURE_SETUP
lam_show_title "Configuring MCA @MCA_TYPE@ @MCA_MODULE_NAME@ module version $@PARAM_VAR_PREFIX@_VERSION"
lam_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$
*
* LAM/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
#
LAM_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:
#
# --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,
# crlam->cr).
case "@MCA_TYPE@" in
crmpi)
generic_type="cr"
;;
crlam)
generic_type="cr"
;;
*)
generic_type="@MCA_TYPE@"
;;
esac
BUILD_LOADABLE_MODULE=0
msg=no
if test "$with_modules" = "yes" -o \
"$with_modules" = "@MCA_TYPE@" -o "$with_modules" = "$generic_type"; then
BUILD_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_LOADABLE_MODULE=1
msg=yes
fi
done
IFS="$ifs_save"
fi
AC_MSG_RESULT([$msg])
unset msg
#
# Part one of libtool magic
#
AM_ENABLE_STATIC
AM_DISABLE_SHARED
#
# Now, if we're building the run-time loadable module, bypass those
# defaults and reset them to shared=yes, static=no.
#
if test "$BUILD_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 "$LAM_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_lam_srcdir)/src/include'" $CPPFLAGS"
#
# Delayed the substitution of these until now because they may have
# been modified throughout the course of this script.
#
AC_SUBST(CPPFLAGS)
############################################################################
# libtool magic
############################################################################
lam_show_subtitle "GNU libtool setup"
AM_PROG_LIBTOOL
AM_CONDITIONAL(LAM_BUILD_LOADABLE_MODULE, test "$BUILD_LOADABLE_MODULE" = "1")
############################################################################
# Party on
############################################################################
lam_show_subtitle "Final output"
AM_CONFIG_HEADER([@PARAM_CONFIG_HEADER_FILE@])
AC_CONFIG_FILES([@PARAM_CONFIG_FILES@])
AC_OUTPUT

314
config/mca_make_configure.pl Исполняемый файл
Просмотреть файл

@ -0,0 +1,314 @@
#!/usr/bin/env perl
#
# $HEADER$
#
use strict;
use Carp;
use Cwd;
use Getopt::Long;
use File::Basename;
############################################################################
# Local variables
############################################################################
my $lam_topdir;
my $module_topdir;
my %config_values;
my %config_params;
my $initial_cwd = cwd();
my $announce_str = "LAM/MPI MCA module configure generator";
my %config_param_names = (PIFILE => "PARAM_INIT_FILE",
PCFGAUXDIR => "PARAM_CONFIG_AUX_DIR",
PC => "PARAM_WANT_C",
PCXX => "PARAM_WANT_CXX",
PVERFILE => "PARAM_VERSION_FILE",
PVARPREFIX => "PARAM_VAR_PREFIX",
PAMNAME => "PARAM_AM_NAME",
PCFGHDRFILE => "PARAM_CONFIG_HEADER_FILE",
PCFGFILES => "PARAM_CONFIG_FILES"
);
############################################################################
# Command line arg procemcang
############################################################################
Getopt::Long::Configure("bundling", "require_order");
my $ok = Getopt::Long::GetOptions("lamdir|l=s" => \$lam_topdir,
"moduledir|m=s" => \$module_topdir);
if (!$ok) {
print "Usage: $0 [--lamdir=DIR] [--moduledir=DIR]\n";
exit(1);
}
############################################################################
# Try to figure out the lam and module topdirs
############################################################################
print "$announce_str starting\n";
if (!$lam_topdir) {
$lam_topdir = dirname($0);
}
chdir($lam_topdir);
$lam_topdir = cwd();
chdir($initial_cwd);
if (!$lam_topdir || ! -f "$lam_topdir/autogen.sh") {
croak("Unable to find LAM base directory (try using --lamdir)");
}
if (!$module_topdir) {
$module_topdir = $initial_cwd;
if ($module_topdir eq $lam_topdir) {
croak("Unable to determine which module to operate on");
}
}
chdir($module_topdir);
$module_topdir = cwd();
chdir($initial_cwd);
if (!$lam_topdir || ! -d $module_topdir) {
croak("Unable to find module directory (try using --moduledir)");
}
# Print them out
print "--> Found LAM top dir: $lam_topdir\n";
print "--> Found module top dir: $module_topdir\n";
# If we have a configure.params file in the module topdir, we're good to
# go.
if (! -f "$module_topdir/configure.params") {
die("No configure.params in module topdir; nothing to do");
}
# Make a backup
if (-f "$module_topdir/acinclude.m4") {
printf(" *** WARNING: Replacing old acinclude.m4 in $module_topdir\n");
unlink("$module_topdir/acinclude.m4.bak");
rename("$module_topdir/acinclude.m4", "$module_topdir/acinclude.m4.bak");
}
if (-f "$module_topdir/configure.ac") {
printf(" *** WARNING: Replacing old configure.ac in $module_topdir\n");
unlink("$module_topdir/configure.ac.bak");
rename("$module_topdir/configure.ac", "$module_topdir/configure.ac.bak");
}
############################################################################
# Set and calculate sensible default parameter values
############################################################################
# Unchangeable values
# MCA_TYPE: calculate
$config_values{"MCA_TYPE"} = dirname($module_topdir);
$config_values{"MCA_TYPE"} = basename($config_values{"MCA_TYPE"});
# PROCESSED_MCA_TYPE: For "special" MCA types, like "crlam" and
# "crmpi".
$config_values{"PROCESSED_MCA_TYPE"} = $config_values{"MCA_TYPE"};
if ($config_values{"PROCESSED_MCA_TYPE"} eq "crlam" ||
$config_values{"PROCESSED_MCA_TYPE"} eq "crmpi") {
$config_values{"PROCESSED_MCA_TYPE"} = "cr";
}
# MCA_NAME: calculate
$config_values{"MCA_MODULE_NAME"} = basename($module_topdir);
# Parameter (changeable) values
# PARAM_CONFIG_AUX_DIR: set
if (-d "$module_topdir/config") {
$config_params{$config_param_names{PCFGAUXDIR}} = "config";
} else {
$config_params{$config_param_names{PCFGAUXDIR}} = ".";
}
$config_params{$config_param_names{PC}} = 1;
$config_params{$config_param_names{PCXX}} = 0;
# PARAM_VERSION_FILE: calculate
if (-f "$module_topdir/VERSION") {
$config_params{$config_param_names{PVERFILE}} = "\$srcdir/VERSION";
} elsif (-f "$module_topdir/$config_params{$config_param_names{PCFGAUXDIR}}/VERSION") {
$config_params{$config_param_names{PVERFILE}} =
"\$srcdir/$config_params{$config_param_names{PCFGAUXDIR}}/VERSION";
}
# PARAM_VAR_PREFIX: calculate
$config_params{$config_param_names{PVARPREFIX}} =
"MCA_" . uc($config_values{"MCA_TYPE"}) .
"_" . uc($config_values{"MCA_MODULE_NAME"});
# PARAM_AM_NAME: calculate
$config_params{$config_param_names{PAMNAME}} =
lc($config_values{"MCA_TYPE"}) .
"-" . lc($config_values{"MCA_MODULE_NAME"});
# PARAM_CONFIG_HEADER_FILE: calculate
$config_params{$config_param_names{PCFGHDRFILE}} =
"src/" . lc($config_values{"MCA_TYPE"}) .
"_" . lc($config_values{"MCA_MODULE_NAME"}) . "_config.h";
# Is there a config.stub file in the module topdir?
if (-f "$module_topdir/configure.stub") {
$config_values{CONFIGURE_STUB_SINCLUDE} = "#
# Module-specific tests
#
sinclude(configure.stub)\n";
$config_values{CONFIGURE_STUB_MACRO} =
"lam_show_subtitle \"MCA " . $config_values{"MCA_TYPE"} . " " .
$config_values{"MCA_MODULE_NAME"} . "-specific setup\"
MCA_CONFIGURE_STUB";
# See if there's a CONFIGURE_DIST_STUB in configure.stub
open(STUB, "$module_topdir/configure.stub");
my $found = 0;
while (<STUB>) {
$found = 1
if ($_ =~ /MCA_CONFIGURE_DIST_STUB/);
}
close(STUB);
if ($found == 1) {
$config_values{CONFIGURE_DIST_STUB_MACRO} =
"lam_show_subtitle \"MCA " . $config_values{"MCA_TYPE"} . " " .
$config_values{"MCA_MODULE_NAME"} .
"-specific setup (dist specific!)\"
MCA_CONFIGURE_DIST_STUB";
} else {
$config_values{CONFIGURE_DIST_STUB_MACRO} = "true";
}
} else {
$config_values{CONFIGURE_STUB_MACRO} = "true";
$config_values{CONFIGURE_DIST_STUB_MACRO} = "true";
}
############################################################################
# Read in the configure.params file (pomcably overriding the defaults
# set above)
############################################################################
my $found = 0;
my @names = values %config_param_names;
open(PARAMS, "$module_topdir/configure.params") ||
die("Could not open configure.params in $module_topdir");
while (<PARAMS>) {
chomp;
# Ignore comments and blank lines
my $line = $_;
$line =~ s/^[ \t]+(.*)[ \t]+$/\1/;
$line =~ s/(.*)[\#]+.*/\1/;
next if (length($line) == 0);
# So we have a key=value line
# Split into componenty, and remove quotes
my ($key, $value) = split(/=/, $line);
$key =~ s/^[ \t]+(.*)[ \t]+$/\1/;
$value =~ s/^[ \t]+(.*)[ \t]+$/\1/;
$value =~ s/^[\"](.*)[\"]$/\1/;
$value =~ s/^[\'](.*)[\']$/\1/;
for (my $i = 0; $i <= $#names; ++$i) {
if ($key eq $names[$i]) {
if (!$found) {
printf("--> Found parameter override:\n");
$found = 1;
}
printf(" $key = $value\n");
$config_params{$key} = $value;
last;
}
}
}
# Print out the values
print "--> Final configuration values:\n";
foreach my $key (sort keys(%config_param_names)) {
print " $config_param_names{$key} = " .
$config_params{$config_param_names{$key}} . "\n";
}
############################################################################
# Read in the configure.ac template
############################################################################
sub make_template {
my ($src, $dest, $mode) = @_;
my $template;
my $search;
my $replace;
# Read in the template file
print "--> Reading template file: $src\n";
open(TEMPLATE, $src) ||
die("Cannot open template file: $src");
while (<TEMPLATE>) {
$template .= $_;
}
close(TEMPLATE);
# Transform the template
print "--> Filling in the template...\n";
foreach my $key (sort keys(%config_values)) {
$search = "@" . $key . "@";
$template =~ s/$search/$config_values{$key}/g;
}
foreach my $key (sort keys(%config_param_names)) {
next if ($key eq "PC" || $key eq "PCXX");
$search = "@" . $config_param_names{$key} . "@";
$template =~
s/$search/$config_params{$config_param_names{$key}}/g;
}
# If we want C or C++, substitute in the right setup macros
$search = "\@C_COMPILER_SETUP\@";
$replace = $config_params{$config_param_names{"PC"}} ?
"LAM_SETUP_CC" : "";
$template =~ s/$search/$replace/;
$search = "\@CXX_COMPILER_SETUP\@";
$replace = $config_params{$config_param_names{"PCXX"}} ?
"LAM_SETUP_CXX" : "";
$template =~ s/$search/$replace/;
print "--> Writing output file: $dest\n";
open(OUTPUT, ">$dest") ||
die("Cannot open output flie: $dest");
print OUTPUT $template;
close(OUTPUT);
chmod($dest, $mode);
}
# Read and fill in the templates
make_template("$lam_topdir/config/mca_configure.ac",
"$module_topdir/configure.ac", 0644);
make_template("$lam_topdir/config/mca_acinclude.m4",
"$module_topdir/acinclude.m4", 0644);
############################################################################
# All done
############################################################################
print "\n$announce_str finished\n";

Просмотреть файл

@ -240,77 +240,6 @@ LAM_SETUP_F90
# vscanf
# va_copy
##################################
# MCA
##################################
# JMS Need to fill this in
# JMS For the moment:
MCA_coll_STATIC_SUBDIRS=
MCA_coll_DYNAMIC_SUBDIRS=
MCA_coll_ALL_SUBDIRS=
AC_SUBST(MCA_coll_STATIC_SUBDIRS)
AC_SUBST(MCA_coll_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_coll_ALL_SUBDIRS)
MCA_io_STATIC_SUBDIRS=
MCA_io_DYNAMIC_SUBDIRS=
MCA_io_ALL_SUBDIRS=
AC_SUBST(MCA_io_STATIC_SUBDIRS)
AC_SUBST(MCA_io_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_io_ALL_SUBDIRS)
MCA_one_STATIC_SUBDIRS=
MCA_one_DYNAMIC_SUBDIRS=
MCA_one_ALL_SUBDIRS=
AC_SUBST(MCA_one_STATIC_SUBDIRS)
AC_SUBST(MCA_one_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_one_ALL_SUBDIRS)
MCA_pml_STATIC_SUBDIRS=
MCA_pml_DYNAMIC_SUBDIRS=
MCA_pml_ALL_SUBDIRS=
AC_SUBST(MCA_pml_STATIC_SUBDIRS)
AC_SUBST(MCA_pml_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_pml_ALL_SUBDIRS)
MCA_ptl_STATIC_SUBDIRS=
MCA_ptl_DYNAMIC_SUBDIRS=
MCA_ptl_ALL_SUBDIRS=
AC_SUBST(MCA_ptl_STATIC_SUBDIRS)
AC_SUBST(MCA_ptl_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_ptl_ALL_SUBDIRS)
MCA_topo_STATIC_SUBDIRS=
MCA_topo_DYNAMIC_SUBDIRS=
MCA_topo_ALL_SUBDIRS=
AC_SUBST(MCA_topo_STATIC_SUBDIRS)
AC_SUBST(MCA_topo_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_topo_ALL_SUBDIRS)
MCA_oob_STATIC_SUBDIRS="cofs"
MCA_oob_DYNAMIC_SUBDIRS=
MCA_oob_ALL_SUBDIRS="${MCA_oob_STATIC_SUBDIRS}"
AC_SUBST(MCA_oob_STATIC_SUBDIRS)
AC_SUBST(MCA_oob_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_oob_ALL_SUBDIRS)
MCA_pcm_STATIC_SUBDIRS=
MCA_pcm_DYNAMIC_SUBDIRS=
MCA_pcm_ALL_SUBDIRS=
AC_SUBST(MCA_pcm_STATIC_SUBDIRS)
AC_SUBST(MCA_pcm_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_pcm_ALL_SUBDIRS)
MCA_registry_STATIC_SUBDIRS=
MCA_registry_DYNAMIC_SUBDIRS=
MCA_registry_ALL_SUBDIRS=
AC_SUBST(MCA_registry_STATIC_SUBDIRS)
AC_SUBST(MCA_registry_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_registry_ALL_SUBDIRS)
##################################
# System-specific tests
##################################
@ -338,6 +267,19 @@ LAM_CASE_SENSITIVE_FS_SETUP
# 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
############################################################################
# Libtool: part two
# (after C compiler setup)
@ -432,30 +374,38 @@ AC_CONFIG_FILES([
src/mpi/request/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/oob/cofs/Makefile
src/mca/lam/oob/cofs/src/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/pml/teg/Makefile
src/mca/mpi/ptl/Makefile
src/mca/mpi/ptl/base/Makefile
src/mca/mpi/topo/Makefile
src/mca/mpi/topo/base/Makefile
src/mca/lam/oob/cofs/Makefile
src/mca/lam/oob/cofs/src/Makefile
src/tools/Makefile
src/tools/wrappers/Makefile