summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2009-11-12 11:20:16 -0700
committerRich Megginson <rmeggins@redhat.com>2009-11-16 11:48:40 -0700
commit2b2c26069aee6c0ead2c6ed95de5f181089025ac (patch)
tree201239e716a3621f76a0bd5351e0342df3751078 /configure.ac
parent4c333c131975debacd65bdb5a96b7a56e9012048 (diff)
downloadds-2b2c26069aee6c0ead2c6ed95de5f181089025ac.tar.gz
ds-2b2c26069aee6c0ead2c6ed95de5f181089025ac.tar.xz
ds-2b2c26069aee6c0ead2c6ed95de5f181089025ac.zip
Implement support for versioning and release engineering procedures - version 1.2.5.a1389-ds-base-1.2.5.a1
Instead of changing configure.ac AC_INIT for each version change, there is a new file - VERSION.sh. This file also contains support for creating version numbers for pre-releases, and pre-release strings containing git commit hashes. One of the complications is that AC_INIT does not allow you to override the version and package tarname fields. We can override them after the fact everywhere except in config.h. AC_INIT defines the following which we would like to override but cannot: PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_STRING PACKAGE_BUGREPORT Instead, we define DS_ versions of these e.g. DS_PACKAGE_VERSION etc. and make these available with AC_DEFINE(DS_PACKAGE_VERSION,...) etc. As an extra added precaution, we undefine these in Makefile.am like this: DS_DEFINES = ... \ -UPACKAGE_VERSION -UPACKAGE_TARNAME -UPACKAGE_STRING -UPACKAGE_BUGREPORT If someone tries to use PACKAGE_VERSION in C code, they will not be able to, and will have to use DS_PACKAGE_VERSION instead. All of the DS code that used PACKAGE_VERSION has been changed to use DS_PACKAGE_VERSION instead. There is a new make target - git-archive - as a convenience for creating source tarballs from git. By default, the source archive will be placed in the build directory - you can specify SRCDISTDIR=/path/to/SOURCES to use an alternate dir (e.g. make SRCDISTDIR=/path/to/rpmbuild/SOURCES git-archive to make a source tarball for rpmbuild) configure will print the branded package name and version Reviewed by: nkinder (Thanks!)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 14 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 7f1fbcea..3d18c4a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,22 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-# This version is the version returned by ns-slapd -v
-AC_INIT([dirsrv], [1.2.4], [http://bugzilla.redhat.com/])
+AC_INIT([dirsrv],[1.0],[http://bugzilla.redhat.com/])
# AC_CONFIG_HEADER must be called right after AC_INIT.
AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([1.9 foreign subdir-objects])
+# include the version information
+. $srcdir/VERSION.sh
+AC_MSG_NOTICE(This is configure for $PACKAGE_TARNAME $PACKAGE_VERSION)
+AC_DEFINE_UNQUOTED([DS_PACKAGE_VERSION], "$PACKAGE_VERSION", [package version])
+AC_DEFINE_UNQUOTED([DS_PACKAGE_TARNAME], "$PACKAGE_TARNAME", [package tarball name])
+AC_DEFINE_UNQUOTED([DS_PACKAGE_BUGREPORT], "$PACKAGE_BUGREPORT", [package bug report url])
+AC_DEFINE_UNQUOTED([DS_PACKAGE_STRING], "$PACKAGE_STRING", [package string])
+AM_INIT_AUTOMAKE([1.9 foreign subdir-objects dist-bzip2 no-dist-gzip no-define])
+# define these for automake distdir
+VERSION=$PACKAGE_VERSION
+PACKAGE=$PACKAGE_TARNAME
+AC_DEFINE_UNQUOTED([VERSION], "$VERSION", [package version])
+AC_DEFINE_UNQUOTED([PACKAGE], "$PACKAGE", [package tar name])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
@@ -185,10 +196,6 @@ AM_CONDITIONAL(enable_presence,test "$enable_presence" = "yes")
# the default prefix - override with --prefix or --with-fhs
AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME])
-brand=389
-capbrand=389
-vendor="389 Project"
-
m4_include(m4/fhs.m4)
# installation paths - by default, we store everything