Re: AX_APPEND_FLAG changed behaviour
Peter Johansson <[email protected]>
| Newsgroups | gmane.comp.sysutils.autoconf.archive-maintainers |
|---|---|
| Message-ID | <[email protected]> |
Hi Bastien, On 02/07/2015 03:48 AM, Bastien ROUCARIES wrote: > I added the or case because it add something when pattern is at end. > Previously it add flag alpha when flag contains "beta alpha". I have > fuxed this problem but introduced a regression > > Could you made a patch for review ? Please find a patch attached. I also attached a tiny 'configure.ac' that uses the macro and tests a few common cases. Cheers, -- Peter Johansson
ax_append_flag.m4.patch
(text/x-patch, 782 B)
diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4
index d26286c..aeab899 100644
--- a/m4/ax_append_flag.m4
+++ b/m4/ax_append_flag.m4
@@ -49,15 +49,15 @@
# 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_FLAG],
[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 *|*$1"],[AC_RUN_LOG([: FLAGS already contains $1])],
+ AS_CASE([" AS_VAR_GET(FLAGS) "],
+ [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
[
AS_VAR_APPEND(FLAGS," $1")
AC_RUN_LOG([: FLAGS="$FLAGS"])
configure.ac
(application/vnd.nokia.n-gage.ac+xml, 522 B) - not displayed