Hi, Currently some configure.ac of mine starts like this:
AC_PREREQ([2.59]) AC_INIT AC_CONFIG_SRCDIR(intl/dcigettext.c) AC_CONFIG_AUX_DIR(../build-aux) . $srcdir/../version.sh AM_INIT_AUTOMAKE(gettext-runtime, $VERSION_NUMBER) Now I would like to set some automake options. The automake doc says: Automatic dependency tracking can be suppressed by putting `no-dependencies' in the variable `AUTOMAKE_OPTIONS', or passing `no-dependencies' as an argument to `AM_INIT_AUTOMAKE' (this should be the preferred way). and The second, deprecated, form of `AM_INIT_AUTOMAKE' has two required arguments: the package and the version number. So the automake doc invites me to use AM_INIT_AUTOMAKE([OPTIONS]) and to move the package and version information to the AC_INIT call. This information comes from a file in the source directory called version.sh. (Putting the version information into a file of its own, not configure.ac, is because I don't want to regenerate all .info, man and .html files each time I do a modification to configure.ac - it would be a waste of time.) So, how can I invoke AC_INIT? I need the contents of version.sh for this. To access it, I need $srcdir. But $srcdir is not defined before AC_INIT has been executed! Either the automake manual is wrong in suggesting to use AC_INIT for setting the package and version. Or something needs to be done about this circular dependency around AC_INIT. A possible solution would be if autoconf would define a macro, say, AC_CONFIG_PACKAGE in such a way that AC_INIT(package, version) is equivalent to AC_INIT AC_CONFIG_PACKAGE(package, version) In other words, AC_CONFIG_PACKAGE would set all the variables PACKAGE, VERSION, AC_PACKAGE_NAME, PACKAGE_NAME, AC_PACKAGE_TARNAME, PACKAGE_TARNAME, AC_PACKAGE_VERSION, PACKAGE_VERSION, AC_PACKAGE_STRING, PACKAGE_STRING, AC_PACKAGE_BUGREPORT, PACKAGE_BUGREPORT. Automake's AM_INIT_AUTOMAKE macro would also profit from such a macro: currently it sets only the variables PACKAGE, VERSION, but not the other 10 variables. Bruno
