Reviewed-and-tested-by: Matias Elo <matias@nokia.com>
> -Original Message-
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT
> Nicolas
> Morey-Chaisemartin
> Sent: Friday, October 09, 2015 4:23 PM
> To: lng-odp@lists.linaro.org
> Subject: [lng-odp] [PATCH] configure: move all AM_CONDITIONAL to
> configure.ac
>
>
> Platform specific m4 files cannot define AM_CONDITIONAL.
> Even if not used outside of the platform specific file, configure will
> exit with an error if another platform does not set this conditional:
>
> configure: error: conditional "netmap_support" was never defined.
> Usually this means the macro was only invoked conditionally.
>
> Solve this by setting a default status do disabled/no at the top configure,
> which can be overridden by the platform m4 files. And then set the
> AM_CONDITIONAl in the top configure.ac for every platform to see.
>
> Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu>
> ---
> configure.ac| 14 ++
> platform/linux-generic/m4/odp_netmap.m4 | 3 ---
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 92f9d39..5d84f92 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -80,6 +80,14 @@ AC_SUBST([with_platform])
> AC_SUBST([platform_with_platform], ["platform/${with_platform}"])
> AC_SUBST([platform_with_platform_test], ["platform/${with_platform}/test"])
>
> +#
> #
> +# Prepare default values for platform specific optional features
> +#
> #
> +netmap_support=no
> +
> +#
> #
> +# Run platform specific checks and settings
> +#
> #
> if test "${with_platform}" == "linux-generic";
> then
> m4_include([./platform/linux-generic/m4/configure.m4])
> @@ -88,6 +96,12 @@ else
> exit 1
> fi
>
> +#
> #
> +# Set conditionals as computed within platform specific files
> +#
> #
> +AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ])
> +
> +
> AC_ARG_WITH([sdk-install-path],
> AC_HELP_STRING([--with-sdk-install-path=DIR path to external libs and
> headers],
> [(or in the default path if not specified).]),
> diff --git a/platform/linux-generic/m4/odp_netmap.m4 b/platform/linux-
> generic/m4/odp_netmap.m4
> index 02cd3d3..72c3fab 100644
> --- a/platform/linux-generic/m4/odp_netmap.m4
> +++ b/platform/linux-generic/m4/odp_netmap.m4
> @@ -1,7 +1,6 @@
>
> ##
>
> # Enable netmap support
>
> ##
>
> -netmap_support=no
> AC_ARG_ENABLE([netmap_support],
> [ --enable-netmap-support include netmap IO support],
> [if test x$enableval = xyes; then
> @@ -36,8 +35,6 @@ else
> netmap_support=no
> fi
>
> -AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ])
> -
> # Disable cast errors until the problem in netmap_user.h is fixed upstream
> if test x$netmap_support = xyes
> then
> --
> 2.6.1.3.g8d02103
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp