1
1
openmpi/config/ompi_contrib.m4
Jeff Squyres 6aba701f65 Change the default to ''not'' build any contrib packages by default
(per consensus on the devel list, at least until the VT configury
issues are fixed).

This commit was SVN r17683.
2008-03-04 13:43:12 +00:00

122 строки
4.6 KiB
Bash

dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
dnl University Research and Technology
dnl Corporation. All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
dnl of Tennessee Research Foundation. All rights
dnl reserved.
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2007-2008 Cisco, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
######################################################################
#
# OMPI_CONTRIB
#
# configure the contributed software components. Currently fairly
# hard-wired, but someday should be much more like OMPI_MCA. See
# https://svn.open-mpi.org/trac/ompi/ticket/1162.
#
# USAGE:
# OMPI_CONTRIB()
#
######################################################################
AC_DEFUN([OMPI_CONTRIB],[
dnl for OMPI_CONFIGURE_USER env variable
AC_REQUIRE([OMPI_CONFIGURE_SETUP])
# Option to not build some of the contributed software packages
AC_ARG_ENABLE([contrib-no-build],
[AC_HELP_STRING([--enable-contrib-no-build=LIST],
[Comma-separated list of contributed package NAMEs that will not be built. Example: "--enable-mca-no-build=libnbc,vt" will disable building both the "libnbc" and "vt" contributed software packages.])])
# Parse the list to see what we should not build
ompi_show_subtitle "Configuring contributed software packages"
AC_MSG_CHECKING([which contributed software packages should be disabled])
if test "$enable_contrib_no_build" = ""; then
enable_contrib_no_build=all
fi
if test "$enable_contrib_no_build" = "yes"; then
AC_MSG_RESULT([yes])
AC_MSG_ERROR([*** The enable-contrib-no-build flag requires an explicit list
*** of packages to not build. For example, --enable-contrib-no-build=vt])
else
ifs_save="$IFS"
IFS="${IFS}$PATH_SEPARATOR,"
msg=
for item in $enable_contrib_no_build; do
str="`echo DISABLE_contrib_${item}=1 | sed s/-/_/g`"
eval $str
msg="$item $msg"
done
IFS="$ifs_save"
fi
AC_MSG_RESULT([$msg])
unset msg
# List of contrib subdirs to traverse into
OMPI_CONTRIB_SUBDIRS=
OMPI_CONTRIB_DIST_SUBDIRS=
# Cycle through each of the hard-coded software packages and
# configure them if not disabled. May someday be expanded to have
# autogen find the packages instead of this hard-coded list
# (https://svn.open-mpi.org/trac/ompi/ticket/1162).
# m4_define([contrib_software_list], [libnbc, vt])
m4_define([contrib_software_list], [vt])
m4_foreach(software, [contrib_software_list],
[m4_include([ompi/contrib/]software[/configure.m4])
_OMPI_CONTRIB_CONFIGURE(software)])
# Setup the top-level glue
AC_SUBST(OMPI_CONTRIB_SUBDIRS)
AC_SUBST(OMPI_CONTRIB_DIST_SUBDIRS)
])dnl
######################################################################
#
# _OMPI_CONTRIB_SOFTWARE
#
# Setup a specific contributed software package. This is a subroutine
# because the work to setup each package is essentially the same.
# Currently assumes that there is a configure.m4 file in the
# contributed software directory. May someday be expanded to handle
# other things.
#
# USAGE:
# _OMPI_CONTRIB_SOFTARE([package_name])
#
######################################################################
AC_DEFUN([_OMPI_CONTRIB_CONFIGURE],[
ompi_show_subsubsubtitle "$1 (m4 configuration macro)"
OMPI_CONTRIB_HAPPY=0
if test "$DISABLE_contrib_$1" = "" -a "$DISABLE_contrib_all" = ""; then
OMPI_contrib_$1_CONFIG([OMPI_CONTRIB_HAPPY=1], [])
AC_MSG_CHECKING([if contributed component $1 can compile])
if test "$OMPI_CONTRIB_HAPPY" = "1"; then
OMPI_CONTRIB_SUBDIRS="$OMPI_CONTRIB_SUBDIRS contrib/$1"
OMPI_CONTRIB_DIST_SUBDIRS="$OMPI_CONTRIB_DIST_SUBDIRS contrib/$1"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
else
AC_MSG_NOTICE([disabled via command line switch])
fi
AC_DEFINE_UNQUOTED(OMPI_ENABLE_CONTRIB_$1, [$OMPI_CONTRIB_HAPPY],
[Enable contributed software package $1])
unset OMPI_CONTRIB_HAPPY
])dnl