]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Do not pass top_srcdir to configure scripts in testsuite.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 4 Dec 2007 21:49:36 +0000 (22:49 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 8 Dec 2007 10:58:44 +0000 (11:58 +0100)
* 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.

ChangeLog
tests/autotest.at
tests/base.at
tests/foreign.at
tests/local.at
tests/torture.at

index 19a49dc74785f45a7d13a30e7db46e329e7b7fe5..e674318a60f11301b530c5cfffe4064a3d6da3ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
 
index 0f3fdf0278c6e61c62d6090b64ed09705ae7b70b..e043d7a6dbdafd753a08f84dcccc38df27c9b3a9 100644 (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 ..
index f1f1a9da9a4491064bfe07b2fee973b84b7412f7..f86c6b79047e8d741d70d5d536c04ae10aeee2df 100644 (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
 
index 269e5d76c5f6bc80c08c43faf5af07ac55896ae4..6348a588082bfae0ab661311ea4eba7b4a9c9477 100644 (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
 ]])
index 75823e247dafe7668d302888c1e518697d42bf2c..855ebd3597859ad43597f176394fc74f4b288a1d 100644 (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])])
 
index 8371d1a208946fbfa24abccbf6615e16937289f0..11c619d79d8a5e9d3ef9e05737e0f1087a1aabcc 100644 (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