Merge branch 'maint'
[platform/upstream/automake.git] / m4 / upc.m4
1 # Find a compiler for Unified Parallel C.                   -*- Autoconf -*-
2
3 # Copyright (C) 2006, 2011 Free Software Foundation, Inc.
4 #
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # serial 1
10
11 AC_DEFUN([AM_PROG_UPC],
12 [dnl We need OBJEXT and EXEEXT, but Autoconf doesn't offer any public
13 dnl macro to compute them.  Use AC_PROG_CC instead.
14 AC_REQUIRE([AC_PROG_CC])dnl
15 AC_ARG_VAR([UPC], [Unified Parallel C compiler command])dnl
16 AC_ARG_VAR([UPCFLAGS], [Unified Parallel C compiler flags])dnl
17 AC_CHECK_TOOLS([UPC], [m4_default([$1], [upcc upc])], [:])
18 if test "$UPC" = :; then
19   AC_MSG_ERROR([no Unified Parallel C compiler was found], [77])
20 fi
21 _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([UPC])])dnl
22 ])