Limit gcc_struct checking to win32 builds.

I guess -Werror isn't used when doing compile checks.
This commit is contained in:
Bill Currie 2014-02-03 16:55:09 +09:00
parent 3fb9fb9373
commit 512514ca23

View file

@ -53,15 +53,17 @@ AH_VERBATIM([HAVE___ATTRIBUTE__VISIBILITY],
# define VISIBLE
#endif])
AC_MSG_CHECKING(for __attribute__ ((gcc_struct)))
AC_TRY_COMPILE(
[void foo (void);
typedef struct { int foo; } __attribute__ ((gcc_struct)) gcc_struct_test;],
[],
AC_DEFINE(HAVE___ATTRIBUTE__GCC_STRUCT)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
if test "x$SYSTYPE" = "xWIN32"; then
AC_MSG_CHECKING(for __attribute__ ((gcc_struct)))
AC_TRY_COMPILE(
[typedef struct { int foo; }
__attribute__ ((gcc_struct)) gcc_struct_test;],
[],
AC_DEFINE(HAVE___ATTRIBUTE__GCC_STRUCT)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
fi
AH_VERBATIM([HAVE___ATTRIBUTE__GCC_STRUCT],
[/* Define this if the GCC gcc_struct __attribute__ is available */
#undef HAVE___ATTRIBUTE__GCC_STRUCT