summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-07-10 17:52:09 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-07-10 17:52:09 +0100
commit745f1d9ee8480b3a38f778fcc4506ce86da473a6 (patch)
treebbc56de7c7fc5dd24cedd64c5fdbb65fc8e39b28 /configure.ac
parent2105fabddfdcecca68e20285808b4d8bbe133227 (diff)
downloadlibguestfs-745f1d9ee8480b3a38f778fcc4506ce86da473a6.tar.gz
libguestfs-745f1d9ee8480b3a38f778fcc4506ce86da473a6.tar.xz
libguestfs-745f1d9ee8480b3a38f778fcc4506ce86da473a6.zip
Add 'version' call to get true library version number.
This patch also changes the way that the version is specified in configure.ac. It is now made out of four parts (major, minor, release and extra) and constructed for AC_INIT.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 48b57ede..7f965b2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,13 +15,26 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-AC_INIT([libguestfs],[1.0.57])
+# major/minor/release must be numbers
+m4_define([libguestfs_major], [1])
+m4_define([libguestfs_minor], [0])
+m4_define([libguestfs_release], [57])
+# extra can be any string
+m4_define([libguestfs_extra], [])
+
+AC_INIT([libguestfs],libguestfs_major.libguestfs_minor.libguestfs_release[]libguestfs_extra)
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_LIBTOOL
+dnl Split up the version string.
+AC_DEFINE([PACKAGE_VERSION_MAJOR],[libguestfs_major],[Major version number])
+AC_DEFINE([PACKAGE_VERSION_MINOR],[libguestfs_minor],[Minor version number])
+AC_DEFINE([PACKAGE_VERSION_RELEASE],[libguestfs_release],[Release number])
+AC_DEFINE([PACKAGE_VERSION_EXTRA],["libguestfs_extra"],[Extra version string])
+
dnl Check for basic C environment.
AC_PROG_CC_STDC
AC_PROG_INSTALL