Do not pass top_srcdir to configure scripts in testsuite.

* tests/autotest.at (srcdir propagation): Copy install-sh to
source tree.
(my only test): Drop setting of `top_srcdir'.
* tests/base.at (Input/Output): Likewise.
* tests/local.at (AT_CONFIGURE_AC): Copy install-sh,
config.guess, and config.sub to test source tree.
Drop AC_CONFIG_AUX_DIR setting.
(AT_CHECK_CONFIGURE): Drop setting of `top_srcdir'.
* tests/torture.at (Substitute a 2000-byte string): Drop
AC_CONFIG_AUX_DIR setting, copy install-sh to test source tree.
(Substitute a newline, datarootdir workaround): Likewise.
(Define a newline): Adjust for linenumber changes in configure.ac.
* tests/foreign.at (Libtool): Adjust comment to reflect changes.
This commit is contained in:
Ralf Wildenhues 2007-12-04 22:49:36 +01:00
parent 5efda51756
commit 3b27d0a8a8
6 changed files with 43 additions and 23 deletions

View File

@ -1,5 +1,20 @@
2007-12-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Do not pass top_srcdir to configure scripts in testsuite.
* tests/autotest.at (srcdir propagation): Copy install-sh to
source tree.
(my only test): Drop setting of `top_srcdir'.
* tests/base.at (Input/Output): Likewise.
* tests/local.at (AT_CONFIGURE_AC): Copy install-sh,
config.guess, and config.sub to test source tree.
Drop AC_CONFIG_AUX_DIR setting.
(AT_CHECK_CONFIGURE): Drop setting of `top_srcdir'.
* tests/torture.at (Substitute a 2000-byte string): Drop
AC_CONFIG_AUX_DIR setting, copy install-sh to test source tree.
(Substitute a newline, datarootdir workaround): Likewise.
(Define a newline): Adjust for linenumber changes in configure.ac.
* tests/foreign.at (Libtool): Adjust comment to reflect changes.
* tests/semantics.at (AC_PATH_PROGS_FEATURE_CHECK): Skip test
if `pwd` contains whitespace.

View File

@ -559,10 +559,11 @@ AT_DATA([pkg/a])
AT_DATA([pkg/t/b])
AT_DATA([pkg/configure.ac], [[AC_INIT
AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
AC_CONFIG_TESTDIR([t])
AC_OUTPUT
]])
cp "$abs_top_srcdir/build-aux/install-sh" pkg
cd pkg
AT_CHECK_AUTOCONF
cd ..
@ -584,7 +585,7 @@ cd ../..
# Build directory totally outside source directory.
cd vpath-outside
AT_CHECK([top_srcdir=$abs_top_srcdir ../pkg/configure], [0], [ignore])
AT_CHECK([../pkg/configure], [0], [ignore])
cd t
AT_CHECK([../../pkg/t/suite], [0], [ignore])
cd ../..
@ -592,20 +593,20 @@ cd ../..
# Build directory totally outside source directory (absolute).
my_srcdir=`pwd`/pkg
cd vpath-abs
AT_CHECK([top_srcdir=$abs_top_srcdir "$my_srcdir"/configure], [0], [ignore])
AT_CHECK(["$my_srcdir"/configure], [0], [ignore])
cd t
AT_CHECK(["$my_srcdir"/t/suite], [0], [ignore])
cd ../..
# Build directory as subdirectory of source directory.
cd pkg/vpath-inside
AT_CHECK([top_srcdir=$abs_top_srcdir ../configure], [0], [ignore])
AT_CHECK([../configure], [0], [ignore])
cd t
AT_CHECK([../../t/suite], [0], [ignore])
cd ../../..
# Build directory as parent of source directory.
AT_CHECK([top_srcdir=$abs_top_srcdir pkg/configure], [0], [ignore])
AT_CHECK([pkg/configure], [0], [ignore])
cd t
AT_CHECK([../pkg/t/suite], [0], [ignore])
cd ..

View File

@ -298,9 +298,9 @@ AT_DATA([configure.ac],
cat <&AS_ORIGINAL_STDIN_FD >&AS_MESSAGE_FD
]])
AT_CHECK_AUTOCONF
AT_CHECK([echo Hello | top_srcdir=$abs_top_srcdir ./configure | grep -v 'configure: loading site script '],, [Hello
AT_CHECK([echo Hello | ./configure | grep -v 'configure: loading site script '],, [Hello
])
AT_CHECK([echo Hello | top_srcdir=$abs_top_srcdir ./configure --silent])
AT_CHECK([echo Hello | ./configure --silent])
AT_CLEANUP

View File

@ -2,8 +2,8 @@
AT_BANNER([Compatibility with other tools.])
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
# Foundation, Inc.
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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
@ -45,9 +45,8 @@ esac]],
# Using a configure.in, have libtoolize confess where libtool.m4 is.
AT_DATA([configure.in],
[[AC_INIT
# The other tests are relying on Autoconf's own copy of install-sh
# etc. via AC_CONFIG_AUX_DIR(..). Don't do that here, since we don't
# want libtoolize to pollute Autoconf's srcdir.
# State that we explicitly want auxiliary files here, so libtoolize
# won't pollute files outside the test directory.
AC_CONFIG_AUX_DIR(.)
AC_PROG_LIBTOOL
]])

