8146995: Introduce named arguments in configure
authorihse
Thu, 14 Jan 2016 11:58:32 +0100
changeset 34923 0a2be16ce53d
parent 34922 1c2e3825546f
child 34924 9aaa30dd1b5d
8146995: Introduce named arguments in configure Reviewed-by: erikj
common/autoconf/basics.m4
common/autoconf/flags.m4
common/autoconf/generated-configure.sh
common/autoconf/toolchain.m4
--- a/common/autoconf/basics.m4	Wed Jan 13 13:56:19 2016 +0000
+++ b/common/autoconf/basics.m4	Thu Jan 14 11:58:32 2016 +0100
@@ -23,6 +23,74 @@
 # questions.
 #
 
+# Create a function/macro that takes a series of named arguments. The call is
+# similar to AC_DEFUN, but the setup of the function looks like this:
+# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
+# ... do something
+#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
+# ])
+# A star (*) in front of a named argument means that it is required and it's
+# presence will be verified. To pass e.g. the first value as a normal indexed
+# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
+# arguments are referenced in the function by their name prefixed by ARG_, e.g.
+# "ARG_FOO".
+#
+# The generated function can be called like this:
+# MYFUNC(FOO: [foo-val], BAR:
+#     [
+#         $ECHO hello world
+#     ])
+#
+#
+# Argument 1: Name of the function to define
+# Argument 2: List of legal named arguments, with a * prefix for required arguments
+# Argument 3: Argument array to treat as named, typically $@
+# Argument 4: The main function body
+AC_DEFUN([BASIC_DEFUN_NAMED],
+[
+  AC_DEFUN($1, [
+    m4_foreach(arg, m4_split($2), [
+      m4_if(m4_bregexp(arg, [^\*]), -1,
+        [
+          m4_set_add(legal_named_args, arg)
+        ],
+        [
+          m4_set_add(legal_named_args, m4_substr(arg, 1))
+          m4_set_add(required_named_args, m4_substr(arg, 1))
+        ]
+      )
+    ])
+
+    m4_foreach([arg], [$3], [
+      m4_define(arg_name, m4_substr(arg, 0, m4_bregexp(arg, [: ])))
+      m4_set_contains(legal_named_args, arg_name, [],[AC_MSG_ERROR([Internal error: arg_name is not a valid named argument to [$1]. Valid arguments are 'm4_set_contents(legal_named_args, [ ])'.])])
+      m4_set_remove(required_named_args, arg_name)
+      m4_set_remove(legal_named_args, arg_name)
+      m4_pushdef([ARG_][]arg_name, m4_substr(arg, m4_incr(m4_incr(m4_bregexp(arg, [: ])))))
+      m4_set_add(defined_args, arg_name)
+      m4_undefine([arg_name])
+    ])
+    m4_set_empty(required_named_args, [], [
+      AC_MSG_ERROR([Internal error: Required named arguments are missing for [$1]. Missing arguments: 'm4_set_contents(required_named_args, [ ])'])
+    ])
+    m4_foreach([arg], m4_indir([m4_dquote]m4_set_listc([legal_named_args])), [
+      m4_pushdef([ARG_][]arg, [])
+      m4_set_add(defined_args, arg)
+    ])
+    m4_set_delete(legal_named_args)
+    m4_set_delete(required_named_args)
+
+    # Execute function body
+    $4
+
+    m4_foreach([arg], m4_indir([m4_dquote]m4_set_listc([defined_args])), [
+      m4_popdef([ARG_][]arg)
+    ])
+
+    m4_set_delete(defined_args)
+  ])
+])
+
 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
 # If so, then append $1 to $2 \
 # Also set JVM_ARG_OK to true/false depending on outcome.
--- a/common/autoconf/flags.m4	Wed Jan 13 13:56:19 2016 +0000
+++ b/common/autoconf/flags.m4	Thu Jan 14 11:58:32 2016 +0100
@@ -425,7 +425,7 @@
       # Add runtime stack smashing and undefined behavior checks.
       # Not all versions of gcc support -fstack-protector
       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
-      FLAGS_COMPILER_CHECK_ARGUMENTS([$STACK_PROTECTOR_CFLAG], [], [STACK_PROTECTOR_CFLAG=""])
+      FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$STACK_PROTECTOR_CFLAG], IF_FALSE: [STACK_PROTECTOR_CFLAG=""])
 
       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
