summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-08 14:44:39 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-08 14:44:39 +0200
commit8c9600879334ce68a72cb1f8de7e6bd156a4b2f2 (patch)
tree55dc396cd14d6826b3b60cc78bd8e87283404641 /configure.ac
parent29bd17729dd74080e0070f09654690200c1e11ae (diff)
add check to see if CC supports '_Static_assert'
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c57a56f9f..3b3c9cbe9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -691,6 +691,14 @@ AC_RUN_IFELSE(
AC_LANG_POP(C)
]) # $build = $target
+AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+ [[int main() {
+ _Static_assert(sizeof(int) >= 4, "not big enough");
+ return 0;
+ };]])],
+ [AC_DEFINE([HAVE_STATIC_ASSERT],[1],[Static assertions supported])],
+ [AC_DEFINE([HAVE_STATIC_ASSERT],[0],[Static assertions not supported])])
+
# check for bluetooth library
bluetooth=0
AC_MSG_CHECKING(for libbluetooth)