[gupnp] m4: update macros



commit 3fb5b13a7862ec262fb99041318b1f7dd110e3b7
Author: Jens Georg <mail jensge org>
Date:   Sat Dec 5 13:47:57 2015 +0100

    m4: update macros
    
    Signed-off-by: Jens Georg <mail jensge org>

 m4/ax_append_compile_flags.m4   |    8 +++++---
 m4/ax_append_flag.m4            |    4 ++--
 m4/ax_compiler_flags_ldflags.m4 |   10 +++++-----
 3 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4
index dc7b866..2bb27ef 100644
--- a/m4/ax_append_compile_flags.m4
+++ b/m4/ax_append_compile_flags.m4
@@ -4,7 +4,7 @@
 #
 # SYNOPSIS
 #
-#   AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
+#   AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
 #
 # DESCRIPTION
 #
@@ -20,6 +20,8 @@
 #   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
 #   force the compiler to issue an error when a bad flag is given.
 #
+#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
 #   NOTE: This macro depends on the AX_APPEND_FLAG and
 #   AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
 #   AX_APPEND_LINK_FLAGS.
@@ -54,12 +56,12 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 4
+#serial 5
 
 AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
 [AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
 AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
 for flag in $1; do
-  AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
+  AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
 done
 ])dnl AX_APPEND_COMPILE_FLAGS
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_ldflags.m4 b/m4/ax_compiler_flags_ldflags.m4
index f393ba4..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 4
+#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,14 +48,14 @@ 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])
     ])
@@ -65,7 +65,7 @@ AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[
         #
         # 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])
     ])


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