with this little bit of code: $ cat common.m4 AC_DEFUN([SIM_AC_COMMON],[ AC_PROG_CC AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h) ])
$ cat configure.ac sinclude(common.m4) AC_INIT(Makefile.in) SIM_AC_COMMON running autoconf (2.64 and 2.68) results in the warnings: $ autoconf configure.ac:3: warning: AC_REQUIRE: `AC_PROG_CC' was expanded before it was required ../../lib/autoconf/c.m4:433: AC_LANG_COMPILER(C) is expanded from... ../../lib/autoconf/lang.m4:315: AC_LANG_COMPILER_REQUIRE is expanded from... ../../lib/autoconf/general.m4:2593: AC_COMPILE_IFELSE is expanded from... ../../lib/m4sugar/m4sh.m4:620: AS_IF is expanded from... ../../lib/m4sugar/m4sh.m4:368: AS_REQUIRE is expanded from... ../../lib/autoconf/general.m4:204: AC_REQUIRE_SHELL_FN is expanded from... ../../lib/autoconf/headers.m4:151: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:89: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:588: AS_FOR is expanded from... ../../lib/autoconf/headers.m4:265: AC_CHECK_HEADERS is expanded from... common.m4:1: SIM_AC_COMMON is expanded from... configure.ac:3: the top level this seems odd to me ... why would autoconf care if a macro is expanded before something requires it ? guessing it's a bug because when i pull just AC_PROG_CC out of "SIM_AC_COMMON" and inline it before the call, autoconf doesnt warn: $ cat configure.ac sinclude(common.m4) AC_INIT(Makefile.in) AC_PROG_CC SIM_AC_COMMON -mike
signature.asc
Description: This is a digitally signed message part.