Merge from trunk.
[m6w6/libmemcached] / m4 / protocol_binary.m4
1 dnl ---------------------------------------------------------------------------
2 dnl Macro: PROTOCOL_BINARY_TEST
3 dnl ---------------------------------------------------------------------------
4 AC_DEFUN([PROTOCOL_BINARY_TEST],
5 [AC_LANG_PUSH([C])
6 save_CFLAGS="$CFLAGS"
7 CFLAGS="$CFLAGS -I${srcdir}"
8 AC_RUN_IFELSE([
9 AC_LANG_PROGRAM([[
10 #include "libmemcached/memcached/protocol_binary.h"
11 ]],[[
12 protocol_binary_request_set request;
13 if (sizeof(request) != sizeof(request.bytes)) {
14 return 1;
15 }
16 ]])],, AC_MSG_ERROR([Unsupported struct padding done by compiler.]))
17 CFLAGS="$save_CFLAGS"
18 AC_LANG_POP
19 ])
20
21 dnl ---------------------------------------------------------------------------
22 dnl End Macro: PROTOCOL_BINARY_TEST
23 dnl ---------------------------------------------------------------------------