automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/6] aclocal: multiple local m4 macro dirs with AC_CONFIG_MAC


From: Eric Blake
Subject: Re: [PATCH 1/6] aclocal: multiple local m4 macro dirs with AC_CONFIG_MACRO_DIRS
Date: Fri, 09 Nov 2012 13:31:14 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

On 11/03/2012 06:36 AM, Stefano Lattarini wrote:
> A new macro 'AC_CONFIG_MACRO_DIRS' has been recently introduced in
> autoconf (and is expected to appear in the autoconf 2.70 release),
> allowing us to declare several local m4 macro directories for a
> package.
> 

> @@ -731,7 +731,8 @@ sub trace_used_macros ()
>                    'AC_DEFUN_ONCE',
>                    'AU_DEFUN',
>                    '_AM_AUTOCONF_VERSION',
> -                  'AC_CONFIG_MACRO_DIR')),
> +                  'AC_CONFIG_MACRO_DIR',
> +                  'AC_CONFIG_MACRO_DIRS')),

Here, you should just trace AC_CONFIG_MACRO_DIR_TRACE, once I finish
posting my autoconf patches.

> @@ -763,7 +764,11 @@ sub trace_used_macros ()
>          }
>        elsif ($macro eq 'AC_CONFIG_MACRO_DIR')
>          {
> -          $ac_config_macro_dir = $arg1;
> +          @ac_config_macro_dirs = ($arg1);
> +        }
> +      elsif ($macro eq 'AC_CONFIG_MACRO_DIRS')
> +        {
> +          push @ac_config_macro_dirs, split (/\s+/, $arg1);

You still have to trace AC_CONFIG_MACRO_DIR for the sake of older
autoconf; but if AC_CONFIG_MACRO_DIR_TRACE exists, you will end up
seeing the first directory under both macros.  So this logic will need
to check if the new macro exists, and if so, ignore the old macro (or
else continue to trace both, but do duplicate elision at the end; and
duplicate elision might make sense anyways).  Also, since
AC_CONFIG_MACRO_DIR_TRACE is called once per directory (no matter how
many directories were crammed in one AC_CONFIG_MACRO_DIRS call), you
don't need to do any of the split(/\s+/) magic.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]