2 # Copyright (C) 2012 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 that --program-transform does not transform too much
18 # stuff (in particular, pgklibdir, pkgdatadir and pkglibexecdir).
23 cat > configure.ac <<'END'
26 AC_CONFIG_FILES([Makefile])
33 cat > Makefile.am <<'END'
35 pkgdata_DATA = bar.txt
36 pkglib_LIBRARIES = libzap.a
37 pkglibexec_SCRIPTS = mu
40 find $(prefix) ;: For debugging.
41 test -f $(bindir)/gnu-foo
42 test -x $(bindir)/gnu-foo
43 test -f $(datadir)/foo/bar.txt
44 test ! -d $(datadir)/gnu-foo
45 test -f $(libdir)/foo/libzap.a
46 test ! -d $(libdir)/gnu-foo
47 test -f $(libexecdir)/foo/gnu-mu
48 test -x $(libexecdir)/foo/gnu-mu
49 test ! -d $(libexecdir)/gnu-foo
51 test-installdirs: installdirs
52 find $(prefix) ;: For debugging.
53 test -d $(datadir)/foo
54 test ! -d $(datadir)/gnu-foo
56 test ! -d $(libdir)/gnu-foo
57 test -d $(libexecdir)/foo
58 test ! -d $(libexecdir)/gnu-foo
61 cat > libzap.c <<'END'
68 echo 'To be or not to be ...' > bar.txt
81 ./configure --program-prefix=gnu- --prefix "$(pwd)/inst"
86 test $(find inst -type f -print | wc -l) -eq 0
88 # Opportunistically test for installdirs.
90 $MAKE test-installdirs