Fix for PR automake/14:
[automake.git] / tests / confsub.test
blobd7ba30f8008a7b0ca763c77f16dec98bb9db92ec
1 #! /bin/sh
3 # Test to make sure config.h can be in subdir.
5 . $srcdir/defs || exit 1
7 cat > configure.in << 'END'
8 AC_PROG_MAKE_SET
9 AM_CONFIG_HEADER(subdir/config.h)
10 PACKAGE=nonesuch
11 VERSION=nonesuch
12 AC_PROG_CC
13 AC_ARG_PROGRAM
14 AC_PROG_INSTALL
15 AC_OUTPUT(Makefile subdir/Makefile)
16 END
18 cat > Makefile.am << 'END'
19 SUBDIRS = subdir
20 END
22 mkdir subdir
23 cat > subdir/Makefile.am << 'END'
24 bin_PROGRAMS = fred
25 END
27 : > subdir/config.h.in
29 $AUTOMAKE || exit 1
31 # Make sure subdir Makefile.in doesn't itself look in the subdir.
32 (grep 'subdir/config.h' subdir/Makefile.in | grep -v CONFIG_HEADERS) && exit 1
33 exit 0