From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> (alternatively, we could simply require this to be installed, but it's very recent and the autofoo error is unfriendly) Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> --- m4/ax_append_flag.m4 | 4 ++-- m4/ax_compiler_flags.m4 | 4 ++-- m4/ax_compiler_flags_cflags.m4 | 7 ++++--- m4/ax_compiler_flags_ldflags.m4 | 12 ++++++------ 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4 index aeab899..08f2e07 100644 --- a/m4/ax_append_flag.m4 +++ b/m4/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/m4/ax_compiler_flags.m4 b/m4/ax_compiler_flags.m4 index c52ae7d..6cfe398 100644 --- a/m4/ax_compiler_flags.m4 +++ b/m4/ax_compiler_flags.m4 @@ -101,7 +101,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 12 +#serial 13 # _AX_COMPILER_FLAGS_LANG([LANGNAME]) m4_defun([_AX_COMPILER_FLAGS_LANG], @@ -138,7 +138,7 @@ AC_DEFUN([AX_COMPILER_FLAGS],[ [Unconditionally make all compiler warnings non-fatal]),, [enable_Werror=maybe]) - # Return the user’s chosen warning level + # Return the user's chosen warning level AS_IF([test "$enable_Werror" = "no" -a \ "$enable_compile_warnings" = "error"],[ enable_compile_warnings="yes" diff --git a/m4/ax_compiler_flags_cflags.m4 b/m4/ax_compiler_flags_cflags.m4 index 295d7fe..f470f8f 100644 --- a/m4/ax_compiler_flags_cflags.m4 +++ b/m4/ax_compiler_flags_cflags.m4 @@ -25,9 +25,10 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 8 +#serial 11 AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ + AC_REQUIRE([AC_PROG_SED]) AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS]) AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) @@ -100,7 +101,7 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ ]) AS_IF([test "$ax_enable_compile_warnings" = "error"],[ # "error" flags; -Werror has to be appended unconditionally because - # it’s not possible to test for + # it's not possible to test for # # suggest-attribute=format is disabled because it gives too many false # positives @@ -119,7 +120,7 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ AS_CASE([$flag], [-Wno-*=*],[], [-Wno-*],[ - AX_APPEND_COMPILE_FLAGS([-Wno-error=${flag:5}], + AX_APPEND_COMPILE_FLAGS([-Wno-error=$(AS_ECHO([$flag]) | $SED 's/^-Wno-//')], ax_warn_cflags_variable, [$ax_compiler_flags_test]) ]) diff --git a/m4/ax_compiler_flags_ldflags.m4 b/m4/ax_compiler_flags_ldflags.m4 index f9077fc..228471e 100644 --- a/m4/ax_compiler_flags_ldflags.m4 +++ b/m4/ax_compiler_flags_ldflags.m4 @@ -25,10 +25,10 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 3 +#serial 5 AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[ - AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS]) + AX_REQUIRE_DEFINED([AX_APPEND_LINK_FLAGS]) AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) @@ -48,24 +48,24 @@ AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[ ]) # Base flags - AX_APPEND_COMPILE_FLAGS([ dnl + AX_APPEND_LINK_FLAGS([ dnl -Wl,--no-as-needed dnl $3 dnl ],ax_warn_ldflags_variable,[$ax_compiler_flags_test]) AS_IF([test "$ax_enable_compile_warnings" != "no"],[ # "yes" flags - AX_APPEND_COMPILE_FLAGS([$4 $5 $6 $7], + AX_APPEND_LINK_FLAGS([$4 $5 $6 $7], ax_warn_ldflags_variable, [$ax_compiler_flags_test]) ]) AS_IF([test "$ax_enable_compile_warnings" = "error"],[ # "error" flags; -Werror has to be appended unconditionally because - # it’s not possible to test for + # it's not possible to test for # # suggest-attribute=format is disabled because it gives too many false # positives - AX_APPEND_COMPILE_FLAGS([ dnl + AX_APPEND_LINK_FLAGS([ dnl -Wl,--fatal-warnings dnl ],ax_warn_ldflags_variable,[$ax_compiler_flags_test]) ]) -- 2.4.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel