aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2015-03-05 20:09:28 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2015-03-07 13:19:08 -0800
commita982586c9ae5fc979d8f489a4b54c606feecf5b1 (patch)
treed09cb738e3f34afd9cb84e02bfb8b6c60d1fbb9e
parent9e0b45348bd2c3c0460ea807a3808d58a56bfdca (diff)
downloadpaludis-a982586c9ae5fc979d8f489a4b54c606feecf5b1.tar.gz
paludis-a982586c9ae5fc979d8f489a4b54c606feecf5b1.tar.xz
build: modernise use of AM_INIT_AUTOMAKE
The two and three argument forms of AM_INIT_AUTOMAKE are deprecated. Update the invocation as recommended. See: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation In order to keep the previous functionality of only defining the version once, resort to some acrobatics with m4 macros. The AC_INIT parameter for the package version (AC_PACKAGE_VERSION) must be a literal (known at autoconf time). As a result, we need to use m4 macros instead of shell values. The strings cannot be named the same since the substitution would become value=value rather than name=value.
-rw-r--r--configure.ac30
1 files changed, 16 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 7f43366..dbc07c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,31 +1,33 @@
dnl vim: set sw=4 sts=4 ts=4 noet ft=config foldmethod=marker foldmarker={{{,}}} :
dnl {{{ program, version
+m4_define([MAJOR_VERSION], [2])
+m4_define([MINOR_VERSION], [2])
+m4_define([MICRO_VERSION], [0])
+m4_define([SUFFIX], [])
+m4_define([FULL_VERSION],
+ m4_join([], m4_joinall([.], MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION),
+ SUFFIX))
+
AC_PREREQ([2.65])
-AC_INIT
+AC_INIT([paludis], [FULL_VERSION])
AC_CONFIG_SRCDIR([paludis/paludis.hh])
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
-VERSION_MAJOR=2
-VERSION_MINOR=2
-VERSION_MICRO=0
-VERSION_SUFFIX=
-VERSION_FULL="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_MICRO$VERSION_SUFFIX"
-VERSION="$VERSION_FULL"
+AC_SUBST([VERSION_MAJOR], MAJOR_VERSION)
+AC_SUBST([VERSION_MINOR], MINOR_VERSION)
+AC_SUBST([VERSION_MICRO], MICRO_VERSION)
+AC_SUBST([VERSION_FULL], FULL_VERSION)
+AC_SUBST([VERSION_SUFFIX], SUFFIX)
+
VERSION_LIB_CURRENT=`expr 100 '*' $VERSION_MAJOR + $VERSION_MINOR`
VERSION_LIB_REVISION="$VERSION_MICRO"
-
-AC_SUBST([VERSION_MAJOR])
-AC_SUBST([VERSION_MINOR])
-AC_SUBST([VERSION_MICRO])
-AC_SUBST([VERSION_FULL])
-AC_SUBST([VERSION_SUFFIX])
AC_SUBST([VERSION_LIB_CURRENT])
AC_SUBST([VERSION_LIB_REVISION])
-AM_INIT_AUTOMAKE(paludis, [$VERSION_FULL])
+AM_INIT_AUTOMAKE
AC_LANG([C++])
PALUDIS_CXXFLAGS=