On Tue, 2009-08-11 at 15:04 +0200, Jakub Hrozek wrote:
4) In general (this is maybe question also for the others not a review
item), is there a reason for passing the macros containing
configure-time variables as -DMACRO instead of using
AC_DEFINE_UNQUOTED
and pulling them out of config.h? Is is just a matter of style?
Replying to this separately.
The problem with AC_DEFINE_UNQUOTED is that it will resolve only simple
variables. If you have variables defined in terms of other variables you
won't get them recursively resolved. Passing them as -DMACRO resolves
them.
Ex:
bar=/baz
foo=${bar}/bazx
foox=${foo}/bazxy
if you use AC_DEFINE_UNQUOTED, foox will be: ${bar}/bazx/baxzy instead
of /baz/bazx/bazxy as you want.
Simo.