Re: setting several m4 directory in configure.ac

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


On Wed, Dec 14, 2011 at 5:15 PM, Eric Blake <eblake@xxxxxxxxxx> wrote:
> 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.

ok

>> 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  Makefile.am, 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.

ok, so  AC_CONFIG_MACRO_DIR([m4]) + ACLOCAL_AMFLAGS set as above.

thank you

Vincent Torri

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf



[GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [USB]     [Samba]

Add to Google Powered by Linux