* configure.ac, NEWS: Bump version to 1.10.
[automake.git] / tests / upc3.test
blob847a99d8988ab6dab0369fd1dbf946f6540b6d94
1 #! /bin/sh
2 # Copyright (C) 2006 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Test that C and Unified Parallel C link safely.
23 . ./defs || exit 1
24 set -e
26 cat >> configure.in << 'END'
27 AC_PROG_CC
28 AM_PROG_UPC
29 AC_OUTPUT
30 END
32 cat > hello.upc << 'END'
33 #include <stdio.h>
34 #include <upc.h>
35 #include "message.h"
36 int
37 main (void)
39 printf ("Thread %d says, '%s'\n", MYTHREAD, message());
40 return 0;
42 END
44 cat > message.h << 'END'
45 const char *message (void);
46 END
48 cat > mix.c << 'END'
49 #include "message.h"
50 const char *
51 message (void)
53 return "Hello.";
55 END
57 cat > Makefile.am << 'END'
58 bin_PROGRAMS = hello
59 hello_SOURCES = hello.upc mix.c message.h
60 hello_LDADD = -lm
61 END
63 $ACLOCAL
64 $AUTOMAKE
65 $AUTOCONF
67 ./configure
68 $MAKE distcheck