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

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

Re: Patches for implementing checking for valid CFLAGS, LDFLAGS, etc.


From: Maarten Bosmans
Subject: Re: Patches for implementing checking for valid CFLAGS, LDFLAGS, etc.
Date: Tue, 28 Jun 2011 14:44:07 +0200

2011/6/28 Peter Simons <address@hidden>:
>  >> If at all possible, there should be just one macro per m4 file.
>  >
>  > OK, that sounds reasonable. I'm OK with the current situation though,
>  > but if anyone wants to extract the AX_APPEND_* macros to a new file,
>  > feel free. Note that the AX_APPEND_{COMPILE,LINK}_FLAGS macros depend
>  > on both AX_APPEND_FLAG and the respective AX_CHECK_*_FLAG macros.
>
> Can I ask you a favor? Could you please make that change? Splitting
> those macros in separate files is not a mechanical procedure, because
> the documentation needs to be adapted as well, etc. If would really be
> way easier if you could do that, instead of someone else doing it.

Well, OK then. I suppose it is best to work out the division of macros
across files before a release is made and we have to do the extra work
of marking them obsolete, etc.

So we have macro dependencies:
AX_APPEND_COMPILE_FLAGS => AX_APPEND_FLAG, AX_CHECK_COMPILE_FLAG
AX_APPEND_LINK_FLAGS => AX_APPEND_FLAG, AX_CHECK_LINK_FLAG

Which distribution of macros over fiels would then be better?
ax_check_preproc_flag.m4: AX_CHECK_PREPROC_FLAG, AX_APPEND_COMPILE_FLAGS
ax_check_compile_flag.m4: AX_CHECK_COMPILE_FLAG, AX_APPEND_LINK_FLAGS
ax_check_link_flag.m4: AX_CHECK_LINK_FLAG
ax_append_flag.m4: AX_APPEND_FLAG

or:
ax_check_preproc_flag.m4: AX_CHECK_PREPROC_FLAG
ax_check_compile_flag.m4: AX_CHECK_COMPILE_FLAG
ax_check_link_flag.m4: AX_CHECK_LINK_FLAG
ax_append_flag.m4: AX_APPEND_FLAG, AX_APPEND_COMPILE_FLAGS, AX_APPEND_LINK_FLAGS

or:
ax_check_flag.m4: AX_CHECK_PREPROC_FLAG,  AX_CHECK_COMPILE_FLAG,
AX_CHECK_LINK_FLAG
ax_append_flag.m4: AX_APPEND_FLAG
ax_append_flags.m4: AX_APPEND_COMPILE_FLAGS, AX_APPEND_LINK_FLAGS


>  > About the snippet you added to NEWS: [...] The macro is not called
>  > AX_CHECK_FLAG, that is the name of the file that contains
>  > AX_CHECK_COMPILE_FLAG and others.
>
> Right, my mistake. Thank you for catching that! I've committed a new
> entry in 1eb1f849 that should improve the situation.

Sorry to nitpick: AX_CFLAGS_GCC_OPTION is still in there.
I'll include that in the patch for the file splitting.

> Take care,
> Peter

Any suggestions on how to consolidate the
AX_CFLAGS_{AIX,GCC,HPUX,IRIX,SUN}_OPTION macros? It seems not very
useful that the use has to decide on a particular compiler family
upfront in configure.ac, that should be autodetected.
May be the approach from AX_CFLAGS_WARN_ALL can be used to autodetect
the flags to return an error for an invalid flag? Has anyone got any
experience with this?

Maarten



reply via email to

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