1
1
openmpi/config/ompi_check_tm.m4

145 строки
5.6 KiB
Plaintext
Исходник Обычный вид История

* Rewrite ompi_mca.m4 to use m4_defined lists of projects (ompi, orte, etc.), frameworks, and components without configure scripts instead of hard-coded shell variables (for projects and frameworks) and shell variable building (for components). * Add 3rd category of component configuration (in addition to configure scripts and no-configured components): configure.m4 components. These components can only be built as part of OMPI (like no-configure), but can provide an m4 file that is run as part of the main configure script. These macros can set whether the component should be built, along with just about any other configuration wanted. More care must be taken compared to configure components, as doing things like setting variables or calling AC_MSG_ERROR now affects the top-level configure script (so calling AC_MSG_ERROR if your component can't configure probably isn't what you want) * Added support to autogen.sh for the configure.m4-style components, as well as building up the m4_define lists ompi_mca.m4 now expects * Updated a number of macros to be more config.cache friendly (both so that config.cache can be used and so the test can be quickly run multiple times in the same configrue script): - ompi_config_asm - c_weak_symbols - c_get_alignment * Added new macros to be shared when configuring components: - ompi_objc.m4 (this actually provides AC_PROG_OBJC - don't ask...) - ompi_check_xgrid - ompi_check_tm - ompi_check_bproc * Updated a number of components to use configure.m4 instead of configure.stub - btl portals - io romio - tm ras and pls - bjs, lsf_bproc ras and bproc_seed pls - xgrid ras and pls - null iof (used by tm) This commit was SVN r6412.
2005-07-09 22:52:53 +04:00
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# 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.
* Rewrite ompi_mca.m4 to use m4_defined lists of projects (ompi, orte, etc.), frameworks, and components without configure scripts instead of hard-coded shell variables (for projects and frameworks) and shell variable building (for components). * Add 3rd category of component configuration (in addition to configure scripts and no-configured components): configure.m4 components. These components can only be built as part of OMPI (like no-configure), but can provide an m4 file that is run as part of the main configure script. These macros can set whether the component should be built, along with just about any other configuration wanted. More care must be taken compared to configure components, as doing things like setting variables or calling AC_MSG_ERROR now affects the top-level configure script (so calling AC_MSG_ERROR if your component can't configure probably isn't what you want) * Added support to autogen.sh for the configure.m4-style components, as well as building up the m4_define lists ompi_mca.m4 now expects * Updated a number of macros to be more config.cache friendly (both so that config.cache can be used and so the test can be quickly run multiple times in the same configrue script): - ompi_config_asm - c_weak_symbols - c_get_alignment * Added new macros to be shared when configuring components: - ompi_objc.m4 (this actually provides AC_PROG_OBJC - don't ask...) - ompi_check_xgrid - ompi_check_tm - ompi_check_bproc * Updated a number of components to use configure.m4 instead of configure.stub - btl portals - io romio - tm ras and pls - bjs, lsf_bproc ras and bproc_seed pls - xgrid ras and pls - null iof (used by tm) This commit was SVN r6412.
2005-07-09 22:52:53 +04:00
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved.
* Rewrite ompi_mca.m4 to use m4_defined lists of projects (ompi, orte, etc.), frameworks, and components without configure scripts instead of hard-coded shell variables (for projects and frameworks) and shell variable building (for components). * Add 3rd category of component configuration (in addition to configure scripts and no-configured components): configure.m4 components. These components can only be built as part of OMPI (like no-configure), but can provide an m4 file that is run as part of the main configure script. These macros can set whether the component should be built, along with just about any other configuration wanted. More care must be taken compared to configure components, as doing things like setting variables or calling AC_MSG_ERROR now affects the top-level configure script (so calling AC_MSG_ERROR if your component can't configure probably isn't what you want) * Added support to autogen.sh for the configure.m4-style components, as well as building up the m4_define lists ompi_mca.m4 now expects * Updated a number of macros to be more config.cache friendly (both so that config.cache can be used and so the test can be quickly run multiple times in the same configrue script): - ompi_config_asm - c_weak_symbols - c_get_alignment * Added new macros to be shared when configuring components: - ompi_objc.m4 (this actually provides AC_PROG_OBJC - don't ask...) - ompi_check_xgrid - ompi_check_tm - ompi_check_bproc * Updated a number of components to use configure.m4 instead of configure.stub - btl portals - io romio - tm ras and pls - bjs, lsf_bproc ras and bproc_seed pls - xgrid ras and pls - null iof (used by tm) This commit was SVN r6412.
2005-07-09 22:52:53 +04:00
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_CHECK_TM_LIBS_FLAGS(prefix, [LIBS or LDFLAGS])
# ---------------------------------------------------
AC_DEFUN([OMPI_CHECK_TM_LIBS_FLAGS],[
ompi_check_tm_flags=`$ompi_check_tm_pbs_config --libs`
for ompi_check_tm_val in $ompi_check_tm_flags; do
if test "`echo $ompi_check_tm_val | cut -c1-2`" = "-l"; then
if test "$2" = "LIBS"; then
$1_$2="$$1_$2 $ompi_check_tm_val"
fi
else
if test "$2" = "LDFLAGS"; then
$1_$2="$$1_$2 $ompi_check_tm_val"
fi
fi
done
])
* Rewrite ompi_mca.m4 to use m4_defined lists of projects (ompi, orte, etc.), frameworks, and components without configure scripts instead of hard-coded shell variables (for projects and frameworks) and shell variable building (for components). * Add 3rd category of component configuration (in addition to configure scripts and no-configured components): configure.m4 components. These components can only be built as part of OMPI (like no-configure), but can provide an m4 file that is run as part of the main configure script. These macros can set whether the component should be built, along with just about any other configuration wanted. More care must be taken compared to configure components, as doing things like setting variables or calling AC_MSG_ERROR now affects the top-level configure script (so calling AC_MSG_ERROR if your component can't configure probably isn't what you want) * Added support to autogen.sh for the configure.m4-style components, as well as building up the m4_define lists ompi_mca.m4 now expects * Updated a number of macros to be more config.cache friendly (both so that config.cache can be used and so the test can be quickly run multiple times in the same configrue script): - ompi_config_asm - c_weak_symbols - c_get_alignment * Added new macros to be shared when configuring components: - ompi_objc.m4 (this actually provides AC_PROG_OBJC - don't ask...) - ompi_check_xgrid - ompi_check_tm - ompi_check_bproc * Updated a number of components to use configure.m4 instead of configure.stub - btl portals - io romio - tm ras and pls - bjs, lsf_bproc ras and bproc_seed pls - xgrid ras and pls - null iof (used by tm) This commit was SVN r6412.
2005-07-09 22:52:53 +04:00
# OMPI_CHECK_TM(prefix, [action-if-found], [action-if-not-found])
# --------------------------------------------------------
AC_DEFUN([OMPI_CHECK_TM],[
AC_ARG_WITH([tm],
[AC_HELP_STRING([--with-tm],
[Directory where the tm software is installed])])
ompi_check_tm_found=no
AS_IF([test "$with_tm" = "no"],
[ompi_check_tm_happy="no"],
[ompi_check_tm_happy="yes"
AS_IF([test ! -z "$with_tm" -a "$with_tm" != "yes"],
[ompi_check_tm_dir="$with_tm"],
[ompi_check_tm_dir=""])])
AS_IF([test "$ompi_check_tm_happy" = "yes"],
[AC_MSG_CHECKING([for pbs-config])
ompi_check_tm_pbs_config="not found"
AS_IF([test "$ompi_check_tm_dir" != "" -a -d "$ompi_check_tm_dir" -a -x "$ompi_check_tm_dir/bin/pbs-config"],
[ompi_check_tm_pbs_config="$ompi_check_tm_dir/bin/pbs-config"],
[AS_IF([pbs-config --prefix >/dev/null 2>&1],
[ompi_check_tm_pbs_config="pbs-config"])])
AC_MSG_RESULT([$ompi_check_tm_pbs_config])])
# If we have pbs-config, get the flags we need from there and then
# do simplistic tests looking for the tm headers and symbols
AS_IF([test "$ompi_check_tm_happy" = "yes" -a "$ompi_check_tm_pbs_config" != "not found"],
[$1_CPPFLAGS=`$ompi_check_tm_pbs_config --cflags`
OMPI_LOG_MSG([$1_CPPFLAGS from pbs-config: $$1_CPPFLAGS], 1)
OMPI_CHECK_TM_LIBS_FLAGS([$1], [LDFLAGS])
OMPI_LOG_MSG([$1_LDFLAGS from pbs-config: $$1_LDFLAGS], 1)
OMPI_CHECK_TM_LIBS_FLAGS([$1], [LIBS])
OMPI_LOG_MSG([$1_LIBS from pbs-config: $$1_LIBS], 1)
# Now that we supposedly have the right flags, try them out.
CPPFLAGS_save="$CPPFLAGS"
LDFLAGS_save="$LDFLAGS"
LIBS_save="$LIBS"
CPPFLAGS="$CPPFLAGS $$1_CPPFLAGS"
LIBS="$LIBS $$1_LIBS"
LDFLAGS="$LDFLAGS $$1_LDFLAGS"
AC_CHECK_HEADER([tm.h],
[AC_CHECK_FUNC([tm_finalize],
[ompi_check_tm_found="yes"])])
CPPFLAGS="$CPPFLAGS_save"
LDFLAGS="$LDFLAGS_save"
LIBS="$LIBS_save"])
# If we don't have pbs-config, then we have to look around
# manually.
# Note that Torque 2.1.0 changed the name of their back-end
# library to "libtorque". So we have to check for both libpbs and
# libtorque. First, check for libpbs.
ompi_check_package_$1_save_CPPFLAGS="$CPPFLAGS"
ompi_check_package_$1_save_LDFLAGS="$LDFLAGS"
ompi_check_package_$1_save_LIBS="$LIBS"
ompi_check_package_$1_orig_CPPFLAGS="$$1_CPPFLAGS"
ompi_check_package_$1_orig_LDFLAGS="$$1_LDFLAGS"
ompi_check_package_$1_orig_LIBS="$$1_LIBS"
AS_IF([test "$ompi_check_tm_found" = "no"],
[AS_IF([test "$ompi_check_tm_happy" = "yes"],
[_OMPI_CHECK_PACKAGE_HEADER([$1],
[tm.h],
[$ompi_check_tm_dir],
[ompi_check_tm_found="yes"],
[ompi_check_tm_found="no"])])
AS_IF([test "$ompi_check_tm_found" = "yes"],
[_OMPI_CHECK_PACKAGE_LIB([$1],
[pbs],
[tm_init],
[],
[$ompi_check_tm_dir],
[$ompi_check_tm_libdir],
[ompi_check_tm_found="yes"],
[_OMPI_CHECK_PACKAGE_LIB([$1],
[torque],
[tm_init],
[],
[$ompi_check_tm_dir],
[$ompi_check_tm_libdir],
[ompi_check_tm_found="yes"],
[ompi_check_tm_found="no"])])])])
CPPFLAGS="$ompi_check_package_$1_save_CPPFLAGS"
LDFLAGS="$ompi_check_package_$1_save_LDFLAGS"
LIBS="$ompi_check_package_$1_save_LIBS"
# Did we find the right stuff?
AS_IF([test "$ompi_check_tm_happy" = "yes" -a "$ompi_check_tm_found" = "yes"],
[$2],
[AS_IF([test ! -z "$with_tm" -a "$with_tm" != "no"],
[AC_MSG_ERROR([TM support requested but not found. Aborting])])
$3])
* Rewrite ompi_mca.m4 to use m4_defined lists of projects (ompi, orte, etc.), frameworks, and components without configure scripts instead of hard-coded shell variables (for projects and frameworks) and shell variable building (for components). * Add 3rd category of component configuration (in addition to configure scripts and no-configured components): configure.m4 components. These components can only be built as part of OMPI (like no-configure), but can provide an m4 file that is run as part of the main configure script. These macros can set whether the component should be built, along with just about any other configuration wanted. More care must be taken compared to configure components, as doing things like setting variables or calling AC_MSG_ERROR now affects the top-level configure script (so calling AC_MSG_ERROR if your component can't configure probably isn't what you want) * Added support to autogen.sh for the configure.m4-style components, as well as building up the m4_define lists ompi_mca.m4 now expects * Updated a number of macros to be more config.cache friendly (both so that config.cache can be used and so the test can be quickly run multiple times in the same configrue script): - ompi_config_asm - c_weak_symbols - c_get_alignment * Added new macros to be shared when configuring components: - ompi_objc.m4 (this actually provides AC_PROG_OBJC - don't ask...) - ompi_check_xgrid - ompi_check_tm - ompi_check_bproc * Updated a number of components to use configure.m4 instead of configure.stub - btl portals - io romio - tm ras and pls - bjs, lsf_bproc ras and bproc_seed pls - xgrid ras and pls - null iof (used by tm) This commit was SVN r6412.
2005-07-09 22:52:53 +04:00
])