autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.61a-329


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.61a-329-g8fab8ab
Date: Sat, 08 Dec 2007 11:07:52 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=8fab8ab6d2d08142ece5fe97a2d0a3768114352f

The branch, master has been updated
       via  8fab8ab6d2d08142ece5fe97a2d0a3768114352f (commit)
       via  3b27d0a8a83a73002dc52604d3332275b704a29a (commit)
       via  5efda51756a97237e382beed9e16697e8b4e8625 (commit)
       via  be000532a980773b5f8bb5bed5bcc7fea370b0f7 (commit)
       via  587ce8cecd03c7f8e08761318e28c807e5a798de (commit)
       via  814cfb9003a3d7d488bd94e09785b02dd3f7c177 (commit)
       via  ce429ecdc03698025176d3003e113e6e003b429f (commit)
       via  064ce0b6be217db3af41216880259003322a6c81 (commit)
       via  7b092b1af35ca302edc862cd92715553121a60ec (commit)
      from  449317f7ee33553165f46de6d818a44ee2cd7def (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8fab8ab6d2d08142ece5fe97a2d0a3768114352f
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Dec 8 12:00:02 2007 +0100

    * tests/torture.at (srcdir): Fix quoting.

commit 3b27d0a8a83a73002dc52604d3332275b704a29a
Author: Ralf Wildenhues <address@hidden>
Date:   Tue Dec 4 22:49:36 2007 +0100

    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.

commit 5efda51756a97237e382beed9e16697e8b4e8625
Author: Ralf Wildenhues <address@hidden>
Date:   Tue Dec 4 22:49:06 2007 +0100

    * tests/semantics.at (AC_PATH_PROGS_FEATURE_CHECK): Skip test if `pwd` 
contains whitespace.

commit be000532a980773b5f8bb5bed5bcc7fea370b0f7
Author: Ralf Wildenhues <address@hidden>
Date:   Tue Dec 4 22:48:42 2007 +0100

    Quote $abs_top_srcdir in tests.
    
    * tests/local.at (AT_CHECK_PERL_SYNTAX): Likewise.
    * tests/tools.at (Syntax of the shell scripts): Likewise.

commit 587ce8cecd03c7f8e08761318e28c807e5a798de
Author: Ralf Wildenhues <address@hidden>
Date:   Tue Dec 4 22:48:04 2007 +0100

    * tests/m4sh.at (LINENO): Quote $0.

commit 814cfb9003a3d7d488bd94e09785b02dd3f7c177
Author: Ralf Wildenhues <address@hidden>
Date:   Tue Dec 4 22:47:42 2007 +0100

    Fix testsuite program wrapper for whitespace in `pwd`.
    
    The problem here is that the usual mantra is that command
    variables can contain arguments, thus we cannot just escape
    $AUTOCONF, $AUTOM4TE etc.  The compromise is to put the
    $top_builddir/tests directory early in $PATH, so that the
    wrappers are found by their plain name.
    
    * tests/wrapper.as: Put $testdir early in $PATH.
    (AUTOCONF, AUTOHEADER, AUTOM4TE): Set to plain command names.

commit ce429ecdc03698025176d3003e113e6e003b429f
Author: Ralf Wildenhues <address@hidden>
Date:   Thu Dec 6 22:54:29 2007 +0100

    Proper config.status --file/--header and $srcdir escaping.
    
    * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Quote special
    characters in $ac_file_inputs.
    (_AC_OUTPUT_FILE, _AC_OUTPUT_HEADER): eval $ac_file_inputs
    accordingly.
    * tests/torture.at (datarootdir workaround): Adjust.
    (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Extend test.

commit 064ce0b6be217db3af41216880259003322a6c81
Author: Ralf Wildenhues <address@hidden>
Date:   Tue Dec 4 22:46:18 2007 +0100

    Fix Autotest for whitespace in `pwd`.
    
    * lib/autotest/general.m4 (AT_INIT)
    <at_func_create_debugging_script, Driver Loop>:
    Quote $at_group_dir.
    * tests/autotest.at (whitespace in absolute testdir): New test.

commit 7b092b1af35ca302edc862cd92715553121a60ec
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Dec 8 11:48:10 2007 +0100

    * lib/autom4te.in: Quote @address@hidden

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog               |   51 +++++++++++++++++++++++++++++++++++++++++++++++
 lib/autoconf/status.m4  |   43 +++++++++++++++++++++++++-------------
 lib/autom4te.in         |   10 ++++----
 lib/autotest/general.m4 |    8 +++---
 tests/autotest.at       |   42 ++++++++++++++++++++++++++++++++++----
 tests/base.at           |    4 +-
 tests/foreign.at        |    9 +++----
 tests/local.at          |    8 ++++--
 tests/m4sh.at           |    2 +-
 tests/semantics.at      |    5 ++++
 tests/tools.at          |   10 ++++----
 tests/torture.at        |   45 ++++++++++++++++++++++++++++++-----------
 tests/wrapper.as        |    9 ++++---
 13 files changed, 185 insertions(+), 61 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9b86bc4..1f157b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,56 @@
 2007-12-08  Ralf Wildenhues  <address@hidden>
 
+       * tests/torture.at (srcdir): Fix quoting.
+
+       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.
+
+       Quote $abs_top_srcdir in tests.
+       * tests/local.at (AT_CHECK_PERL_SYNTAX): Likewise.
+       * tests/tools.at (Syntax of the shell scripts): Likewise.
+
+       * tests/m4sh.at (LINENO): Quote $0.
+
+       Fix testsuite program wrapper for whitespace in `pwd`.
+       The problem here is that the usual mantra is that command
+       variables can contain arguments, thus we cannot just escape
+       $AUTOCONF, $AUTOM4TE etc.  The compromise is to put the
+       $top_builddir/tests directory early in $PATH, so that the
+       wrappers are found by their plain name.
+       * tests/wrapper.as: Put $testdir early in $PATH.
+       (AUTOCONF, AUTOHEADER, AUTOM4TE): Set to plain command names.
+
+       Proper config.status --file/--header and $srcdir escaping.
+       * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Quote special
+       characters in $ac_file_inputs.
+       (_AC_OUTPUT_FILE, _AC_OUTPUT_HEADER): eval $ac_file_inputs
+       accordingly.
+       * tests/torture.at (datarootdir workaround): Adjust.
+       (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Extend test.
+
+       Fix Autotest for whitespace in `pwd`.
+       * lib/autotest/general.m4 (AT_INIT)
+       <at_func_create_debugging_script, Driver Loop>:
+       Quote $at_group_dir.
+       * tests/autotest.at (whitespace in absolute testdir): New test.
+
+       * lib/autom4te.in: Quote @address@hidden
+
        Proper file name escaping in Autoconf programs and Perl modules.
        This includes escaping of characters special to the shell
        as well as special to Perl, e.g., leading `<' or `>'.
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index 3372a8b..8afa9ba 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -601,13 +601,15 @@ m4_ifndef([AC_DATAROOTDIR_CHECKED],
 ac_datarootdir_hack=; ac_datarootdir_seen=
 m4_define([_AC_datarootdir_vars],
          [datadir, docdir, infodir, localedir, mandir])
-case `sed -n '/datarootdir/ {
+ac_sed_dataroot='
+/datarootdir/ {
   p
   q
 }
 m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
           [/@_AC_Var@/p
-])' $ac_file_inputs` in
+])'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
 *datarootdir*) ac_datarootdir_seen=yes;;
 address@hidden(address@hidden|address@hidden, _AC_datarootdir_vars)@*)
   AC_MSG_WARN([$ac_file_inputs seems to ignore the --datarootdir setting])
