1
1
openmpi/ompi/mca/ptl/elan/configure.stub
Jeff Squyres 4ab17f019b Rename src -> ompi
This commit was SVN r6269.
2005-07-02 13:43:57 +00:00

94 строки
3.1 KiB
Bash

# -*- 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],[
AC_ARG_WITH(ptl-elan-qsnet-headers,
AC_HELP_STRING([--with-ptl-elan-qsnet-headers=DIR],
[The path to qsnet header files, default /usr ]))
EXTRA_CPPFLAGS=
if test -n "$with_ptl_elan_qsnet_headers"; then
EXTRA_CPPFLAGS="-I$with_ptl_elan_qsnet_headers/include/"
else
AC_MSG_WARN([*** Warning: using default qsnet header path /usr/include])
fi
# See if we can find a sample kernel header
CPPFLAGS="$EXTRA_CPPFLAGS $CPPFLAGS "
AC_CHECK_HEADERS([qsnet/config.h],,
[AC_MSG_ERROR([*** Cannot find qsnet header files, e.g., config.h])])
# Look for a bunch of libraries; abort if we don't have them
PTL_ELAN_LIBS="$LIBS"
pairs="rmscall:rms_getcap elan:elan_init elan4:elan4_init"
for pair in $pairs; do
lib="`echo $pair | cut -d: -f1`"
func="`echo $pair | cut -d: -f2`"
AC_CHECK_LIB([$lib], [$func], [happy=yes], [happy=])
if test -z "$happy"; then
AC_MSG_WARN([*** Cannot find lib$lib])
AC_MSG_ERROR([Cannot continue])
fi
PTL_ELAN_LIBS="$PTL_ELAN_LIBS -l$lib"
done
# We only need one of elanctrl or elan3
AC_CHECK_LIB([elanctrl], [elanctrl_open],
[happy=yes PTL_ELAN_LIBS="$PTL_ELAN_LIBS -lelanctrl"], [happy=])
if test -z "$happy"; then
AC_CHECK_LIB([elan3], [elan3_create],
[happy=yes PTL_ELAN_LIBS="$PTL_ELAN_LIBS -lelan3"], [happy=])
fi
if test -z "$happy"; then
AC_MSG_WARN([*** Cannot find libelan3 or libelanctrl])
AC_MSG_ERROR([Cannot continue])
fi
# Some versions of AC seem to automatically append LIBS with the
# result of a successful AC_CHECK_LIB. So ensure to override this
# here.
LIBS="$PTL_ELAN_LIBS"
# Need the elan qs2netlib source as well
AC_ARG_WITH(ptl_elan_qsnet2libsrc,
AC_HELP_STRING([--with-ptl-elan-qsnet2libsrc],
[provide the path to qsnet2lib source]))
QSNET2SRC="$with_ptl_elan_qsnet2libsrc"
if test -z "$QSNET2SRC"; then
AC_MSG_WARN([*** Need path to qsnet2 library source; please use --with-ptl-elan-qs2netlibsrc=/path/to/qsnet2/source])
AC_MSG_ERROR([Cannot continue])
else
CPPFLAGS="$CPPFLAGS -I${QSNET2SRC}/include -I${QSNET2SRC}/elan4lib/include -I${QSNET2SRC}/elan4lib/elan4 -I${QSNET2SRC}/elan4lib/common"
fi
AC_SUBST(LIBS)
AC_SUBST(CPPFLAGS)
AC_SUBST(QSNET2SRC)
WRAPPER_EXTRA_LDFLAGS="$LDFLAGS"
WRAPPER_EXTRA_LIBS="$PTL_ELAN_LIBS"
])dnl