autoconf-patches
[Top][All Lists]
Advanced

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

Re: may Automake rely on _AC_SUBST_VARS?


From: Eric Blake
Subject: Re: may Automake rely on _AC_SUBST_VARS?
Date: Tue, 07 Apr 2009 21:53:00 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 4/7/2009 12:41 PM:
>> m4_define([_AC_COMPILER_EXEEXT],
>> m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
>>
>> m4_provide_if([_AM_COMPILER_EXEEXT],
>>   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])
> 
> I assume that you mean that the m4_define part should happen before
> AC_PROG_CC and the m4_provide_if part afterwards?  How would you ensure
> the former?

The m4_define part would occur in isolation at the top level, as something
that gets folded into aclocal.m4 alongside all your other
m4_define/AC_DEFUN setups.  aclocal.m4 is sourced after autoconf.m4 (so
you are guaranteed that the original _AC_COMPILER_EXEEXT that you are
trying to hook has already been defined), and before configure.ac (and
thus before any invocation of AC_INIT, let alone AC_PROG_CC).

The m4_provide_if part would be in the same place that you were originally
thinking of investigating _AC_SUBST_VARS.  And regardless of whether
AC_PROG_CC or AM_INIT_AUTOMAKE was expanded first, the fact that you
hooked _AC_COMPILER_EXEEXT should be visible.

> 
> If it works then yes, that sounds easier.  Can Automake rely on the
> existence of the _AC_COMPILER_EXEEXT macro then, and that it's this
> macro which is called whenever EXEEXT may be needed?

Whether it is _AC_COMPILER_EXEEXT or _AC_SUBST_VARS, I think that once we
have a working use in automake that we should definitely add the
documenting comment into autoconf.

- --
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

iEYEARECAAYFAkncH5wACgkQ84KuGfSFAYAFCgCg0dDjTe0zt39sGnx2aQ05jrKu
KI8An1cB78dkJqytvxtBA8E4bM6Z1mo4
=CD7O
-----END PGP SIGNATURE-----




reply via email to

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