@@ -626,7 +628,7 @@ _ACEOF
 # Shell code in configure.ac might set extrasub.
 # FIXME: do we really want to maintain this feature?
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  sed "$ac_vpsub
+ac_sed_extra="$ac_vpsub
 $extrasub
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -645,7 +647,8 @@ m4_foreach([_AC_Var], [srcdir, abs_srcdir, top_srcdir, 
abs_top_srcdir,
 ])dnl
 m4_ifndef([AC_DATAROOTDIR_CHECKED], [$ac_datarootdir_hack
 ])dnl
-" $ac_file_inputs m4_defn([_AC_SUBST_CMDS]) >$tmp/out \
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" m4_defn([_AC_SUBST_CMDS]) 
>$tmp/out \
   || AC_MSG_ERROR([could not create $ac_file])
 
 m4_ifndef([AC_DATAROOTDIR_CHECKED],
@@ -659,14 +662,14 @@ which seems to be undefined.  Please make sure it is 
defined.])
   rm -f "$tmp/stdin"
   case $ac_file in
   -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" $ac_file;;
+  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
   esac \
   || AC_MSG_ERROR([could not create $ac_file])
 dnl This would break Makefile dependencies:
-dnl  if diff $ac_file "$tmp/out" >/dev/null 2>&1; then
+dnl  if diff "$ac_file" "$tmp/out" >/dev/null 2>&1; then
 dnl    echo "$ac_file is unchanged"
 dnl  else
