[ovs-dev] [PATCH 08/10] acinclude: Add OVS_FIND_PARAM_IFELSE.

Ben Pfaff blp at ovn.org
Thu Jun 9 23:24:01 UTC 2016


On Thu, Jun 09, 2016 at 03:45:25PM -0700, Jarno Rajahalme wrote:
> OVS_FIND_PARAM_IFELSE is more robust macro for checking function
> parameters, as it does not require the parameter to be on the same
> line as the function name like the OVS_GREP_IFELSE does.
> 
> Use this to fix the check for struct conntrack_zone parameter, which
> is on a different line on Linux 4.3 and higher.
> 
> Signed-off-by: Jarno Rajahalme <jarno at ovn.org>

> +dnl OVS_FIND_PARAM_IFELSE(FILE, FUNCTION, REGEX, [IF-MATCH], [IF-NO-MATCH])
> +dnl
> +dnl Looks for FUNCTION in FILE. If it is found, greps for REGEX within
> +dnl the function signature starting from the line matching FUNCTION
> +dnl and ending with the line containing the closing parenthesis.  If
> +dnl this is successful, runs IF-MATCH, otherwise IF_NO_MATCH.  If
> +dnl IF-MATCH is empty then it defines to
> +dnl OVS_DEFINE(HAVE_<FUNCTION>_WITH_<REGEX>), with <FUNCTION> and
> +dnl <REGEX> translated to uppercase.
> +AC_DEFUN([OVS_FIND_PARAM_IFELSE], [
> +  AC_MSG_CHECKING([whether $2 has member $3 in $1])

The message in AC_MSG_CHECKING, above, seems wrong.

The Autoconf syntax looks correct.  I didn't otherwise review this (and
don't plan to review other patches in the series).



More information about the dev mailing list