mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
build: check for recent GCC with stdatomic.h
This commit is contained in:
10
configure.ac
10
configure.ac
@ -98,6 +98,16 @@ AX_CHECK_COMPILE_FLAG([-std=gnu11],
|
||||
[AC_MSG_ERROR([C compiler cannot compile GNU C11 code])])
|
||||
|
||||
|
||||
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 ***********************************************************************
|
||||
|
||||
Reference in New Issue
Block a user