From Nicolas Joly:
[automake.git] / tests / confsub.test
blob2e0778f77307d051b1d342b8a7033e477e359f35
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 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
9 AC_PROG_MAKE_SET
10 AM_CONFIG_HEADER(subdir/config.h)
11 PACKAGE=nonesuch
12 VERSION=nonesuch
13 AC_PROG_CC
14 AC_ARG_PROGRAM
15 AC_PROG_INSTALL
16 AC_OUTPUT(Makefile subdir/Makefile)
17 END
19 cat > Makefile.am << 'END'
20 SUBDIRS = subdir
21 END
23 mkdir subdir
24 cat > subdir/Makefile.am << 'END'
25 bin_PROGRAMS = fred
26 END
28 : > subdir/config.h.in
30 $ACLOCAL || exit 1
31 $AUTOMAKE || exit 1
33 # Make sure subdir Makefile.in doesn't itself look in the subdir.
34 (grep 'subdir/config.h' subdir/Makefile.in | grep -v CONFIG_HEADERS) && exit 1
35 exit 0