[prev in list] [next in list] [prev in thread] [next in thread] 

List:       autoconf
Subject:    Chicken and Egg problem with AC_INIT
From:       Bill Moseley <moseley () hank ! org>
Date:       2003-12-23 14:11:50
Message-ID: 20031223141150.GA920 () hank ! org
[Download RAW message or body]

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
moseley@hank.org




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic