summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-09 15:16:17 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-09 15:16:17 +0200
commitc99cd9519a56b2d7c60fa30e9fecd02f08336671 (patch)
treed897b2e3e31a2386a16dc6b5f4c3500ac66f601f /m4
parented72565137c93ab0385a10036d234f5f4dd1b960 (diff)
downloadxine-lib-c99cd9519a56b2d7c60fa30e9fecd02f08336671.tar.gz
xine-lib-c99cd9519a56b2d7c60fa30e9fecd02f08336671.tar.bz2
Cleanup handling of packed attribute.
- Add a configure test for the attribute, during xine build process. - Define the attribute as supported when using GCC 2.95 or later outside xine build process. - Use the new XINE_PACKED define instead of the attribute directly. - Check for SUPPORT_ATTRIBUTE_PACKED rather than doing strange subdefines.
Diffstat (limited to 'm4')
-rw-r--r--m4/attributes.m48
1 files changed, 8 insertions, 0 deletions
diff --git a/m4/attributes.m4 b/m4/attributes.m4
index 393ee0ba7..bb53cca41 100644
--- a/m4/attributes.m4
+++ b/m4/attributes.m4
@@ -166,6 +166,14 @@ AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
[$2])
])
+AC_DEFUN([CC_ATTRIBUTE_PACKED], [
+ CC_CHECK_ATTRIBUTE(
+ [packed], ,
+ [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));],
+ [$1],
+ [$2])
+])
+
AC_DEFUN([CC_FLAG_VISIBILITY], [
AC_REQUIRE([CC_CHECK_WERROR])
ac_save_CFLAGS="$CFLAGS"