Edit

kc3-lang/automake/m4/upc.m4

Branch :

  • Show log

    Commit

  • Author : Alexandre Duret-Lutz
    Date : 2006-08-14 20:38:43
    Hash : 49d9a341
    Message : * automake.in: Register "Unified Parallel C" as language. (lang_upc_rewrite): New function. (resolve_linker): Consider UPCLINK. * lib/Automake/Variable.pm (%_ac_macro_for_var): Suggest AM_PROG_UPC for UPC and UPCFLAGS. * m4/upc.m4: New file. * m4/depend.m4 (_AM_DEPENDENCIES): Add UPC case. * m4/Makefile.am (dist_m4data_DATA): Add upc.m4. * doc/automake.texi (Unified Parallel C Support): New node. (Public macros): Mention AM_PROG_UPC. (Program and Library Variables, Flag Variables Ordering): Mention UPCFLAGS. * tests/upc.test, tests/upc2.test, tests/upc3.test: New file. * tests/Makefile.am (TESTS): Add them. * tests/ext.test: Also test upc files.

  • m4/upc.m4
  • # Find a compiler for Unified Parallel C.	            -*- Autoconf -*-
    
    # Copyright (C) 2006  Free Software Foundation, Inc.
    #
    # This file is free software; the Free Software Foundation
    # gives unlimited permission to copy and/or distribute it,
    # with or without modifications, as long as this notice is preserved.
    
    AC_DEFUN([AM_PROG_UPC],
    [dnl We need OBJEXT and EXEEXT, but Autoconf doesn't offer any public
    dnl macro to compute them.  Use AC_PROG_CC instead.
    AC_REQUIRE([AC_PROG_CC])dnl
    AC_ARG_VAR([UPC], [Unified Parallel C compiler command])dnl
    AC_ARG_VAR([UPCFLAGS], [Unified Parallel C compiler flags])dnl
    AC_CHECK_TOOLS([UPC], [m4_default([$1], [upcc upc])], [:])
    if test "$UPC" = :; then
      AC_MSG_ERROR([no Unified Parallel C compiler was found], [77])
    fi
    _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([UPC])])dnl
    ])