Re: Dynamically creating output variables.

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

 



Hello Craig,

Let's keep the list in the game, please.

* Craig Sanders wrote on Wed, Jan 16, 2008 at 02:06:23PM CET:
> 
> Thankyou for your response. I envisage that the set of keys will be
> known and fixed prior to the point in time at which autoconf will be
> run. So if I understand correctly what it is that you are alluding to,
> then I should be able to scan through my package's configuration file
> and extract the necessary values, which can then be passed to
> corresponding calls to AC_SUBST which have had their first argument
> hard wired. Thankyou. I didn't think of doing it that way!

You can separate the setting of variables and the announement of
AC_SUBST.  These three are all equivalent:
  AC_SUBST([var], [$value])

  var=$value
  AC_SUBST([var])

  AC_SUBST([var])
  var=$value

so if you have a set of variables known at autoconf time, you can
do the substitution announcement like this:

  m4_foreach(Varname, [var1, var2, var3, var4],
    [AC_SUBST(Varname)])

and just take care to set $var1, $var2, ..., someplace in configure.

Cheers,
Ralf


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux