From 7af3bf7ccd3b1427c1ebb2b03c4615b6b25b975f Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 27 Aug 2001 07:21:20 +0000 Subject: [PATCH] * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): $2 defaults to $1. * lib/autotest/autotest.m4 (AT_INIT): Expand AUTOTEST_PATH into first the build dirs, then the src dirs. * configure.ac (AC_CONFIG_TESTDIR): Adjust. --- ChangeLog | 7 +++++++ configure.ac | 2 +- lib/autoconf/autotest.m4 | 12 ++++++------ lib/autotest/general.m4 | 37 +++++++++++++++++++++++++++++++------ 4 files changed, 45 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a08bde5..807edeb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-08-27 Akim Demaille + + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): $2 defaults to $1. + * lib/autotest/autotest.m4 (AT_INIT): Expand AUTOTEST_PATH into + first the build dirs, then the src dirs. + * configure.ac (AC_CONFIG_TESTDIR): Adjust. + 2001-08-27 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Output the definition of diff --git a/configure.ac b/configure.ac index 028340a9..413cb3da 100644 --- a/configure.ac +++ b/configure.ac @@ -28,7 +28,7 @@ AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE(autoconf, 2.52c) # Initialize the test suite. -AC_CONFIG_TESTDIR(tests, ../bin) +AC_CONFIG_TESTDIR(tests, bin) AC_PATH_PROG(EXPR, expr) # We use a path for GNU m4 so even if users have another m4 first in diff --git a/lib/autoconf/autotest.m4 b/lib/autoconf/autotest.m4 index 3113345a..fb5df2d4 100644 --- a/lib/autoconf/autotest.m4 +++ b/lib/autoconf/autotest.m4 @@ -50,14 +50,14 @@ # Roland McGrath, Noah Friedman, david d zuhn, and many others. -# AC_CONFIG_TESTDIR(TEST-DIRECTORY, [AUTOTEST-PATH = .]) -# ------------------------------------------------------ +# AC_CONFIG_TESTDIR(TEST-DIRECTORY, [AUTOTEST-PATH = TEST-DIRECTORY]) +# ------------------------------------------------------------------- # Configure an Autotest test suite directory. Invoke it once per dir, # even if there are several test suites in there. # -# AUTOTEST-PATH must help the test suite to find the executables, -# i.e., if the executables are in `src/', pass `src'. If there are -# also executables in the source tree, use `src:$top_srcdir/src'. +# AUTOTEST-PATH must help the test suite to find the executables. +# It is relative to the top level of the package, and is expanded +# into all the build dirs of AUTOTEST-PATH, then all the src dirs. AC_DEFUN([AC_CONFIG_TESTDIR], [AC_CONFIG_COMMANDS([$1/atconfig], [cat >$1/atconfig </dev/null` + if test -n "$at_dir"; then + at_path="$at_path$at_sep$at_dir" + at_sep=$PATH_SEPARATOR + fi +done +# Then source. +for at_dir in $AUTOTEST_PATH; do + at_dir=`(cd "$top_srcdir/$at_dir" && pwd) 2>/dev/null` + if test -n "$at_dir"; then + at_path="$at_path$at_sep$at_dir" + at_sep=$PATH_SEPARATOR + fi +done +# And finally PATH. +for at_dir in $PATH; do at_dir=`(cd "$at_dir" && pwd) 2>/dev/null` - test -n "$at_dir" && at_path="$at_path$PATH_SEPARATOR$at_dir" + if test -n "$at_dir"; then + at_path="$at_path$at_sep$at_dir" + at_sep=$PATH_SEPARATOR + fi done IFS=$at_IFS_save PATH=$at_path