This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why do I need both AC_INIT and AM_INIT_AUTOMAKE???


>>> "Bill" == Bill Moseley <moseley at hank dot org> writes:

[...]

 Bill> How do you use a shell variable in AC_INIT?

 Bill> The docs for AC_INIT say:

 Bill> It is preferable that the arguments of `AC_INIT' be static, i.e.,
 Bill> there should not be any shell computation, but they can be
 Bill> computed by M4.

 Bill> And indeed:

 Bill> configure.in:5: warning: AC_INIT: not a literal: $VERSION

Consider m4 macros.  Static is just a way to say `known at compile
time' (i.e. when Autoconf runs).

m4_define([MAJOR], 1)
m4_define([MINOR], 2)
AC_INIT([foo], [MAJOR.MINOR], [bugs at go dot here])
AM_INIT_AUTOMAKE  

(AM_INIT_AUTOMAKE already defines the VERSION variable you don't
need to do it.)

-- 
Alexandre Duret-Lutz




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]