2005-02-02 Stepan Kasal * lib/autoconf/status.m4 (_AC_SRCDIRS): Rename ... (ac_top_builddir): ... this ... (ac_top_build_prefix): ... to this; the old name is also kept, for backward compatibility. (ac_top_builddir_sub): New variable, without the trailing slash, always nonempty. (_AC_OUTPUT_FILES): s/@top_builddir@/$ac_top_builddir_sub/ * doc/autoconf.texi (Configuration Actions): Rename ac_top_builddir to ac_top_build_prefix. * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Rename at_top_builddir to at_top_build_prefix. * lib/autotest/general.m4 (AT_INIT): Likewise. Index: doc/autoconf.texi =================================================================== RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v retrieving revision 1.871 diff -u -r1.871 autoconf.texi --- doc/autoconf.texi 1 Feb 2005 20:43:42 -0000 1.871 +++ doc/autoconf.texi 2 Feb 2005 10:00:50 -0000 @@ -1951,7 +1951,7 @@ directory is the current build directory. address@hidden ac_top_builddir address@hidden ac_top_build_prefix The name of the top build directory, assuming that the working directory is the current build directory. It can be empty, or else ends with a slash, so that you may concatenate @@ -1978,8 +1978,8 @@ # Argument of --srcdir srcdir='../package' # Reversing deep/dir -ac_top_builddir='../../' -# Concatenation of $ac_top_builddir and srcdir +ac_top_build_prefix='../../' +# Concatenation of $ac_top_build_prefix and srcdir ac_top_srcdir='../../../package' # Concatenation of $ac_top_srcdir and deep/dir ac_srcdir='../../../package/deep/dir' Index: lib/autoconf/autotest.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/autotest.m4,v retrieving revision 1.16 diff -u -r1.16 autotest.m4 --- lib/autoconf/autotest.m4 28 Jan 2004 22:22:04 -0000 1.16 +++ lib/autoconf/autotest.m4 2 Feb 2005 10:00:50 -0000 @@ -1,7 +1,7 @@ # This file is part of Autoconf. -*- Autoconf -*- # Interface with Autotest. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 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 @@ -75,7 +75,7 @@ abs_srcdir='$ac_abs_srcdir' at_top_srcdir='$ac_top_srcdir' abs_top_srcdir='$ac_abs_top_srcdir' -at_top_builddir='$ac_top_builddir' +at_top_build_prefix='$ac_top_build_prefix' abs_top_builddir='$ac_abs_top_builddir' AUTOTEST_PATH='m4_default([$2], [$1])' Index: lib/autoconf/status.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v retrieving revision 1.48 diff -u -r1.48 status.m4 --- lib/autoconf/status.m4 21 Dec 2004 14:24:01 -0000 1.48 +++ lib/autoconf/status.m4 2 Feb 2005 10:00:50 -0000 @@ -1,7 +1,7 @@ # This file is part of Autoconf. -*- Autoconf -*- # Parameterizing and creating config.status. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005 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 @@ -128,44 +128,52 @@ # # Ouputs: # - `ac_builddir' is `.', for symmetry only. -# - `ac_top_builddir' is `build -> top_build'. +# - `ac_top_builddir_sub' is `build -> top_build'. +# This is used for @address@hidden +# - `ac_top_build_prefix' is `build -> top_build'. # If not empty, has a trailing slash. # - `ac_srcdir' is `build -> src'. # - `ac_top_srcdir' is `build -> top-src'. -# # and `ac_abs_builddir' etc., the absolute directory names. m4_define([_AC_SRCDIRS], [ac_builddir=. if test $1 != .; then ac_dir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[[^\\/]]*,../,g'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[[^\\/]]*,/..,g;s,/,,'` + if test -n "$ac_top_builddir_sub"; then + ac_top_build_prefix=$ac_top_builddir_sub/ + else + ac_top_builddir_sub=. ac_top_build_prefix= + fi else - ac_dir_suffix= ac_top_builddir= + ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= fi +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then + if test -z "$ac_top_build_prefix"; then ac_top_srcdir=. else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + ac_top_srcdir=`echo $ac_top_build_prefix | sed 's,/$,,'` fi ;; [[\\/]]* | ?:[[\\/]]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative name. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute names, because # the directories may not exist. AS_SET_CATFILE([ac_abs_builddir], [`pwd`], [$1]) AS_SET_CATFILE([ac_abs_top_builddir], - [$ac_abs_builddir], [${ac_top_builddir}.]) + [$ac_abs_builddir], [${ac_top_builddir_sub}]) AS_SET_CATFILE([ac_abs_srcdir], [$ac_abs_builddir], [$ac_srcdir]) AS_SET_CATFILE([ac_abs_top_srcdir], [$ac_abs_builddir], [$ac_top_srcdir]) ])# _AC_SRCDIRS @@ -789,7 +797,7 @@ case $srcdir in [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$srcdir/$ac_source ;; - *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;; + *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;; esac # Try a symlink, then a hard link, then a copy. @@ -954,7 +962,7 @@ AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [ case $INSTALL in [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ])dnl @@ -1014,7 +1022,7 @@ s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t +s,@top_builddir@,$ac_top_builddir_sub,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s,@INSTALL@,$ac_INSTALL,;t t ])dnl @@ -1155,7 +1163,7 @@ case $cache_file in [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. - ac_sub_cache_file=$ac_top_builddir$cache_file ;; + ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir]) Index: lib/autotest/general.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autotest/general.m4,v retrieving revision 1.170 diff -u -r1.170 general.m4 --- lib/autotest/general.m4 28 Jan 2005 21:21:32 -0000 1.170 +++ lib/autotest/general.m4 2 Feb 2005 10:00:51 -0000 @@ -165,7 +165,7 @@ # in, but the groups themselves are run in testsuite-dir/group-dir. if test -n "$at_top_srcdir"; then builddir=../.. - for at_dir in srcdir top_srcdir top_builddir + for at_dir in srcdir top_srcdir top_build_prefix do at_val=AS_VAR_GET(at_$at_dir) AS_VAR_SET($at_dir, $at_val/../..) @@ -451,12 +451,12 @@ at_path=$at_path$as_dir ;; * ) - if test -z "$at_top_builddir"; then + if test -z "$at_top_build_prefix"; then # Stand-alone test suite. at_path=$at_path$as_dir else # Embedded test suite. - at_path=$at_path$at_top_builddir/$as_dir$PATH_SEPARATOR + at_path=$at_path$at_top_build_prefix/$as_dir$PATH_SEPARATOR at_path=$at_path$at_top_srcdir/$as_dir fi ;; @@ -869,8 +869,8 @@ echo fi if test -n "$at_top_srcdir"; then - AS_BOX([$at_top_builddir/config.log]) - sed 's/^/| /' $at_top_builddir/config.log + AS_BOX([$at_top_build_prefix/config.log]) + sed 's/^/| /' $at_top_build_prefix/config.log echo fi } >&AS_MESSAGE_LOG_FD