ax_gcc_var_attribute

Synopsis

AX_GCC_VAR_ATTRIBUTE(ATTRIBUTE)

Description

This macro checks if the compiler supports one of GCC’s variable
attributes; many other compilers also provide variable attributes with the
same syntax. Compiler warnings are used to detect supported attributes as
unsupported ones are ignored by default so quieting warnings when using this
macro will yield false positives.

The ATTRIBUTE parameter holds the name of the attribute to be checked.

If ATTRIBUTE is supported define HAVE_VAR_ATTRIBUTE_<ATTRIBUTE>.

The macro caches its result in the
ax_cv_have_var_attribute_<attribute> variable.

Unsuppored variable attributes will be tested against a global integer
variable and without any arguments given to the attribute itself; the result
of this check might be wrong or meaningless so use with care.

Source Code

License

Copying and distribution of this file, with or without modification, are
permitted in any medium without royalty provided the copyright notice and
this notice are preserved. This file is offered as-is, without any warranty.