1 dnl ---------------------------------------------------------------------------
2 dnl Macro: PROTOCOL_BINARY_TEST
3 dnl ---------------------------------------------------------------------------
5 AC_DEFUN([PROTOCOL_BINARY_TEST], [
7 AC_CACHE_CHECK([for supported struct padding], [ac_cv_supported_struct_padding], [
8 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
9 [ #include <inttypes.h>
10 #include "libmemcached/memcached/protocol_binary.h"
11 ], [ protocol_binary_request_set request;
15 case sizeof(request.bytes):
21 [ ac_cv_supported_struct_padding=no ],
22 [ ac_cv_supported_struct_padding=yes ])
25 AS_IF([test "x$ac_cv_supported_struct_padding" = "xno"],[ AC_MSG_ERROR([Unsupported struct padding done by compiler.])])
28 dnl ---------------------------------------------------------------------------
29 dnl End Macro: PROTOCOL_BINARY_TEST
30 dnl ---------------------------------------------------------------------------