autoconf
[Top][All Lists]
Advanced

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

Chicken and Egg problem with AC_INIT


From: Bill Moseley
Subject: Chicken and Egg problem with AC_INIT
Date: Tue, 23 Dec 2003 06:11:50 -0800
User-agent: Mutt/1.5.4i

I want to use the new form of AM_INIT_AUTOMAKE to use a global -Wall 
setting.

My current configure.in uses the old method:

  AC_INIT(src/swish.c)
  [...]
  AM_INIT_AUTOMAKE($PACKAGE, $VERSION)

And I want to use this new form:

  AC_INIT($PACKAGE, $VERSION)
  AM_INIT_AUTOMAKE([-Wall])

The problem is that $VERSION can be modified by a configure option, 
which I can't seem to use unless I call AC_INIT first.


  VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION

  AC_ARG_ENABLE(daystamp,
             AC_HELP_STRING([--enable-daystamp], [Adds today's date to 
version]),
             daystamp=yes,)

  if test x$daystamp = xyes; then
        TODAY=`/bin/date +%Y-%m-%d`
        VERSION="$VERSION-$TODAY"
  fi

So, two questions:

1) Can I somehow use the new form of AC_INIT and use AC_ARG_ENABLE like 
above?

2) If not, is there another suggested way to set -Wall globally for all 
my Makefiles?


Thanks,



-- 
Bill Moseley
address@hidden





reply via email to

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