AT_SETUP([Include in Makefile.am and configure.ac])


m4_pattern_allow([m4_include])

AS_MKDIR_P([include_ac])
AT_DATA([include_ac/configure.ac],
[[AC_CONFIG_FILES(m4_include([include.m4]))
]])
AT_DATA([include_ac/include.m4],
[[Makefile
]])
AT_DATA([include_ac/Makefile.am],
[[
bin_PROGRAMS = target1
]])
AT_DATA([expect],
[[ROOT (): include_ac
    TARGET (): target1
        PROPERTY (Installation directory): bindir
    SOURCE (): configure.ac
    SOURCE (): include.m4
    SOURCE (): Makefile.am
]])
AT_PARSER_CHECK([load include_ac \
		 list])
AT_CHECK([diff -b output expect])



AS_MKDIR_P([include])
AT_DATA([include/configure.ac],
[[AC_CONFIG_FILES(GNUmakefile)
]])
AT_DATA([include/GNUmakefile.am],
[[
include module/target.am
]])
AS_MKDIR_P([include/module])
AT_DATA([include/module/target.am],
[[
bin_PROGRAMS = target1
]])
AT_DATA([expect],
[[ROOT (): include
    TARGET (): target1
        PROPERTY (Installation directory): bindir
    SOURCE (): configure.ac
    SOURCE (): GNUmakefile.am
    SOURCE (): module/target.am
]])
AT_PARSER_CHECK([load include \
		 list])
AT_CHECK([diff -b output expect])



AT_CLEANUP
