[sysprof] build: check for recent GCC with stdatomic.h
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] build: check for recent GCC with stdatomic.h
- Date: Tue, 23 Aug 2016 23:11:21 +0000 (UTC)
commit 55b374b8be0b53d6ee7243901dce851abae9fc61
Author: Christian Hergert <chergert redhat com>
Date: Tue Aug 23 16:11:14 2016 -0700
build: check for recent GCC with stdatomic.h
configure.ac | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a455bfe..ca79143 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,6 +99,16 @@ AX_CHECK_COMPILE_FLAG([-std=gnu11],
dnl ***********************************************************************
+dnl GCC 4.8 supports gnu11, but lacked the stdatomic.h headers.
+dnl ***********************************************************************
+AC_MSG_CHECKING([whether C compiler supports stdatomic.h])
+AC_TRY_LINK([#include <stdatomic.h>],
+ [atomic_thread_fence(memory_order_acquire);atomic_thread_fence(memory_order_seq_cst);],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_ERROR([Sysprof requires a C compiler with stdatomic support such as GCC 4.9 or newer])])
+
+
+dnl ***********************************************************************
dnl Check for required packages
dnl ***********************************************************************
m4_define([glib_required_version], [2.44.0])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]