[vlc-devel] [PATCH 4/6] configure: use attributes.m4 to check for attribute aligned
Rémi Denis-Courmont
remi at remlab.net
Sun Feb 26 20:34:06 CET 2017
Le sunnuntaina 26. helmikuuta 2017, 20.13.14 EET Filip Roséen a écrit :
> ---
> configure.ac | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index fee531f6dd..47e6e204d0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1109,17 +1109,13 @@ AM_ATTRIBUTE_FN_COND_DEFINE([noinline],
> [HAVE_ATTRIBUTE_NOINLINE]) AM_ATTRIBUTE_STRUCT_COND_DEFINE([packed],
> [HAVE_ATTRIBUTE_PACKED])
>
> dnl Checks for __attribute__(aligned()) directive
> -VLC_SAVE_FLAGS
> -CFLAGS="${CFLAGS} -Werror"
> AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
> [ac_cv_c_attribute_aligned],
> [ac_cv_c_attribute_aligned=0
> for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
> - AC_TRY_COMPILE([],
> - [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try})))
> = 0; return c;], +
> AM_ATTRIBUTE_STRUCT_IFELSE([aligned(${ac_cv_c_attr_align_try})],
> [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
> done])
> -VLC_RESTORE_FLAGS
> if test "${ac_cv_c_attribute_aligned}" != "0"; then
> AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
> [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
Why bother? You can use the standard syntax instead.
--
雷米‧德尼-库尔蒙
https://www.remlab.net/
More information about the vlc-devel
mailing list