[PATCH] Add checks for unexpanded macros.

Vratislav Podzimek vpodzime at redhat.com
Thu Oct 10 09:54:07 UTC 2013


On Wed, 2013-10-09 at 11:25 -0400, David Shea wrote:
> Autoconf checks for unexpanded macros, which usually indicates a missing
> definition for that macro, but it only works if the macro names start
> with AC/AS/AM and probably a couple of other things. The
> gobject-introspection and gtk-doc macros start with
> GOBJECT_INTROSPECTION and GTK_DOC, respectively, so added checks for
> those two macros.
> ---
>  widgets/configure.ac | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/widgets/configure.ac b/widgets/configure.ac
> index baac242..19dedb9 100644
> --- a/widgets/configure.ac
> +++ b/widgets/configure.ac
> @@ -38,12 +38,18 @@ AC_PROG_LN_S
>  
>  AM_GNU_GETTEXT([external])
>  
> +dnl Make sure that autoconf fails if the gobject-introspection macro
> +dnl is not expanded.
> +m4_pattern_forbid([GOBJECT_INTROSPECTION_CHECK])dnl
>  GOBJECT_INTROSPECTION_CHECK([0.6.7])
>   
>  # Fail if introspection was not enabled
>  AS_IF([test "x$found_introspection" = xyes], [:],
>        [AC_MSG_ERROR([*** GObject introspection must be enabled])])
>  
> +dnl A missing GTK_DOC_CHECK should fail in autogen.sh running gtkdocize, but
> +dnl might as well check it here too
> +m4_pattern_forbid([GTK_DOC_CHECK])dnl
>  GTK_DOC_CHECK([1.14], [--flavour no-tmpl])
>  
>  PKG_CHECK_MODULES([GLADEUI], [gladeui-2.0 >= 3.10])
Good idea, ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list