[PATCH app-xfd] Use the Automake recommended alternative to AX_DEFINE_DIR

Gaetan Nadon memsize at videotron.ca
Thu Dec 8 05:36:09 PST 2011


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20111208/5bd9683a/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20111208/5bd9683a/attachment-0001.pgp>


More information about the xorg-devel mailing list