2006-09-21 20:08:52 +04:00
|
|
|
#! /usr/bin/env bash
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
2006-01-22 01:53:16 +03:00
|
|
|
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
# University Research and Technology
|
|
|
|
# Corporation. All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
# of Tennessee Research Foundation. All rights
|
|
|
|
# reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
# University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
# All rights reserved.
|
2008-05-28 01:58:09 +04:00
|
|
|
# Copyright (c) 2007-2008 Cisco, Inc. All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
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
|
|
|
|
2005-05-04 05:02:06 +04:00
|
|
|
#set -x
|
2004-01-04 03:14:51 +03:00
|
|
|
|
2008-06-20 04:39:43 +04:00
|
|
|
# Just to make sure that local setup doesn't interfere with what we're
|
|
|
|
# doing here in this script
|
|
|
|
unalias test sort cut xargs echo 2> /dev/null
|
|
|
|
unset GREP_COLORS
|
|
|
|
|
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)
|
2005-08-27 15:23:19 +04:00
|
|
|
#
|
|
|
|
# Note: use ';' to separate parameters
|
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"
|
2005-08-27 15:23:19 +04:00
|
|
|
if test ! -z "$ACLOCAL"; then
|
|
|
|
ompi_aclocal_search="$ACLOCAL"
|
|
|
|
fi
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_autoheader_search="autoheader"
|
2005-08-27 15:23:19 +04:00
|
|
|
if test ! -z "$AUTOHEADER"; then
|
|
|
|
ompi_autoheader_search="$AUTOHEADER"
|
|
|
|
fi
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_autoconf_search="autoconf"
|
2005-08-27 15:23:19 +04:00
|
|
|
if test ! -z "$AUTOCONF"; then
|
|
|
|
ompi_autoconf_search="$AUTOCONF"
|
|
|
|
fi
|
2006-01-22 01:53:16 +03:00
|
|
|
ompi_autom4te_search="autom4te"
|
|
|
|
if test ! -z "$AUTOM4TE"; then
|
|
|
|
ompi_autom4te_search="$AUTOM4TE"
|
|
|
|
fi
|
2005-08-27 15:23:19 +04:00
|
|
|
ompi_libtoolize_search="libtoolize;glibtoolize"
|
|
|
|
if test ! -z "$LIBTOOLIZE"; then
|
|
|
|
ompi_libtoolize_search="$LIBTOOLIZE"
|
|
|
|
fi
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_automake_search="automake"
|
2005-08-27 15:23:19 +04:00
|
|
|
if test ! -z "$AUTOMAKE"; then
|
|
|
|
ompi_automake_search="$AUTOMAKE"
|
|
|
|
fi
|
2004-01-04 03:14:51 +03:00
|
|
|
|
2006-02-11 20:16:53 +03:00
|
|
|
ompi_automake_version="1.9.6"
|
2006-02-09 18:23:04 +03:00
|
|
|
ompi_autoconf_version="2.59"
|
2007-05-09 00:29:04 +04:00
|
|
|
ompi_libtool_version="1.5.22"
|
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"
|
2006-01-22 01:53:16 +03:00
|
|
|
ompi_autom4te_version="$ompi_autoconf_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"
|
2005-07-06 22:38:57 +04:00
|
|
|
mca_no_config_env_file="mca_no_config_env"
|
2006-02-12 04:33:29 +03:00
|
|
|
mca_m4_include_file="config/mca_m4_config_include.m4"
|
2005-07-09 22:52:53 +04:00
|
|
|
mca_m4_config_env_file="mca_m4_config_env"
|
2004-09-24 03:46:58 +04:00
|
|
|
autogen_subdir_file="autogen.subdirs"
|
2006-02-12 04:33:29 +03:00
|
|
|
topdir_file="opal/include/opal_config_bottom.h"
|
2004-02-13 06:58:56 +03:00
|
|
|
|
2006-09-26 03:36:04 +04:00
|
|
|
if echo a | grep -E '(a|b)' >/dev/null 2>&1; then
|
|
|
|
egrep='grep -E'
|
|
|
|
else
|
|
|
|
egrep=egrep
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
2007-05-09 23:54:10 +04:00
|
|
|
min_version=`echo $min_version | sed -e 's/[A-Za-z]//g'`
|
|
|
|
version=`echo $version | sed -e 's/[A-Za-z]//g'`
|
|
|
|
|
2004-01-04 03:14:51 +03:00
|
|
|
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
|
2005-08-27 15:23:19 +04:00
|
|
|
local tmpIFS=$IFS
|
2004-01-04 03:14:51 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
eval "min_version=\"\$ompi_${app_name}_version\""
|
|
|
|
eval "search_path=\"\$ompi_${app_name}_search\""
|
2005-08-27 15:23:19 +04:00
|
|
|
IFS=";"
|
2004-01-04 03:14:51 +03:00
|
|
|
for i in $search_path ; do
|
2005-08-27 15:23:19 +04:00
|
|
|
IFS="$tmpIFS"
|
2004-01-04 03:14:51 +03:00
|
|
|
version="`${i} --version 2>&1`"
|
|
|
|
if test "$?" != 0 ; then
|
2005-08-27 15:23:19 +04:00
|
|
|
IFS=";"
|
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}\""
|
2007-05-09 23:54:10 +04:00
|
|
|
eval "ompi_${app_name}_found_version=$version"
|
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
|
|
|
|
|
2005-08-27 15:23:19 +04:00
|
|
|
IFS="$tmpIFS"
|
|
|
|
|
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="$*"
|
2007-05-09 23:54:10 +04:00
|
|
|
echo "$indent[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
|
|
|
|
|
|
|
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
|
2006-09-26 03:36:04 +04:00
|
|
|
auxdir="`grep AC_CONFIG_AUX_DIR $fad_cfile | $egrep -v '^dnl' | cut -d\( -f 2 | cut -d\) -f 1`"
|
2006-09-09 02:40:00 +04:00
|
|
|
fi
|
2003-11-22 19:36:58 +03:00
|
|
|
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:
|
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() {
|
2004-10-21 20:27:17 +04:00
|
|
|
rgt_ompi_topdir="$1"
|
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
|
2004-10-21 20:27:17 +04:00
|
|
|
|
|
|
|
# If we need to make a version header template file, do so
|
|
|
|
|
|
|
|
rgt_abs_dir="`pwd`"
|
2006-09-26 03:38:04 +04:00
|
|
|
rgt_component_name=`basename "$rgt_abs_dir"`
|
|
|
|
rgt_component_type=`dirname "$rgt_abs_dir"`
|
|
|
|
rgt_component_type=`basename "$rgt_component_type"`
|
2004-10-21 20:27:17 +04:00
|
|
|
rgt_ver_header="$rgt_abs_dir/$rgt_component_type-$rgt_component_name-version.h"
|
2006-09-26 03:38:04 +04:00
|
|
|
rgt_ver_header_base=`basename "$rgt_ver_header"`
|
2004-10-21 20:27:17 +04:00
|
|
|
make_version_header_template "$rgt_ver_header_base" "$rgt_component_type" "$rgt_component_name"
|
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
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
|
2005-05-04 05:02:06 +04:00
|
|
|
--> Err... there's no configure.in or configure.ac file in this directory
|
2004-02-13 06:58:56 +03:00
|
|
|
--> 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
|
2005-12-09 18:13:36 +03:00
|
|
|
find_and_delete compile
|
2004-02-13 06:58:56 +03:00
|
|
|
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"
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
if test -f $topdir_file ; then
|
2006-01-22 01:53:16 +03:00
|
|
|
cd config
|
|
|
|
run_and_check $ompi_autom4te --language=m4sh ompi_get_version.m4sh -o ompi_get_version.sh
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
if test -f $topdir_file ; then
|
2005-07-02 18:29:45 +04:00
|
|
|
rm -rf libltdl opal/libltdl opal/ltdl.h
|
2004-06-07 19:33:53 +04:00
|
|
|
run_and_check $ompi_libtoolize --automake --copy --ltdl
|
2005-10-29 16:10:07 +04:00
|
|
|
if test -d libltdl; then
|
2007-05-09 23:54:10 +04:00
|
|
|
echo " -- Moving libltdl to opal/"
|
|
|
|
mv libltdl opal
|
|
|
|
fi
|
|
|
|
if check_version "1.10.0" $ompi_automake_found_version ; then
|
|
|
|
ver=`grep '^am__api_version' opal/libltdl/configure | cut -f2 -d=`
|
|
|
|
# eat single quotes
|
|
|
|
eval "ver=$ver"
|
|
|
|
if ! check_version "1.9.7" $ver ; then
|
|
|
|
indent=" "
|
|
|
|
echo "** Updating Automake version in libltdl package"
|
|
|
|
pushd opal/libltdl > /dev/null 2>&1
|
|
|
|
run_and_check $ompi_aclocal
|
|
|
|
run_and_check $ompi_automake
|
2007-11-07 05:30:40 +03:00
|
|
|
chmod u+w configure # Need this for FreeBSD.
|
2007-05-09 23:54:10 +04:00
|
|
|
run_and_check $ompi_autoconf
|
|
|
|
popd > /dev/null 2>&1
|
|
|
|
unset indent
|
|
|
|
fi
|
2005-10-29 16:10:07 +04:00
|
|
|
fi
|
|
|
|
if test ! -r opal/libltdl/ltdl.h; then
|
|
|
|
cat <<EOF
|
|
|
|
$ompi_libtoolize --ltdl apparently failed to install libltdl.
|
|
|
|
Please check that you have the libltdl development files installed.
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
fi
|
2004-02-13 06:58:56 +03:00
|
|
|
|
2007-05-09 23:54:10 +04:00
|
|
|
echo "** Adjusting libltdl for OMPI :-("
|
2004-02-13 06:58:56 +03:00
|
|
|
|
2007-05-09 23:54:10 +04:00
|
|
|
echo " ++ patching for argz bugfix in libtool 1.5"
|
2005-07-02 18:29:45 +04:00
|
|
|
cd opal/libltdl
|
2004-03-17 22:06:06 +03:00
|
|
|
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
|
2005-05-04 05:02:06 +04:00
|
|
|
#'
|
2004-03-17 22:06:06 +03:00
|
|
|
else
|
2007-05-09 23:54:10 +04:00
|
|
|
echo " -- your libtool doesn't need this! yay!"
|
2004-03-17 22:06:06 +03:00
|
|
|
fi
|
|
|
|
cd ../..
|
2007-05-09 23:54:10 +04:00
|
|
|
echo " ++ patching 64-bit OS X bug in ltmain.sh"
|
2007-01-22 23:31:04 +03:00
|
|
|
if test ! -z "`grep otool config/ltmain.sh`" -a \
|
|
|
|
-z "`grep otool64 config/ltmain.sh`"; then
|
|
|
|
patch -N -p0 < config/ltmain_otool.diff
|
2007-05-08 17:24:08 +04:00
|
|
|
rm -f config/ltmain.sh.orig
|
2007-01-22 23:31:04 +03:00
|
|
|
else
|
2007-05-09 23:54:10 +04:00
|
|
|
echo " -- your libtool doesn't need this! yay!"
|
2007-01-22 23:31:04 +03:00
|
|
|
fi
|
2007-03-05 20:21:42 +03:00
|
|
|
|
2007-05-09 23:54:10 +04:00
|
|
|
echo " ++ RTLD_GLOBAL in libltdl"
|
2007-03-05 20:21:42 +03:00
|
|
|
if test -r opal/libltdl/loaders/dlopen.c && \
|
|
|
|
test ! -z "`grep 'filename, LT_LAZY_OR_NOW' opal/libltdl/loaders/dlopen.c`"; then
|
|
|
|
patch -N -p0 < config/libltdl_dlopen_global.diff
|
|
|
|
else
|
2007-05-09 23:54:10 +04:00
|
|
|
echo " -- your libltdl doesn't need this! yay!"
|
2007-03-05 20:21:42 +03:00
|
|
|
fi
|
2007-05-15 08:23:48 +04:00
|
|
|
if grep 'chmod -w \.' configure ; then
|
|
|
|
echo " ++ patching configure for broken -c/-o compiler test"
|
|
|
|
sed -e 's/chmod -w \./#OMPI\/MPI FIX: chmod -w ./' \
|
|
|
|
configure > configure.new
|
|
|
|
mv configure.new configure
|
|
|
|
chmod a+x configure
|
|
|
|
fi
|
2008-05-28 01:58:09 +04:00
|
|
|
|
|
|
|
# See http://lists.gnu.org/archive/html/bug-libtool/2008-05/msg00045.html
|
|
|
|
if check_version "2.1.9999" $ompi_libtoolize_found_version ; then
|
|
|
|
echo " ++ patching for ifort (LT 2.2.0-4)"
|
|
|
|
cd opal/libltdl/m4
|
|
|
|
patch -N -p0 < ../../../config/lt224-icc.diff > /dev/null 2>&1
|
|
|
|
rm -f libtool.m4.orig
|
|
|
|
cd ../../..
|
|
|
|
fi
|
2004-02-13 06:58:56 +03:00
|
|
|
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
|
2008-05-28 01:58:09 +04:00
|
|
|
|
|
|
|
if test -f $topdir_file; then
|
|
|
|
run_and_check $ompi_aclocal -I config
|
|
|
|
else
|
|
|
|
run_and_check $ompi_aclocal
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "`grep AC_CONFIG_HEADER $file`" != "" -o \
|
|
|
|
"`grep AM_CONFIG_HEADER $file`" != ""; then
|
|
|
|
run_and_check $ompi_autoheader
|
|
|
|
fi
|
|
|
|
|
|
|
|
# We only need to patch the top-level aclocal.m4 for libtool stuff
|
|
|
|
# because this only affects creating C++ libraries (with pathCC).
|
|
|
|
# This must be done before we run autoconf.
|
|
|
|
|
|
|
|
if test -f $topdir_file; then
|
|
|
|
echo "** Adjusting libtool for OMPI :-("
|
|
|
|
if ! check_version "2.0.0" $ompi_libtoolize_found_version ; then
|
|
|
|
echo " ++ patching for pathscale multi-line output (LT 1.5.x)"
|
|
|
|
patch -N -p0 < config/lt1522-pathCC.diff > /dev/null 2>&1
|
|
|
|
else
|
|
|
|
echo " ++ patching for pathscale multi-line output (LT 2.x)"
|
|
|
|
patch -N -p0 < config/lt21a-pathCC.diff > /dev/null 2>&1
|
|
|
|
fi
|
|
|
|
# See http://lists.gnu.org/archive/html/bug-libtool/2008-05/msg00045.html
|
|
|
|
if check_version "2.1.9999" $ompi_libtoolize_found_version ; then
|
|
|
|
echo " ++ patching for ifort (LT 2.2.0-4)"
|
|
|
|
cd config
|
|
|
|
patch -N -p0 < lt224-icc.diff > /dev/null 2>&1
|
|
|
|
rm -f libtool.m4.orig
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
rm -f aclocal.m4.orig
|
|
|
|
|
|
|
|
|
|
|
|
# Libtool 1.5.2x and 2.1x automatically link in the "Cstd" STL library
|
|
|
|
# when using the Sun compilers on Linux or Solaris, even if the
|
|
|
|
# application does not use the STL (as of Feb 2008, Open MPI does not
|
|
|
|
# use any C++ STL). The problem is that Solaris has two different STL
|
|
|
|
# libraries: Cstd and stlport. Having Libtool choose that OMPI (and its
|
|
|
|
# wrapper compilers) use Cstd is problematic for users who want to
|
|
|
|
# compile their MPI applications with the other STL library. So we
|
|
|
|
# currently hack aclocal's LT macros to *not* add the Cstd library to
|
|
|
|
# any of OMPI's CXXFLAGS; the OMPI wrapper compilers can then therefore
|
|
|
|
# be used with any STL library -- it's the user's choice.
|
|
|
|
|
|
|
|
echo " ++ patching to remove solaris Cstd"
|
|
|
|
sed -e 's/-lCstd -lCrun//' \
|
|
|
|
-e 's/-library=Cstd -library=Crun//' \
|
|
|
|
aclocal.m4 > aclocal.m4.new
|
|
|
|
cp aclocal.m4.new aclocal.m4
|
|
|
|
rm -f aclocal.m4.new
|
|
|
|
fi
|
|
|
|
|
|
|
|
run_and_check $ompi_autoconf
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-07-06 22:38:57 +04:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# run_no_configure_component
|
|
|
|
# Prepares the non-configure component
|
|
|
|
#
|
|
|
|
# INPUT:
|
|
|
|
# - OMPI top directory
|
|
|
|
#
|
|
|
|
# OUTPUT:
|
|
|
|
# none
|
|
|
|
#
|
|
|
|
# SIDE EFFECTS:
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
run_no_configure_component() {
|
|
|
|
noconf_dir="$1"
|
|
|
|
noconf_ompi_topdir="$2"
|
|
|
|
noconf_project="$3"
|
|
|
|
noconf_framework="$4"
|
|
|
|
noconf_component="$5"
|
|
|
|
|
|
|
|
# Write out to two files (they're merged at the end)
|
|
|
|
noconf_list_file="$noconf_ompi_topdir/$mca_no_config_list_file"
|
|
|
|
noconf_env_file="$noconf_ompi_topdir/$mca_no_config_env_file"
|
|
|
|
|
|
|
|
cat >> "$noconf_list_file" <<EOF
|
|
|
|
dnl ----------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl No-configure component:
|
|
|
|
dnl $noconf_dir
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# Tell configure to add all the PARAM_CONFIG_FILES to
|
|
|
|
# the AC_CONFIG_FILES list.
|
|
|
|
for file in $PARAM_CONFIG_FILES; do
|
|
|
|
echo "AC_CONFIG_FILES([$noconf_dir/$file])" >> "$noconf_list_file"
|
|
|
|
done
|
|
|
|
|
2005-07-09 22:52:53 +04:00
|
|
|
cat <<EOF
|
|
|
|
--> Adding to top-level configure no-configure subdirs:
|
|
|
|
--> $noconf_dir
|
|
|
|
--> Adding to top-level configure AC_CONFIG_FILES list:
|
|
|
|
--> $PARAM_CONFIG_FILES
|
|
|
|
EOF
|
2005-07-06 22:38:57 +04:00
|
|
|
|
2005-08-16 09:21:34 +04:00
|
|
|
echo "$PARAM_CONFIG_PRIORITY $noconf_component" >> "$noconf_env_file"
|
2005-07-09 22:52:53 +04:00
|
|
|
}
|
2005-07-06 22:38:57 +04:00
|
|
|
|
|
|
|
|
2005-07-09 22:52:53 +04:00
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# run_m4_configure_component
|
|
|
|
# Prepares the component with an .m4 file that should be used to
|
|
|
|
# configure the component.
|
|
|
|
#
|
|
|
|
# INPUT:
|
|
|
|
#
|
|
|
|
# OUTPUT:
|
|
|
|
# none
|
|
|
|
#
|
|
|
|
# SIDE EFFECTS:
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
run_m4_configure_component() {
|
|
|
|
m4conf_dir="$1"
|
|
|
|
m4conf_ompi_topdir="$2"
|
|
|
|
m4conf_project="$3"
|
|
|
|
m4conf_framework="$4"
|
|
|
|
m4conf_component="$5"
|
|
|
|
|
|
|
|
# Write out to two files (they're merged at the end)
|
|
|
|
m4conf_list_file="$m4conf_ompi_topdir/$mca_no_config_list_file"
|
|
|
|
m4conf_env_file="$m4conf_ompi_topdir/$mca_m4_config_env_file"
|
|
|
|
|
|
|
|
cat >> "$m4conf_list_file" <<EOF
|
|
|
|
dnl ----------------------------------------------------------------
|
2005-07-06 22:38:57 +04:00
|
|
|
|
2005-07-09 22:52:53 +04:00
|
|
|
dnl m4-configure component:
|
|
|
|
dnl $m4conf_dir
|
2005-07-06 22:38:57 +04:00
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2005-07-09 22:52:53 +04:00
|
|
|
# Tell configure to add all the PARAM_CONFIG_FILES to
|
|
|
|
# the AC_CONFIG_FILES list.
|
|
|
|
for file in $PARAM_CONFIG_FILES; do
|
|
|
|
echo "AC_CONFIG_FILES([$m4conf_dir/$file])" >> "$m4conf_list_file"
|
|
|
|
done
|
|
|
|
|
2005-07-28 19:48:46 +04:00
|
|
|
# add the m4_include of the m4 file into the mca .m4 file
|
|
|
|
# directly. It shouldn't be in a macro, so this is fairly safe to
|
|
|
|
# do. By this point, there should already be a header and all
|
|
|
|
# that. m4_includes are relative to the currently included file,
|
|
|
|
# so need the .. to get us from config/ to the topsrcdir again.
|
|
|
|
echo "m4_include(${m4conf_project}/mca/${m4conf_framework}/${m4conf_component}/configure.m4)" >> "$m4conf_ompi_topdir/$mca_m4_include_file"
|
2005-07-09 22:52:53 +04:00
|
|
|
|
2005-07-06 22:38:57 +04:00
|
|
|
cat <<EOF
|
2005-07-09 22:52:53 +04:00
|
|
|
--> Adding to top-level configure m4-configure subdirs:
|
|
|
|
--> $m4conf_dir
|
2005-07-06 22:38:57 +04:00
|
|
|
--> Adding to top-level configure AC_CONFIG_FILES list:
|
|
|
|
--> $PARAM_CONFIG_FILES
|
|
|
|
EOF
|
|
|
|
|
2005-08-16 09:21:34 +04:00
|
|
|
echo "$PARAM_CONFIG_PRIORITY $m4conf_component" >> "$m4conf_env_file"
|
2005-07-06 22:38:57 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-18 14:36:08 +04:00
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# make_template_version_header -- make a templated version header
|
|
|
|
# file, but only if we have a PARAM_VERSION_FILE that exists
|
|
|
|
#
|
|
|
|
# INPUT:
|
|
|
|
# - filename base
|
|
|
|
# - component type name
|
|
|
|
# - component name
|
|
|
|
#
|
|
|
|
# OUTPUT:
|
|
|
|
# none
|
|
|
|
#
|
|
|
|
# SIDE EFFECTS:
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
make_version_header_template() {
|
|
|
|
mvht_filename="$1"
|
|
|
|
mvht_component_type="$2"
|
|
|
|
mvht_component_name="$3"
|
|
|
|
|
|
|
|
# See if we have a VERSION file
|
|
|
|
|
|
|
|
PARAM_CONFIG_FILES_save="$PARAM_CONFIG_FILES"
|
|
|
|
. ./configure.params
|
|
|
|
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 test -n "$PARAM_VERSION_FILE" -a -f "$PARAM_VERSION_FILE" -a \
|
|
|
|
"$pd_component_type" != "common"; then
|
|
|
|
rm -f "$mvht_filename.template.in"
|
|
|
|
cat > "$mvht_filename.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_${mvht_component_type}_${mvht_component_name}_VERSION_H
|
|
|
|
#define MCA_${mvht_component_type}_${mvht_component_name}_VERSION_H
|
|
|
|
|
|
|
|
#define MCA_${mvht_component_type}_${mvht_component_name}_MAJOR_VERSION @MCA_${mvht_component_type}_${mvht_component_name}_MAJOR_VERSION@
|
|
|
|
#define MCA_${mvht_component_type}_${mvht_component_name}_MINOR_VERSION @MCA_${mvht_component_type}_${mvht_component_name}_MINOR_VERSION@
|
|
|
|
#define MCA_${mvht_component_type}_${mvht_component_name}_RELEASE_VERSION @MCA_${mvht_component_type}_${mvht_component_name}_RELEASE_VERSION@
|
|
|
|
#define MCA_${mvht_component_type}_${mvht_component_name}_GREEK_VERSION "@MCA_${mvht_component_type}_${mvht_component_name}_GREEK_VERSION@"
|
|
|
|
#define MCA_${mvht_component_type}_${mvht_component_name}_SVN_VERSION "@MCA_${mvht_component_type}_${mvht_component_name}_SVN_VERSION@"
|
|
|
|
#define MCA_${mvht_component_type}_${mvht_component_name}_VERSION "@MCA_${mvht_component_type}_${mvht_component_name}_VERSION@"
|
|
|
|
|
|
|
|
#endif /* MCA_${mvht_component_type}_${mvht_component_name}_VERSION_H */
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
PARAM_CONFIG_FILES="$PARAM_CONFIG_FILES_save"
|
|
|
|
unset PARAM_VERSION_FILE PARAM_CONFIG_FILES_save
|
|
|
|
}
|
|
|
|
|
|
|
|
component_list_sort() {
|
|
|
|
cls_filename="$1"
|
|
|
|
|
|
|
|
# why, oh, why can't non-gnu sort support the -s (stable) option?
|
|
|
|
# Solaris sort supports -r -n and -u, so we'll assume that works everywhere
|
|
|
|
|
|
|
|
# get the list of priorities
|
|
|
|
component_list=
|
|
|
|
cls_priority_list=`sort -r -n -u "$cls_filename" | cut -f1 -d' ' | xargs`
|
|
|
|
for cls_priority in $cls_priority_list ; do
|
|
|
|
component_list="$component_list "`grep "^$cls_priority " "$cls_filename" | cut -f2 -d' ' | xargs`
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
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"
|
2005-07-06 22:38:57 +04:00
|
|
|
pd_project="$3"
|
|
|
|
pd_framework="$4"
|
|
|
|
pd_component="$5"
|
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
pd_cur_dir="`pwd`"
|
|
|
|
|
2004-10-10 17:15:36 +04:00
|
|
|
# Convert to absolutes
|
|
|
|
|
|
|
|
if test -d "$pd_dir"; then
|
|
|
|
cd "$pd_dir"
|
|
|
|
pd_abs_dir="`pwd`"
|
|
|
|
cd "$pd_cur_dir"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -d "$pd_ompi_topdir"; then
|
|
|
|
cd "$pd_ompi_topdir"
|
|
|
|
pd_ompi_topdir="`pwd`"
|
|
|
|
cd "$pd_cur_dir"
|
|
|
|
fi
|
|
|
|
|
2005-08-16 09:21:34 +04:00
|
|
|
# clean our environment a bit, since we might evaluate a configure.params
|
|
|
|
unset PARAM_CONFIG_FILES
|
|
|
|
PARAM_CONFIG_PRIORITY="0"
|
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
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-12-08 20:41:29 +03:00
|
|
|
elif test -f .ompi_ignore -a ! -f .ompi_unignore; then
|
|
|
|
|
|
|
|
# Note that if we have an empty (but existant)
|
|
|
|
# .ompi_unignore, then we ignore the .ompi_ignore file
|
|
|
|
# (and therefore build the component)
|
|
|
|
|
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`
|
|
|
|
|
2004-12-08 20:41:29 +03:00
|
|
|
EOF
|
2005-05-10 18:35:33 +04:00
|
|
|
|
|
|
|
# Use && instead of -a here for the test conditions because if
|
|
|
|
# you use -a, then "test" will execute *all* condition clauses
|
|
|
|
# (even if the first one is false), meaning that grep will
|
|
|
|
# fail if there is no .ompi_unignore file. If you use &&,
|
|
|
|
# then the latter tests will not be executed if a prior one
|
|
|
|
# fails (i.e., grep won't run if .ompi_unignore does not
|
|
|
|
# exist).
|
|
|
|
|
|
|
|
elif test -f .ompi_ignore && \
|
|
|
|
test -s .ompi_unignore && \
|
2006-09-26 03:36:04 +04:00
|
|
|
test -z "`$egrep $USER\$\|$USER@$HOST .ompi_unignore`" ; then
|
2004-12-08 20:41:29 +03:00
|
|
|
|
|
|
|
# If we have a non-empty .ompi_unignore and our username
|
|
|
|
# is in there somewhere, we ignore the .ompi_ignore (and
|
|
|
|
# therefore build the component). Otherwise, this
|
|
|
|
# condition is true and we don't configure.
|
|
|
|
|
|
|
|
cat <<EOF
|
|
|
|
|
|
|
|
*** Found .ompi_ignore file and .ompi_unignore didn't invalidate --
|
|
|
|
*** skipping entire tree:
|
|
|
|
*** `pwd`
|
|
|
|
|
2004-01-12 00:35:37 +03:00
|
|
|
EOF
|
2004-10-10 17:15:36 +04:00
|
|
|
elif test "$pd_abs_dir" != "$pd_ompi_topdir" -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
|
2006-02-09 18:23:04 +03:00
|
|
|
if test ! $? -eq 0 ; then
|
|
|
|
echo "Error running autogen.sh -l in `pwd`. Aborting."
|
|
|
|
exit 1
|
|
|
|
fi
|
2005-07-09 22:52:53 +04:00
|
|
|
elif test -f configure.params -a -f configure.m4 ; then
|
|
|
|
cat <<EOF
|
|
|
|
|
|
|
|
*** Found configure.params and configure.m4
|
|
|
|
*** `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
|
|
|
|
# temporary workaround - remove possibly there configure code
|
|
|
|
rm -f "configure" "configure.ac*" "acinclude*" "aclocal.m4"
|
|
|
|
|
|
|
|
run_m4_configure_component "$pd_dir" "$pd_ompi_topdir" \
|
|
|
|
"$pd_project" "$pd_framework" "$pd_component"
|
|
|
|
fi
|
|
|
|
|
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-10-21 20:27:17 +04:00
|
|
|
run_gnu_tools "$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-10-21 20:27:17 +04:00
|
|
|
run_gnu_tools "$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
|
2005-07-06 22:38:57 +04:00
|
|
|
run_no_configure_component "$pd_dir" "$pd_ompi_topdir" \
|
|
|
|
"$pd_project" "$pd_framework" "$pd_component"
|
2004-02-13 06:58:56 +03:00
|
|
|
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
|
2006-02-09 18:23:04 +03:00
|
|
|
if test ! $? -eq 0 ; then
|
|
|
|
echo "Error running autogen.sh -l in $dir. Aborting."
|
|
|
|
exit 1
|
|
|
|
fi
|
2004-09-24 03:46:58 +04:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2007-09-18 14:36:08 +04:00
|
|
|
process_framework() {
|
|
|
|
framework_path="$1"
|
|
|
|
rg_cwd="$2"
|
|
|
|
project="$3"
|
|
|
|
framework="$4"
|
|
|
|
|
|
|
|
if test "$framework" != "base" -a \
|
|
|
|
-d "$framework_path" ; then
|
|
|
|
if test "$framework" = "common" -o \
|
|
|
|
-r "${framework_path}/${framework}.h" ; then
|
|
|
|
framework_list="$framework_list $framework"
|
|
|
|
|
|
|
|
# Add the framework's configure file into configure,
|
|
|
|
# if there is one
|
|
|
|
if test -r "${framework_path}/configure.m4" ; then
|
|
|
|
echo "m4_include(${framework_path}/configure.m4)" >> "$mca_m4_include_file"
|
|
|
|
fi
|
|
|
|
echo "AC_CONFIG_FILES(${framework_path}/Makefile)" >> "$mca_no_config_list_file"
|
2004-01-12 00:35:37 +03:00
|
|
|
|
2007-09-18 14:36:08 +04:00
|
|
|
rm -f "$mca_no_config_env_file" "$mca_m4_config_env_file"
|
|
|
|
touch "$mca_no_config_env_file" "$mca_m4_config_env_file"
|
2004-10-21 20:27:17 +04:00
|
|
|
|
2007-09-18 14:36:08 +04:00
|
|
|
for component_path in "$framework_path"/*; do
|
|
|
|
if test -d "$component_path"; then
|
|
|
|
if test -f "$component_path/configure.in" -o \
|
|
|
|
-f "$component_path/configure.params" -o \
|
|
|
|
-f "$component_path/configure.ac"; then
|
2004-10-21 20:27:17 +04:00
|
|
|
|
2007-09-18 14:36:08 +04:00
|
|
|
component=`basename "$component_path"`
|
2004-10-21 20:27:17 +04:00
|
|
|
|
2007-09-18 14:36:08 +04:00
|
|
|
process_dir "$component_path" "$rg_cwd" \
|
|
|
|
"$project" "$framework" "$component"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
2004-10-21 20:27:17 +04:00
|
|
|
|
2007-09-18 14:36:08 +04:00
|
|
|
# make list of components that are "no configure".
|
|
|
|
# Sort the list by priority (stable, so things stay in
|
|
|
|
# alphabetical order at the same priority), then munge
|
|
|
|
# it into form we like
|
|
|
|
component_list=
|
|
|
|
component_list_sort $mca_no_config_env_file
|
2008-06-20 04:39:43 +04:00
|
|
|
component_list_define="m4_define([mca_${framework}_no_config_component_list], ["
|
2007-09-18 14:36:08 +04:00
|
|
|
component_list_define_first="1"
|
|
|
|
for component in $component_list ; do
|
|
|
|
if test "$component_list_define_first" = "1"; then
|
|
|
|
component_list_define="${component_list_define}${component}"
|
|
|
|
component_list_define_first="0"
|
|
|
|
else
|
|
|
|
component_list_define="${component_list_define}, ${component}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
component_list_define="${component_list_define}])"
|
|
|
|
echo "$component_list_define" >> "$mca_no_configure_components_file"
|
|
|
|
|
|
|
|
# make list of components that are "m4 configure"
|
|
|
|
component_list=
|
|
|
|
component_list_sort $mca_m4_config_env_file
|
2008-06-20 04:39:43 +04:00
|
|
|
component_list_define="m4_define([mca_${framework}_m4_config_component_list], ["
|
2007-09-18 14:36:08 +04:00
|
|
|
component_list_define_first="1"
|
|
|
|
for component in $component_list ; do
|
|
|
|
if test "$component_list_define_first" = "1"; then
|
|
|
|
component_list_define="${component_list_define}${component}"
|
|
|
|
component_list_define_first="0"
|
|
|
|
else
|
|
|
|
component_list_define="${component_list_define}, ${component}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
component_list_define="${component_list_define}])"
|
|
|
|
echo "$component_list_define" >> "$mca_no_configure_components_file"
|
|
|
|
fi
|
2004-10-21 20:27:17 +04:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2007-09-18 14:36:08 +04:00
|
|
|
process_project() {
|
|
|
|
project_path="$1"
|
|
|
|
rg_cwd="$2"
|
|
|
|
project="$3"
|
|
|
|
|
|
|
|
project_list="$project_list $project"
|
|
|
|
framework_list=""
|
|
|
|
for framework_path in $project_path/mca/*; do
|
|
|
|
framework=`basename "$framework_path"`
|
|
|
|
process_framework $framework_path $rg_cwd $project $framework
|
|
|
|
done
|
2005-08-16 09:21:34 +04:00
|
|
|
|
2007-09-18 14:36:08 +04:00
|
|
|
# make list of frameworks for this project
|
2008-06-20 04:39:43 +04:00
|
|
|
framework_list_define="m4_define([mca_${project}_framework_list], ["
|
2007-09-18 14:36:08 +04:00
|
|
|
framework_list_define_first="1"
|
|
|
|
for framework in $framework_list ; do
|
|
|
|
if test "$framework_list_define_first" = "1"; then
|
|
|
|
framework_list_define="${framework_list_define}${framework}"
|
|
|
|
framework_list_define_first="0"
|
|
|
|
else
|
|
|
|
framework_list_define="${framework_list_define}, ${framework}"
|
|
|
|
fi
|
2005-08-16 09:21:34 +04:00
|
|
|
done
|
2007-09-18 14:36:08 +04:00
|
|
|
framework_list_define="${framework_list_define}])"
|
|
|
|
echo "$framework_list_define" >> "$mca_no_configure_components_file"
|
2008-03-05 18:14:39 +03:00
|
|
|
|
|
|
|
# process contributed software packages (ompi/contrib/*)
|
|
|
|
if test "$project" = "ompi"; then
|
|
|
|
for contrib_path in $project_path/contrib/*; do
|
|
|
|
process_dir $contrib_path $rg_cwd
|
|
|
|
done
|
|
|
|
fi
|
2005-08-16 09:21:34 +04:00
|
|
|
}
|
|
|
|
|
2004-10-21 20:27:17 +04:00
|
|
|
|
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" \
|
2005-07-09 22:52:53 +04:00
|
|
|
"$mca_no_config_env_file" "$mca_m4_config_env_file" "$mca_m4_include_file"
|
2004-08-02 04:24:22 +04:00
|
|
|
touch "$mca_no_configure_components_file" "$mca_no_config_list_file" \
|
2005-07-09 22:52:53 +04:00
|
|
|
"$mca_m4_config_env_file" "$mca_m4_include_file"
|
|
|
|
|
|
|
|
# create header for the component m4 include file
|
|
|
|
cat > "$mca_m4_include_file" <<EOF
|
|
|
|
dnl
|
|
|
|
dnl \$HEADER
|
|
|
|
dnl
|
|
|
|
|
|
|
|
dnl This file is automatically created by autogen.sh; it should not
|
|
|
|
dnl be edited by hand!!
|
|
|
|
|
|
|
|
EOF
|
2004-01-12 00:35:37 +03:00
|
|
|
|
2005-07-06 22:38:57 +04:00
|
|
|
#create header for the component config file
|
|
|
|
cat > "$mca_no_configure_components_file" <<EOF
|
|
|
|
dnl
|
|
|
|
dnl \$HEADER
|
|
|
|
dnl
|
|
|
|
|
|
|
|
dnl This file is automatically created by autogen.sh; it should not
|
|
|
|
dnl be edited by hand!!
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2005-07-02 18:29:45 +04:00
|
|
|
# Now run the config in every directory in <location>/mca/*/*
|
2004-01-12 00:35:37 +03:00
|
|
|
# that has a configure.in or configure.ac script
|
2005-07-06 22:38:57 +04:00
|
|
|
#
|
|
|
|
# In order to deal with components that have .m4 files, we need to
|
|
|
|
# build up m4_defined lists along the way. Unfortunately, there
|
|
|
|
# is no good way to do this at the end (stupid sh), so we have to
|
|
|
|
# do it as we are going through the lists of frameworks and
|
|
|
|
# components. Use a file to keep the list of components (we don't
|
|
|
|
# want every component in a framework included, as the
|
|
|
|
# determination about skipping components or whether the component
|
|
|
|
# has its own configure script are made later on in the process.
|
2004-01-12 00:35:37 +03:00
|
|
|
|
|
|
|
rg_cwd="`pwd`"
|
|
|
|
echo $rg_cwd
|
2005-07-06 22:38:57 +04:00
|
|
|
project_list=""
|
2005-08-14 01:02:24 +04:00
|
|
|
for project_path in $config_project_list; do
|
2006-09-26 03:38:04 +04:00
|
|
|
project=`basename "$project_path"`
|
2007-09-18 14:36:08 +04:00
|
|
|
process_project $project_path $rg_cwd $project
|
2004-01-12 00:35:37 +03:00
|
|
|
done
|
2004-02-13 06:58:56 +03:00
|
|
|
|
2005-07-06 22:38:57 +04:00
|
|
|
# create the m4 defines for the list of projects. The list of
|
|
|
|
# frameworks for each project is already created and in the file.
|
2008-06-20 04:39:43 +04:00
|
|
|
project_list_define="m4_define([mca_project_list], ["
|
2005-07-06 22:38:57 +04:00
|
|
|
project_list_define_first="1"
|
|
|
|
for project in $project_list ; do
|
|
|
|
if test "$project_list_define_first" = "1"; then
|
|
|
|
project_list_define="${project_list_define}${project}"
|
|
|
|
project_list_define_first="0"
|
|
|
|
else
|
|
|
|
project_list_define="${project_list_define}, ${project}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
project_list_define="${project_list_define}])"
|
|
|
|
echo "$project_list_define" >> "$mca_no_configure_components_file"
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
|
2005-07-06 22:38:57 +04:00
|
|
|
cat >> "$mca_no_configure_components_file" <<EOF
|
2004-02-13 06:58:56 +03:00
|
|
|
|
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
|
|
|
|
|
2005-07-09 22:52:53 +04:00
|
|
|
AC_DEFUN([MCA_NO_CONFIG_CONFIG_FILES],[
|
2004-02-13 06:58:56 +03:00
|
|
|
|
|
|
|
`cat $mca_no_config_list_file`
|
|
|
|
])dnl
|
|
|
|
EOF
|
2005-07-09 22:52:53 +04:00
|
|
|
|
2004-02-13 06:58:56 +03:00
|
|
|
# Remove temp files
|
2005-07-09 22:52:53 +04:00
|
|
|
rm -f $mca_no_config_list_file $mca_no_config_env_file $mca_m4_config_env_file
|
2004-02-13 06:58:56 +03:00
|
|
|
|
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
|
|
|
|
|
2005-07-06 22:38:57 +04:00
|
|
|
process_dir . . "" "" ""
|
2004-02-13 06:58:56 +03:00
|
|
|
|
2005-07-06 22:38:57 +04:00
|
|
|
unset project project_path framework framework_path component component_path
|
2004-01-12 00:35:37 +03:00
|
|
|
}
|
|
|
|
|
2007-10-25 18:12:52 +04:00
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# check_for_svk_checkout - determine whether this is an SVK checkout
|
|
|
|
#
|
|
|
|
# INPUT:
|
|
|
|
# none
|
|
|
|
#
|
|
|
|
# OUTPUT:
|
|
|
|
# none
|
|
|
|
#
|
|
|
|
# SIDE EFFECTS:
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
check_for_svk_checkout() {
|
|
|
|
is_svk_checkout=0
|
|
|
|
|
|
|
|
svk_path=`which svk 2>/dev/null`
|
2007-10-26 23:46:06 +04:00
|
|
|
if test -x "$svk_path" -a -d "$HOME/.svk/local"; then
|
2007-10-25 18:12:52 +04:00
|
|
|
top_level_dir="`dirname $0`"
|
|
|
|
svk info $top_level_dir >/dev/null 2>&1
|
|
|
|
if test "$?" = 0 ; then
|
|
|
|
is_svk_checkout=1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
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=
|
2005-08-14 01:02:24 +04:00
|
|
|
no_ompi=0
|
|
|
|
no_orte=0
|
2004-01-12 00:35:37 +03:00
|
|
|
for arg in $*; do
|
|
|
|
case $arg in
|
|
|
|
-l) want_local=yes ;;
|
2005-08-14 01:02:24 +04:00
|
|
|
-ompidir|--ompidir|-ompi|--ompi) ompidir="$2" ;;
|
|
|
|
-no-ompi) no_ompi=1 ;;
|
|
|
|
-no-orte) no_orte=1 ;;
|
2004-01-12 00:35:37 +03:00
|
|
|
*) ;;
|
|
|
|
esac
|
2005-08-14 01:02:24 +04:00
|
|
|
shift
|
2004-01-12 00:35:37 +03:00
|
|
|
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
|
2007-10-25 18:12:52 +04:00
|
|
|
check_for_svk_checkout
|
|
|
|
if test ! -d .svn -a ! $is_svk_checkout ; 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.
|
2006-02-12 04:33:29 +03:00
|
|
|
if test -f VERSION -a -f configure.ac -a -f $topdir_file ; then
|
2006-02-09 18:23:04 +03:00
|
|
|
# locations to look for mca modules
|
|
|
|
config_project_list="opal orte ompi"
|
|
|
|
if test "$no_ompi" = "1" ; then
|
|
|
|
config_project_list="opal orte"
|
|
|
|
fi
|
|
|
|
if test "$no_orte" = "1" ; then
|
|
|
|
config_project_list="opal"
|
|
|
|
fi
|
|
|
|
echo "Configuring projects: $config_project_list"
|
|
|
|
|
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
|
2006-01-22 01:53:16 +03:00
|
|
|
find_app "autom4te"
|
2004-01-04 03:14:51 +03:00
|
|
|
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
|
|
|
|
2007-05-08 23:57:17 +04:00
|
|
|
# BWB --- temporary time to update autoconf / automake hack
|
2007-05-09 23:54:10 +04:00
|
|
|
bad=0
|
|
|
|
if ! check_version "2.60.0" $ompi_autoconf_found_version ; then
|
|
|
|
bad=1
|
2007-05-08 23:57:17 +04:00
|
|
|
fi
|
2007-05-09 23:54:10 +04:00
|
|
|
if ! check_version "1.10.0" $ompi_automake_found_version ; then
|
|
|
|
bad=1
|
2007-05-08 23:57:17 +04:00
|
|
|
fi
|
|
|
|
if test $bad -eq 1 ; then
|
|
|
|
cat <<EOF
|
|
|
|
|
|
|
|
-------------------------------------------------------------------------
|
|
|
|
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
|
|
|
|
|
|
|
You are currently using Autoconf $ac_version and Automake $am_version.
|
|
|
|
Starting Saturday, May 12th, Autoconf 2.60 and Automake 1.10 or higher
|
|
|
|
will be required to built configure for the trunk. Note that these
|
|
|
|
autotool versions can also safely build the v1.2 branch. You will
|
|
|
|
still be able to use either Libtool 1.5.22 or 2.1a.
|
|
|
|
|
|
|
|
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
|
|
|
-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
# BWB --- end evil hack
|
|
|
|
|
2003-11-22 19:36:58 +03:00
|
|
|
# All done
|
|
|
|
exit 0
|