aboutsummaryrefslogtreecommitdiff
path: root/m4/ax_append_flag.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/ax_append_flag.m4')
-rw-r--r--m4/ax_append_flag.m430
1 files changed, 16 insertions, 14 deletions
diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4
index 1d38b76f..08f2e07e 100644
--- a/m4/ax_append_flag.m4
+++ b/m4/ax_append_flag.m4
@@ -49,21 +49,23 @@
49# modified version of the Autoconf Macro, you may extend this special 49# modified version of the Autoconf Macro, you may extend this special
50# exception to the GPL to apply to your modified version as well. 50# exception to the GPL to apply to your modified version as well.
51 51
52#serial 2 52#serial 6
53 53
54AC_DEFUN([AX_APPEND_FLAG], 54AC_DEFUN([AX_APPEND_FLAG],
55[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX 55[dnl
56AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl 56AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
57AS_VAR_SET_IF(FLAGS, 57AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
58 [case " AS_VAR_GET(FLAGS) " in 58AS_VAR_SET_IF(FLAGS,[
59 *" $1 "*) 59 AS_CASE([" AS_VAR_GET(FLAGS) "],
60 AC_RUN_LOG([: FLAGS already contains $1]) 60 [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
61 ;; 61 [
62 *) 62 AS_VAR_APPEND(FLAGS,[" $1"])
63 AC_RUN_LOG([: FLAGS="$FLAGS $1"]) 63 AC_RUN_LOG([: FLAGS="$FLAGS"])
64 AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"]) 64 ])
65 ;; 65 ],
66 esac], 66 [
67 [AS_VAR_SET(FLAGS,["$1"])]) 67 AS_VAR_SET(FLAGS,[$1])
68 AC_RUN_LOG([: FLAGS="$FLAGS"])
69 ])
68AS_VAR_POPDEF([FLAGS])dnl 70AS_VAR_POPDEF([FLAGS])dnl
69])dnl AX_APPEND_FLAG 71])dnl AX_APPEND_FLAG