summaryrefslogtreecommitdiff
path: root/lib/talloc/configure.ac
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-08-20 13:43:42 +0200
committerAndrew Tridgell <tridge@samba.org>2009-08-24 16:29:58 +1000
commit6c9ace27c591e48fdffdf5add6b4e11b2f669922 (patch)
tree3aac85ba1c52b0795bc543cc80d0b0657e3a8611 /lib/talloc/configure.ac
parent9baacbbbdf766b87512f6d0f518f91decbbf2e2b (diff)
downloadsamba-6c9ace27c591e48fdffdf5add6b4e11b2f669922.tar.gz
samba-6c9ace27c591e48fdffdf5add6b4e11b2f669922.tar.bz2
samba-6c9ace27c591e48fdffdf5add6b4e11b2f669922.zip
talloc: add defines and functions for TALLOC_MAJOR/MINOR_VERSION
We also use the major and minor versions in the TALLOC_MAGIC, so that we can detect if two conflicting versions of talloc are loaded in one process. In this case we use talloc_log() to output a very useful debug message before we call talloc_abort(). metze
Diffstat (limited to 'lib/talloc/configure.ac')
-rw-r--r--lib/talloc/configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac
index d6471a4aa7..49f396cf61 100644
--- a/lib/talloc/configure.ac
+++ b/lib/talloc/configure.ac
@@ -4,6 +4,26 @@ AC_CONFIG_SRCDIR([talloc.c])
AC_SUBST(datarootdir)
AC_CONFIG_HEADER(config.h)
+TALLOC_VERSION=${PACKAGE_VERSION}
+TALLOC_VERSION_MAJOR=`echo ${PACKAGE_VERSION} | cut -d '.' -f1`
+TALLOC_VERSION_MINOR=`echo ${PACKAGE_VERSION} | cut -d '.' -f2`
+TALLOC_VERSION_RELEASE=`echo ${PACKAGE_VERSION} | cut -d '.' -f3`
+
+AC_SUBST(TALLOC_VERSION)
+AC_SUBST(TALLOC_VERSION_MAJOR)
+AC_SUBST(TALLOC_VERSION_MINOR)
+AC_SUBST(TALLOC_VERSION_RELEASE)
+
+AC_DEFINE_UNQUOTED(TALLOC_BUILD_VERSION_MAJOR,
+ [${TALLOC_VERSION_MAJOR}],
+ [talloc major version])
+AC_DEFINE_UNQUOTED(TALLOC_BUILD_VERSION_MINOR,
+ [${TALLOC_VERSION_MINOR}],
+ [talloc minor version])
+AC_DEFINE_UNQUOTED(TALLOC_BUILD_VERSION_RELEASE,
+ [${TALLOC_VERSION_RELEASE}],
+ [talloc release version])
+
AC_LIBREPLACE_ALL_CHECKS
AC_LD_PICFLAG