Home | History | Annotate | only in /src/tools/compat/buildaux
History log of /src/tools/compat/buildaux
RevisionDateAuthorComments
 1.1 30-May-2023  lukem tools/compat: import AX_CHECK_COMPILE_FLAG

Import AX_CHECK_COMPILE_FLAG serial 6 from autoconf-archive
https://github.com/autoconf-archive/autoconf-archive.git
as at commit 5b5ce7f on 2023-05-01.
 1.1 20-Jul-2023  lukem tools/compat: provide nb_check_cc_flag.m4

Implement m4 macro NB_CHECK_CC_FLAG(FLAG, [VAR=FLAG_DERIVED])
Determine if the C compiler supports FLAG,
and sets output variable VAR to FLAG if FLAG is supported.

If VAR is not provided, default to FLAG_DERIVED, which is
FLAG converted to upper-case and all special characters
replaced with "_", and the result prepended with "CC_".
FLAG_DERIVED is appended to the m4 macro NB_CHECK_CC_FLAG_VARS.
E.g., if FLAG is "-Wexample=yes", FLAG_DERIVED is "CC_WEXAMPLE_YES".

This is implemented in separate buildaux/nb_check_cc_flag.m4,
based on configure's NB_CC_FLAG(), but supports VAR override.

Adapt configure from internal NB_CC_FLAG() to NB_CHECK_CC_FLAG().

(Note: AX_CHECK_COMPILE_FLAG() from autoconf-archive could be enhanced
to support the clang and gcc workarounds I've implemented here.)

RSS XML Feed