2 # Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2011 Free Software
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Test to make sure compiling Vala code really works with non-recursive make.
20 required="libtool libtoolize pkg-config valac gcc GNUmake"
25 cat >> 'configure.in' << 'END'
29 AM_PROG_VALAC([0.7.0])
30 PKG_CHECK_MODULES([GOBJECT],[gobject-2.0 >= 2.10])
34 cat > 'src/zardoz.vala' <<'END'
38 public static void main () {
39 stdout.printf ("Zardoz!\n");
44 cat > 'Makefile.am' <<'END'
45 bin_PROGRAMS = src/zardoz
46 src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
47 src_zardoz_LDADD = $(GOBJECT_LIBS)
48 src_zardoz_SOURCES = src/zardoz.vala
57 ./configure || skip_ "configure failure"
70 # Try again with subdir-objects.
72 cat > 'Makefile.am' <<'END'
73 AUTOMAKE_OPTIONS = subdir-objects
75 bin_PROGRAMS = src/zardoz
76 src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
77 src_zardoz_LDADD = $(GOBJECT_LIBS)
78 src_zardoz_SOURCES = src/zardoz.vala
87 ./configure || skip_ "configure failure"