[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoreconf not passing -I option to aclocal
From: |
Stepan Kasal |
Subject: |
Re: autoreconf not passing -I option to aclocal |
Date: |
Fri, 29 Sep 2006 17:39:05 +0200 |
User-agent: |
Mutt/1.4.2.1i |
Hello Guillaume,
On Thu, Sep 28, 2006 at 03:44:30PM +0200, Guillaume Rousse wrote:
> [...] aclocal is useful even when you don't use automake, for
> importing your own macros as in my case, [...]
I agree with you, ...
> Anyway, my tests show that [aclocal] is called unconditionally.
... and autoreconf agrees with us, too. ;-)
In this context, is seems a bit unfortunate that aclocal is
distributed in the Automake package, but that's the way it is.
The -I option of autoconf is where the _included_ files are searched
for. For example, if your configure.ac contained
m4_include([foobar.m4])
then the -I options specify where foobar.m4 might be found.
(Though adding m4_include([ocaml.m4]) to the top of your
configure.ac might be a usable workaround for your problem, I do
not think it is ``the right way.'')
autoheader and autoupdate have the same -I option as autoconf.
The -I option of autoreconf is corresponding to this -I.
aclocal's -I option is somewhat different: it specifies the search
path for *.m4 files with individual macro definitions.
This explains why we were reluctant to pass autoconf's -I options as
the -I options to aclocal.
But I understand it generates much confusion, so it seems we might
reconsider the decision. Actually, if we passed the -I options from
autoreconf to aclocal, would it break anything? If not, we might do
it.
(After all, the aclocal -I option is the only widely popular here.
Almost noone uses autoconfs -I and -B options, the -I only pops up
when someone confuses it with aclocal's -I.)
Opinions from others are welcome.
At the end, I would like to return to this:
On Thu, Sep 28, 2006 at 03:09:39PM +0200, Guillaume Rousse wrote:
> Eric Blake wrote:
> > Sounds like you forgot to do
> > ACLOCAL_AMFLAGS = -I ../autoconf
> >
> > in your Makefile.am.
> I forgot to precise that I'm not using automake...
Well, the above advice works even if you are not using automake:
The presence of Makefile.am should not cause problems; autoreconf
recognizes that you are not using automake because configure.ac does
not call AM_INIT_AUTOMAKE. But autoreconf greps Makefile.am for that
assignment, even in that case.
I understand it looks ugly, and it might confuse people, though.
Stepan Kasal