1
1
openmpi/config/ompi_check_xgrid.m4
Brian Barrett bf38c9d8e2 Configure changes... woopie...
* Check that the C++, Fortran 77, and Objective C comilers emit code
    that can link against object files emitted by the C compiler.
    Moves some built / run time errors to configure time, which is
    nice and should help with the debugging
  * Remove unneeded -F option when building the XGrid components, 
    which started causing problems with LT 2.0.
  * Try to use the XGridFoundation library, rather than just seeing
    if we can give -framework XGridFoundation.  Should make the
    test slightly more accurate
  * Don't assume XGrid is unavailable on 64 bit platforms, as that
    won't be true on Leopard
  * Require AM 1.10 or newer if using AC 2.60 or newer, so that
    we don't have a split of AC supporting Objective C and AM
    not doing so

This commit was SVN r12701.
2006-11-30 01:59:44 +00:00

65 строки
2.4 KiB
Bash

# -*- 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.
# 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 Los Alamos National Security, LLC. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_CHECK_XGRID(prefix, [action-if-found], [action-if-not-found])
# --------------------------------------------------------
AC_DEFUN([OMPI_CHECK_XGRID],[
AC_REQUIRE([AC_PROG_OBJC])
AC_ARG_WITH([xgrid],
[AC_HELP_STRING([--with-xgrid],
[Build support for the Apple Xgrid batch system (default: yes)])])
AS_IF([test "$with_xgrid" != "no"],
[OMPI_LANG_LINK_WITH_C([Objective C],
[AC_CACHE_CHECK([for XGridFoundation Framework],
[ompi_cv_check_xgrid_foundation],
[_OMPI_CHECK_XGRID([ompi_cv_check_xgrid_foundation="yes"],
[ompi_cv_check_xgrid_foundation="no"])])
AS_IF([test "$ompi_cv_check_xgrid_foundation" = "yes"],
[ompi_check_xgrid_happy="yes"],
[ompi_check_xgrid_happy="no"])],
[ompi_check_xgrid_happy="no"])],
[ompi_check_xgrid_happy="no"])
AS_IF([test "$ompi_check_xgrid_happy" = "yes"],
[$1_LDFLAGS="$$1_LDFLAGS -framework XGridFoundation -framework Foundation"
$2], [$3])
])
# _OMPI_CHECK_XGRID([action-if-found], [action-if-not-found])
# --------------------------------------------------------
AC_DEFUN([_OMPI_CHECK_XGRID],[
AC_LANG_PUSH(Objective C)
ompi_check_xgrid_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -framework XGridFoundation -framework Foundation"
AC_TRY_LINK([#import <Foundation/Foundation.h>
#import <XgridFoundation/XgridFoundation.h>
#import <Foundation/NSString.h>
],
[NSLog(@"%@", XGConnectionKeyIsOpened);],
[$1], [$2])
LDFLAGS="$ompi_check_xgrid_save_LDFLAGS"
AC_LANG_POP(Objective C)
])