autoconf
[Top][All Lists]
Advanced

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

Re: c99


From: vishnu
Subject: Re: c99
Date: Wed, 17 Oct 2001 22:55:44 -0700
User-agent: Mutt/1.3.20i

On Sun, Oct 14, 2001 at 08:14:11PM +0200, Guido Draheim wrote:
> address@hidden wrote:
> > {..}
> > Is this stylistically acceptable?
> 
> *fg* oh well, speaking about style is (of course) a matter of taste
> and then a matter of whose taste it shall please. For a macro that
> you want to reuse in your own projects, yes looks good. 
> 
> Speaking as a maintainer of the (gnu) ac-archive, I would add just 
> some optional hints:
> * calling the macro TEST_C99 is not quite correct as you only test
>   one specific feature - so it would be good to call the macro as
>   just that, e.g. TEST_C99_FOR_BLOCK or whatever you like to call it.
>   Just see how many STL&C++template checks we currently have at the
>   ac-archive.. compilers might implement C99 features just partially.

Fixed.

> * tune your (internal and) exported variables, possibly just make them
>   longer so they do not accidently trap those of other macros, atleast
>   ensure to give a hint where a variable might have come from that another
>   macro might start to go and use - $C99 is probably not the best one.

Fixed.

> * you call a compile-test, even twice, and it looks as if this is a
>   case that can be turned into a macro using an AC_CACHE_CHECK value.
>   That's especially good during creation of configure-scrips as the
>   test can be run with a good cache-file that holds some answers
>   premade, and there is a good benefit in overly large projects that 
>   might be able to share a answer-file - and speed up their configure
>   time dramatically. 
> * Personally, I'd prefer the cache_val to contain the needed answer
>   of the test - well, I'd see the needed clfag -std=gnu99 as the answer.
> * in a highgrade extension, consider to add an ACTION-IF, ACTION-IF-NOT, 
>   ACTION-WITH-CFLAG triple along with an ifelse() that puts in default
>   actions like adding the needed cflag to CFLAGS. But that might be
>   overdone for what you need - it would just serve you in learning 
>   decent tricks one can do to make an autoconf-macro even more reusable ;-)

i can't figure this out right now.  :-)

> * anyway, I'd really like to have this macro in the ac-archive for
>   others to reuse (and let it be tested for you ;-)) ... just read the
>   small hints about the small extras that are needed to have it registered:
>   http://ac-archive.sourceforge.net/#formatting

Attached.  Enjoy.

-- 
Victory to the Divine Mother!!   ... after all, why compete?
  http://sahajayoga.org                http://why-compete.org

Attachment: acinclude.m4
Description: Text document


reply via email to

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