|
From: | Vincent Torri |
Subject: | Re: string manipulation : removing a part of a string |
Date: | Sat, 16 Jun 2012 08:01:09 +0200 (CEST) |
On Fri, 15 Jun 2012, Eric Blake wrote:
On 06/15/2012 04:55 PM, Vincent Torri wrote:
AC_DEFUN([EFL_CHECK_COMPILER_FLAG], [ m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z])) m4_pushdef([UP], m4_translit([[$2]], [-a-z], [_A-Z])) m4_if(m4_index([$2], [-Wno-]), [0], [m4_pushdef([flagm4], [m4_bpatsubst([[$2]], [no-])])], [m4_pushdef([flagm4], [$2])])option=m4_bpatsubst([[$2]], [no-])
Actually, i want to store in option -Wfoo if $2 is -Wno-foo, and only that case. It's for testing if a compiler option is available (after discussion with gcc guys, -Wno-foo use produces a warning while -Wfoo use produces an error). So if I pass -fno-bar, option will store -fbar, which is not what I want. So I guess that I have to use the m4_if construction.
Vincent Torri
[Prev in Thread] | Current Thread | [Next in Thread] |