-dnl     rm -f $ac_file; mv "$tmp/out" $ac_file
+dnl     rm -f "$ac_file"; mv "$tmp/out" "$ac_file"
 dnl  fi
 ])# _AC_OUTPUT_FILE
 
@@ -855,19 +858,19 @@ m4_define([_AC_OUTPUT_HEADER],
   if test x"$ac_file" != x-; then
     {
       AS_ECHO(["/* $configure_input  */"]) \
-      && $AWK -f "$tmp/defines.awk" $ac_file_inputs
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
     } >"$tmp/config.h" \
       || AC_MSG_ERROR([could not create $ac_file])
     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
       AC_MSG_NOTICE([$ac_file is unchanged])
     else
       rm -f $ac_file
-      mv "$tmp/config.h" $ac_file \
+      mv "$tmp/config.h" "$ac_file" \
        || AC_MSG_ERROR([could not create $ac_file])
     fi
   else
     AS_ECHO(["/* $configure_input  */"]) \
-      && $AWK -f "$tmp/defines.awk" $ac_file_inputs \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
       || AC_MSG_ERROR([could not create -])
   fi
 dnl If running for Automake, be ready to perform additional
@@ -1450,13 +1453,19 @@ do
 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl
   --file | --fil | --fi | --f )
     $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    case $ac_optarg in
+    *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
     ac_need_defaults=false;;
 ])dnl
 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl
   --header | --heade | --head | --hea )
     $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    case $ac_optarg in
+    *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
@@ -1588,11 +1597,14 @@ AS_TMPDIR([conf], [.])
 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [_AC_OUTPUT_FILES_PREPARE])[]dnl
 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [_AC_OUTPUT_HEADERS_PREPARE])[]dnl
 
-for ac_tag in[]dnl
+eval set X "dnl
   m4_ifdef([_AC_SEEN_CONFIG(FILES)],    [:F $CONFIG_FILES])[]dnl
   m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],  [:H $CONFIG_HEADERS])[]dnl
   m4_ifdef([_AC_SEEN_CONFIG(LINKS)],    [:L $CONFIG_LINKS])[]dnl
-  m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C $CONFIG_COMMANDS])
+  m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C $CONFIG_COMMANDS])[]dnl
+"
+shift
+for ac_tag
 do
   case $ac_tag in
   :[[FHLC]]) ac_mode=$ac_tag; continue;;
@@ -1629,7 +1641,8 @@ do
           esac ||
           AC_MSG_ERROR([cannot find input file: $ac_f]);;
       esac
