bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib update broke clisp


From: Eric Blake
Subject: Re: gnulib update broke clisp
Date: Thu, 15 Jan 2009 18:09:21 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.5.666

-----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             address@hidden
-----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-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]