Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / lzma.test
1 #! /bin/sh
2 # Copyright (C) 2003, 2007, 2011 Free Software Foundation, Inc.
3 #
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)
7 # any later version.
8 #
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.
13 #
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/>.
16
17 # Check support for no-dist-gzip with lzma
18
19 . ./defs || Exit 1
20
21 errmsg='lzma.*deprecated.*dist-xz.*dist-lzip.*instead'
22
23 set -e
24
25 echo AUTOMAKE_OPTIONS = dist-lzma > Makefile.am
26 $ACLOCAL --force
27 AUTOMAKE_fails -Wnone -Wobsolete
28 grep "^Makefile\\.am:1:.*$errmsg" stderr
29
30 cat > configure.in << 'END'
31 AC_INIT([lzma], [1.0])
32 AM_INIT_AUTOMAKE([no-dist-gzip dist-lzma])
33 AC_CONFIG_FILES([Makefile])
34 AC_OUTPUT
35 END
36
37 cat > Makefile.am << 'END'
38 test: distcheck
39         test $(DIST_ARCHIVES) = lzma-1.0.tar.lzma
40         test -f $(DIST_ARCHIVES)
41 END
42
43 rm -rf autom4te*.cache
44 $ACLOCAL
45 AUTOMAKE_fails
46 grep "^configure\\.in:2:.*$errmsg" stderr
47
48 $AUTOMAKE -Wno-obsolete
49
50 lzma --version || skip_ "lzma compressor required for the rest of the test"
51
52 $AUTOCONF
53 ./configure
54 $MAKE test
55
56 :