1
1

Migrating MX PTL to the new configure sub-system (shared by both MX BTL and MX PTL).

This commit was SVN r6634.
Этот коммит содержится в:
George Bosilca 2005-07-27 23:39:56 +00:00
родитель 94fe5e6ac8
Коммит 801037ed6c
4 изменённых файлов: 47 добавлений и 93 удалений

Просмотреть файл

@ -18,6 +18,8 @@
include $(top_ompi_srcdir)/config/Makefile.options
AM_CPPFLAGS = $(ptl_mx_CPPFLAGS)
# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds).
@ -30,17 +32,17 @@ component_noinst = libmca_ptl_mx.la
component_install =
endif
mx_SOURCES = ptl_mx.c ptl_mx.h ptl_mx_component.c ptl_mx_module.c ptl_mx_module.h \
ptl_mx_SOURCES = ptl_mx.c ptl_mx.h ptl_mx_component.c ptl_mx_module.c ptl_mx_module.h \
ptl_mx_peer.c ptl_mx_peer.h ptl_mx_proc.c ptl_mx_proc.h \
ptl_mx_recvfrag.c ptl_mx_recvfrag.h ptl_mx_sendfrag.c ptl_mx_sendfrag.h
mcacomponentdir = $(libdir)/openmpi
mcacomponent_LTLIBRARIES = $(component_install)
mca_ptl_mx_la_SOURCES = $(mx_SOURCES)
mca_ptl_mx_la_LIBADD =
mca_ptl_mx_la_LDFLAGS = -module -avoid-version
mca_ptl_mx_la_LIBADD = $(ptl_mx_LIBX)
mca_ptl_mx_la_LDFLAGS = -module -avoid-version $(ptl_mx_LDFLAGS)
noinst_LTLIBRARIES = $(component_noinst)
libmca_ptl_mx_la_SOURCES = $(mx_SOURCES)
libmca_ptl_mx_la_LIBADD =
libmca_ptl_mx_la_LDFLAGS = -module -avoid-version
libmca_ptl_mx_la_SOURCES = $(ptl_mx_SOURCES)
libmca_ptl_mx_la_LIBADD = $(ptl_mx_LIBS)
libmca_ptl_mx_la_LDFLAGS = -module -avoid-version $(ptl_mx_LDFLAGS)

39
ompi/mca/ptl/mx/configure.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,39 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University.
# All rights reserved.
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
# All rights reserved.
# 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$
#
# Additional copyrights may follow
#
# $HEADER$
#
# MCA_ptl_mx_CONFIG([action-if-can-compile],
# [action-if-cant-compile])
# ------------------------------------------------
AC_DEFUN([MCA_ptl_mx_CONFIG],[
OMPI_CHECK_MX([ptl_mx],
[ptl_mx_happy="yes"],
[ptl_mx_happy="no"])
AS_IF([test "$ptl_mx_happy" = "yes"],
[ptl_mx_WRAPPER_EXTRA_LDFLAGS="$ptl_mx_LDFLAGS"
ptl_mx_WRAPPER_EXTRA_LIBS="$ptl_mx_LIBS"
$1],
[$2])
# substitute in the things needed to build mx
AC_SUBST([ptl_mx_CFLAGS])
AC_SUBST([ptl_mx_CPPFLAGS])
AC_SUBST([ptl_mx_LDFLAGS])
AC_SUBST([ptl_mx_LIBS])
])dnl

Просмотреть файл

@ -18,5 +18,4 @@
# Specific to this module
PARAM_INIT_FILE=ptl_mx.c
PARAM_CONFIG_HEADER_FILE="mx_config.h"
PARAM_CONFIG_FILES="Makefile"

Просмотреть файл

@ -1,86 +0,0 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University.
# All rights reserved.
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
# All rights reserved.
# 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$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# Main function. This will be invoked in the middle of the templated
# configure script.
#
AC_DEFUN([MCA_CONFIGURE_STUB],[
# Additional --with flags that can be specified
AC_ARG_WITH(ptl-mx,
AC_HELP_STRING([--with-ptl-mx=DIR],
[Specify the installation directory of MX]))
AC_ARG_WITH(ptl-mx-libdir,
AC_HELP_STRING([--with-ptl-mx-libdir=DIR],
[directory where the MX library can be found, if it is not in \$MXDIR/lib or \$MXDIR/binary/lib]))
# Add to CPPFLAGS if necessary
EXTRA_CPPFLAGS=
if test -n "$with_ptl_mx"; then
if test -d "$with_ptl_mx/include"; then
EXTRA_CPPFLAGS="-I$with_ptl_mx/include"
else
AC_MSG_WARN([*** Warning: cannot find $with_ptl_mx/include])
AC_MSG_WARN([*** Will still try to configure mx ptl anyway...])
fi
fi
# See if we can find mx.h
CPPFLAGS="$CPPFLAGS $EXTRA_CPPFLAGS"
AC_CHECK_HEADERS(myriexpress.h,,
AC_MSG_ERROR([*** Cannot find working myriexpress.h.]))
# Add to LDFLAGS if necessary
EXTRA_LDFLAGS=
if test -n "$with_ptl_mx_libdir"; then
if test -d "$with_ptl_mx_libdir"; then
EXTRA_LDFLAGS="-L$with_ptl_mx_libdir"
else
AC_MSG_WARN([*** Warning: cannot find $with_ptl_mx_libdir])
AC_MSG_WARN([*** Will still try to configure mx ptl anyway...])
fi
elif test -n "$with_ptl_mx"; then
if test -d "$with_ptl_mx/lib"; then
EXTRA_LDFLAGS="-L$with_ptl_mx/lib"
elif test -d "$with_ptl_mx/binary/lib"; then
EXTRA_LDFLAGS="-L$with_ptl_mx/binary/lib"
else
AC_MSG_WARN([*** Warning: cannot find $with_ptl_mx/lib])
AC_MSG_WARN([*** or $with_ptl_mx/binary/lib])
AC_MSG_WARN([*** Will still try to configure mx ptl anyway...])
fi
fi
# Try to find libmyriexpress
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -lpthread"
AC_CHECK_LIB([myriexpress], [main], [],
AC_MSG_ERROR([*** Cannot find libmyriexpress]))
#
# Save extra compiler/linker flags so that they can be added in
# the wrapper compilers, if necessary
#
WRAPPER_EXTRA_LDFLAGS="$EXTRA_LDFLAGS"
WRAPPER_EXTRA_LIBS="-lmyriexpress -lpthread"
])dnl