aboutsummaryrefslogtreecommitdiff
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 1d38b76..aeab899 100644
--- a/m4/ax_append_flag.m4
+++ b/m4/ax_append_flag.m4
@@ -49,21 +49,23 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 2
+#serial 5
AC_DEFUN([AX_APPEND_FLAG],
-[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
-AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl
-AS_VAR_SET_IF(FLAGS,
- [case " AS_VAR_GET(FLAGS) " in
- *" $1 "*)
- AC_RUN_LOG([: FLAGS already contains $1])
- ;;
- *)
- AC_RUN_LOG([: FLAGS="$FLAGS $1"])
- AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"])
- ;;
- esac],
- [AS_VAR_SET(FLAGS,["$1"])])
+[dnl
+AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
+AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
+AS_VAR_SET_IF(FLAGS,[
+ AS_CASE([" AS_VAR_GET(FLAGS) "],
+ [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
+ [
+ AS_VAR_APPEND(FLAGS," $1")
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+ ],
+ [
+ AS_VAR_SET(FLAGS,[$1])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
AS_VAR_POPDEF([FLAGS])dnl
])dnl AX_APPEND_FLAG