On Wed, 2011-12-07 at 21:10 -0800, Alan Coopersmith wrote:

> On 12/07/11 10:39, Gaetan Nadon wrote:
> > DATADIR, like any installation variable, is not known at configure time.
> > This is by design to allow setting the variable at make time.
> > The AX_DEFINE_DIR macro worked around this design and consequently
> > cancelled an Automake feature.
> >
> > The alternative method suggested by Automake ends up being simpler
> > while providing the same result as AX_DEFINE_DIR but without cancelling
> > any feature. It is used in the xserver for the parser and in xquartz.
> >
> > The AX_DEFINE_DIR macro has been removed from the Autoconf Archive.
> > There are no official providers for this macro anymore.
> 
> Before automake 1.11 doing this would have contributed a lot of noise to
> the build logs, but silent mode should cover this.

Many -Ds would be noisy and could overflow command limits in some cases.

> 
> For simple cases like this it seems okay - in cases where we were
> exporting the definition in a .h file a more complex solution may
> be required.

There is another Automake proposed alternative:

        Alternatively, create a dedicated header file: 
        
        DISTCLEANFILES = myprog-paths.h
                  myprog-paths.h: Makefile
                          echo '#define DATADIR "$(datadir)"' >$@
        
> 
> One nit/question, should it be CPPFLAGS instead of CFLAGS?
> 
> 

See patch v2

Thanks.

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to