autoconf-archive-maintainers | |
[Top][All Lists]
[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
- [PATCH 1/7] ax_cflags_*_option.m4: Consolidate _OLD and _NEW macros, (continued)
- [PATCH 1/7] ax_cflags_*_option.m4: Consolidate _OLD and _NEW macros, Maarten Bosmans, 2011/06/20
- [PATCH 2/7] ax_cflags_*_option.m4: Consolidate CFLAGS and CXXFLAGS macros, Maarten Bosmans, 2011/06/20
- [PATCH 4/7] ax_cflags_*_option.m4: Use AX_CHECK_COMPILE_FLAG macro to do most of the work, Maarten Bosmans, 2011/06/20
- [PATCH 5/7] ax_cflags_*_option.m4: Use AX_APPEND_FLAG macro to append the flag, Maarten Bosmans, 2011/06/20
- [PATCH 3/7] Add ax_check_flag.m4, Maarten Bosmans, 2011/06/20
- [PATCH 7/7] Implement AX_*_CHECK_FLAG on top of ax_check_flag.m4 macros, Maarten Bosmans, 2011/06/20
- [PATCH 6/7] Implement AX_CHECK_*_FLAGS on top of ax_check_flag.m4 macros, Maarten Bosmans, 2011/06/20
- Re: Patches for implementing checking for valid CFLAGS, LDFLAGS, etc., Peter Simons, 2011/06/25
- Re: Patches for implementing checking for valid CFLAGS, LDFLAGS, etc., Maarten Bosmans, 2011/06/25
- Re: Patches for implementing checking for valid CFLAGS, LDFLAGS, etc., Peter Simons, 2011/06/28
- Re: Patches for implementing checking for valid CFLAGS, LDFLAGS, etc.,
Maarten Bosmans <=
- Re: Patches for implementing checking for valid CFLAGS, LDFLAGS, etc., Peter Simons, 2011/06/30