blob: 552ce5c500f77f812152efb4a8b5660c84fdd195 [file] [log] [blame]
#! /bin/sh
# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test to make sure config.h works in a subdir.
# Report from Alexandre Oliva.
. ./defs || Exit 1
set -e
cat >> configure.in << 'END'
AM_CONFIG_HEADER([include/config.h])
END
: > Makefile.am
: > acconfig.h
mkdir include
: > include/Makefile.am
: > include/config.h.in
$ACLOCAL
$AUTOMAKE
perl -ne '
if (s/^DIST_COMMON *=//)
{
$_ .= <> while (s/\\$//);
$_ = " $_ ";
s/\s+/ /g;
print "$_\n";
exit 0;
}' Makefile.in > dc.txt
cat dc.txt # might be useful for debugging.
$FGREP ' acconfig.h ' dc.txt
# Make sure re-running automake in a different way generates same
# Makefile.in.
mv Makefile.in Makefile.sav
$ACLOCAL
$AUTOMAKE Makefile
diff Makefile.sav Makefile.in
: