
* Add new configure command line options and deprecate some old ones: * --with-verbs replaces --with-openib * --with-verbs-libdir replaces --with-openib-libdir * If you specify --with-openib[-libdir] without --with-verbs[-libdir], you'll get a "these options have been deprecated!" warning, but then they'll act just like --with-verbs[--libdir]. '''Sidenote:''' Note that we are not renaming any components at this time, nor are we renaming the top-level OMPI_CHECK_OPENIB m4 macro (which is pretty strongly tied to the openib BTL and is bastaridzed by the ofud BTL). Note that there will likely be more changes in this area coming soon (next week?) when some long-standing changes move to the SVN trunk: some openib BTL infrastructure will move to ompi/mca/common, and its configury gets split up / refactored. We extend our philosophy of other --with-<foo> configure options of --with-verbs to ''all'' verbs-lovin components: * If you specify --with-verbs, then all verbs-lovin' components must configure successfully (or abort). This currently means: OOB ud, BTL ofud, BTL openib. * If you specify --with-verbs=DIR, then all verbs-lovin' component must configure successfully (or abort), and will use DIR to find verbs headers and libraries. * If you specify --without-verbs, then all verbs-lovin' components will be ignored. This commit also fixes a problem where the --with-openib=DIR form would not use DIR for ''all'' verbs-lovin' components (I think only BTL openib and BTL ofud used that DIR). Now all of them do, as does hwloc (because hwloc has some !OpenFabrics helper functions that require ibv types from verbs.h). There's a little new m4 infrastructure worth mentioning: * If you create a new verbs-lovin' component (i.e., a component that need verbs), your configure.m4 should AC_REQUIRE([OPAL_CHECK_VERBS_DIR]). * You can then use three global shell variables: $opal_want_verbs, $opal_verbs_dir, $opal_verbs_libdir, which will be set as follows: * opal_want_verbs will be "yes" and opal_verbs_dir and opal_verbs_libdir will both be set to directory values, '''OR''' * opal_want_verbs will be "no" and opal_verbs_dir and opal_verbs_libdir will both be set empty This commit was SVN r26640.
145 строки
5.8 KiB
Bash
145 строки
5.8 KiB
Bash
# -*- shell-script -*-
|
|
#
|
|
# Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
|
|
#
|
|
# $COPYRIGHT$
|
|
#
|
|
# Additional copyrights may follow
|
|
#
|
|
# $HEADER$
|
|
#
|
|
|
|
#
|
|
# Priority
|
|
#
|
|
AC_DEFUN([MCA_opal_hwloc_hwloc142_PRIORITY], [65])
|
|
|
|
#
|
|
# Force this component to compile in static-only mode
|
|
#
|
|
AC_DEFUN([MCA_opal_hwloc_hwloc142_COMPILE_MODE], [
|
|
AC_MSG_CHECKING([for MCA component $2:$3 compile mode])
|
|
$4="static"
|
|
AC_MSG_RESULT([$$4])
|
|
])
|
|
|
|
# Include hwloc m4 files
|
|
m4_include(opal/mca/hwloc/hwloc142/hwloc/config/hwloc.m4)
|
|
m4_include(opal/mca/hwloc/hwloc142/hwloc/config/hwloc_pkg.m4)
|
|
m4_include(opal/mca/hwloc/hwloc142/hwloc/config/hwloc_check_attributes.m4)
|
|
m4_include(opal/mca/hwloc/hwloc142/hwloc/config/hwloc_check_visibility.m4)
|
|
m4_include(opal/mca/hwloc/hwloc142/hwloc/config/hwloc_check_vendor.m4)
|
|
|
|
# MCA_hwloc_hwloc142_POST_CONFIG()
|
|
# ---------------------------------
|
|
AC_DEFUN([MCA_opal_hwloc_hwloc142_POST_CONFIG],[
|
|
HWLOC_DO_AM_CONDITIONALS
|
|
])dnl
|
|
|
|
|
|
# MCA_hwloc_hwloc142_CONFIG([action-if-found], [action-if-not-found])
|
|
# --------------------------------------------------------------------
|
|
AC_DEFUN([MCA_opal_hwloc_hwloc142_CONFIG],[
|
|
# Hwloc needs to know if we have Verbs support
|
|
AC_REQUIRE([OPAL_CHECK_VERBS_DIR])
|
|
|
|
AC_CONFIG_FILES([opal/mca/hwloc/hwloc142/Makefile])
|
|
|
|
OPAL_VAR_SCOPE_PUSH([HWLOC_VERSION opal_hwloc_hwloc142_save_CPPFLAGS opal_hwloc_hwloc142_save_LDFLAGS opal_hwloc_hwloc142_save_LIBS opal_hwloc_hwloc142_save_cairo opal_hwloc_hwloc142_save_xml opal_hwloc_hwloc142_basedir opal_hwloc_hwloc142_file opal_hwloc_hwloc142_save_cflags])
|
|
|
|
# default to this component not providing support
|
|
opal_hwloc_hwloc142_basedir=opal/mca/hwloc/hwloc142
|
|
opal_hwloc_hwloc142_support=no
|
|
|
|
if test "$with_hwloc" = "internal" -o "$with_hwloc" = "" -o "$with_hwloc" = "yes"; then
|
|
opal_hwloc_hwloc142_save_CPPFLAGS=$CPPFLAGS
|
|
opal_hwloc_hwloc142_save_LDFLAGS=$LDFLAGS
|
|
opal_hwloc_hwloc142_save_LIBS=$LIBS
|
|
|
|
# Run the hwloc configuration - set the prefix to minimize
|
|
# the chance that someone will use the internal symbols
|
|
HWLOC_SET_SYMBOL_PREFIX([opal_hwloc142_])
|
|
|
|
# save XML or graphical options
|
|
opal_hwloc_hwloc142_save_cairo=$enable_cairo
|
|
opal_hwloc_hwloc142_save_xml=$enable_xml
|
|
|
|
# never enable hwloc's graphical option
|
|
enable_cairo=no
|
|
|
|
# Override -- disable hwloc's libxml2 support, but enable the
|
|
# native hwloc XML support
|
|
enable_libxml2=no
|
|
enable_xml=yes
|
|
|
|
# hwloc checks for compiler visibility, and its needs to do
|
|
# this without "picky" flags.
|
|
opal_hwloc_hwloc142_save_cflags=$CFLAGS
|
|
CFLAGS=$OMPI_CFLAGS_BEFORE_PICKY
|
|
HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc142/hwloc],
|
|
[AC_MSG_CHECKING([whether hwloc configure succeeded])
|
|
AC_MSG_RESULT([yes])
|
|
HWLOC_VERSION="internal v`$srcdir/$opal_hwloc_hwloc142_basedir/hwloc/config/hwloc_get_version.sh $srcdir/$opal_hwloc_hwloc142_basedir/hwloc/VERSION`"
|
|
|
|
# Build flags for our Makefile.am
|
|
opal_hwloc_hwloc142_LDFLAGS='$(HWLOC_EMBEDDED_LDFLAGS)'
|
|
opal_hwloc_hwloc142_LIBS='$(top_ompi_builddir)/'"$opal_hwloc_hwloc142_basedir"'/hwloc/src/libhwloc_embedded.la $(HWLOC_EMBEDDED_LIBS)'
|
|
opal_hwloc_hwloc142_support=yes],
|
|
[AC_MSG_CHECKING([whether hwloc configure succeeded])
|
|
AC_MSG_RESULT([no])
|
|
opal_hwloc_hwloc142_support=no])
|
|
CFLAGS=$opal_hwloc_hwloc142_save_cflags
|
|
|
|
# Restore some env variables, if necessary
|
|
AS_IF([test -n "$opal_hwloc_hwloc142_save_cairo"],
|
|
[enable_cairo=$opal_hwloc_hwloc142_save_cairo])
|
|
AS_IF([test -n "$opal_hwloc_hwloc142_save_xml"],
|
|
[enable_xml=$opal_hwloc_hwloc142_save_xml])
|
|
|
|
CPPFLAGS=$opal_hwloc_hwloc142_save_CPPFLAGS
|
|
LDFLAGS=$opal_hwloc_hwloc142_save_LDFLAGS
|
|
LIBS=$opal_hwloc_hwloc142_save_LIBS
|
|
|
|
AC_SUBST([opal_hwloc_hwloc142_CFLAGS])
|
|
AC_SUBST([opal_hwloc_hwloc142_CPPFLAGS])
|
|
AC_SUBST([opal_hwloc_hwloc142_LDFLAGS])
|
|
AC_SUBST([opal_hwloc_hwloc142_LIBS])
|
|
fi
|
|
|
|
# Done!
|
|
AS_IF([test "$opal_hwloc_hwloc142_support" = "yes"],
|
|
[AC_DEFINE_UNQUOTED([HWLOC_HWLOC142_HWLOC_VERSION],
|
|
["$HWLOC_VERSION"],
|
|
[Version of hwloc])
|
|
|
|
# Do we have verbs support?
|
|
CPPFLAGS_save=$CPPFLAGS
|
|
AS_IF([test "$opal_want_verbs" = "yes"],
|
|
[CPPFLAGS="-I$opal_verbs_dir/include $CPPFLAGS"])
|
|
AC_CHECK_HEADERS([infiniband/verbs.h])
|
|
CPPFLAGS=$CPPFLAGS_save
|
|
|
|
# Set these variables so that the framework m4 knows
|
|
# what file to include in opal/mca/hwloc/hwloc.h
|
|
opal_hwloc_hwloc142_include="$opal_hwloc_hwloc142_basedir/hwloc142.h"
|
|
|
|
# Also pass some *_ADD_* flags upwards to the framework m4
|
|
# for various compile/link flags that are needed a) to
|
|
# build the rest of the source tree, and b) for the wrapper
|
|
# compilers (in the --with-devel-headers case).
|
|
opal_hwloc_hwloc142_file=$opal_hwloc_hwloc142_basedir/hwloc
|
|
opal_hwloc_hwloc142_ADD_CPPFLAGS="-I$OMPI_TOP_SRCDIR/$opal_hwloc_hwloc142_file/include"
|
|
AS_IF([test "$OMPI_TOP_BUILDDIR" != "$OMPI_TOP_SRCDIR"],
|
|
[opal_hwloc_hwloc142_ADD_CPPFLAGS="$opal_hwloc_hwloc142_ADD_CPPFLAGS -I$OMPI_TOP_BUILDDIR/$opal_hwloc_hwloc142_file/include"])
|
|
if test "$with_devel_headers" = "yes" ; then
|
|
opal_hwloc_hwloc142_ADD_WRAPPER_EXTRA_CPPFLAGS='-I${includedir}/openmpi/'"$opal_hwloc_hwloc142_basedir/hwloc/include"
|
|
fi
|
|
|
|
opal_hwloc_hwloc142_ADD_WRAPPER_EXTRA_LIBS=$HWLOC_EMBEDDED_LIBS
|
|
|
|
$1],
|
|
[$2])
|
|
|
|
OPAL_VAR_SCOPE_POP
|
|
])dnl
|