autoconf (was [PATCH] memcached on FreeBSD...)
Thu, 21 Aug 2003 14:42:06 -0700
On Thu, 2003-08-21 at 14:24, Sean Chittenden wrote:
> > > > configure.ac:5: error: possibly undefined macro: AM_INIT_AUTOMAKE
> > > If this token and others are legitimate, please use m4_pattern_allow.
> > > See the Autoconf documentation.
> > > configure.ac:6: error: possibly undefined macro: AM_CONFIG_HEADER
> > What version of automake are you using?
> What version do you want me to try using? I've got 1.4.5, 1.5, and
> 1.7.5, none seemed successful.
It's working for me with both 1.4 and 1.7. (Each different x.y version
of automake is slightly incompatible with the others... but they did
change the version numbers, after all!)
autoconf, on the other hand, I think has only two main families: the
2.1x series and the 2.5x+ series.
Do you get any warnings with this sequence of commands?
aclocal-1.4; autoheader; automake-1.4; autoconf
also try it with -1.7. (Note that you should be using the same versions
of autoheader and autoconf, as well.)
You might also want to check things out from CVS again to make sure you
don't have leftover files from somewhere messing things up.
The autotools have a lot of inertia, especially because they support
platforms we've never even seen...
> > Try "automake --add-missing". I suppose that's not in the autogen
> > script, but it ought to be.
> Duh, thanks, that helps some, but now I'm getting a syntax error in
Hm, wait. The autogen script *does* include --add-missing. Are you not
running autogen for some reason?
> ./configure: line 1318: syntax error near unexpected token `memcached,'
> ./configure: line 1318: `AM_INIT_AUTOMAKE(memcached, 1.1.9-snapshot)'
> or with autoconf257:
> ./configure: line 1393: syntax error near unexpected token `memcached,'
> ./configure: line 1393: `AM_INIT_AUTOMAKE(memcached, 1.1.9-snapshot)'
> autoconf can't find the macro AM_INIT_AUTOMAKE. :-/
> configure.ac:5: error: possibly undefined macro: AM_INIT_AUTOMAKE
> If this token and others are legitimate, please use m4_pattern_allow.
> See the Autoconf documentation.
Because m4 is a macro language, the errors are often very misleading.
Even though configure is failing, it could be any tool in the chain. If
AM_INIT_AUTOMAKE is undefined, it's likely something isn't providing it,
and I'd suspect automake over autoconf.
(See http://www.advogato.org/person/raph/diary.html?start=349 for a
discussion of this problem.)
It's possible you don't even need that line (the AM_INIT_AUTOMAKE one in
configure.ac); I believe you normally include it to fake compatibility
with older automakes. If the above suggestions don't help, could you
deleting that line and running the process again? I'd be able to
diagnose this better if I could reproduce it, but as I said, it works
for me on the versions I've tried...