2003-12-24 04:49:07 +03:00
|
|
|
#! /bin/bash
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2004-01-07 17:43:42 +03:00
|
|
|
# $HEADER$
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2004-08-06 18:30:18 +04:00
|
|
|
# This script is run on developer copies of Open MPI -- *not*
|
2003-11-22 19:36:58 +03:00
|
|
|
# distribution tarballs.
|
2004-01-04 03:14:51 +03:00
|
|
|
|
|
|
|
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2004-01-04 03:14:51 +03:00
|
|
|
#
|
|
|
|
# User-definable parameters (search path and minimum supported versions)
|
|
|
|
#
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2004-01-04 03:14:51 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_aclocal_search="aclocal"
|
|
|
|
ompi_autoheader_search="autoheader"
|
|
|
|
ompi_autoconf_search="autoconf"
|
|
|
|
ompi_libtoolize_search="libtoolize glibtoolize"
|
|
|
|
ompi_automake_search="automake"
|
2004-01-04 03:14:51 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_automake_version="1.7"
|
|
|
|
ompi_autoconf_version="2.58"
|
|
|
|
ompi_libtool_version="1.5"
|
2004-01-04 03:14:51 +03:00
|
|
|
|
|
|
|
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2004-01-04 03:14:51 +03:00
|
|
|
# Global variables - should not need to modify defaults
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2003-11-22 19:36:58 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_aclocal_version="$ompi_automake_version"
|
|
|
|
ompi_autoheader_version="$ompi_autoconf_version"
|
|
|
|
ompi_libtoolize_version="$ompi_libtool_version"
|
2004-01-04 03:14:51 +03:00
|
|
|
|
|
|
|
# program names to execute
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_aclocal=""
|
|
|
|
ompi_autoheader=""
|
|
|
|
ompi_autoconf=""
|
|
|
|
ompi_libtoolize=""
|
|
|
|
ompi_automake=""
|
2004-01-04 03:14:51 +03:00
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_no_configure_components_file="config/mca_no_configure_components.m4"
|
2004-02-13 06:58:56 +03:00
|
|
|
mca_no_config_list_file="mca_no_config_list"
|
|
|
|
mca_no_config_amc_file="mca_no_config_amc"
|
2004-09-24 03:46:58 +04:00
|
|
|
autogen_subdir_file="autogen.subdirs"
|
2004-02-13 06:58:56 +03:00
|
|
|
|
2004-01-04 03:14:51 +03:00
|
|
|
|
2004-01-07 17:43:42 +03:00
|
|
|
############################################################################
|
2004-01-04 03:14:51 +03:00
|
|
|
#
|
2004-01-07 17:43:42 +03:00
|
|
|
# Version check - does major,minor,release check (hopefully ignoring
|
|
|
|
# beta et al)
|
2004-01-04 03:14:51 +03:00
|
|
|
#
|
|
|
|
# INPUT:
|
|
|
|
# - minimum version allowable
|
|
|
|
# - version we found
|
|
|
|
#
|
|
|
|
# OUTPUT:
|
|
|
|
# - 0 version is ok
|
|
|
|
# - 1 version is not ok
|
|
|
|
#
|
|
|
|
# SIDE EFFECTS:
|
|
|
|
# none
|
|
|
|
#
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2004-01-04 03:14:51 +03:00
|
|
|
check_version() {
|
|
|
|
local min_version="$1"
|
|
|
|
local version="$2"
|
|
|
|
|
|
|
|
local min_major_version="`echo $min_version | cut -f1 -d.`"
|
|
|
|
local min_minor_version="`echo $min_version | cut -f2 -d.`"
|
|
|
|
local min_release_version="`echo $min_version | cut -f3 -d.`"
|
|
|
|
if test "$min_release_version" = "" ; then
|
|
|
|
min_release_version=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
local major_version="`echo $version | cut -f1 -d.`"
|
|
|
|
local minor_version="`echo $version | cut -f2 -d.`"
|
|
|
|
local release_version="`echo $version | cut -f3 -d.`"
|
|
|
|
if test "$release_version" = "" ; then
|
|
|
|
release_version=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $min_major_version -lt $major_version ; then
|
|
|
|
return 0
|
|
|
|
elif test $min_major_version -gt $major_version ; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $min_minor_version -lt $minor_version ; then
|
|
|
|
return 0
|
|
|
|
elif test $min_minor_version -gt $minor_version ; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $min_release_version -gt $release_version ; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2004-01-04 03:14:51 +03:00
|
|
|
#
|
2004-01-07 17:43:42 +03:00
|
|
|
# find app - find a version of the given application that is new
|
|
|
|
# enough for use
|
2004-01-04 03:14:51 +03:00
|
|
|
#
|
|
|
|
# INPUT:
|
|
|
|
# - name of application (eg aclocal)
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2004-01-04 03:14:51 +03:00
|
|
|
# OUTPUT:
|
|
|
|
# none
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2004-01-04 03:14:51 +03:00
|
|
|
# SIDE EFFECTS:
|
|
|
|
# - sets application_name variable to working executable name
|
|
|
|
# - aborts on error finding application
|
2003-12-24 04:49:07 +03:00
|
|
|
#
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2004-01-04 03:14:51 +03:00
|
|
|
find_app() {
|
|
|
|
local app_name="$1"
|
2003-12-24 04:49:07 +03:00
|
|
|
|
2004-01-04 03:14:51 +03:00
|
|
|
local version="0.0.0"
|
|
|
|
local min_version="99.99.99"
|
|
|
|
local found=0
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
eval "min_version=\"\$ompi_${app_name}_version\""
|
2004-01-04 03:14:51 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
eval "search_path=\"\$ompi_${app_name}_search\""
|
2004-01-04 03:14:51 +03:00
|
|
|
for i in $search_path ; do
|
|
|
|
version="`${i} --version 2>&1`"
|
|
|
|
if test "$?" != 0 ; then
|
2003-12-24 04:49:07 +03:00
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2004-01-04 03:14:51 +03:00
|
|
|
version="`echo $version | cut -f2 -d')'`"
|
|
|
|
version="`echo $version | cut -f1 -d' '`"
|
|
|
|
|
|
|
|
if check_version $min_version $version ; then
|
2004-06-07 19:33:53 +04:00
|
|
|
eval "ompi_${app_name}=\"${i}\""
|
2004-01-04 03:14:51 +03:00
|
|
|
found=1
|
2004-01-10 03:02:53 +03:00
|
|
|
break
|
2003-12-24 04:49:07 +03:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2004-01-04 03:14:51 +03:00
|
|
|
if test "$found" = "0" ; then
|
2003-11-22 19:36:58 +03:00
|
|
|
cat <<EOF
|
2004-01-04 03:14:51 +03:00
|
|
|
I could not find a recent enough copy of ${app_name}.
|
|
|
|
I am gonna abort. :-(
|
2003-11-22 19:36:58 +03:00
|
|
|
|
2004-01-04 03:14:51 +03:00
|
|
|
Please make sure you are using at least the following versions of the
|
|
|
|
GNU tools:
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
GNU Autoconf $ompi_autoconf_version
|
|
|
|
GNU Automake $ompi_automake_version
|
2004-07-08 21:49:41 +04:00
|
|
|
NOTE: You may need Automake 1.8.5 (or higher) in order to run
|
|
|
|
"make dist" successfully
|
2004-06-07 19:33:53 +04:00
|
|
|
GNU Libtool $ompi_libtool_version
|
2003-11-22 19:36:58 +03:00
|
|
|
|
|
|
|
EOF
|
2004-01-04 03:14:51 +03:00
|
|
|
exit 1
|
2003-11-22 19:36:58 +03:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2004-01-04 03:14:51 +03:00
|
|
|
#
|
|
|
|
# run_and_check - run the right GNU tool, printing warning on failure
|
|
|
|
#
|
|
|
|
# INPUT:
|
|
|
|
# - name of application (eg aclocal)
|
|
|
|
# - program arguments
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2004-01-04 03:14:51 +03:00
|
|
|
# OUTPUT:
|
|
|
|
# none
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2004-01-04 03:14:51 +03:00
|
|
|
# SIDE EFFECTS:
|
|
|
|
# - aborts on error running application
|
|
|
|
#
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2003-11-22 19:36:58 +03:00
|
|
|
run_and_check() {
|
2004-01-04 03:14:51 +03:00
|
|
|
local rac_progs="$*"
|
2004-01-08 18:17:57 +03:00
|
|
|
echo "[Running] $rac_progs"
|
2003-11-22 19:36:58 +03:00
|
|
|
eval $rac_progs
|
|
|
|
if test "$?" != 0; then
|
|
|
|
cat <<EOF
|
|
|
|
|
2004-02-24 15:25:22 +03:00
|
|
|
-------------------------------------------------------------------------
|
|
|
|
It seems that the execution of "$rac_progs" has failed. See above for
|
|
|
|
the specific error message that caused it to abort.
|
2003-11-22 19:36:58 +03:00
|
|
|
|
2004-02-24 15:25:22 +03:00
|
|
|
This *MAY* be caused by an older version of one of the required
|
2003-11-22 19:36:58 +03:00
|
|
|
packages. Please make sure you are using at least the following
|
|
|
|
versions:
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
GNU Autoconf $ompi_autoconf_version
|
|
|
|
GNU Automake $ompi_automake_version
|
|
|
|
GNU Libtool $ompi_libtool_version
|
2004-02-24 15:25:22 +03:00
|
|
|
-------------------------------------------------------------------------
|
2003-11-22 19:36:58 +03:00
|
|
|
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2004-01-04 03:14:51 +03:00
|
|
|
#
|
|
|
|
# find_and_delete - look for standard files in a number of common places
|
|
|
|
# (e.g., ./config.guess, config/config.guess, dist/config.guess), and
|
|
|
|
# delete it. If it's not found there, look for AC_CONFIG_AUX_DIR in
|
|
|
|
# the configure.in script and try there. If it's not there, oh well.
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2004-01-04 03:14:51 +03:00
|
|
|
# INPUT:
|
|
|
|
# - file to delete
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2004-01-04 03:14:51 +03:00
|
|
|
# OUTPUT:
|
|
|
|
# none
|
|
|
|
#
|
|
|
|
# SIDE EFFECTS:
|
|
|
|
# - files may disappear
|
|
|
|
#
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2003-11-22 19:36:58 +03:00
|
|
|
find_and_delete() {
|
2004-01-04 03:14:51 +03:00
|
|
|
local fad_file="$1"
|
|
|
|
|
|
|
|
local fad_cfile
|
|
|
|
local auxdir
|
2003-11-22 19:36:58 +03:00
|
|
|
|
|
|
|
# Look for the file in "standard" places
|
|
|
|
|
|
|
|
if test -f $fad_file; then
|
|
|
|
rm -f $fad_file
|
|
|
|
elif test -d config/$fad_file; then
|
|
|
|
rm -f config/$fad_file
|
|
|
|
elif test -d dist/$fad_file; then
|
|
|
|
rm -f dist/$fad_file
|
|
|
|
else
|
|
|
|
|
|
|
|
# Didn't find it -- look for an AC_CONFIG_AUX_DIR line in
|
|
|
|
# configure.[in|ac]
|
|
|
|
|
|
|
|
if test -f configure.in; then
|
|
|
|
fad_cfile=configure.in
|
|
|
|
elif test -f configure.ac; then
|
|
|
|
fad_cfile=configure.ac
|
|
|
|
else
|
|
|
|
echo "--> Errr... there's no configure.in or configure.ac file!"
|
|
|
|
fi
|
|
|
|
if test -n "$fad_cfile"; then
|
|
|
|
auxdir="`grep AC_CONFIG_AUX_DIR $fad_cfile | cut -d\( -f 2 | cut -d\) -f 1`"
|
|
|
|
fi
|
|
|
|
if test -f "$auxdir/$fad_file"; then
|
|
|
|
rm -f "$auxdir/$fad_file"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-01-12 00:35:37 +03:00
|
|
|
##############################################################################
|
|
|
|
#
|
2004-02-13 06:58:56 +03:00
|
|
|
# run_gnu_tools - run the GNU tools in a given directory
|
2004-01-12 00:35:37 +03:00
|
|
|
#
|
|
|
|
# INPUT:
|
|
|
|
# - directory to run in
|
2004-06-07 19:33:53 +04:00
|
|
|
# - OMPI top directory
|
2004-01-12 00:35:37 +03:00
|
|
|
#
|
|
|
|
# OUTPUT:
|
|
|
|
# none
|
|
|
|
#
|
|
|
|
# SIDE EFFECTS:
|
2004-02-13 06:58:56 +03:00
|
|
|
# - 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.)
|
2004-01-12 00:35:37 +03:00
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
run_gnu_tools() {
|
|
|
|
rgt_dir="$1"
|
2004-06-07 19:33:53 +04:00
|
|
|
rgt_ompi_topdir="$2"
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
# 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 \
|
2004-06-07 19:33:53 +04:00
|
|
|
-x "$rgt_ompi_topdir/config/mca_make_configure.pl"; then
|
2004-02-13 06:58:56 +03:00
|
|
|
cat <<EOF
|
|
|
|
*** Found configure.stub
|
|
|
|
*** Running mca_make_configure.pl
|
|
|
|
EOF
|
2004-06-07 19:33:53 +04:00
|
|
|
"$rgt_ompi_topdir/config/mca_make_configure.pl" \
|
|
|
|
--ompidir "$rgt_ompi_topdir" \
|
2004-08-02 04:24:22 +04:00
|
|
|
--componentdir "`pwd`"
|
2004-02-13 06:58:56 +03:00
|
|
|
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"
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
run_and_check $ompi_aclocal
|
2004-02-13 06:58:56 +03:00
|
|
|
if test "`grep AC_CONFIG_HEADER $file`" != "" -o \
|
|
|
|
"`grep AM_CONFIG_HEADER $file`" != ""; then
|
2004-06-07 19:33:53 +04:00
|
|
|
run_and_check $ompi_autoheader
|
2004-02-13 06:58:56 +03:00
|
|
|
fi
|
2004-06-07 19:33:53 +04:00
|
|
|
run_and_check $ompi_autoconf
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
# We only need the libltdl stuff for the top-level
|
2004-08-02 04:24:22 +04:00
|
|
|
# configure, not any of the MCA components.
|
2004-02-13 06:58:56 +03:00
|
|
|
|
2004-03-19 00:35:28 +03:00
|
|
|
if test -f include/mpi.h; then
|
2004-03-17 22:06:06 +03:00
|
|
|
rm -rf libltdl src/libltdl src/ltdl.h
|
2004-06-07 19:33:53 +04:00
|
|
|
run_and_check $ompi_libtoolize --automake --copy --ltdl
|
2004-03-17 22:06:06 +03:00
|
|
|
mv libltdl src
|
2004-02-13 06:58:56 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
echo "Adjusting libltdl for OMPI :-("
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
echo " -- patching for argz bugfix in libtool 1.5"
|
2004-03-17 22:06:06 +03:00
|
|
|
cd src/libltdl
|
|
|
|
if test "`grep 'while ((before >= *pargz) && (before[-1] != LT_EOS_CHAR))' ltdl.c`" != ""; then
|
|
|
|
patch -N -p0 <<EOF
|
2004-02-13 06:58:56 +03:00
|
|
|
--- 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
|
2004-03-17 22:06:06 +03:00
|
|
|
else
|
|
|
|
echo " ==> your libtool doesn't need this! yay!"
|
|
|
|
fi
|
|
|
|
cd ../..
|
2004-02-13 06:58:56 +03:00
|
|
|
echo " -- patching configure for broken -c/-o compiler test"
|
2004-06-07 19:33:53 +04:00
|
|
|
sed -e 's/chmod -w \./#OMPI\/MPI FIX: chmod -w ./' \
|
2004-02-13 06:58:56 +03:00
|
|
|
configure > configure.new
|
|
|
|
mv configure.new configure
|
|
|
|
chmod a+x configure
|
|
|
|
else
|
2004-06-07 19:33:53 +04:00
|
|
|
run_and_check $ompi_libtoolize --automake --copy
|
2004-02-13 06:58:56 +03:00
|
|
|
fi
|
2004-06-07 19:33:53 +04:00
|
|
|
run_and_check $ompi_automake --foreign -a --copy --include-deps
|
2004-02-13 06:58:56 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# 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
|
2004-06-07 19:33:53 +04:00
|
|
|
# - OMPI top directory
|
2004-02-13 06:58:56 +03:00
|
|
|
#
|
|
|
|
# OUTPUT:
|
|
|
|
# none
|
|
|
|
#
|
|
|
|
# SIDE EFFECTS:
|
2004-06-07 19:33:53 +04:00
|
|
|
# - skips directories with .ompi_no_gnu .ompi_ignore
|
2004-02-13 06:58:56 +03:00
|
|
|
# - uses provided autogen.sh if available
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
process_dir() {
|
|
|
|
pd_dir="$1"
|
2004-06-07 19:33:53 +04:00
|
|
|
pd_ompi_topdir="$2"
|
2004-02-13 06:58:56 +03:00
|
|
|
pd_cur_dir="`pwd`"
|
|
|
|
|
|
|
|
if test -d "$pd_dir"; then
|
|
|
|
cd "$pd_dir"
|
2004-01-12 00:35:37 +03:00
|
|
|
|
|
|
|
# See if the package doesn't want us to set it up
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
if test -f .ompi_no_gnu; then
|
2004-01-12 00:35:37 +03:00
|
|
|
cat <<EOF
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
*** Found .ompi_no_gnu file -- skipping GNU setup in:
|
2004-01-12 00:35:37 +03:00
|
|
|
*** `pwd`
|
|
|
|
|
|
|
|
EOF
|
2004-06-07 19:33:53 +04:00
|
|
|
elif test -f .ompi_ignore; then
|
2004-01-12 00:35:37 +03:00
|
|
|
cat <<EOF
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
*** Found .ompi_ignore file -- skipping entire tree:
|
2004-01-12 00:35:37 +03:00
|
|
|
*** `pwd`
|
|
|
|
|
|
|
|
EOF
|
2004-02-13 06:58:56 +03:00
|
|
|
elif test "$pd_dir" != "." -a -x autogen.sh; then
|
2004-01-12 00:35:37 +03:00
|
|
|
cat <<EOF
|
|
|
|
|
|
|
|
*** Found custom autogen.sh file in:
|
|
|
|
*** `pwd`
|
|
|
|
|
|
|
|
EOF
|
|
|
|
./autogen.sh
|
2004-02-13 06:58:56 +03:00
|
|
|
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
|
|
|
|
|
|
|
|
*** Found configure.(in|ac)
|
|
|
|
*** `pwd`
|
|
|
|
|
|
|
|
EOF
|
2004-06-07 19:33:53 +04:00
|
|
|
run_gnu_tools "$pd_dir" "$pd_ompi_topdir"
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
elif test -f configure.params -a -f configure.stub; then
|
2004-01-12 00:35:37 +03:00
|
|
|
cat <<EOF
|
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
*** Found configure.params and configure.stub
|
2004-01-12 00:35:37 +03:00
|
|
|
*** `pwd`
|
|
|
|
|
|
|
|
EOF
|
2004-06-07 19:33:53 +04:00
|
|
|
run_gnu_tools "$pd_dir" "$pd_ompi_topdir"
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
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
|
2004-08-02 04:24:22 +04:00
|
|
|
pd_component_name="`basename $pd_dir`"
|
|
|
|
pd_component_type="`dirname $pd_dir`"
|
|
|
|
pd_component_type="`basename $pd_component_type`"
|
2004-01-12 00:35:37 +03:00
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
# Write out to two files (they're merged at the end)
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
pd_list_file="$pd_ompi_topdir/$mca_no_config_list_file"
|
|
|
|
pd_amc_file="$pd_ompi_topdir/$mca_no_config_amc_file"
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
cat >> $pd_list_file <<EOF
|
|
|
|
dnl ----------------------------------------------------------------
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
dnl No-configure component:
|
2004-02-13 06:58:56 +03:00
|
|
|
dnl $pd_dir
|
|
|
|
|
2004-01-12 00:35:37 +03:00
|
|
|
EOF
|
2004-02-13 06:58:56 +03:00
|
|
|
cat >> $pd_amc_file <<EOF
|
|
|
|
dnl ----------------------------------------------------------------
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
dnl No-configure component:
|
2004-02-13 06:58:56 +03:00
|
|
|
dnl $pd_dir
|
|
|
|
|
|
|
|
EOF
|
2004-08-10 08:10:08 +04:00
|
|
|
# Tell configure to add all the PARAM_CONFIG_FILES to
|
|
|
|
# the AC_CONFIG_FILES list.
|
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
for file in $PARAM_CONFIG_FILES; do
|
|
|
|
echo "AC_CONFIG_FILES([$pd_dir/$file])" >> $pd_list_file
|
|
|
|
done
|
|
|
|
|
2004-08-10 08:10:08 +04:00
|
|
|
# Add this component directory to the list of
|
|
|
|
# subdirectories to traverse when building.
|
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
cat >> $pd_list_file <<EOF
|
|
|
|
|
2004-08-10 08:10:08 +04:00
|
|
|
dnl Add this component directory to the list of directories to
|
|
|
|
dnl traverse for this component framework
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
MCA_${pd_component_type}_NO_CONFIGURE_SUBDIRS="$pd_dir \$MCA_${pd_component_type}_NO_CONFIGURE_SUBDIRS"
|
2004-02-13 06:58:56 +03:00
|
|
|
|
2004-08-10 08:10:08 +04:00
|
|
|
EOF
|
|
|
|
|
|
|
|
# See if we have a VERSION file
|
|
|
|
|
|
|
|
if test -z "$PARAM_VERSION_FILE"; then
|
|
|
|
if test -f "VERSION"; then
|
|
|
|
PARAM_VERSION_FILE="VERSION"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if test ! -f "$PARAM_VERSION_FILE"; then
|
|
|
|
PARAM_VERSION_FILE=
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# If we have the VERSION file, save the version
|
|
|
|
# numbers in a .h file. Ignore this for the
|
|
|
|
# mca/common tree -- they're not components, so they
|
|
|
|
# don't have version numbers.
|
|
|
|
|
|
|
|
if test -n "$PARAM_VERSION_FILE" -a \
|
|
|
|
"$pd_component_type" != "common"; then
|
|
|
|
pd_ver_header="$pd_dir/$pd_component_type-$pd_component_name-version.h"
|
|
|
|
pd_ver_header_base="`basename $pd_ver_header`"
|
|
|
|
|
|
|
|
# Get all the version numbers
|
|
|
|
|
|
|
|
pd_get_ver="../../../../config/ompi_get_version.sh"
|
|
|
|
pd_ver="`sh $pd_get_ver $PARAM_VERSION_FILE --all`"
|
|
|
|
pd_ver_full="`echo $pd_ver | awk '{ print $1 }'`"
|
|
|
|
pd_ver_major="`echo $pd_ver | awk '{ print $2 }'`"
|
|
|
|
pd_ver_minor="`echo $pd_ver | awk '{ print $3 }'`"
|
|
|
|
pd_ver_release="`echo $pd_ver | awk '{ print $4 }'`"
|
|
|
|
pd_ver_alpha="`echo $pd_ver | awk '{ print $5 }'`"
|
|
|
|
pd_ver_beta="`echo $pd_ver | awk '{ print $6 }'`"
|
|
|
|
pd_ver_svn="`echo $pd_ver | awk '{ print $7 }'`"
|
|
|
|
|
|
|
|
# Because autoconf does not handle selectively
|
|
|
|
# sending some AC_DEFINE's to one file and not to
|
|
|
|
# all others, we have to do a bizarre multi-step
|
|
|
|
# thing to make this work. :-(
|
|
|
|
|
|
|
|
# 1. make a template header file
|
|
|
|
# <type>-<name>-version.h.template.in. In there,
|
|
|
|
# have #define's with values that are @foo@ (i.e.,
|
|
|
|
# the result of AC_SUBST)
|
|
|
|
|
|
|
|
# 2. Add the template header file to the list of
|
|
|
|
# AC_CONFIG_FILES so that AC_SUBST'ed things will
|
|
|
|
# be substituted in.
|
|
|
|
|
|
|
|
# 3. Setup commands to run after config.status has
|
|
|
|
# run. Compare the resulting template header
|
|
|
|
# version file with the existing version header
|
|
|
|
# file. If they're different (or if the version
|
|
|
|
# header file does not yet exist), replace it with
|
|
|
|
# the template version header file. Otherwise,
|
|
|
|
# leave it alone. This leaves the
|
|
|
|
# <type>-<name>-version.h file unchanged (and
|
|
|
|
# therefore its timestamp unaltered) if nothing
|
|
|
|
# changed.
|
|
|
|
|
|
|
|
rm -f "$pd_ver_header_base.template.in"
|
|
|
|
cat > "$pd_ver_header_base.template.in" <<EOF
|
|
|
|
/*
|
|
|
|
* This file is automatically created by autogen.sh; it should not
|
|
|
|
* be edited by hand!!
|
|
|
|
*
|
|
|
|
* List of version number for this component
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_${pd_component_type}_${pd_component_name}_VERSION_H
|
|
|
|
#define MCA_${pd_component_type}_${pd_component_name}_VERSION_H
|
|
|
|
|
|
|
|
#define MCA_${pd_component_type}_${pd_component_name}_MAJOR_VERSION @MCA_${pd_component_type}_${pd_component_name}_MAJOR_VERSION@
|
|
|
|
#define MCA_${pd_component_type}_${pd_component_name}_MINOR_VERSION @MCA_${pd_component_type}_${pd_component_name}_MINOR_VERSION@
|
|
|
|
#define MCA_${pd_component_type}_${pd_component_name}_RELEASE_VERSION @MCA_${pd_component_type}_${pd_component_name}_RELEASE_VERSION@
|
|
|
|
#define MCA_${pd_component_type}_${pd_component_name}_ALPHA_VERSION @MCA_${pd_component_type}_${pd_component_name}_ALPHA_VERSION@
|
|
|
|
#define MCA_${pd_component_type}_${pd_component_name}_BETA_VERSION @MCA_${pd_component_type}_${pd_component_name}_BETA_VERSION@
|
|
|
|
#define MCA_${pd_component_type}_${pd_component_name}_SVN_VERSION "@MCA_${pd_component_type}_${pd_component_name}_SVN_VERSION@"
|
|
|
|
#define MCA_${pd_component_type}_${pd_component_name}_FULL_VERSION "@MCA_${pd_component_type}_${pd_component_name}_FULL_VERSION@"
|
|
|
|
|
|
|
|
#endif /* MCA_${pd_component_type}_${pd_component_name}_VERSION_H */
|
|
|
|
EOF
|
|
|
|
cat >> $pd_list_file <<EOF
|
|
|
|
dnl Generate the version header template
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([$pd_ver_header.template])
|
|
|
|
|
|
|
|
dnl Assign and AC_SUBST all the version number components
|
|
|
|
|
|
|
|
MCA_${pd_component_type}_${pd_component_name}_MAJOR_VERSION=$pd_ver_major
|
|
|
|
AC_SUBST(MCA_${pd_component_type}_${pd_component_name}_MAJOR_VERSION)
|
|
|
|
MCA_${pd_component_type}_${pd_component_name}_MINOR_VERSION=$pd_ver_minor
|
|
|
|
AC_SUBST(MCA_${pd_component_type}_${pd_component_name}_MINOR_VERSION)
|
|
|
|
MCA_${pd_component_type}_${pd_component_name}_RELEASE_VERSION=$pd_ver_release
|
|
|
|
AC_SUBST(MCA_${pd_component_type}_${pd_component_name}_RELEASE_VERSION)
|
|
|
|
MCA_${pd_component_type}_${pd_component_name}_ALPHA_VERSION=$pd_ver_alpha
|
|
|
|
AC_SUBST(MCA_${pd_component_type}_${pd_component_name}_ALPHA_VERSION)
|
|
|
|
MCA_${pd_component_type}_${pd_component_name}_BETA_VERSION=$pd_ver_beta
|
|
|
|
AC_SUBST(MCA_${pd_component_type}_${pd_component_name}_BETA_VERSION)
|
|
|
|
MCA_${pd_component_type}_${pd_component_name}_SVN_VERSION="$pd_ver_svn"
|
|
|
|
AC_SUBST(MCA_${pd_component_type}_${pd_component_name}_SVN_VERSION)
|
|
|
|
MCA_${pd_component_type}_${pd_component_name}_FULL_VERSION="$pd_ver_full"
|
|
|
|
AC_SUBST(MCA_${pd_component_type}_${pd_component_name}_FULL_VERSION)
|
|
|
|
|
|
|
|
dnl After config.status has run, compare the version header template to
|
|
|
|
dnl the version header. If the version header does not exist, create it
|
|
|
|
dnl from the template. If it does already exist, diff it and see if
|
|
|
|
dnl they're different. If they're different, copy the template over the
|
|
|
|
dnl old version. If they're the same, leave the original alone so that
|
|
|
|
dnl we don't distrub any dependencies.
|
|
|
|
|
|
|
|
AC_CONFIG_COMMANDS([${pd_component_type}-${pd_component_name}],
|
|
|
|
[if test -f "$pd_ver_header"; then
|
|
|
|
diff "$pd_ver_header" "$pd_ver_header.template" > /dev/null 2>&1
|
|
|
|
if test "$?" != 0; then
|
|
|
|
cp "$pd_ver_header.template" "$pd_ver_header"
|
|
|
|
echo "config.status: regenerating $pd_ver_header"
|
|
|
|
else
|
|
|
|
echo "config.state: $pd_ver_header unchanged"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
cp "$pd_ver_header.template" "$pd_ver_header"
|
|
|
|
echo "config.status: creating $pd_ver_header"
|
|
|
|
fi])
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
EOF
|
2004-08-10 08:10:08 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Setup the AM_CONDITIONAL to build this component
|
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
cat >> $pd_amc_file <<EOF
|
2004-08-02 04:24:22 +04:00
|
|
|
AM_CONDITIONAL(OMPI_BUILD_${pd_component_type}_${pd_component_name}_DSO,
|
|
|
|
test "\$BUILD_${pd_component_type}_${pd_component_name}_DSO" = "1")
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2004-09-24 03:46:58 +04:00
|
|
|
# See if there's a file containing additional directories to
|
|
|
|
# traverse. Shell scripts aren't too good at recursion (no
|
|
|
|
# local state!), so just have a child autogen.sh do the work.
|
|
|
|
|
|
|
|
if test -f $autogen_subdir_file; then
|
|
|
|
pd_subdir_start_dir="`pwd`"
|
|
|
|
echo ""
|
|
|
|
echo "==> Found $autogen_subdir_file -- sub-traversing..."
|
|
|
|
echo ""
|
|
|
|
for dir in `cat $autogen_subdir_file`; do
|
|
|
|
if test -d "$dir"; then
|
|
|
|
echo "*** Running autogen.sh in $dir"
|
|
|
|
echo "*** (started in $pd_subdir_start_dir)"
|
|
|
|
cd "$dir"
|
|
|
|
$pd_ompi_topdir/autogen.sh -l
|
|
|
|
cd "$pd_subdir_start_dir"
|
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
echo "<== Back in $pd_subdir_start_dir"
|
|
|
|
echo "<== autogen.sh continuing..."
|
|
|
|
fi
|
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
# Go back to the topdir
|
2004-01-12 00:35:37 +03:00
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
cd "$pd_cur_dir"
|
2004-01-12 00:35:37 +03:00
|
|
|
fi
|
2004-08-10 08:10:08 +04:00
|
|
|
unset PARAM_CONFIG_FILES PARAM_VERSION_FILE
|
2004-08-02 04:24:22 +04:00
|
|
|
unset pd_dir pd_ompi_topdir pd_cur_dir pd_component_type
|
2004-01-12 00:35:37 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#
|
2004-08-02 04:24:22 +04:00
|
|
|
# run_global - run the config in the top OMPI dir and all MCA components
|
2004-01-12 00:35:37 +03:00
|
|
|
#
|
|
|
|
# INPUT:
|
|
|
|
# none
|
|
|
|
#
|
|
|
|
# OUTPUT:
|
|
|
|
# none
|
|
|
|
#
|
|
|
|
# SIDE EFFECTS:
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
run_global() {
|
2004-08-02 04:24:22 +04:00
|
|
|
# [Re-]Create the mca_component_list file
|
2004-01-12 00:35:37 +03:00
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
rm -f "$mca_no_configure_components_file" "$mca_no_config_list_file" \
|
2004-02-13 06:58:56 +03:00
|
|
|
"$mca_no_config_amc_file"
|
2004-08-02 04:24:22 +04:00
|
|
|
touch "$mca_no_configure_components_file" "$mca_no_config_list_file" \
|
2004-02-13 06:58:56 +03:00
|
|
|
"$mca_no_config_amc_file"
|
2004-01-12 00:35:37 +03:00
|
|
|
|
2004-03-17 22:06:06 +03:00
|
|
|
# Now run the config in every directory in src/mca/*/*
|
2004-01-12 00:35:37 +03:00
|
|
|
# that has a configure.in or configure.ac script
|
|
|
|
|
|
|
|
rg_cwd="`pwd`"
|
|
|
|
echo $rg_cwd
|
2004-03-17 22:06:06 +03:00
|
|
|
for type in src/mca/*; do
|
2004-01-12 00:35:37 +03:00
|
|
|
if test -d "$type"; then
|
2004-08-02 04:24:22 +04:00
|
|
|
for component in "$type"/*; do
|
|
|
|
if test -d "$component"; then
|
|
|
|
if test -f "$component/configure.in" -o \
|
|
|
|
-f "$component/configure.params" -o \
|
|
|
|
-f "$component/configure.ac"; then
|
|
|
|
process_dir "$component" "$rg_cwd"
|
2004-01-12 00:35:37 +03:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
done
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
# Fill in the final m4 file
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
cat > "$mca_no_configure_components_file" <<EOF
|
2004-02-13 06:58:56 +03:00
|
|
|
dnl
|
|
|
|
dnl \$HEADER
|
|
|
|
dnl
|
|
|
|
|
|
|
|
dnl This file is automatically created by autogen.sh; it should not
|
|
|
|
dnl be edited by hand!!
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
dnl List all the no-configure components that we found, and AC_DEFINE
|
2004-02-13 06:58:56 +03:00
|
|
|
dnl their versions
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
AC_DEFUN([MCA_FIND_NO_CONFIGURE_COMPONENTS],[
|
2004-02-13 06:58:56 +03:00
|
|
|
MCA_cofs_NO_CONFIGURE_SUBDIRS=""
|
|
|
|
MCA_pcm_NO_CONFIGURE_SUBDIRS=""
|
2004-07-08 01:35:26 +04:00
|
|
|
MCA_gpr_NO_CONFIGURE_SUBDIRS=""
|
|
|
|
MCA_ns_NO_CONFIGURE_SUBDIRS=""
|
2004-02-13 06:58:56 +03:00
|
|
|
|
2004-06-15 20:57:18 +04:00
|
|
|
MCA_allocator_NO_CONFIGURE_SUBDIRS=""
|
2004-02-13 06:58:56 +03:00
|
|
|
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
|
2004-08-02 04:24:22 +04:00
|
|
|
dnl components static or shared. This must be done separately from the
|
2004-02-13 06:58:56 +03:00
|
|
|
dnl list because we have to do it late in the configure script, after
|
|
|
|
dnl all the test variable values have been set.
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
AC_DEFUN([MCA_AMC_NO_CONFIGURE_COMPONENTS],[
|
2004-02-13 06:58:56 +03:00
|
|
|
`cat $mca_no_config_amc_file`
|
|
|
|
])dnl
|
|
|
|
EOF
|
|
|
|
# Remove temp files
|
|
|
|
|
|
|
|
rm -f $mca_no_config_list_file $mca_no_config_amc_file
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
# Finally, after we found all the no-configure MCA components, run
|
2004-02-13 06:58:56 +03:00
|
|
|
# the config in the top-level directory
|
|
|
|
|
|
|
|
process_dir . .
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
unset type component
|
2004-01-12 00:35:37 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2004-01-04 03:14:51 +03:00
|
|
|
#
|
|
|
|
# main - do the real work...
|
|
|
|
#
|
2004-01-07 17:43:42 +03:00
|
|
|
##############################################################################
|
2004-01-04 03:14:51 +03:00
|
|
|
|
2004-01-12 00:35:37 +03:00
|
|
|
# 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
|
2004-06-07 19:33:53 +04:00
|
|
|
ompidir=
|
2004-01-12 00:35:37 +03:00
|
|
|
for arg in $*; do
|
|
|
|
case $arg in
|
|
|
|
-l) want_local=yes ;;
|
2004-06-07 19:33:53 +04:00
|
|
|
-ompidir|--ompidir|-ompi|--ompi) ompidir="$1" ;;
|
2004-01-12 00:35:37 +03:00
|
|
|
*) ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2004-01-08 18:17:57 +03:00
|
|
|
# announce
|
|
|
|
echo "[Checking] prerequisites"
|
|
|
|
|
2004-01-04 03:14:51 +03:00
|
|
|
# sanity check to make sure user isn't being stupid
|
2004-03-19 09:05:27 +03:00
|
|
|
if test ! -d .svn ; then
|
2004-01-04 03:14:51 +03:00
|
|
|
cat <<EOF
|
|
|
|
|
2004-08-06 18:30:18 +04:00
|
|
|
This doesn't look like a developer copy of Open MPI. You probably do not
|
2004-01-04 03:14:51 +03:00
|
|
|
want to run autogen.sh - it is normally not needed for a release source
|
2004-01-12 00:35:37 +03:00
|
|
|
tree. Giving you 5 seconds to reconsider and kill me.
|
2004-01-04 03:14:51 +03:00
|
|
|
|
|
|
|
EOF
|
2004-01-12 00:35:37 +03:00
|
|
|
sleep 5
|
2004-01-04 03:14:51 +03:00
|
|
|
fi
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
# figure out if we're at the top level of the OMPI tree, a component's
|
2004-01-12 00:35:37 +03:00
|
|
|
# top-level directory, or somewhere else.
|
2004-03-19 00:35:28 +03:00
|
|
|
if test -f VERSION -a -f configure.ac -a -f include/mpi.h ; then
|
2004-06-07 19:33:53 +04:00
|
|
|
# Top level of OMPI tree
|
|
|
|
ompidir="`pwd`"
|
2004-01-12 00:35:37 +03:00
|
|
|
elif test -f configure.in -o -f configure.ac -o -f configure.params ; then
|
2004-08-02 04:24:22 +04:00
|
|
|
# Top level of a component directory
|
2004-01-12 00:35:37 +03:00
|
|
|
want_local=yes
|
2004-06-07 19:33:53 +04:00
|
|
|
if test -z "$ompidir"; then
|
|
|
|
ompidir="../../../.."
|
2004-01-12 00:35:37 +03:00
|
|
|
fi
|
2003-11-22 19:36:58 +03:00
|
|
|
else
|
|
|
|
cat <<EOF
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
You must run this script from either the top level of the OMPI
|
2004-08-02 04:24:22 +04:00
|
|
|
directory tree or the top-level of an MCA component directory tree.
|
2003-11-22 19:36:58 +03:00
|
|
|
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2004-01-04 03:14:51 +03:00
|
|
|
# find all the apps we are going to run
|
|
|
|
find_app "aclocal"
|
|
|
|
find_app "autoheader"
|
|
|
|
find_app "autoconf"
|
|
|
|
find_app "libtoolize"
|
|
|
|
find_app "automake"
|
2003-11-22 19:36:58 +03:00
|
|
|
|
2004-01-12 00:35:37 +03:00
|
|
|
# do the work
|
|
|
|
if test "$want_local" = "yes"; then
|
2004-06-07 19:33:53 +04:00
|
|
|
process_dir . $ompidir
|
2004-01-12 00:35:37 +03:00
|
|
|
else
|
|
|
|
run_global
|
2003-11-22 19:36:58 +03:00
|
|
|
fi
|
2004-01-12 00:35:37 +03:00
|
|
|
|
2003-11-22 19:36:58 +03:00
|
|
|
# All done
|
|
|
|
exit 0
|