3 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 AT_BANNER([[Testing config.status.]])
25 ## ---------------------------------------- ##
26 ## AC_CONFIG_COMMANDS with empty commands. ##
27 ## ---------------------------------------- ##
29 AT_CHECK_MACRO([AC_CONFIG_COMMANDS with empty commands],
30 [[AC_CONFIG_COMMANDS([foo], [], [:])
34 ## -------------------------- ##
35 ## Multiple AC_CONFIG_FILES. ##
36 ## -------------------------- ##
38 AT_SETUP([Multiple AC_CONFIG_FILES])
40 AT_CONFIGURE_AC([[AC_CONFIG_FILES([foo foo])]])
41 AT_CHECK_AUTOCONF([], 1, [], [ignore])
51 # AT_CHECK_AC_ARG_VAR(FIRST-VALUE, SECOND-VALUE)
52 # ----------------------------------------------
53 # Check that AC_ARG_VAR caches the latest values, diagnoses
54 # inconsistencies, and arms config.status.
55 m4_define([AT_CHECK_AC_ARG_VAR],
60 [precious='m4_bpatsubst($1, [[']], ['\\''])'; export precious],
62 AT_CHECK_CONFIGURE([--config-cache -q])
63 AT_CHECK([cat file], [], [`$1'
66 # Testing --recheck: 1. have the environment `forget' about PRECIOUS.
68 # 2. Rerun config.status to recreate `file'.
69 AT_CHECK([./config.status --recheck], [], [ignore])
70 AT_CHECK([./config.status], [], [ignore])
71 # 3. Check that file contains the old value of PRECIOUS.
72 AT_CHECK([cat file], [], [`$1'
75 # Second value: we should issue an error here: the value
78 [precious='$2'; export precious],
80 AT_CHECK_CONFIGURE([--config-cache], [1], [], [ignore])
82 ])# AT_CHECK_AC_ARG_VAR
85 AT_SETUP([AC_ARG_VAR])
87 # We don't want to run this test if this shell doesn't support
90 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
97 AT_DATA([configure.ac],
99 AC_ARG_VAR([precious], [this variable costs a lot])
100 echo "precious:$precious"
110 # Set a precious variable
111 AT_CHECK_AC_ARG_VAR([], [apple of my eye])
113 # Unset a precious variable
114 AT_CHECK_AC_ARG_VAR([apple of my eye], [])
116 # Change a precious variable
117 AT_CHECK_AC_ARG_VAR([apple of my eye], [orange of my eye])
119 # Change a precious variable that contains braces
120 AT_CHECK_AC_ARG_VAR([apple of my {eye}], [orange of my eye])
122 # Change a precious variable that contains all kinds of fun
123 AT_CHECK_AC_ARG_VAR(['p r ec"iou$], [orange of my eye])
130 ## ---------------------------------------------- ##
131 ## AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS. ##
132 ## ---------------------------------------------- ##
134 AT_SETUP([AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS])
136 AT_DATA([configure.ac],
138 rm -f -r header var-header file var-file link var-link command var-command
141 # Be sure to also stress the associated INIT-CMDS.
142 case $what_to_test in
144 AC_CONFIG_HEADERS(header:input);;
146 AC_CONFIG_HEADERS(var-header:$header_in, [], [header_in=input]);;
149 AC_CONFIG_FILES(file:input);;
151 AC_CONFIG_FILES(var-file:$file_in, [], [file_in=input]);;
154 AC_CONFIG_COMMANDS(command,
155 [cp input command]);;
157 AC_CONFIG_COMMANDS(var-command,
158 [cp $command_in var-command], [command_in=input]);;
161 AC_CONFIG_LINKS(link:input);;
163 AC_CONFIG_LINKS(var-link:$link_in, [], [link_in=input]);;
171 # AT_CHECK_CONFIG_CREATION(THING = (header | link | file | command))
172 # ------------------------------------------------------------------
173 # Check that THING and var-THING (which uses variables in AC_CONFIG_THING)
174 # are properly created, with the right content.
175 # Use `grep OK' instead of a simple `cat' to avoid banners such as in
177 m4_define([AT_CHECK_CONFIG_CREATION],
178 [AT_CHECK_CONFIGURE([what_to_test=$1])
179 AT_CHECK([ls header var-header file var-file command var-command link var-link 2>/dev/null],
182 AT_CHECK([grep OK $1], [], [OK
185 AT_CHECK_CONFIGURE([what_to_test=var-$1 --no-create])
186 # config.status might be stupidly expecting data on stdin, if it's
188 AT_CHECK([./config.status var-$1 </dev/null], [], [ignore])
189 AT_CHECK([ls header var-header file var-file command var-command link var-link 2>/dev/null],
192 AT_CHECK([grep OK var-$1], [], [OK
194 ])# AT_CHECK_CONFIG_CREATION
198 AT_CHECK_CONFIG_CREATION(file)
201 AT_CHECK_CONFIG_CREATION(header)
204 AT_CHECK_CONFIG_CREATION(command)
207 AT_CHECK_CONFIG_CREATION(link)
213 ## ---------------------------------------- ##
214 ## Macro calls in AC_CONFIG_COMMANDS tags. ##
215 ## ---------------------------------------- ##
217 AT_SETUP([Macro calls in AC_CONFIG_COMMANDS tags])
219 AT_DATA_M4SUGAR([configure.ac],
221 AC_CONFIG_COMMANDS([m4_if(1,1,mytag)])
232 ## ------------------- ##
233 ## Missing templates. ##
234 ## ------------------- ##
236 # Check that config.status detects missing input files
237 AT_SETUP([Missing templates])
239 AT_DATA([configure.ac],
241 AC_CONFIG_FILES([nonexistent])
246 AT_CHECK_CONFIGURE([], [1], [],
247 [[config.status: error: cannot find input file: nonexistent.in
249 # Make sure that the output file doesn't exist
250 AT_CHECK([test -f nonexistent], 1)
257 ## ---------------------- ##
258 ## configure invocation. ##
259 ## ---------------------- ##
261 # Check that `configure' and `config.status' honor their interface.
263 # We run `./configure one=val1 --enable-two=val2 --with-three=val3'
264 # and verify that (i) `configure' correctly receives the arguments,
265 # (ii) correctly passes them to `config.status', which we check by
266 # running `config.status --recheck', and (iii) correctly passes them
267 # to sub-configure scripts.
269 AT_SETUP([configure invocation])
273 AT_DATA([configure.ac],
275 AC_CONFIG_SUBDIRS([sub])
276 echo "result=$one$enable_two$with_three"
280 AT_DATA([sub/configure.ac],
282 echo "result=$one$enable_two$with_three"
286 echo fake install-sh script >install-sh
293 AT_CHECK_CONFIGURE([one=one --enable-two=two --with-three=three |
294 sed -n -e 's/^result=//p'], 0,
298 AT_CHECK([./config.status --recheck | sed -n 's/^result=//p'], 0,
302 AT_CHECK_CONFIGURE([one="\"'$ " --enable-two="\" ' $" --with-three=" \"'$"|
303 sed -n -e 's/^result=//p'], 0,
304 [m4_do(["'$ " ' $ "'$
307 AT_CHECK([./config.status --recheck | sed -n 's/^result=//p'], 0,
315 ## -------------------------------------------- ##
316 ## Check that `#define' templates are honored. ##
317 ## -------------------------------------------- ##
319 # Use various forms of `#define' templates, and make sure there are no
320 # problems when a symbol is prefix of another.
322 AT_SETUP([#define header templates])
324 AT_DATA([configure.ac],
326 AC_CONFIG_HEADERS(config.h:config.hin)
328 # I18n of dummy variables: their French translations.
332 AC_DEFINE(fubar, tutu)
334 # Symbols which are prefixes of another.
338 AC_CONFIG_FILES(defs)
340 # Things included in confdefs.h, but which make no sense in
341 # config.h, nor in $DEFS.
342 cat <<\EOF >>confdefs.h
343 /* Hi Mum! Look, I am doing C++! */
345 void exit (int status);
349 # In addition of config.h output a full DEFS
360 AT_DATA([config.hin],
363 # define baz "Archimedes was sinking in his baz"
377 [[/* config.h. Generated from config.hin by configure. */
389 AT_CHECK([cat config.h], 0, expout)
391 # Check the value of DEFS.
393 [[-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -Dfoo=toto -Dbar=tata -Dbaz=titi -Dfubar=tutu -Da=A -Daaa=AAA -Daa=AA
396 # Because we strip trailing spaces in `testsuite' we can't leave one in
397 # expout, hence nuke the one left by AC_OUTPUT_MAKE_DEFS.
398 AT_CHECK([sed -e 's/ $//' defs], 0, expout)
404 ## ------------------------- ##
405 ## Torturing config.status. ##
406 ## ------------------------- ##
408 ## Require 100 AC_DEFINE and AC_SUBST and AC_SUBST_FILE with a significantly
409 ## big value. This is mostly to check that Autoconf produces portable sed
410 ## scripts in config.status. sed is used to skip the first two lines
411 ## `Generated by...'.
413 # We use m4_for many times.
414 m4_pattern_allow([^m4_for$])
416 AT_SETUP([Torturing config.status])
418 dnl The value used as a big value for AC_DEFINE.
419 dnl Don't use sh active chars here, below it is also used in a sh
421 m4_define([AT_BIG_VALUE],
422 [This value should be long enough to torture the various limits of sed and other tools used by Autoconf.])
424 m4_define([AT_DESCRIPTION],
425 [Define to a long string if your `Autoconf' works properly.])
428 # AT_DUMMY_VAR(NUMBER)
429 # --------------------
430 # Build a name used for AC_SUBST and AC_DEFINE. Put ac_ in it
431 # so that the check for user name space invasion does not complain
432 # of the new variables defined.
434 # Note that you should not use the name ac_dummy, because it will be
435 # turned into ac_uummy during the construction of config.status. Yes,
436 # this is admittedly a bug, but it would be too hard to fix this.
437 # There is really no point in AC_DEFINE a var named ac_d.*.
438 m4_pattern_allow([^m4_bpatsubst$])
439 m4_define([AT_DUMMY_VAR],
440 [ac_Dummy_[]m4_bpatsubst([000$1], [.*\(...\)$], [\1])])
445 [m4_for([AT_Count], 1, 100, 1,
446 [@AT_DUMMY_VAR(AT_Count)@
452 while test $i != 101; do
453 echo "content of file $i" > file_$i
462 m4_pattern_allow([^m4_(define|defun)$])
463 AT_DATA([configure.ac],
464 dnl The following lines transfer AT_DUMMY_VAR, AT_DESCRIPTION, and
465 dnl AT_BIG_VALUE into the configure.ac as AC_DUMMY_VAR etc.
466 [[m4_define([AC_DUMMY_VAR],]
467 m4_dquote(m4_defn([AT_DUMMY_VAR]))[)]]
469 [[m4_define([AC_DESCRIPTION],]
470 m4_dquote(m4_defn([AT_DESCRIPTION]))[)]]
472 [[m4_define([AC_BIG_VALUE],]
473 m4_dquote(m4_defn([AT_BIG_VALUE]))[)]]
477 # Related VALUE to NAME both with AC_SUBST and AC_DEFINE. This is
478 # used in the torture tests.
479 m4_defun([AC_DEFUBST],
480 [AC_DUMMY_VAR($1)="AC_BIG_VALUE"
481 AC_DEFINE_UNQUOTED(AC_DUMMY_VAR($1), "$AC_DUMMY_VAR($1)",
483 AC_SUBST(AC_DUMMY_VAR($1))
489 AC_CONFIG_HEADERS(config.h:config.hin)
490 AC_CONFIG_FILES(dummy)
491 m4_for(AC_Count, 1, 100, 1,
492 [AC_DEFUBST(AC_Count)])
500 # Checking that AC_DEFINE worked properly.
502 [/* Define to the address where bug reports for this package should be sent. */
503 #define PACKAGE_BUGREPORT ""
505 /* Define to the full name of this package. */
506 #define PACKAGE_NAME ""
508 /* Define to the full name and version of this package. */
509 #define PACKAGE_STRING ""
511 /* Define to the one symbol short name of this package. */
512 #define PACKAGE_TARNAME ""
514 /* Define to the version of this package. */
515 #define PACKAGE_VERSION ""
516 m4_for(AT_Count, 1, 100, 1,
519 [#define] AT_DUMMY_VAR(AT_Count) "AT_BIG_VALUE"
521 AT_CHECK([sed -n '4,$ p' config.h], 0, expout)
523 # Checking that AC_SUBST worked properly.
525 [m4_for(AT_Count, 1, 100, 1,
527 content of file AT_Count
530 AT_CHECK([cat dummy], 0, expout)
535 ## ------------------------------- ##
536 ## Substitute a 2000-byte string. ##
537 ## ------------------------------- ##
539 # Solaris 9 /usr/ucb/sed that rejects commands longer than 4000 bytes. HP/UX
540 # sed dumps core around 8 KiB. However, POSIX says that sed need not
541 # handle lines longer than 2048 bytes (including the trailing newline).
542 # So we'll just test a 2000-byte value.
544 AT_SETUP([Substitute a 2000-byte string])
546 AT_DATA([Foo.in], [@foo@
549 AT_DATA([configure.ac],
551 AC_CONFIG_AUX_DIR($top_srcdir/config)
552 AC_SUBST([foo], ]m4_for([n], 1, 100,, ....................)[)
553 AC_CONFIG_FILES([Foo])
559 AT_CHECK([cat Foo], 0, m4_for([n], 1, 100,, ....................)
564 ## ------------------------------ ##
565 ## Define to a 2000-byte string. ##
566 ## ------------------------------ ##
568 AT_SETUP([Define to a 2000-byte string])
572 AC_DEFINE([foo], ]m4_for([n], 1, 100,, ....................)[, [desc])
578 AT_CHECK_DEFINES([@%:@define foo m4_for([n], 1, 100,, ....................)
583 ## ------------------------------------------ ##
584 ## Substitute and define special characters. ##
585 ## ------------------------------------------ ##
587 # Use characters special to the shell, sed, and M4.
589 AT_SETUP([Substitute and define special characters])
591 AT_DATA([Foo.in], [@foo@
595 [[foo="AS@&t@_ESCAPE([[X*'[]+ ", `\($foo]])"
597 AC_DEFINE([foo], [[X*'[]+ ", `\($foo]], [Awful value.])
598 AC_CONFIG_FILES([Foo])]])
603 AT_CHECK([cat Foo], 0, [[X*'[]+ ", `\($foo
605 AT_CHECK_DEFINES([[#define foo X*'[]+ ", `\($foo
610 ## ---------------------- ##
611 ## Substitute a newline. ##
612 ## ---------------------- ##
614 AT_SETUP([Substitute a newline])
620 AT_DATA([configure.ac],
622 AC_CONFIG_AUX_DIR($top_srcdir/config)
626 AC_CONFIG_FILES([Foo])
632 AT_CHECK([cat Foo], 0, [one
638 ## ------------------ ##
639 ## Define a newline. ##
640 ## ------------------ ##
642 AT_SETUP([Define a newline])
644 AT_CONFIGURE_AC([[AC_DEFINE([foo], [one
645 two], [This spans two lines.])
650 AT_CHECK_DEFINES([[#define foo one
656 ## ------------------------ ##
657 ## datarootdir workaround. ##
658 ## ------------------------ ##
660 AT_SETUP([datarootdir workaround])
674 AT_DATA([configure.ac],
676 d@&t@nl The following line silences the warnings, if uncommented:
677 d@&t@nl AC_DEFUN([AC_DATAROOTDIR_CHECKED])
678 AC_CONFIG_AUX_DIR($top_srcdir/config)
680 # This substitution is wrong and bogus! Don't use it in your own code!
681 # Read `info Autoconf "Defining Directories"'!
682 AC_SUBST([mydatadir], [${datadir}/my])
684 AC_CONFIG_FILES([Foo Bar])
689 AT_CHECK_CONFIGURE([], [], [],
690 [config.status: WARNING: Foo.in seems to ignore the --datarootdir setting
691 config.status: WARNING: Bar contains a reference to the variable `datarootdir'
692 which seems to be undefined. Please make sure it is defined.
694 AT_CHECK([grep datarootdir Foo], 1, [])
697 sed '/AC_DEFUN/s/^d@&t@nl //' configure.ac >t
717 AT_DATA([configure.ac],
720 AC_CONFIG_FILES([foo at-dir/bar])
722 AC_CONFIG_COMMANDS([report],
723 [test -f $srcdir/configure.ac ||
724 AC_MSG_ERROR([cannot find $srcdir/configure.ac])],
728 rm -f -r foo at-dir/bar
734 AT_CHECK([./configure], [], [ignore])
737 AT_CHECK([cd at-dir && ../configure], [], [ignore])
741 AT_CHECK([cd at-dir && "$at_here/configure"], [], [ignore])
746 ## ----------------- ##
747 ## Signal handling. ##
748 ## ----------------- ##
750 AT_SETUP([Signal handling])
752 AT_DATA([configure.ac],
759 AT_CHECK_CONFIGURE([], 1, ignore, ignore)
765 AT_BANNER([autoreconf.])
767 ## ---------------------------- ##
768 ## Configuring subdirectories. ##
769 ## ---------------------------- ##
774 # | |-- config.status
777 # | |-- config.status
789 AT_SETUP([Configuring subdirectories])
790 AT_KEYWORDS(autoreconf)
792 # We use aclocal (via autoreconf).
793 AT_CHECK([aclocal --version || exit 77], [], [stdout], [ignore])
794 # It should understand configure.ac.
795 AT_CHECK([[grep '1.[01234]' stdout && exit 77]], [1], [ignore])
797 # Set CONFIG_SITE to a nonexistent file, so that there are
798 # no worries about nonstandard values for 'prefix'.
799 CONFIG_SITE=no-such-file
802 # The contents of `inner/', and `inner/innermost/'.
803 AS_MKDIR_P([inner/innermost])
805 # We have to use configure.in, not configure.ac, if we still want to
806 # be compatible with Automake 1.4: aclocal (run by autoreconf) would
807 # die because it can't find configure.in.
808 AT_DATA([inner/configure.in],
809 [[AC_INIT(GNU Inner, 1.0)
810 AC_CONFIG_SRCDIR([innermost/config.in])
811 AC_ARG_VAR([INNER], [an inner variable])
813 if test "x$INNER" = x; then
816 AC_CONFIG_FILES([innermost/config])
820 AT_DATA([inner/innermost/config.in],
823 top_srcdir=@top_srcdir@
827 # The contents of `.'
828 AT_DATA([install-sh], [])
830 # nonexistent is allowed not to exist.
831 AT_DATA([configure.in],
832 [[AC_INIT(GNU Outer, 1.0)
833 AC_ARG_VAR([OUTER], [an outer variable])
835 AC_CONFIG_SUBDIRS([nonexistent])
837 AC_CONFIG_SUBDIRS([inner])
841 # If there are improperly quoted AC_DEFUN installed in share/aclocal,
842 # they trigger warnings from aclocal 1.8, so ignore stderr.
843 AT_CHECK([autoreconf], [], [], [ignore])
844 AT_CHECK([test -f inner/configure])
846 # Running the outer configure recursively should provide the innermost
848 AT_CHECK([./configure --help=recursive | grep INNER], 0, [ignore])
850 # Running the outer configure should trigger the inner.
852 AT_CHECK([cat inner/innermost/config], 0,
859 # The same, but from a builddir.
860 AS_MKDIR_P([builddir])
861 AT_CHECK([cd builddir && ../configure], 0, [ignore])
862 AT_CHECK([cat builddir/inner/innermost/config], 0,
864 srcdir=../../../inner/innermost
865 top_srcdir=../../../inner
869 # Make sure precious variables and command line options are properly
870 # passed, even when there are duplicates.
871 AT_CHECK([cd builddir && ../configure --prefix /bad --prefix /good INNER=bad INNER=good], 0, [ignore])
872 AT_CHECK([cat builddir/inner/innermost/config], 0,
874 srcdir=../../../inner/innermost
875 top_srcdir=../../../inner
879 # Make sure we can run autoreconf on a subdirectory
880 rm -f configure configure.in
881 AT_CHECK([autoreconf inner], [], [], [ignore])
883 # Make sure we can pass a configure.ac name
884 AT_CHECK([cd inner && autoreconf configure.in], [], [], [ignore])
885 AT_CHECK([autoreconf inner/configure.in], [], [], [ignore])
895 AT_SETUP([Deep Package])
896 AT_KEYWORDS(autoreconf)
898 # We use aclocal (via autoreconf).
899 AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore])
901 # The contents of `.'
902 AT_DATA([install-sh], [])
903 AT_DATA([configure.in],
904 [[AC_INIT(GNU Outer, 1.0)
905 AC_ARG_VAR([OUTER], [an outer variable])
906 AC_CONFIG_SUBDIRS([inner])
910 # The contents of `inner/', and `inner/innermost/'.
911 AS_MKDIR_P([inner/innermost])
913 AT_DATA([inner/configure.in],
914 [[AC_INIT(GNU Inner, 1.0)
915 AC_ARG_VAR([INNER], [an inner variable])
916 AC_CONFIG_SUBDIRS(innermost)
920 AT_DATA([inner/innermost/configure.in],
921 [[AC_INIT(GNU Innermost, 1.0)
922 AC_ARG_VAR([INNERMOST], [an innermost variable])
923 AC_CONFIG_HEADERS(config.h:config.hin)
924 AC_DEFINE_UNQUOTED([INNERMOST], [$INNERMOST], [an innermost variable])
928 AT_CHECK([autoreconf -Wall -v], [0], [ignore], [ignore])
929 AT_CHECK([test -f inner/configure])
930 AT_CHECK([test -f inner/innermost/configure])
931 AT_CHECK([test -f inner/innermost/config.hin])
933 # Running the outer configure recursively should provide the innermost
935 AT_CHECK([./configure --help=recursive | grep " INNER "], 0, [ignore])
936 AT_CHECK([./configure --help=recursive | grep " INNERMOST "], 0, [ignore])
938 # Running the outer configure should trigger the inner.
939 AT_CHECK_CONFIGURE([INNERMOST=tsomrenni])
940 AT_CHECK([grep INNERMOST inner/innermost/config.h], 0,
941 [[#define INNERMOST tsomrenni
944 # The same, but from a builddir.
945 AS_MKDIR_P([builddir])
946 AT_CHECK([cd builddir && ../configure INNERMOST=build/tsomrenni], 0, [ignore])
947 AT_CHECK([grep INNERMOST builddir/inner/innermost/config.h], 0,
948 [[#define INNERMOST build/tsomrenni
955 ## -------------------------------- ##
956 ## Non-Autoconf AC_CONFIG_SUBDIRS. ##
957 ## -------------------------------- ##
959 AT_SETUP([Non-Autoconf AC_CONFIG_SUBDIRS])
960 AT_KEYWORDS([autoreconf])
962 # We use aclocal (via autoreconf).
963 AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore])
965 AT_DATA([install-sh], [])
966 AT_DATA([configure.in],
967 [[AC_INIT(GNU Outer, 1.0)
968 AC_CONFIG_SUBDIRS([inner])
974 AT_DATA([inner/configure],
977 *--help*) echo 'No Autoconf here, folks!' ;;
978 *) echo got_it >myfile ;;
982 chmod +x inner/configure
984 AT_CHECK([autoreconf -Wall -v], 0, [ignore], [ignore])
986 # Running the outer configure recursively should provide the innermost
988 AT_CHECK([./configure --help=recursive | grep "folks"], 0, [ignore])
990 # Running the outer configure should trigger the inner.
991 AT_CHECK([./configure], 0, [ignore])
992 AT_CHECK([test -f inner/myfile], 0)
998 ## ----------------- ##
999 ## Empty directory. ##
1000 ## ----------------- ##
1002 AT_SETUP([Empty directory])
1003 AT_KEYWORDS([autoreconf])
1005 # We use aclocal (via autoreconf).
1006 AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore])
1008 # The test group directory is not necessarily _empty_, but it does not contain
1009 # files meaningful to `autoreconf'.
1011 AT_CHECK([autoreconf -Wall -v], 1, [ignore], [ignore])
1017 ## ------------------------------ ##
1018 ## Unusual Automake input files. ##
1019 ## ------------------------------ ##
1021 # This parallels gnumake.test in Automake.
1023 AT_SETUP([Unusual Automake input files])
1024 AT_KEYWORDS([autoreconf])
1026 # We use aclocal and automake via autoreconf.
1027 AT_CHECK([automake --version || exit 77], [], [ignore], [ignore])
1029 AT_DATA([configure.in],
1030 [[AC_INIT(GNU foo, 1.0)
1032 AC_CONFIG_FILES([HeeHee])
1036 AT_DATA([HeeHee.am],
1037 [[# Humans do no worse than `GNUmakefile.am'.
1038 AUTOMAKE_OPTIONS = foreign 1.8
1041 AT_CHECK([autoreconf -Wall -v -i], 0, [ignore], [stderr],
1042 [AT_CHECK([grep 'require.*1\.8' stderr && exit 77], [1])])
1043 AT_CHECK([test -f HeeHee.in])