[gnome-builder] build: fallback counters require _GNU_SOURCE on Linux



commit 67cef47f17a04cac20f406f9fdf23422128c0848
Author: Christian Hergert <christian hergert me>
Date:   Sun May 17 22:06:46 2015 -0700

    build: fallback counters require _GNU_SOURCE on Linux
    
    We need sched_getcpu() with _GNU_SOURCE defined. I am considering simply
    using atomics for fallbacks, but this is good for now.

 configure.ac |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a476875..8f870a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,7 @@ AC_CONFIG_SRCDIR([src/main.c])
 AC_CONFIG_MACRO_DIR([build/autotools])
 AC_CONFIG_AUX_DIR([build])
 AC_SUBST(ACLOCAL_AMFLAGS, "-I build/autotools")
+AC_CANONICAL_HOST
 
 
 dnl ***********************************************************************
@@ -112,6 +113,10 @@ AC_ARG_ENABLE(rdtscp,
                      ], [enable_rdtscp=no])
              ],
               [enable_rdtscp=no])
+AS_IF([test "$enable_rdtscp" = "no"],
+      [AS_CASE(["$host"],
+              [*-*-linux*],[CFLAGS="$CFLAGS -D_GNU_SOURCE"],
+              [])])
 
 
 dnl ***********************************************************************


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]