-      ac_file_inputs="$ac_file_inputs $ac_f"
+      case $ac_f in *\'*) ac_f=`AS_ECHO(["$ac_f"]) | sed 
"s/'/'\\\\\\\\''/g"`;; esac
+      ac_file_inputs="$ac_file_inputs '$ac_f'"
     done
 
     # Let's still pretend it is `configure' which instantiates (i.e., don't
diff --git a/lib/autom4te.in b/lib/autom4te.in
index 87b352f..6e3ab7a 100644
--- a/lib/autom4te.in
+++ b/lib/autom4te.in
@@ -1,6 +1,6 @@
 # Definition of Autom4te option sets.                     -*- Makefile -*-
 #
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
 # Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -93,7 +93,7 @@ end-language: "Autoreconf-preselections"
 # This intermediate language is used by aclocal to build aclocal.m4.
 
 begin-language: "Autoconf-without-aclocal-m4"
-args: --prepend-include @datadir@
+args: --prepend-include '@datadir@'
 args: --cache=autom4te.cache
 args: autoconf/autoconf.m4f
 args: acsite.m4?
@@ -120,7 +120,7 @@ end-language: "Autoconf"
 ## -------- ##
 
 begin-language: "Autotest"
-args: --prepend-include @datadir@
+args: --prepend-include '@datadir@'
 args: autotest/autotest.m4f
 args: package.m4?
 args: local.at?
@@ -134,7 +134,7 @@ end-language: "Autotest"
 ## ---- ##
 
 begin-language: "M4sh"
-args: --prepend-include @datadir@
+args: --prepend-include '@datadir@'
 args: m4sugar/m4sh.m4f
 args: --mode 777
 args: --language M4sugar
@@ -146,7 +146,7 @@ end-language: "M4sh"
 ## ------- ##
 
 begin-language: "M4sugar"
-args: --prepend-include @datadir@
+args: --prepend-include '@datadir@'
 args: m4sugar/m4sugar.m4f
 args: --warnings syntax
 end-language: "M4sugar"
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 022c56d..cf33cda 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -334,8 +334,8 @@ at_func_create_debugging_script ()
     AS_ECHO(["exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d ]dnl
 [$at_debug_args $at_group \${1+\"address@hidden"}"])
     echo 'exit 1'
-  } >$at_group_dir/run
-  chmod +x $at_group_dir/run
+  } >"$at_group_dir/run"
+  chmod +x "$at_group_dir/run"
 }
 
 # at_func_arith
@@ -911,8 +911,8 @@ do
       AS_WARN([test directory could not be cleaned.])
   fi
   # Be tolerant if the above `rm' was not able to remove the directory.
-  AS_MKDIR_P([$at_group_dir])
-  cd $at_group_dir
+  AS_MKDIR_P(["$at_group_dir"])
+  cd "$at_group_dir"
 
   echo 0 > "$at_status_file"
 
diff --git a/tests/autotest.at b/tests/autotest.at
index fa7b7ea..e043d7a 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -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 ..
@@ -618,3 +619,34 @@ AT_CHECK([./suite], [0], [ignore])
 cd ../..
 
 AT_CLEANUP
+
+
+## ------------------------------ ##
+## whitespace in absolute testdir ##
+## ------------------------------ ##
+
+AT_SETUP([whitespace in absolute testdir])
+AT_KEYWORDS([autotest])
+
+dir='dir with  whitespace'
+mkdir "$dir"
+cd "$dir"
+wd=`pwd`
+
+AT_DATA([a])
+AT_DATA([suite.at],
+[[m4_define([AT_PACKAGE_NAME],    [GNU Nonsense])
+m4_define([AT_PACKAGE_TARNAME],   [nonsense])
+m4_define([AT_PACKAGE_VERSION],   [1.0])
+m4_define([AT_PACKAGE_STRING],    [GNU Nonsense 1.0])
+m4_define([AT_PACKAGE_BUGREPORT], address@hidden)
+AT_INIT([suite to check srcdir])
+AT_SETUP([my only test])
+AT_CHECK([test -f "$top_srcdir"/a])
+AT_CLEANUP
+]])
+AT_CHECK_AUTOM4TE([--language=autotest -o suite suite.at])
+AT_CHECK([top_srcdir=$wd ./suite], [0], [ignore])
+AT_CHECK([top_srcdir=$wd ./suite -d], [0], [ignore])
+AT_CHECK([cd suite.dir/1 && ./run top_srcdir="$wd"], [0], [ignore])
+AT_CLEANUP
diff --git a/tests/base.at b/tests/base.at
index f1f1a9d..f86c6b7 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -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
 