View File

@ -203,13 +203,15 @@ ls -1 | sed '/^at-/d;/^state-/d;/^config\./d' | sort >state-ls.$][1
AT_DATA([configure.ac],
[[AC_INIT
AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
AC_CONFIG_HEADER(config.h:config.hin)
AC_STATE_SAVE(before)]
$1
[AC_OUTPUT
AC_STATE_SAVE(after)
]])
cp "$abs_top_srcdir/build-aux/install-sh" \
"$abs_top_srcdir/build-aux/config.guess" \
"$abs_top_srcdir/build-aux/config.sub" .
])# AT_CONFIGURE_AC
@ -240,7 +242,7 @@ m4_define([AT_CHECK_AUTOHEADER],
# Using --srcdir is more expensive.
m4_define([AT_CHECK_CONFIGURE],
[AT_CAPTURE_FILE([config.log])[]dnl
AT_CHECK([top_srcdir=$abs_top_srcdir ./configure $1],
AT_CHECK([./configure $1],
[$2],
m4_default([$3], [ignore]), [$4])])

View File

@ -660,7 +660,6 @@ AT_DATA([Baz.in], [@baz@
AT_DATA([configure.ac],
[[AC_INIT
AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
AC_SUBST([foo], ]m4_for([n], 1, 100,, ....................)[)
AC_SUBST([bar], "]m4_for([n], 1, 100,, @ @ @ @ @ @ @ @ @ @@)[")
baz="]m4_for([m], 1, 100,, ... ... ... ... ....)[
@ -672,6 +671,8 @@ AC_CONFIG_FILES([Foo Bar Baz])
AC_OUTPUT
]])
cp "$abs_top_srcdir/build-aux/install-sh" .
AT_CHECK_AUTOCONF
# Check both awk and the result of AC_PROG_AWK
for awk_arg in Foo= AWK=awk; do
@ -803,7 +804,6 @@ AT_DATA([Foo.in],
AT_DATA([configure.ac],
[[AC_INIT
AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
foo='one
two'
bar='%!_!# ''
@ -815,6 +815,8 @@ AC_PROG_AWK
AC_OUTPUT
]])
cp "$abs_top_srcdir/build-aux/install-sh" .
echo 'one
two
%!_!# ''
@ -838,14 +840,14 @@ AT_CONFIGURE_AC([[AC_DEFINE([foo], [one
two], [This spans two lines.])
]])
AT_CHECK_AUTOCONF([], [], [], [stderr])
dnl Older versions of m4 report error at line 6 (end of macro);
dnl newer versions report it at line 5 (start of macro).
AT_CHECK([[sed 's/^configure.ac:[56]: //' stderr]], [],
dnl Older versions of m4 report error at line 5 (end of macro);
dnl newer versions report it at line 4 (start of macro).
AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [],
[[warning: AC_DEFINE: `one
two' is not a valid preprocessor define value
]])
AT_CHECK_AUTOHEADER([], [], [], [stderr])
AT_CHECK([[sed 's/^configure.ac:[56]: //' stderr]], [],
AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [],
[[warning: AC_DEFINE: `one
two' is not a valid preprocessor define value
]])
@ -857,12 +859,12 @@ AT_CONFIGURE_AC([[AC_DEFINE_UNQUOTED([foo], [one
two], [This spans two lines.])
]])
AT_CHECK_AUTOCONF([], [], [], [stderr])
AT_CHECK([[sed 's/^configure.ac:[56]: //' stderr]], [],
AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [],
[[warning: AC_DEFINE_UNQUOTED: `one
two' is not a valid preprocessor define value
]])
AT_CHECK_AUTOHEADER([], [], [], [stderr])
AT_CHECK([[sed 's/^configure.ac:[56]: //' stderr]], [],
AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [],
[[warning: AC_DEFINE_UNQUOTED: `one
two' is not a valid preprocessor define value
]])
@ -925,7 +927,6 @@ AT_DATA([configure.ac],
[[AC_INIT
d@&t@nl The following line silences the warnings, if uncommented:
d@&t@nl AC_DEFUN([AC_DATAROOTDIR_CHECKED])
AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
# This substitution is wrong and bogus! Don't use it in your own code!
# Read `info Autoconf "Defining Directories"'!
@ -935,6 +936,8 @@ AC_CONFIG_FILES([Foo Bar])
AC_OUTPUT
]])
cp "$abs_top_srcdir/build-aux/install-sh" .
AT_CHECK_AUTOCONF
AT_CHECK_CONFIGURE([], [], [],
[config.status: WARNING: 'Foo.in' seems to ignore the --datarootdir setting