2 # Copyright (C) 2010-2013 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Make sure AC_LIBSOURCE and AC_LIBSOURCES work.
22 mv configure.ac configure.proto
23 cat >> configure.proto << 'END'
30 cat > Makefile.am << 'END'
31 noinst_LIBRARIES = libtu.a
32 libtu_a_SOURCES = foo.c
33 libtu_a_LIBADD = $(LIBOBJS)
35 include extra-checks.am
36 .PHONY: $(extra_checks) pre-test
39 ls -l $(srcdir) $(builddir) $(distdir)
41 $(extra_checks): pre-test
42 check-local: $(extra_checks)
45 grep dummy_maude $(srcdir)/maude.c
47 grep dummy_maude $(distdir)/maude.c
49 grep dummy_liver $(srcdir)/liver.c
51 grep dummy_liver $(distdir)/liver.c
54 test ! -r $(distdir)/liver.c
57 test ! -r $(distdir)/maude.c
64 cat > maude.c << 'END'
65 extern int dummy_maude;
68 cat > liver.c << 'END'
69 extern int dummy_liver;
72 # AC_LIBSOURCE should work also if called after AC_OUTPUT.
73 cat configure.proto - > configure.ac <<END
74 AC_LIBSOURCE([maude.c])
77 cat > extra-checks.am << 'END'
78 extra_checks = maude-src maude-dist liver-not-dist
81 cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script 'ar-lib'"
92 # Avoid timestamp-related differences.
93 rm -rf autom4te*.cache
95 cat > extra-checks.am << 'END'
96 extra_checks = maude-src maude-dist liver-src liver-dist
99 # AC_LIBSOURCES should work also if called after AC_OUTPUT.
100 cat configure.proto - > configure.ac <<END
101 AC_LIBSOURCES([maude.c, liver.c])