@@ -742,7 +742,7 @@
       -I${JDK_TOPDIR}/src/java.base/share/native/include \
       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
-      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \ 
+      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
 
   # The shared libraries are compiled using the picflag.
@@ -896,17 +896,18 @@
   AC_SUBST(LDFLAGS_TESTEXE)
 ])
 
-# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
-#                                   [RUN-IF-FALSE])
+# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
+#                                   IF_FALSE: [RUN-IF-FALSE])
 # ------------------------------------------------------------
 # Check that the c and c++ compilers support an argument
-AC_DEFUN([FLAGS_COMPILER_CHECK_ARGUMENTS],
+BASIC_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
+    [*ARGUMENT IF_TRUE IF_FALSE], [$@],
 [
-  AC_MSG_CHECKING([if compiler supports "$1"])
+  AC_MSG_CHECKING([if compiler supports "ARG_ARGUMENT"])
   supports=yes
 
   saved_cflags="$CFLAGS"
-  CFLAGS="$CFLAGS $1"
+  CFLAGS="$CFLAGS ARG_ARGUMENT"
   AC_LANG_PUSH([C])
   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [],
       [supports=no])
@@ -914,7 +915,7 @@
   CFLAGS="$saved_cflags"
 
   saved_cxxflags="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAG $1"
+  CXXFLAGS="$CXXFLAG ARG_ARGUMENT"
   AC_LANG_PUSH([C++])
   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [],
       [supports=no])
@@ -923,23 +924,26 @@
 
   AC_MSG_RESULT([$supports])
   if test "x$supports" = "xyes" ; then
-    m4_ifval([$2], [$2], [:])
+    :
+    ARG_IF_TRUE
   else
-    m4_ifval([$3], [$3], [:])
+    :
+    ARG_IF_FALSE
   fi
 ])
 
-# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
-#                                    [RUN-IF-FALSE])
+# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
+#                                   IF_FALSE: [RUN-IF-FALSE])
 # ------------------------------------------------------------
 # Check that the linker support an argument
-AC_DEFUN([FLAGS_LINKER_CHECK_ARGUMENTS],
+BASIC_DEFUN_NAMED([FLAGS_LINKER_CHECK_ARGUMENTS],
+    [*ARGUMENT IF_TRUE IF_FALSE], [$@],
 [
-  AC_MSG_CHECKING([if linker supports "$1"])
+  AC_MSG_CHECKING([if linker supports "ARG_ARGUMENT"])
   supports=yes
 
   saved_ldflags="$LDFLAGS"
-  LDFLAGS="$LDFLAGS $1"
+  LDFLAGS="$LDFLAGS ARG_ARGUMENT"
   AC_LANG_PUSH([C])
   AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
       [], [supports=no])
@@ -948,9 +952,11 @@
 
   AC_MSG_RESULT([$supports])
   if test "x$supports" = "xyes" ; then
-    m4_ifval([$2], [$2], [:])
+    :
+    ARG_IF_TRUE
   else
-    m4_ifval([$3], [$3], [:])
+    :
+    ARG_IF_FALSE
   fi
 ])
 
@@ -965,14 +971,14 @@
     *)
       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
   esac
-  FLAGS_COMPILER_CHECK_ARGUMENTS([$ZERO_ARCHFLAG], [], [ZERO_ARCHFLAG=""])
+  FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$ZERO_ARCHFLAG], IF_FALSE: [ZERO_ARCHFLAG=""])
   AC_SUBST(ZERO_ARCHFLAG)
 
   # Check that the compiler supports -mX (or -qX on AIX) flags
   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
