dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.18 2003/07/01 15:06:36 sam Exp $
+dnl $Id: configure.ac,v 1.19 2003/07/01 17:14:58 sam Exp $
AC_INIT(vlc,0.6.0)
AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
fi
+dnl Check for __attribute__(())
+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;],
+ [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
* codecs.h: codec related structures needed by the demuxers and decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: codecs.h,v 1.3 2002/12/03 17:00:15 fenrir Exp $
+ * $Id: codecs.h,v 1.4 2003/07/01 17:14:58 sam Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
#ifndef _WAVEFORMATEX_
#define _WAVEFORMATEX_
-typedef struct __attribute__((__packed__)) _WAVEFORMATEX {
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+_WAVEFORMATEX {
uint16_t wFormatTag;
uint16_t nChannels;
uint32_t nSamplesPerSec;
#if !defined(_BITMAPINFOHEADER_) && !defined(WIN32)
#define _BITMAPINFOHEADER_
-typedef struct __attribute__((__packed__))
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
{
uint32_t biSize;
uint32_t biWidth;
* ogg.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: ogg.c,v 1.7 2003/06/29 20:58:16 gbazin Exp $
+ * $Id: ogg.c,v 1.8 2003/07/01 17:14:58 sam Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
#define PACKET_IS_SYNCPOINT 0x08
-typedef struct __attribute__((__packed__))
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
{
int32_t i_width;
int32_t i_height;
} ogg_stream_header_video_t;
-typedef struct __attribute__((__packed__))
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
{
int16_t i_channels;
int16_t i_block_align;
int32_t i_avgbytespersec;
} ogg_stream_header_audio_t;
-typedef struct __attribute__((__packed__))
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
{
uint8_t i_packet_type;