summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorAkim Demaille <akim@epita.fr>2001-08-20 14:46:29 +0000
committerAkim Demaille <akim@epita.fr>2001-08-20 14:46:29 +0000
commite901ead4963b9e3782981bcb22b99d30a6cf4a00 (patch)
treee1a4b2223db420e621deb7e58cab38052e87947a /m4
parente2002fb0523deef31189a6a364e2d49716c8094b (diff)
downloadautoconf-e901ead4963b9e3782981bcb22b99d30a6cf4a00.tar.gz
* lib/autotest/general.m4 (AT_INIT): Compute top_builddir,
top_srcdir and srcdir from at_topbuild_2_topsrc and at_testdir. Load atlocal late enough to dump it in the log. * m4/atconfig.m4 (AT_CONFIG): Pass them to atconfig.
Diffstat (limited to 'm4')
-rw-r--r--m4/atconfig.m420
1 files changed, 11 insertions, 9 deletions
diff --git a/m4/atconfig.m4 b/m4/atconfig.m4
index dfcb2300..2dc46d49 100644
--- a/m4/atconfig.m4
+++ b/m4/atconfig.m4
@@ -2,7 +2,7 @@
## Prepare for testing. ##
## ----------------------##
-#serial 5
+#serial 6
# Copyright 2000, 2001 Free Software Foundation, Inc.
#
@@ -21,14 +21,15 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
+
# AT_CONFIG(TEST-DIRECTORY, [AUTOTEST-PATH = .])
# ----------------------------------------------
# Configure the test suite.
#
-# AUTOTEST-PATH must help the test suite to find the executables, i.e.,
-# if the test suite is in `tests/' and 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,
+# i.e., if the executables are in `src/', pass `src'. If there are
+# also executables in the source tree, use `src:$top_srcdir/src'.
+
AC_DEFUN([AT_CONFIG],
[AC_CONFIG_COMMANDS([$1/atconfig],
[cat >$1/atconfig <<EOF
@@ -43,8 +44,9 @@ at_bugreport='$at_bugreport'
at_n='$at_n'
at_c='$at_c'
-srcdir='$srcdir'
-top_srcdir='$top_srcdir'
+at_testdir='$1'
+at_topbuild_2_topsrc='$at_topbuild_2_topsrc'
+
AUTOTEST_PATH='m4_default([$2], [.])'
SHELL=\${CONFIG_SHELL-'$at_shell'}
@@ -59,8 +61,8 @@ at_bugreport='$PACKAGE_BUGREPORT'
at_n='$ECHO_N'
at_c='$ECHO_C'
-srcdir='$srcdir'
-top_srcdir=`echo '$1/' | sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g;s,/$,,'`
+# Path from top_build to top_src
+at_topbuild_2_topsrc=$srcdir
at_shell='$SHELL'
at_path_separator='$PATH_SEPARATOR'