-  FLAGS_COMPILER_CHECK_ARGUMENTS([${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
-      [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
-      [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
+  FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
+      IF_TRUE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
+      IF_FALSE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
   AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
 
   AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
@@ -1013,9 +1019,9 @@
       ;;
     gcc)
       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
-      FLAGS_COMPILER_CHECK_ARGUMENTS([-Wno-this-is-a-warning-that-do-not-exist],
-          [GCC_CAN_DISABLE_WARNINGS=true],
-          [GCC_CAN_DISABLE_WARNINGS=false]
+      FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
+          IF_TRUE: [GCC_CAN_DISABLE_WARNINGS=true],
+          IF_FALSE: [GCC_CAN_DISABLE_WARNINGS=false]
       )
       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
         DISABLE_WARNING_PREFIX="-Wno-"
@@ -1026,9 +1032,9 @@
       # Repeate the check for the BUILD_CC
       CC_OLD="$CC"
       CC="$BUILD_CC"
-      FLAGS_COMPILER_CHECK_ARGUMENTS([-Wno-this-is-a-warning-that-do-not-exist],
-          [BUILD_CC_CAN_DISABLE_WARNINGS=true],
-          [BUILD_CC_CAN_DISABLE_WARNINGS=false]
+      FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [-Wno-this-is-a-warning-that-do-not-exist],
+          IF_TRUE: [BUILD_CC_CAN_DISABLE_WARNINGS=true],
+          IF_FALSE: [BUILD_CC_CAN_DISABLE_WARNINGS=false]
       )
       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
--- a/common/autoconf/generated-configure.sh	Wed Jan 13 13:56:19 2016 +0000
+++ b/common/autoconf/generated-configure.sh	Thu Jan 14 11:58:32 2016 +0100
@@ -3451,6 +3451,31 @@
 # questions.
 #
 
+# Create a function/macro that takes a series of named arguments. The call is
+# similar to AC_DEFUN, but the setup of the function looks like this:
+# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
+# ... do something
+#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
+# ])
+# A star (*) in front of a named argument means that it is required and it's
+# presence will be verified. To pass e.g. the first value as a normal indexed
+# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
+# arguments are referenced in the function by their name prefixed by ARG_, e.g.
+# "ARG_FOO".
+#
+# The generated function can be called like this:
+# MYFUNC(FOO: [foo-val], BAR:
+#     [
+#         $ECHO hello world
+#     ])
+#
+#
+# Argument 1: Name of the function to define
+# Argument 2: List of legal named arguments, with a * prefix for required arguments
+# Argument 3: Argument array to treat as named, typically $@
+# Argument 4: The main function body
+
+
 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
 # If so, then append $1 to $2 \
 # Also set JVM_ARG_OK to true/false depending on outcome.
@@ -3886,20 +3911,24 @@
 
 
 
-# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
-#                                   [RUN-IF-FALSE])
+# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
+#                                   IF_FALSE: [RUN-IF-FALSE])
 # ------------------------------------------------------------
 # Check that the c and c++ compilers support an argument
 
 
-# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
-#                                    [RUN-IF-FALSE])
+
+
+# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
+#                                   IF_FALSE: [RUN-IF-FALSE])
 # ------------------------------------------------------------
 # Check that the linker support an argument
 
 
 
 
+
+
 #
 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4810,7 +4839,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1452261921
+DATE_WHEN_GENERATED=1452769076
 
 ###############################################################################
 #
@@ -45358,6 +45387,54 @@
     # "-Og" suppported for GCC 4.8 and later
     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
   supports=yes
@@ -45417,15 +45494,76 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
+    :
     HAS_CFLAG_OPTIMIZE_DEBUG=true
   else
+    :
     HAS_CFLAG_OPTIMIZE_DEBUG=false
   fi
 
 
+
+
+
+
+
+
+
+
+
+
+
     # "-z relro" supported in GNU binutils 2.17 and later
     LINKER_RELRO_FLAG="-Wl,-z,relro"
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
   supports=yes
@@ -45467,15 +45605,76 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
+    :
     HAS_LINKER_RELRO=true
   else
+    :
     HAS_LINKER_RELRO=false
   fi
 
 
+
+
+
+
+
+
+
+
+
+
+
     # "-z now" supported in GNU binutils 2.11 and later
     LINKER_NOW_FLAG="-Wl,-z,now"
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
   supports=yes
@@ -45517,11 +45716,24 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
+    :
     HAS_LINKER_NOW=true
   else
+    :
     HAS_LINKER_NOW=false
   fi
 
+
+
+
+
+
+
+
+
+
+
+
   fi
 
   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
@@ -46842,6 +47054,49 @@
       # Not all versions of gcc support -fstack-protector
       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
 $as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
   supports=yes
@@ -46902,11 +47157,24 @@
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
     :
-  else
+
+  else
+    :
     STACK_PROTECTOR_CFLAG=""
   fi
 
 
+
+
+
+
+
+
+
+
+
+
+
       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
       ;;
@@ -47384,6 +47652,49 @@
       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
   esac
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
   supports=yes
@@ -47444,15 +47755,76 @@
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
     :
-  else
+
+  else
+    :
     ZERO_ARCHFLAG=""
   fi
 
 
 
+
+
+
+
+
+
+
+
+
+
+
   # Check that the compiler supports -mX (or -qX on AIX) flags
   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
   supports=yes
@@ -47512,13 +47884,26 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
+    :
     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
   else
+    :
     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
   fi
 
 
 
+
+
+
+
+
+
+
+
+
+
+
   # Check whether --enable-warnings-as-errors was given.
 if test "${enable_warnings_as_errors+set}" = set; then :
   enableval=$enable_warnings_as_errors;
@@ -47565,6 +47950,54 @@
     gcc)
       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
   supports=yes
@@ -47624,12 +48057,25 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
+    :
     GCC_CAN_DISABLE_WARNINGS=true
   else
+    :
     GCC_CAN_DISABLE_WARNINGS=false
 
   fi
 
+
+
+
+
+
+
+
+
+
+
+
       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
         DISABLE_WARNING_PREFIX="-Wno-"
       else
@@ -47640,6 +48086,54 @@
       CC_OLD="$CC"
       CC="$BUILD_CC"
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
   supports=yes
@@ -47699,12 +48193,25 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
+    :
     BUILD_CC_CAN_DISABLE_WARNINGS=true
   else
+    :
     BUILD_CC_CAN_DISABLE_WARNINGS=false
 
   fi
 
+
+
+
+
+
+
+
+
+
+
+
       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
       else
--- a/common/autoconf/toolchain.m4	Wed Jan 13 13:56:19 2016 +0000
+++ b/common/autoconf/toolchain.m4	Thu Jan 14 11:58:32 2016 +0100
@@ -75,8 +75,8 @@
       # For full static builds, we're overloading the SHARED_LIBRARY
       # variables in order to limit the amount of changes required.
       # It would be better to remove SHARED and just use LIBRARY and
-      # LIBRARY_SUFFIX for libraries that can be built either 
-      # shared or static and use STATIC_* for libraries that are 
+      # LIBRARY_SUFFIX for libraries that can be built either
+      # shared or static and use STATIC_* for libraries that are
       # always built statically.
       if test "x$STATIC_BUILD" = xtrue; then
         SHARED_LIBRARY='lib[$]1.a'
@@ -824,21 +824,21 @@
 
     # "-Og" suppported for GCC 4.8 and later
     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
-    FLAGS_COMPILER_CHECK_ARGUMENTS([$CFLAG_OPTIMIZE_DEBUG_FLAG],
-      [HAS_CFLAG_OPTIMIZE_DEBUG=true],
-      [HAS_CFLAG_OPTIMIZE_DEBUG=false])
+    FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CFLAG_OPTIMIZE_DEBUG_FLAG],
+      IF_TRUE: [HAS_CFLAG_OPTIMIZE_DEBUG=true],
+      IF_FALSE: [HAS_CFLAG_OPTIMIZE_DEBUG=false])
 
     # "-z relro" supported in GNU binutils 2.17 and later
     LINKER_RELRO_FLAG="-Wl,-z,relro"
-    FLAGS_LINKER_CHECK_ARGUMENTS([$LINKER_RELRO_FLAG],
-      [HAS_LINKER_RELRO=true],
-      [HAS_LINKER_RELRO=false])
+    FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_RELRO_FLAG],
+      IF_TRUE: [HAS_LINKER_RELRO=true],
+      IF_FALSE: [HAS_LINKER_RELRO=false])
 
     # "-z now" supported in GNU binutils 2.11 and later
     LINKER_NOW_FLAG="-Wl,-z,now"
-    FLAGS_LINKER_CHECK_ARGUMENTS([$LINKER_NOW_FLAG],
-      [HAS_LINKER_NOW=true],
-      [HAS_LINKER_NOW=false])
+    FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_NOW_FLAG],
+      IF_TRUE: [HAS_LINKER_NOW=true],
+      IF_FALSE: [HAS_LINKER_NOW=false])
   fi
 
   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed