Merge.
[awesomized/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 <inttypes.h>
11 #include "libmemcached/memcached/protocol_binary.h"
12 ]],[[
13 protocol_binary_request_set request;
14 if (sizeof(request) != sizeof(request.bytes)) {
15 return 1;
16 }
17 ]])],, AC_MSG_ERROR([Unsupported struct padding done by compiler.]))
18 CFLAGS="$save_CFLAGS"
19 AC_LANG_POP
20 ])
21
22 dnl ---------------------------------------------------------------------------
23 dnl End Macro: PROTOCOL_BINARY_TEST
24 dnl ---------------------------------------------------------------------------