-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Sam Steingold on 1/15/2009 2:40 PM: > so you are saying that I cannot call AC_CONFIG_AUX_DIR($1) in > CL_MODULE_COMMON_CHECKS because other things required there must run > after it.
You cannot call it directly in CL_MODULE_COMMON_CHECKS, but you can AC_REQUIRE something that calls it. This is the same issue as Bruno's recently reported issue with gl_MULTIARCH. For an example fix, see: http://lists.gnu.org/archive/html/bug-gnulib/2008-12/msg00301.html but realize that although that message claims it is a bug in autoconf, later discussion on the autoconf determined that the behavior of AC_REQUIRE, albeit a bit surprising, is indeed desirable, and that the best we can hope for is a patch that warns on instances where out-of-order expansion occurs because someone directly expanded a macro A prior to requiring another macro B that in turn requires A. I'm still working on the autoconf patch to add that warning. > why can't I do > AC_REQUIRE([AC_CONFIG_AUX_DIR($1)]) > ?? Because that requires the macro literally named "AC_CONFIG_AUX_DIR(../../../src/build-aux)" with no arguments, rather than requiring the macro "AC_CONFIG_AUX_DIR" with a single argument of "../../../src/build-aux". You can, however, try: AC_REQUIRE([AC_CONFIG_AUX_DIR], [AC_CONFIG_AUX_DIR([$1])]) which states that you are requiring the macro AC_CONFIG_AUX_DIR, and if it has not yet been expanded, please invoke the expression AC_CONFIG_AUX_DIR([../../../src/build-aux]) rather than the no-argument version. But it is probably easier to understand this form of rewrite: AC_DEFUN([CL_MODULE_COMMON_CHECKS], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([my_AUX_DIR])dnl ... ]) AC_DEFUN([my_AUX_DIR], [AC_CONFIG_AUX_DIR($1)]) - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklv3kEACgkQ84KuGfSFAYA62gCeMHT2uwVNr3E9vHW8wEZr9uM9 1jsAmgI1LJj3SDzCXEyBLIm2eqRRinbW =99it -----END PGP SIGNATURE-----