#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 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
# passed down to the configure script of the subpackage. This is
# explicitly documented in the manual.
-. ./defs || Exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_SUBDIRS([subpkg])
grep '^AM_DISTCHECK_CONFIGURE_FLAGS =' Makefile.in
grep '^DISTCHECK_CONFIGURE_FLAGS =' Makefile.in
-$EGREP '^(AM_)?DISTCHECK_CONFIGURE_FLAGS' subpkg/Makefile.in && Exit 1
+$EGREP '^(AM_)?DISTCHECK_CONFIGURE_FLAGS' subpkg/Makefile.in && exit 1
./configure dc=ok am_dc=ok
# ... but not when "make distcheck" is run from the subpackage.
cd subpkg
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -e FAIL -M distcheck
grep '^configure:.* dc=KO am_dc=KO' output
: