3 # Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4 # University Research and Technology
5 # Corporation. All rights reserved.
6 # Copyright (c) 2004-2005 The University of Tennessee and The University
7 # of Tennessee Research Foundation. All rights
9 # Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10 # University of Stuttgart. All rights reserved.
11 # Copyright (c) 2004-2005 The Regents of the University of California.
12 # All rights reserved.
15 # Additional copyrights may follow
21 # OMPI_CHECK_XGRID(prefix, [action-if-found], [action-if-not-found])
22 # --------------------------------------------------------
23 AC_DEFUN([OMPI_CHECK_XGRID],[
24 AC_REQUIRE([AC_PROG_OBJC])
27 [AC_HELP_STRING([--with-xgrid],
28 [Build support for the Apple Xgrid batch system (default: yes)])])
30 AC_CACHE_CHECK([for XGridFoundation Framework],
31 [ompi_cv_check_xgrid_foundation],
32 [AS_IF([test "$with_xgrid" != "no"],
33 [_OMPI_CHECK_XGRID([ompi_cv_check_xgrid_foundation="yes"],
34 [ompi_cv_check_xgrid_foundation="no"])],
35 [ompi_cv_check_xgrid_foundation="no"])])
37 AS_IF([test "$ompi_cv_check_xgrid_foundation" = "yes"],
38 [$1_OBJCFLAGS="$$1_OBJCFLAGS -F XGridFoundation"
39 $1_LDFLAGS="$$1_LDFLAGS -framework XGridFoundation"
43 # _OMPI_CHECK_XGRID([action-if-found], [action-if-not-found])
44 # --------------------------------------------------------
45 AC_DEFUN([_OMPI_CHECK_XGRID],[
46 # ok, so in environments where this is going to work, the objc and
47 # c compilers are the same thing. Because our ompi_prog_objc is
48 # really lame, you can't push/pop languages into and out of
49 # objective-C (as soon as something post Autoconf 2.59 comes out,
50 # it will have Objective C support, and this will all be much
51 # simpler). We modify CFLAGS because AC_TRY_LINK is going to use
52 # the C compiler. Automake, however, is smart enough to know what
53 # Objective C is, so in the end, we put things in OBJCFLAGS and
54 # the right things will happen. *sigh*
56 AS_IF([test "$ac_cv_sizeof_long" = "8"],
57 [ # can't compile in 64 bit mode
59 [ompi_check_xgrid_save_CFLAGS="$CFLAGS"
60 CFLAGS="$CFLAGS -framework XGridFoundation"
61 AC_TRY_LINK([],[;],[ompi_check_xgrid_happy="yes"],[ompi_check_xgrid_happy="no"])
62 CFLAGS="$ompi_check_xgrid_save_CFLAGS"
63 AS_IF([test "$ompi_check_xgrid_happy" = "no"], [$2], [$1])])