ac-archive-maintainers
[Top][All Lists]
Advanced

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

Re: new submission: AX_CONFIG_PREFIXED_HEADER


From: Guido Draheim
Subject: Re: new submission: AX_CONFIG_PREFIXED_HEADER
Date: Sun, 08 Aug 2004 20:39:00 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313



Matto Marjanovic wrote:
Hiya,

Appended is my submission for a new pair of macros:

    AX_CONFIG_PREFIXED_HEADER(OUTPUT, PREFIX, INPUT)
    AX_PREFIXED_DEFINE(PREFIX, SYMBOL)

 for release under the "GPLv2 with Autoconf exception" license.

These were inspired by the AX_PREFIX_CONFIG_H macro to solve the
same basic problem: create an installable version of the generated "config.h" header by prefixing the defined symbols with a PREFIX.

However, instead of copying/prefixing the *entire* input header file,
 this new pair of macros allows the developer to select exactly which
 symbols she needs in the installable header file.  AX_PREFIXED_DEFINE
 is used to schedule a SYMBOL (which should already have a corresponding
 AC_DEFINE) for prefixing with PREFIX.  AX_CONFIG_PREFIXED_HEADER
 specifies that the OUTPUT header is generated from the INPUT header
 using all the symbols scheduled under PREFIX.

It's nice because it creates an installable config header with only
 the symbols one absolutely needs (and none of the extraneous cruft
 which may be broken anyhow).

The macros currently have no defaults for the parameters; each parameter
 is required.  I'm happy to take suggestions for how to improve this,
 or pointers to examples of the right way to do this, or anything else
 in the macros.  (This is my first autoconf macro, and I must admit I'd
 like to take a break from pouring over m4 source code for a while.)


Hi Matt,

great idea, and indeed some people were not all too happy with the
prefix_config_h macro to export all symbols which effectivly means to
export some implementation detail to the user. Since you do check all
exported symbols explicitly, I'd like to remind of two things:
(a) there is need for self-defining macros like AC_*_OFF_T and those
     AC_*_SIZE_T which will define off_t/size_t if not already in the system.
     For the prefixed variant we need to define the default if the original
     macro did tell to not be defined (!!) #define my_size_t size_t
     - may be you could invent a companion prefixed_self_define hint.
(b) the PREFIX runs up twice, and uneccessarily. Better leave the PREFIX
    as a secondary optional argument. Moreover it would be nice to have
    a loop-exporter prefix_defines(list of names), to make things easier.

Just hints though, great work for what you call "first ac macro ever"!! :-)))
-- cheers, guido








reply via email to

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