diff --git a/ChangeLog b/ChangeLog index 082c8034..f854847b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-09-13 Ralf Wildenhues + Four new autoupdate tests, expected failures. + * tests/tools.at (autoupdating macros recursively) + (autoupdating with m4@&t@_pushdef, autoupdating with AC_REQUIRE) + (autoupdating with complex quoting): New tests. + Fix description of AC_CHECK_LIB regarding other deplibs. * doc/autoconf.texi (Libraries): Library linking may not fail even without missing additional libs. diff --git a/tests/tools.at b/tests/tools.at index 60349813..20a0f43b 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -890,6 +890,31 @@ AT_CHECK([[grep 'NEW(\[0, 0], *\[0])' configure.ac]], 0, [ignore], [ignore]) AT_CLEANUP +# autoupdating macros recursively +# ------------------------------- + +AT_SETUP([autoupdating macros recursively]) + +AT_XFAIL_IF([:]) + +AT_DATA([configure.ac], +[[AC_INIT +AC_PROG_CC +AC_TRY_COMPILE([], [choke me], [echo bogus1], + [AC_TRY_COMPILE([], [return 0;], [echo good], [echo bogus2])]) +AC_OUTPUT +]]) + +# Checking `autoupdate'. +AT_CHECK_AUTOUPDATE +AT_CHECK([grep changequote configure.ac], [1]) +AT_CHECK([grep TRY_COMPILE configure.ac], [1]) +AT_CHECK_AUTOCONF +AT_CHECK_CONFIGURE + +AT_CLEANUP + + # autoupdating AC_HELP_STRING # --------------------------- AT_SETUP([autoupdating AC_HELP_STRING]) @@ -944,6 +969,85 @@ AT_CHECK_CONFIGURE([], [], [], [ignore]) AT_CLEANUP +# autoupdating with m4_pushdef +# ---------------------------- +AT_SETUP([autoupdating with m4@&t@_pushdef]) + +AT_XFAIL_IF([:]) + +touch foo.in +AT_DATA([configure.ac], +[[AC_INIT +AC_PROG_CC +# temporarily override this macro +m4@&t@_pushdef([AC_MSG_RESULT_UNQUOTED], [:]) +AC_C_BIGENDIAN +m4@&t@_popdef([AC_MSG_RESULT_UNQUOTED]) +AC_OUTPUT +]]) + +# Checking `autoupdate'. +AT_CHECK_AUTOUPDATE([], [], [], [ignore]) +AT_CHECK([grep changequote configure.ac], [1]) +AT_CHECK([grep [pushdef.*AC_MSG_RESULT_UNQUOTED] configure.ac], [0], [ignore]) +AT_CHECK_AUTOCONF +AT_CHECK_CONFIGURE([], [], [], [ignore]) + +AT_CLEANUP + + +# autoupdating with AC_REQUIRE +# ---------------------------- +AT_SETUP([autoupdating with AC_REQUIRE]) + +AT_XFAIL_IF([:]) + +AT_DATA([configure.ac], +[[AC_DEFUN([MACRO], +[AC_REQUIRE([AC_DECL_SYS_SIGLIST]) +AC_CHECK_DECLS([_sys_siglist], [], [], [#include ]) +]) + +AC_INIT +MACRO +AC_OUTPUT +]]) + +# Checking `autoupdate'. +AT_CHECK_AUTOUPDATE([], [], [], [ignore]) +AT_CHECK_AUTOCONF +AT_CHECK_CONFIGURE([], [], [], [ignore]) + +AT_CLEANUP + + +# autoupdating with complex quoting +# --------------------------------- +AT_SETUP([autoupdating with complex quoting]) + +AT_XFAIL_IF([:]) + +AT_DATA([configure.ac], +[[m4_define([MACRO], +[[#define STRING "hello, world\n" +]]) + +AC_INIT +AC_TRY_COMPILE([#include + ]MACRO[], [printf (STRING);], + [], [AS_EXIT([1])]) +AC_OUTPUT +]]) + +# Checking `autoupdate'. +AT_CHECK_AUTOUPDATE([], [], [], [ignore]) +AT_CHECK_AUTOCONF +AT_CHECK([grep MACRO configure], [1]) +AT_CHECK_CONFIGURE([], [], [], [ignore]) + +AT_CLEANUP + + # autoupdating AC_LANG_SAVE # ------------------------- AT_SETUP([autoupdating AC_LANG_SAVE])