Chicken and Egg problem with AC_INIT

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

 



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@xxxxxxxx




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux