[vlc-devel] [PATCH 3/6] configure: use attributes.m4 to check for attribute packed
Filip Roséen
filip at atch.se
Sun Feb 26 20:13:13 CET 2017
---
configure.ac | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index c2af1bd93e..fee531f6dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1106,6 +1106,7 @@ AM_ATTRIBUTE_FN_COND_DEFINE([unused], [HAVE_ATTRIBUTE_UNUSED])
AM_ATTRIBUTE_FN_COND_DEFINE([error("")], [HAVE_ATTRIBUTE_ERROR])
AM_ATTRIBUTE_FN_COND_DEFINE([warning("")], [HAVE_ATTRIBUTE_WARNING])
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
@@ -1124,16 +1125,6 @@ if test "${ac_cv_c_attribute_aligned}" != "0"; then
[${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
fi
-dnl Check for __attribute__((packed))
-AC_CACHE_CHECK([for __attribute__((packed))],
- [ac_cv_c_attribute_packed],
- [ac_cv_c_attribute_packed=no
- AC_TRY_COMPILE(, [struct __attribute__((__packed__)) foo { int a; } b; (void)b;],
- [ac_cv_c_attribute_packed=yes])])
-if test "${ac_cv_c_attribute_packed}" != "no"; then
- AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
-fi
-
dnl
dnl Check the CPU
dnl
--
2.11.1
More information about the vlc-devel
mailing list