Add configure.ac check for static_assert

Part of C11, defined via assert.h.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Tested-by: Baruch Siach <baruch@tkos.co.il>
This commit is contained in:
Peter Hutterer 2016-05-16 11:33:38 +10:00
parent 1c276f7f4a
commit 50a86cceb4

View file

@ -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 <time.h>]])
AC_CHECK_DECL(static_assert, [],
[AC_DEFINE(static_assert(...), [/* */], [noop static_assert() replacement]),
AC_MSG_RESULT([no])],
[[#include <assert.h>]])
PKG_PROG_PKG_CONFIG()
PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0])