diff --git a/tests/foreign.at b/tests/foreign.at
index 269e5d7..6348a58 100644
--- a/tests/foreign.at
+++ b/tests/foreign.at
@@ -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
 ]])
diff --git a/tests/local.at b/tests/local.at
index b17fff3..855ebd3 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -52,7 +52,7 @@ m4_define([AT_CHECK_SHELL_SYNTAX],
   [AT_CHECK([/bin/sh -n $1])])])
 
 m4_define([AT_CHECK_PERL_SYNTAX],
-[AT_CHECK([autom4te_perllibdir=$abs_top_srcdir/lib $PERL -c 
$abs_top_builddir/bin/$1],
+[AT_CHECK([autom4te_perllibdir=$abs_top_srcdir/lib $PERL -c 
"$abs_top_builddir"/bin/$1],
           0, [], [ignore])])
 
 ## ------------------ ##
@@ -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])])
 
diff --git a/tests/m4sh.at b/tests/m4sh.at
index 966ca9a..2b55bc9 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -54,7 +54,7 @@ if $2; then
 fi
 _AS@&address@hidden
 echo "Line: $3"
-grep 'Line: .*$4' $[0] >/dev/null ||
+grep 'Line: .*$4' "$[0]" >/dev/null ||
   AS@&address@hidden([cannot find original script])
 exit 0
 ]])
diff --git a/tests/semantics.at b/tests/semantics.at
index f2c59f3..9e3da84 100644
--- a/tests/semantics.at
+++ b/tests/semantics.at
@@ -554,6 +554,11 @@ AT_CLEANUP
 
 AT_SETUP([AC_PATH_PROGS_FEATURE_CHECK])
 
+# This test doesn't work if `pwd` contains white space
+case `pwd` in
+  *\ * | *\    *) AT_CHECK([exit 77]) ;;
+esac
+
 AT_CHECK_PROGS_PREPARE
 
 AT_DATA([configure.ac],
diff --git a/tests/tools.at b/tests/tools.at
index 199c15e..8c0794f 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -50,13 +50,13 @@ AT_CHECK([test "$ac_cv_sh_n_works" = yes || exit 77])
 # Specify the absolute name of the tool, as some shells don't honor PATH when
 # running `sh PROG'.
 
-AT_CHECK_SHELL_SYNTAX([$abs_top_builddir/bin/autoconf])
-AT_CHECK_SHELL_SYNTAX([$abs_top_builddir/tests/autoconf])
-AT_CHECK_SHELL_SYNTAX([$abs_top_builddir/tests/testsuite])
+AT_CHECK_SHELL_SYNTAX(["$abs_top_builddir/bin/autoconf"])
+AT_CHECK_SHELL_SYNTAX(["$abs_top_builddir/tests/autoconf"])
+AT_CHECK_SHELL_SYNTAX(["$abs_top_builddir/tests/testsuite"])
 
 # These are not built, they are in the src tree.
-AT_CHECK_SHELL_SYNTAX([$abs_top_srcdir/build-aux/install-sh])
-AT_CHECK_SHELL_SYNTAX([$abs_top_srcdir/build-aux/missing])
+AT_CHECK_SHELL_SYNTAX(["$abs_top_srcdir/build-aux/install-sh"])
+AT_CHECK_SHELL_SYNTAX(["$abs_top_srcdir/build-aux/missing"])
 
 AT_CLEANUP
 
diff --git a/tests/torture.at b/tests/torture.at
index 80b1782..6a7b962 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -261,6 +261,21 @@ AT_CHECK_CONFIG_CREATION_NOWRITE(link)
 # Check that no use of `ac_write_fail' escaped into config.status
 AT_CHECK([grep ac_write_fail config.status], [1])
 
+# Check that --file and --header accept funny file names
+file='file with  funny \ '\'' \'\'' $ & #!*? name'
+cat >"$file.in" <<'END'
+OK
+END
+# skip if we cannot create such a file
+AT_CHECK([test -f "$file.in" || exit 77])
+AT_CHECK([./config.status "--file=$file:$file.in"],
+        [0], [ignore])
+AT_CHECK([grep OK "$file"], [], [OK
+])
+AT_CHECK([./config.status "--header=$file:$file.in"],
+        [0], [ignore])
+AT_CHECK([grep OK "$file"], [], [OK
+])
 AT_CLEANUP
 
 
@@ -645,7 +660,6 @@ AT_DATA([Baz.in], address@hidden@
 
 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,, ... ... ... ... ....)[
@@ -657,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
@@ -788,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='%!_!# ''
@@ -800,6 +815,8 @@ AC_PROG_AWK
 AC_OUTPUT
 ]])
 
