1
1

First cut at dramatically decreasing the overhead and increasing the

speed of autogen.sh and configure: find modules that don't need to have
a separate configure script during autogen.sh and set them up to be
part of LAM's build process.  This means that we don't have to run the GNU
tools nearly as much during autogen.sh and that we don't have to run
nearly as many sub-configure scripts during configure.

This works fine for statically-built MCA modules, but doesn't seem to work
properly yet for dynamically-built modules.  More coming soon, but I wanted
to get this in for others to use.

This commit was SVN r756.
Этот коммит содержится в:
Jeff Squyres 2004-02-13 03:58:56 +00:00
родитель 1d4a6c1dc6
Коммит afb6d28cbf
29 изменённых файлов: 578 добавлений и 401 удалений

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

@ -3,6 +3,7 @@ dnl
dnl $HEADER$
dnl
#
# LAM/MPI-specific tests
#
@ -35,3 +36,9 @@ sinclude(config/lam_check_pthread_pids.m4)
sinclude(config/lam_config_pthreads.m4)
sinclude(config/lam_config_solaris_threads.m4)
sinclude(config/lam_config_threads.m4)
#
# The config/mca_no_configure_modules.m4 file is generated by autogen.sh
#
sinclude(config/mca_no_configure_modules.m4)

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

@ -40,6 +40,10 @@ lam_autoconf=""
lam_libtoolize=""
lam_automake=""
mca_no_configure_modules_file="config/mca_no_configure_modules.m4"
mca_no_config_list_file="mca_no_config_list"
mca_no_config_amc_file="mca_no_config_amc"
############################################################################
#
@ -249,7 +253,134 @@ find_and_delete() {
##############################################################################
#
# run_gnu_tools - run the GNU tools on a given directory
# run_gnu_tools - run the GNU tools in a given directory
#
# INPUT:
# - directory to run in
# - LAM top directory
#
# OUTPUT:
# none
#
# SIDE EFFECTS:
# - assumes that the directory is ready to have the GNU tools run
# in it (i.e., there's some form of configure.*)
# - may preprocess the directory before running the GNU tools
# (e.g., generale Makefile.am's from configure.params, etc.)
#
##############################################################################
run_gnu_tools() {
rgt_dir="$1"
rgt_lam_topdir="$2"
# 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 -f configure.stub -a \
-x "$rgt_lam_topdir/config/mca_make_configure.pl"; then
cat <<EOF
*** Found configure.stub
*** Running mca_make_configure.pl
EOF
"$rgt_lam_topdir/config/mca_make_configure.pl" \
--lamdir "$rgt_lam_topdir" \
--moduledir "`pwd`"
if test "$?" != "0"; then
echo "*** autogen.sh failed to complete!"
exit 1
fi
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
cat <<EOF
--> Err... there's no configure.in or configure.ac file in this directory"
--> Confused; aborting in despair
EOF
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
echo "*** Running 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 MCA modules.
if test -f 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 -N -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
}
##############################################################################
#
# process_dir - look at the files present in a given directory, and do
# one of the following:
# - skip/ignore it
# - run custom autogen.sh in it
# - run the GNU tools in it
# - get a list of Makefile.am's to add to the top-level configure
#
# INPUT:
# - directory to run in
@ -263,12 +394,13 @@ find_and_delete() {
# - 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"
process_dir() {
pd_dir="$1"
pd_lam_topdir="$2"
pd_cur_dir="`pwd`"
if test -d "$pd_dir"; then
cd "$pd_dir"
# See if the package doesn't want us to set it up
@ -286,7 +418,7 @@ EOF
*** `pwd`
EOF
elif test "$rgt_dir" != "." -a -x autogen.sh; then
elif test "$pd_dir" != "." -a -x autogen.sh; then
cat <<EOF
*** Found custom autogen.sh file in:
@ -294,110 +426,146 @@ EOF
EOF
./autogen.sh
else
elif test -f configure.ac -o -f configure.in; then
# If we have configure.ac or configure.in, run the GNU
# tools here
cat <<EOF
*** Running GNU tools in directory:
*** Found configure.(in|ac)
*** `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.
run_gnu_tools "$pd_dir" "$pd_lam_topdir"
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`"
if test "$?" != "0"; then
echo "*** autogen.sh failed to complete!"
exit 1
fi
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
elif test -f configure.params -a -f configure.stub; then
cat <<EOF
# Find and delete the GNU helper script files
*** Found configure.params and configure.stub
*** `pwd`
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 MCA modules.
if test -f 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 -N -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
run_gnu_tools "$pd_dir" "$pd_lam_topdir"
cd "$rgt_cur_dir"
elif test -f configure.params; then
cat <<EOF
*** Found configure.params
*** `pwd`
EOF
. ./configure.params
if test -z "$PARAM_CONFIG_FILES"; then
cat <<EOF
*** No PARAM_CONFIG_FILES!
*** Nothing to do -- skipping this directory
EOF
else
pd_module_name="`basename $pd_dir`"
pd_module_type="`dirname $pd_dir`"
pd_module_type="`basename $pd_module_type`"
pd_get_ver="../../../../../config/lam_get_version.sh"
pd_ver_file="`grep PARAM_VERSION_FILE configure.params`"
if test -z "$pd_ver_file"; then
pd_ver_file="VERSION"
else
pd_ver_file="`echo $pd_ver_file | cut -d= -f1`"
fi
# Write out to two files (they're merged at the end)
pd_list_file="$pd_lam_topdir/$mca_no_config_list_file"
pd_amc_file="$pd_lam_topdir/$mca_no_config_amc_file"
cat >> $pd_list_file <<EOF
dnl ----------------------------------------------------------------
dnl No-configure module:
dnl $pd_dir
EOF
cat >> $pd_amc_file <<EOF
dnl ----------------------------------------------------------------
dnl No-configure module:
dnl $pd_dir
EOF
for file in $PARAM_CONFIG_FILES; do
echo "AC_CONFIG_FILES([$pd_dir/$file])" >> $pd_list_file
done
# Get all the version numbers
pd_ver="`sh $pd_get_ver $pd_ver_file --all`"
pd_ver_full="`echo $pd_ver | cut -d: -f1`"
pd_ver_major="`echo $pd_ver | cut -d: -f2`"
pd_ver_minor="`echo $pd_ver | cut -d: -f3`"
pd_ver_release="`echo $pd_ver | cut -d: -f4`"
pd_ver_alpha="`echo $pd_ver | cut -d: -f5`"
pd_ver_beta="`echo $pd_ver | cut -d: -f6`"
pd_ver_cvs="`echo $pd_ver | cut -d: -f7`"
cat >> $pd_list_file <<EOF
MCA_${pd_module_type}_NO_CONFIGURE_SUBDIRS="$pd_dir \$MCA_${pd_module_type}_NO_CONFIGURE_SUBDIRS"
dnl Since AM_CONDITIONAL does not accept a variable name as its first
dnl argument, we generate it here, and the variable used in the test
dnl will be filled in later.
dnl Similarly, AC_DEFINE_UNQUOTED doesn't take a variable first
dnl argument. So we have to figure it out here.
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_MAJOR_VERSION,
$pd_ver_major,
[Major LAM MCA $pd_module_type $pd_module_name version])
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_MINOR_VERSION,
$pd_ver_minor,
[Minor LAM MCA $pd_module_type $pd_module_name version])
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_RELEASE_VERSION,
$pd_ver_release,
[Release LAM MCA $pd_module_type $pd_module_name version])
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_ALPHA_VERSION,
$pd_ver_alpha,
[Alpha LAM MCA $pd_module_type $pd_module_name version])
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_BETA_VERSION,
$pd_ver_beta,
[Beta LAM MCA $pd_module_type $pd_module_name version])
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_CVS_VERSION,
$pd_ver_cvs,
[CVS LAM MCA $pd_module_type $pd_module_name version])
AC_DEFINE_UNQUOTED(MCA_${pd_module_type}_${pd_module_name}_FULL_VERSION,
"$pd_ver_full",
[Full LAM MCA $pd_module_type $pd_module_name version])
EOF
cat >> $pd_amc_file <<EOF
AM_CONDITIONAL(LAM_BUILD_${pd_module_type}_${pd_module_name}_LOADABLE_MODULE,
test "\$BUILD_${pd_module_type}_${pd_module_name}_LOADABLE_MODULE" = "1")
EOF
cat <<EOF
--> Adding to top-level configure no-configure subdirs:
--> $pd_dir
--> Adding to top-level configure AC_CONFIG_FILES list:
--> $PARAM_CONFIG_FILES
EOF
fi
else
cat <<EOF
*** Nothing found; directory skipped
*** `pwd`
EOF
fi
# Go back to the topdir
cd "$pd_cur_dir"
fi
unset rgt_dir rgt_cur_dir
unset pd_dir pd_lam_topdir pd_cur_dir pd_module_type
}
@ -415,9 +583,12 @@ EOF
#
##############################################################################
run_global() {
# Run the config in the top-level directory
# [Re-]Create the mca_module_list file
run_gnu_tools . .
rm -f "$mca_no_configure_modules_file" "$mca_no_config_list_file" \
"$mca_no_config_amc_file"
touch "$mca_no_configure_modules_file" "$mca_no_config_list_file" \
"$mca_no_config_amc_file"
# Now run the config in every directory in src/mca/[lam|mpi]/*/*
# that has a configure.in or configure.ac script
@ -431,12 +602,59 @@ run_global() {
if test -f "$module/configure.in" -o \
-f "$module/configure.params" -o \
-f "$module/configure.ac"; then
run_gnu_tools "$module" "$rg_cwd"
process_dir "$module" "$rg_cwd"
fi
fi
done
fi
done
# Fill in the final m4 file
cat > "$mca_no_configure_modules_file" <<EOF
dnl
dnl \$HEADER
dnl
dnl This file is automatically created by autogen.sh; it should not
dnl be edited by hand!!
dnl List all the no-configure modules that we found, and AC_DEFINE
dnl their versions
AC_DEFUN([MCA_FIND_NO_CONFIGURE_MODULES],[
MCA_cofs_NO_CONFIGURE_SUBDIRS=""
MCA_pcm_NO_CONFIGURE_SUBDIRS=""
MCA_registry_NO_CONFIGURE_SUBDIRS=""
MCA_coll_NO_CONFIGURE_SUBDIRS=""
MCA_io_NO_CONFIGURE_SUBDIRS=""
MCA_one_NO_CONFIGURE_SUBDIRS=""
MCA_pml_NO_CONFIGURE_SUBDIRS=""
MCA_ptl_NO_CONFIGURE_SUBDIRS=""
MCA_topo_NO_CONFIGURE_SUBDIRS=""
`cat $mca_no_config_list_file`
])dnl
dnl Separately have the AM_CONDITIONALS as to whether we build the
dnl modules static or shared. This must be done separately from the
dnl list because we have to do it late in the configure script, after
dnl all the test variable values have been set.
AC_DEFUN([MCA_AMC_NO_CONFIGURE_MODULES],[
`cat $mca_no_config_amc_file`
])dnl
EOF
# Remove temp files
rm -f $mca_no_config_list_file $mca_no_config_amc_file
# Finally, after we found all the no-configure MCA modules, run
# the config in the top-level directory
process_dir . .
unset type module
}
@ -508,7 +726,7 @@ find_app "automake"
# do the work
if test "$want_local" = "yes"; then
run_gnu_tools . $lamdir
process_dir . $lamdir
else
run_global
fi

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

@ -7,3 +7,4 @@ install-sh
ltmain.sh
missing
mkinstalldirs
mca_no_configure_modules.m4

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

@ -20,13 +20,14 @@ EXTRA_DIST = \
lam_config_pthreads.m4 \
lam_config_solaris_threads.m4 \
lam_config_threads.m4 \
lam_configure_options.m4 \
lam_functions.m4 \
lam_configure_options.m4 \
lam_functions.m4 \
lam_get_sizeof_fortran_type.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
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 \
mca_no_configure_modules.m4

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

@ -65,6 +65,9 @@ case "$option" in
--cvs)
echo $LAM_CVS_VERSION
;;
--all)
echo ${LAM_VERSION}:${LAM_MAJOR_VERSION}:${LAM_MINOR_VERSION}:${LAM_RELEASE_VERSION}:${LAM_ALPHA_VERSION}:${LAM_BETA_VERSION}:${LAM_CVS_VERSION}
;;
-h|--help)
cat <<EOF
$0 <srcfile> [<option>]
@ -78,6 +81,7 @@ $0 <srcfile> [<option>]
--alpha - Alpha version number
--beta - Beta version nmumber
--cvs - CVS date stamp
--all - Show all version numbers, separated by :
--help - This message
EOF
esac

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

