[Top][All Lists]

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

Re: setting several m4 directory in

From: Eric Blake
Subject: Re: setting several m4 directory in
Date: Wed, 14 Dec 2011 09:15:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

On 12/14/2011 05:21 AM, Vincent Torri wrote:
> Hey
> I have several m4 macro files and I want to put them in several sub
> directories of the directory m4/. So the m4 files are located in:
> m4/ (libtool m4 files)
> m4/foo/
> m4/bar/
> I have tried to call several times AC_CONFIG_MACRO_DIR (one for each
> dir above) but it seems that only the last call is taken into account.

Right now, AC_CONFIG_MACRO_DIR can only support a single directory.  It
would probably be a good idea to let it support multiple directories
(and/or allow multiple calls to append to the directory list), but that
would require patches.

> How can I solve that (if it's possible) ?

Without patches, the best you can do is pick which of your three
directories should be the primary one to contain any m4 files installed
during autoreconf; the remaining directories are still included via
ACLOCAL_AMFLAGS when running aclocal, but aclocal will only modify the
primary directory registered via AC_CONFIG_MACRO_DIR.

> PS: in the top level, I have set ACLOCAL_AMFLAGS to -I m4
> -I m4/foo -I m4/bar

Yes, that is the correct way to read macros from multiple locations.

Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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