+cp "$abs_top_srcdir/build-aux/install-sh" .
+
 echo 'one
 two
 %!_!# ''
@@ -823,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
 ]])
@@ -842,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
 ]])
@@ -910,7 +927,6 @@ AT_DATA([configure.ac],
 [[AC_INIT
 d@&address@hidden The following line silences the warnings, if uncommented:
 d@&address@hidden 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"'!
@@ -920,9 +936,11 @@ 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
+  [config.status: WARNING:  'Foo.in' seems to ignore the --datarootdir setting
 config.status: WARNING: Bar contains a reference to the variable `datarootdir'
 which seems to be undefined.  Please make sure it is defined.
 ])
@@ -954,10 +972,13 @@ AT_DATA([configure.ac],
 
 AC_CONFIG_FILES([foo at-dir/bar])
 
+# Use quotes in the INIT-COMMANDS to accommodate a value of $srcdir
+# containing e.g., spaces or shell meta-characters.
+# Use *single* quotes because the context is an unquoted here-doc.
 AC_CONFIG_COMMANDS([report],
-[test -f $srcdir/configure.ac ||
+[test -f "$srcdir/configure.ac" ||
    AC_MSG_ERROR([cannot find $srcdir/configure.ac])],
-                  [srcdir=$srcdir])
+                  [srcdir='$srcdir'])
 
 AC_OUTPUT
 rm -f -r foo at-dir/bar
diff --git a/tests/wrapper.as b/tests/wrapper.as
index 148dac9..3f313f7 100644
--- a/tests/wrapper.as
+++ b/tests/wrapper.as
@@ -1,7 +1,7 @@
 AS_INIT[]dnl                                            -*- shell-script -*-
 # wrapper.as -- running address@hidden@' as if it were installed.
 # @configure_input@
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 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
@@ -19,9 +19,10 @@ AS_INIT[]dnl                                            -*- 
shell-script -*-
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 testdir='@abs_top_builddir@/tests'
-AUTOCONF=$testdir/autoconf
-AUTOHEADER=$testdir/autoheader
-AUTOM4TE=$testdir/autom4te
+PATH=$testdir$PATH_SEPARATOR$PATH
+AUTOCONF=autoconf
+AUTOHEADER=autoheader
+AUTOM4TE=autom4te
 AUTOM4TE_CFG='@abs_top_builddir@/lib/autom4te.cfg'
 autom4te_perllibdir='@abs_top_srcdir@/lib'
 export AUTOCONF AUTOHEADER AUTOM4TE AUTOM4TE_CFG autom4te_perllibdir


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

[Prev in Thread] Current Thread [Next in Thread]