#! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check support for AC_CONFIG_LIBOBJ_DIR vs ALLOCA.
-# (pr401.test and pr401b.test do the same for LIBOBJS and LTLIBOBJS)
+# (pr401.sh and pr401b.sh do the same for LIBOBJS and LTLIBOBJS)
-am_parallel_tests=no
required=cc
-. ./defs || Exit 1
+. test-init.sh
mkdir lib src
-ac_cv_func_alloca_works=no
-export ac_cv_func_alloca_works
+ac_cv_func_alloca_works=no; export ac_cv_func_alloca_works
cat >lib/alloca.c <<'EOF'
const char *feep (void)
## These lines are activated for later tests.
#: AC_CONFIG_LIBOBJ_DIR([lib])
AC_PROG_CC
-#x AM_PROG_CC_C_O
AM_PROG_AR
AC_PROG_RANLIB
AC_FUNC_ALLOCA
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
$MAKE distcheck
# Invocation of AC_CONFIG_LIBOBJ_DIR may be necessary for reasons
# unrelated to Automake or Makefile.am layout.
-sed 's/#: //' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/#: //' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
$ACLOCAL
$AUTOCONF
$AUTOMAKE
./configure
-test ! -d lib/lib
+test ! -e lib/lib
$MAKE distcheck
## -------------------------------------------- ##
## Test using ALLOCA from a sibling directory. ##
## ------------------------------------------- ##
-sed 's/#x //; s/lib\/Makefile //' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/lib\/Makefile //' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
cat >Makefile.am <<'EOF'
SUBDIRS = src
$AUTOMAKE --add-missing
./configure
$MAKE
-test ! -d src/lib
-test ! -d 'src/$(top_builddir)'
+test ! -e src/lib
+test ! -e 'src/$(top_builddir)'
$MAKE check
$MAKE distclean
## Test using ALLOCA from parent directory. ##
## ---------------------------------------- ##
-sed 's/^.*src\/Makefile.*$//' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/^.*src\/Makefile.*$//' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
cat >Makefile.am <<'EOF'
AUTOMAKE_OPTIONS = subdir-objects