2 # Copyright (C) 2014-2024 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 <https://www.gnu.org/licenses/>.
17 # Test automake bug#15981: automake 1.14 may use $ac_aux_dir
18 # before it is defined, leading to error messages such as:
19 # "/bin/sh: /home/david/missing: No such file or directory"
24 cat > configure.ac
<<END
26 AC_USE_SYSTEM_EXTENSIONS
27 AM_INIT_AUTOMAKE([1.11 foreign])
28 AC_CONFIG_FILES([Makefile])
34 echo 'int main (void) { return 0; }' > foo.c
36 cat > Makefile.am
<<'END'
39 # Without quotes around '--help' and with an empty $(MISSING), make might
40 # strip the trailing '--', call Bash's 'help' builtin, and have this test
41 # succeed spuriously. Yes, that has happened in practice :-(
50 .
/configure
2>stderr ||
{ cat stderr
>&2; exit 1; }
52 $FGREP "missing" stderr
&& exit 1