From 50a86cceb44c626ff137fbc1826e49b9e5cdd047 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 16 May 2016 11:33:38 +1000 Subject: [PATCH] Add configure.ac check for static_assert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of C11, defined via assert.h. Signed-off-by: Peter Hutterer Reviewed-by: Jonas Ã…dahl Tested-by: Baruch Siach --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 8ddc3b6e..8c14efe6 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,10 @@ AC_CHECK_DECL(TFD_CLOEXEC,[], AC_CHECK_DECL(CLOCK_MONOTONIC,[], [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile libinput")], [[#include ]]) +AC_CHECK_DECL(static_assert, [], + [AC_DEFINE(static_assert(...), [/* */], [noop static_assert() replacement]), + AC_MSG_RESULT([no])], + [[#include ]]) PKG_PROG_PKG_CONFIG() PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0])