@ -40,43 +40,23 @@ 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"
# The list of MCA types (it's fixed)
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
found_types="lam/oob lam/pcm lam/registry mpi/coll mpi/io mpi/one mpi/pml mpi/ptl mpi/topo"
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.
# Get the list of all the non-configure MCA modules that were found by
# autogen.sh.
# config/mca_no_configure_modules.m4
MCA_FIND_NO_CONFIGURE_MODULES
# Now determine the configurable 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=
@ -117,9 +97,9 @@ for type in $found_types; do
outfile=$outdir/static-modules.h
rm -f $outfile $outfile.struct $outfile.extern \
$file.all $file.static $file.dyanmic
$outfile.all $outfile.static $outfile.dyanmic
touch $outfile.struct $outfile.extern \
$file.all $file.static $file.dynamic
$outfile.all $outfile.static $outfile.dynamic
# Manual conversion of $type to its generic name (e.g., crmpi->cr,
# crlam->cr).
@ -137,7 +117,53 @@ for type in $found_types; do
;;
esac
# Go through all the module directories and find valid modules
# Iterate through the list of no-configure modules
foo="found_modules=\$MCA_${type}_NO_CONFIGURE_SUBDIRS"
eval $foo
for module in $found_modules; do
m=`basename "$module"`
if test -d $module -a ! -f $module/.lam_ignore; then
lam_show_subtitle "MCA module $type:$m (no configure script)"
# Remove any possible sym link in the mca-dynamic tree
pwd
ls -l src/mca/dyanmic-$library/$type/$m
rm -f src/mca/dyanmic-$library/$type/$m
ls -l src/mca/dyanmic-$library/$type/$m
# Now process the module
#JMS
echo calling no-configure process_module
MCA_PROCESS_MODULE(1, 1, $library, $type, $m)
#JMS
echo back from no-configure process_module
# Note that the AM_CONDITIONAL for this module is set in
# config/mca_module_list.m4 -- which is generated by
# autogen.sh because we cannot have a variable
# AM_CONDITIONAL name (which we need here). Since
# autogen.sh knows the name that is necessary, it just
# generated the AM_CONDITIONAL directly. Here, we fill in
# the variable that is used in that AM_CONDITIONAL.
if test "$compile_mode" = "dynamic"; then
value=1
else
value=0
fi
foo="BUILD_${type}_${m}_LOADABLE_MODULE=$value"
eval $foo
echo no-configure: $foo : $value
fi
done
# Find all configureable modules, run their configure scripts,
# etc.
for module in $srcdir/src/mca/$library/$type/*; do
FOUND=0
@ -145,6 +171,7 @@ for type in $found_types; do
m="`basename $module`"
if test -d $module -a -x $module/configure -a \
! -f $module/.lam_ignore; then
lam_show_subtitle "MCA module $type:$m (need to configure)"
# We found one!
@ -152,146 +179,30 @@ for type in $found_types; do
# Remove any possible sym link in the mca-dynamic tree
rm -f src/mca/dyanmica-$library/$type/$m
rm -f src/mca/dyanmic-$library/$type/$m
# If we're skipping MCA, look at the results from last
# time
# Configure the module subdirectory
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_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.
# Process this module
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
MCA_PROCESS_MODULE($FOUND, $HAPPY, $library, $type, $m)
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="`sort $outfile.all`"
all_modules="`echo $all_modules`"
static_modules="`sort $file.static`"
static_modules="`sort $outfile.static`"
static_modules="`echo $static_modules`"
dynamic_modules="`sort $file.dynamic`"
dynamic_modules="`sort $outfile.dynamic`"
dynamic_modules="`echo $dynamic_modules`"
rm -f $file $file.all $file.static $file.dynamic
rm -f $outfile $outfile.all $outfile.static $outfile.dynamic
# Create the final .h file that will be included in the type's
# top-level glue. This lists all the static modules.
@ -379,4 +290,129 @@ AC_SUBST(MCA_topo_STATIC_SUBDIRS)
AC_SUBST(MCA_topo_DYNAMIC_SUBDIRS)
AC_SUBST(MCA_topo_STATIC_LTLIBS)
# Finally, now that we've filled in all the test variables, get all
# the AM_CONDITIONALs that indicate whether to build modules as shared
# or static.
# config/mca_no_configure_modules.m4
MCA_AMC_NO_CONFIGURE_MODULES])
dnl -----------------------------------------------------------------------
dnl -----------------------------------------------------------------------
dnl -----------------------------------------------------------------------
AC_DEFUN([MCA_PROCESS_MODULE],[
HAPPY=$1
FOUND=$2
library=$3
type=$4
m=$5
#JMS
echo in MCA:PROCESS:MODULE
ls -l src/mca/dyanmic-$library/$type/$m
# 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
#JMS
echo in MCA:PROCESS:MODULE: HAPPY is 1
ls -l src/mca/dyanmic-$library/$type/$m
# Add this subdir to the mast list of all MCA module subdirs
echo $m >> $outfile.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
#JMS
echo in MCA:PROCESS:MODULE: after evals
ls -l src/mca/dyanmic-$library/$type/$m
shared_mode_override=static
# 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 >> $outfile.dynamic
ls -l "src/mca/dynamic-$library/$type/$m"
$LN_S "$LAM_TOP_BUILDDIR/src/mca/$library/$type/$m" \
"src/mca/dynamic-$library/$type/$m"
ls -l "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 >> $outfile.static
fi
# Output pretty results
AC_MSG_CHECKING([if MCA module $type:$m can compile])
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for MCA module $type:$m compile mode])
AC_MSG_RESULT([$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
elif test "$FOUND" = "1"; then
AC_MSG_CHECKING([if MCA module $type:$m can compile])
AC_MSG_RESULT([no])
# 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
])

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

@ -143,11 +143,11 @@ crlam)
;;
esac
BUILD_LOADABLE_MODULE=0
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_LOADABLE_MODULE=1
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE=1
msg=yes
elif test "$with_modules" != "no"; then
ifs_save="$IFS"
@ -155,7 +155,7 @@ elif test "$with_modules" != "no"; then
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
BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE=1
msg=yes
fi
done
@ -178,7 +178,7 @@ AM_DISABLE_SHARED
# defaults and reset them to shared=yes, static=no.
#
if test "$BUILD_LOADABLE_MODULE" = "1"; then
if test "$BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE" = "1"; then
enable_shared=yes
enable_static=no
fi
@ -229,7 +229,8 @@ AC_SUBST(CPPFLAGS)
lam_show_subtitle "GNU libtool setup"
AM_PROG_LIBTOOL
AM_CONDITIONAL(LAM_BUILD_LOADABLE_MODULE, test "$BUILD_LOADABLE_MODULE" = "1")
AM_CONDITIONAL(LAM_BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE,
test "$BUILD_@MCA_TYPE@_@MCA_MODULE_NAME@_LOADABLE_MODULE" = "1")
############################################################################

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

@ -91,6 +91,10 @@ AH_BOTTOM([
LAM_BASIC_SETUP
top_lam_srcdir="$LAM_TOP_SRCDIR"
AC_SUBST(top_lam_srcdir)
top_lam_builddir="$LAM_TOP_BUILDDIR"
AC_SUBST(top_lam_builddir)
############################################################################
# Configuration options
@ -380,6 +384,12 @@ AC_DEFINE_UNQUOTED(MPI_Offset, $MPI_OFFSET_TYPE, [Type of MPI_Offset])
LAM_CONFIG_THREADS
#
# What is the local equivalent of "ln -s"
#
AC_PROG_LN_S
#
# File system case sensitivity
#
@ -433,7 +443,7 @@ AC_SUBST(liblam_third_party_subdirs)
# (after C compiler setup)
############################################################################
lam_show_subtitle "Libtool / libltdl configuration"
lam_show_subtitle "Libtool configuration"
# 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

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

@ -8,7 +8,6 @@
include $(top_lam_srcdir)/config/Makefile.options
SUBDIRS = src
DIST_SUBDIRS = config $(SUBDIRS)
EXTRA_DIST = VERSION
@ -16,8 +15,8 @@ EXTRA_DIST = VERSION
# in the top-level directory, and it has to be named
# liblam_ssi_coll_lam_basic.la
if LAM_BUILD_LOADABLE_MODULE
module_noinst =
if LAM_BUILD_oob_cofs_LOADABLE_MODULE
module_noinst =
module_install = mca_oob_cofs.la
else
module_noinst = libmca_lam_oob_cofs.la

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

@ -1,9 +0,0 @@
config.guess
config.sub
depcomp
install-sh
ltmain.sh
Makefile
Makefile.in
missing
mkinstalldirs

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

@ -6,4 +6,4 @@
# Specific to this module
PARAM_INIT_FILE=src/oob_cofs.c
PARAM_CONFIG_FILES="Makefile config/Makefile src/Makefile"
PARAM_CONFIG_FILES="Makefile src/Makefile"

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

@ -8,7 +8,6 @@
include $(top_lam_srcdir)/config/Makefile.options
SUBDIRS = src
DIST_SUBDIRS = config $(SUBDIRS)
EXTRA_DIST = VERSION
@ -16,7 +15,7 @@ EXTRA_DIST = VERSION
# in the top-level directory, and it has to be named
# liblam_ssi_coll_lam_basic.la
if LAM_BUILD_LOADABLE_MODULE
if LAM_BUILD_pcm_cofs_LOADABLE_MODULE
module_noinst =
module_install = mca_pcm_cofs.la
else

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

@ -1,9 +0,0 @@
config.guess
config.sub
depcomp
install-sh
ltmain.sh
Makefile
Makefile.in
missing
mkinstalldirs

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

@ -6,4 +6,4 @@
# Specific to this module
PARAM_INIT_FILE=src/pcm_cofs.c
PARAM_CONFIG_FILES="Makefile config/Makefile src/Makefile"
PARAM_CONFIG_FILES="Makefile src/Makefile"

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

@ -8,7 +8,6 @@
include $(top_lam_srcdir)/config/Makefile.options
SUBDIRS = src
DIST_SUBDIRS = config $(SUBDIRS)
EXTRA_DIST = VERSION
@ -16,7 +15,7 @@ EXTRA_DIST = VERSION
# in the top-level directory, and it has to be named
# liblam_ssi_coll_lam_basic.la
if LAM_BUILD_LOADABLE_MODULE
if LAM_BUILD_registry_cofs_LOADABLE_MODULE
module_noinst =
module_install = mca_registry_cofs.la
else

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

@ -1,9 +0,0 @@
config.guess
config.sub
depcomp
install-sh
ltmain.sh
Makefile
Makefile.in
missing
mkinstalldirs

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

@ -6,4 +6,4 @@
# Specific to this module
PARAM_INIT_FILE=src/registry_cofs.c
PARAM_CONFIG_FILES="Makefile config/Makefile src/Makefile"
PARAM_CONFIG_FILES="Makefile src/Makefile"

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

@ -16,7 +16,7 @@ EXTRA_DIST = VERSION
# in the top-level directory, and it has to be named
# liblam_ssi_coll_lam_basic.la
if LAM_BUILD_LOADABLE_MODULE
if LAM_BUILD_coll_basic_LOADABLE_MODULE
module_noinst =
module_install = mca_coll_basic.la
else

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

@ -7,7 +7,6 @@
include $(top_lam_srcdir)/config/Makefile.options
SUBDIRS = src
DIST_SUBDIRS = config $(SUBDIRS)
EXTRA_DIST = VERSION
@ -15,7 +14,7 @@ EXTRA_DIST = VERSION
# in the top-level directory, and it has to be named
# liblam_ssi_coll_lam_basic.la
if LAM_BUILD_LOADABLE_MODULE
if LAM_BUILD_io_romio_LOADABLE_MODULE
module_noinst =
module_install = mca_io_romio.la
else

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

@ -1,25 +0,0 @@
Makefile
Makefile.in
acinclude.m4
aclocal.m4
configure
configure.ac
config.log
config.status
libtool
autom4te.cache
.libs
.deps
*.la
*.lo
.lam*
config.guess
config.sub
depcomp
install-sh
ltmain.sh
missing
mkinstalldirs
stamp-h1
teg_config.h
teg_config.h.in

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

@ -7,4 +7,4 @@
PARAM_INIT_FILE=src/io_romio_module.c
PARAM_CONFIG_HEADER_FILE="src/romio_config.h"
PARAM_CONFIG_FILES="Makefile src/Makefile config/Makefile"
PARAM_CONFIG_FILES="Makefile src/Makefile"

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

@ -1,2 +1,3 @@
Makefile
Makefile.in
static-modules.h

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

@ -7,7 +7,6 @@
include $(top_lam_srcdir)/config/Makefile.options
SUBDIRS = src
DIST_SUBDIRS = config $(SUBDIRS)
EXTRA_DIST = VERSION
@ -15,7 +14,7 @@ EXTRA_DIST = VERSION
# in the top-level directory, and it has to be named
# liblam_ssi_coll_lam_basic.la
if LAM_BUILD_LOADABLE_MODULE
if LAM_BUILD_pml_teg_LOADABLE_MODULE
module_noinst =
module_install = mca_pml_teg.la
else

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

@ -1,25 +0,0 @@
Makefile
Makefile.in
acinclude.m4
aclocal.m4
configure
configure.ac
config.log
config.status
libtool
autom4te.cache
.libs
.deps
*.la
*.lo
.lam*
config.guess
config.sub
depcomp
install-sh
ltmain.sh
missing
mkinstalldirs
stamp-h1
teg_config.h
teg_config.h.in

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

@ -7,4 +7,4 @@
PARAM_INIT_FILE=src/pml_teg.c
PARAM_CONFIG_HEADER_FILE="src/teg_config.h"
PARAM_CONFIG_FILES="Makefile src/Makefile config/Makefile"
PARAM_CONFIG_FILES="Makefile src/Makefile"

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

@ -7,7 +7,6 @@
include $(top_lam_srcdir)/config/Makefile.options
SUBDIRS = src
DIST_SUBDIRS = config $(SUBDIRS)
EXTRA_DIST = VERSION
@ -15,7 +14,7 @@ EXTRA_DIST = VERSION
# in the top-level directory, and it has to be named
# liblam_ssi_coll_lam_basic.la
if LAM_BUILD_LOADABLE_MODULE
if LAM_BUILD_ptl_tcp_LOADABLE_MODULE
module_noinst =
module_install = mca_ptl_tcp.la
else

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

@ -1,23 +0,0 @@
Makefile
Makefile.in
acinclude.m4
aclocal.m4
configure
configure.ac
config.log
config.status
libtool
autom4te.cache
.libs
.deps
*.la
*.lo
.lam*
config.guess
config.sub
depcomp
install-sh
ltmain.sh
missing
mkinstalldirs
stamp-h1

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

@ -2,6 +2,9 @@
#
# $HEADER$
#
# Specific to this module
PARAM_INIT_FILE=src/ptl_tcp.c
PARAM_CONFIG_HEADER_FILE="src/tcp_config.h"
PARAM_CONFIG_FILES="Makefile src/Makefile config/Makefile"
PARAM_CONFIG_FILES="Makefile src/Makefile"

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

@ -1,2 +1,3 @@
Makefile
Makefile.in
static-modules.h