GNOME Bugzilla – Bug 152241
Adapt to newer autotools plus cleanups
Last modified: 2005-01-08 11:07:39 UTC
Since several versions ago, GNU Autoconf and GNU Automake changed the interface of some of their macros to make them more powerful. Since the previous syntax is deprecated, I expect that it will be removed in a maybe-soon future version. Gossip can take advantage of them. Let's see all the changes that should/can be done in the configure.in: * Use new syntax of AC_INIT and AM_INIT_AUTOMAKE. The former now takes more parameters, and defines more C constants to be used in source code (I haven't set any email address as the third parameter because I'm not sure if you want that). The later takes a list of automake options. I've added the following: check-news verifies that the NEWS file contains details for the latest version upon a 'make dist'; dist-bzip2 automatically creates a .tar.bz2 file (as well as the .tar.gz) on a 'make dist'; no-define avoids polluting namespace by not defining PACKAGE nor VERSION. * Set AC_PREREQ to a sane version to avoid breakage with older Autoconf's. * Use AC_COPYRIGHT to add a line in the configure script. I just added it for completeness, but you can perfectly remove it. * Remove AM_MAINTAINER_MODE. This shouldn't be used, according to Automake's manual; the 'missing' script sould handle in a better way the situations this macro tries to workaround. * Use AS_HELP_STRING to format help strings passed to AC_ARG_WITH and AC_ARG_ENABLE. This ensures that they appear properly aligned on a './configure --help'. * Simplify the definition of variables specifying minimum versions by doing it at once with an AC_SUBST. This is just to trim the configure script a bit. IMHO, it looks nicer this way, but you may well remove this chunk from the patch too. * Remove the definition of GOSSIP_LOCALEDIR. It is used nowhere. Furthermore, it is incorrect to do such substitutions from the configure script, as described by the GNU Standards (the expansion must be done from the Makefiles). * Remove the glib-genmarshal check. This is automatically done by the AM_PATH_GLIB_2_0 macro, so we should let it do its job. In Makefile.am files, INCLUDES has to be replaced with AM_CPPFLAGS. In source files PACKAGE becomes PACKAGE_TARNAME, and VERSION becomes PACKAGE_VERSION. Furthermore, "Imendio Gossip 0.7.8" can be expressed as PACKAGE_STRING, and "Imendio Gossip" as PACKAGE_NAME. (All of this, because of the new AC_INIT macro). I've set the minimum version of Automake to 1.9, as this is the one I've installed here. However, I'm sure it will also work equally fine with 1.8 (so you may lower the requirement), and *maybe* with 1.7 too (you'll have to check if you want to go that low). Using newer versions of these utilities fix bugs (specially when building with non-GNU make utilities) and ensure that no deprecated functionality is used as soon as possible.
Created attachment 31442 [details] [review] Sample patch that implements all described points
Please correct me if I'm wrong but this will only affect people building from CVS, right? So if I add this it won't be a problem for people building from release tarballs?
Yes, you are right. People building from published releases do not have to deal with the auto* tools (although they will benefit from bugs fixed and improvements done in the latest versions).
Ok, thanks. I'll most likely commit this patch after we've merged a pretty huge branch into HEAD. I want as little changes as possible on HEAD for that.
Commited to HEAD, thanks! Sorry for the long delay but I only now had time to merge the branches.