Re: Tiny bit of autoconf/automake help on librsvg head?



Darin Adler wrote:

I'd like to make a first release of the Gnome 2 librsvg, now that it has
been ported to use Pango instead of directly relying on FreeType. But even
though it is a simple little package, it has some minor problems in
configure.in -- specifically it requires autoconf 2.52 for no good reason
and the version number (1.1) is repeated in two different place.

Is there an autoconf/automake expert who'd be willing to spend a few minutes
tweaking the configure.in file for me so I can do a release?

For some of my packages, I use some m4 macros to specify the version number. The top of the pygtk configure.in file looks like the following:

-*- mode: m4 -*-
AC_PREREQ(2.52)

dnl the pygtk version number
m4_define(pygtk_major_version, 1)
m4_define(pygtk_minor_version, 99)
m4_define(pygtk_micro_version, 6)
m4_define(pygtk_version, pygtk_major_version.pygtk_minor_version.pygtk_micro_version)

AC_INIT(pygtk, pygtk_version,
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-python&component=pygtk])

AC_DEFINE(PYGTK_MAJOR_VERSION, pygtk_major_version, [PyGtk major version])
AC_DEFINE(PYGTK_MINOR_VERSION, pygtk_minor_version, [PyGtk minor version])
AC_DEFINE(PYGTK_MICRO_VERSION, pygtk_micro_version, [PyGtk macro version])

AC_CONFIG_SRCDIR([gtk/gtkmodule.c])
AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)


This way I only list the version number once, and anywhere I want to repeat it, I just use "pygtk_version". I use similar code to list the required versions of other packages at the top of the configure.in file, so that they are easy to update. This is straight macro substitution, so choose macro names that aren't used in other parts of the script.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/



_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers



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