2 # Copyright (C) 2013 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Verify our probe that checks that "rm -f" doesn't complain if called
18 # without file operands works as expected. See automake bug#10828.
22 echo AC_OUTPUT >> configure.ac
33 PATH=$original_PATH; export PATH
35 while test $# -gt 0; do
37 -*) rm_opts="$rm_opts $1";;
42 if test $# -eq 0; then
43 echo "Oops, fake rm called without arguments" >&2
52 PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
53 export PATH original_PATH
55 rm -f && exit 99 # Sanity check.
57 ./configure 2>stderr && { cat stderr >&2; exit 1; }
60 grep "'rm' program.* unable to run without file operands" stderr
61 $FGREP "tell bug-automake@gnu.org about your system" stderr
62 $FGREP "install GNU coreutils" stderr
63 $EGREP "(^| |')ACCEPT_INFERIOR_RM_PROGRAM($| |')" stderr
65 ACCEPT_INFERIOR_RM_PROGRAM=yes; export ACCEPT_INFERIOR_RM_PROGRAM
71 # For the sake of our exit trap.
72 PATH=$original_PATH; export PATH