[gnome-builder] build: bring in some autoconf-archive updates



commit d4804778021edab680646066c71387ffd13b0206
Author: Christian Hergert <chergert redhat com>
Date:   Wed Oct 7 16:20:01 2015 -0400

    build: bring in some autoconf-archive updates

 build/autotools/ax_append_flag.m4           |    4 ++--
 build/autotools/ax_cxx_compile_stdcxx_11.m4 |   13 +++++++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/build/autotools/ax_append_flag.m4 b/build/autotools/ax_append_flag.m4
index aeab899..08f2e07 100644
--- a/build/autotools/ax_append_flag.m4
+++ b/build/autotools/ax_append_flag.m4
@@ -49,7 +49,7 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 5
+#serial 6
 
 AC_DEFUN([AX_APPEND_FLAG],
 [dnl
@@ -59,7 +59,7 @@ AS_VAR_SET_IF(FLAGS,[
   AS_CASE([" AS_VAR_GET(FLAGS) "],
     [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
     [
-     AS_VAR_APPEND(FLAGS," $1")
+     AS_VAR_APPEND(FLAGS,[" $1"])
      AC_RUN_LOG([: FLAGS="$FLAGS"])
     ])
   ],
diff --git a/build/autotools/ax_cxx_compile_stdcxx_11.m4 b/build/autotools/ax_cxx_compile_stdcxx_11.m4
index 229de30..516da37 100644
--- a/build/autotools/ax_cxx_compile_stdcxx_11.m4
+++ b/build/autotools/ax_cxx_compile_stdcxx_11.m4
@@ -28,13 +28,14 @@
 #   Copyright (c) 2012 Zack Weinberg <zackw panix com>
 #   Copyright (c) 2013 Roy Stogner <roystgnr ices utexas edu>
 #   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov google com>
+#   Copyright (c) 2015 Paul Norman <penorman mac com>
 #
 #   Copying and distribution of this file, with or without modification, are
 #   permitted in any medium without royalty provided the copyright notice
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 9
+#serial 13
 
 m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
   template <typename T>
@@ -61,6 +62,8 @@ m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
 
     auto d = a;
     auto l = [](){};
+    // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable]
+    struct use_l { use_l() { l(); } };
 
     // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
     // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this
@@ -82,6 +85,9 @@ m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
             func<foo>(0);
         }
     }
+
+    // Check for C++11 attribute support
+    void noret [[noreturn]] () { throw 0; }
 ]])
 
 AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
@@ -126,7 +132,10 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
 
   m4_if([$1], [ext], [], [dnl
   if test x$ac_success = xno; then
-    for switch in -std=c++11 -std=c++0x; do
+    dnl HP's aCC needs +std=c++11 according to:
+    dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
+    dnl Cray's crayCC needs "-h std=c++11"
+    for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
       cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
       AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
                      $cachevar,


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