summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-16 17:24:36 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-16 17:24:36 +0000
commitad1417713b564bf28605077220b86794b9dbbcd6 (patch)
tree4dcf44b5c9e5e9e53e0b5e1fde460bc707f04329 /configure.ac
parent09f342fdebd1889c3c6e401cb2a6c5799a6c20ed (diff)
simplify efl version and initialization in a macro, fixes libtool version-info.
Introduces EFL_VERSION() to make it simpler to define our version. The last parameter is the release status, defaults to 'dev' for development purposes and may be set to something else to be a snapshot. It non-empty will be given to libtool's -release. As EFL_VERSION() must be done *before* AC_INIT(), we need to create another macro to do the AC_SUBST() and AC_DEFINE(). This is EFL_INIT. And no, we can't just call AC_INIT() from inside EFL_INIT(). Last but not least, we had a problem with our libtool version-info. It was being calculated as MAJOR + MINOR, right now 1 + 7 = 8. But as soon as we get to MAJOR=2 and MINOR=0, we get into problems. This was fixed by rewriting as (MAJOR * 100 + MINOR), but this is still problematic. According to libtool's manual (info libtool), we shouldn't bind the version-info with package info, instead doing the 'release' field. Pretty likely we'll do worse than expected by distros and binary packages in future :-/ SVN revision: 82891
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac44
1 files changed, 4 insertions, 40 deletions
diff --git a/configure.ac b/configure.ac
index 4782315..9939d60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,27 +1,6 @@
1m4_define([v_maj], [1]) 1EFL_VERSION([1], [7], [99], [dev])
2m4_define([v_min], [7])
3m4_define([v_mic], [99])
4
5m4_define([v_rev], m4_esyscmd([(LC_ALL=C svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
6m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
7
8#### FIXME: i am sure that we can do some m4 to automagically do the stuff below for release and snapshots
9
10##-- When released, remove the dnl on the below line
11dnl m4_undefine([v_rev])
12
13m4_define([v_rel], [])
14##-- When doing snapshots - change soname. remove dnl on below line
15dnl m4_define([relname], [ver-pre-svn-07])
16dnl m4_define([v_rel], [-release relname])
17
18m4_ifdef([v_rev], [m4_define([efl_version], [v_maj.v_min.v_mic.v_rev])], [m4_define([efl_version], [v_maj.v_min.v_mic])])
19
20m4_define([lt_cur], m4_eval(v_maj + v_min))
21m4_define([lt_rev], v_mic)
22m4_define([lt_age], v_min)
23
24AC_INIT([efl], [efl_version], [enlightenment-devel@lists.sourceforge.net]) 2AC_INIT([efl], [efl_version], [enlightenment-devel@lists.sourceforge.net])
3
25AC_PREREQ([2.60]) 4AC_PREREQ([2.60])
26AC_CONFIG_SRCDIR([configure.ac]) 5AC_CONFIG_SRCDIR([configure.ac])
27AC_CONFIG_MACRO_DIR([m4]) 6AC_CONFIG_MACRO_DIR([m4])
@@ -40,17 +19,6 @@ AC_USE_SYSTEM_EXTENSIONS
40AM_INIT_AUTOMAKE([1.6 dist-bzip2 -Wall color-tests]) 19AM_INIT_AUTOMAKE([1.6 dist-bzip2 -Wall color-tests])
41m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 20m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
42 21
43m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
44AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version])
45AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])
46AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])
47AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])
48VMAJ=v_maj
49VMIN=v_min
50AC_SUBST([VMAJ])
51AC_SUBST([VMIN])
52
53
54#### Additional options to configure 22#### Additional options to configure
55 23
56AC_ARG_WITH([profile], 24AC_ARG_WITH([profile],
@@ -58,7 +26,7 @@ AC_ARG_WITH([profile],
58 [use the predefined build profile, one of: dev, debug and release. 26 [use the predefined build profile, one of: dev, debug and release.
59 @<:@default=dev@:>@])], 27 @<:@default=dev@:>@])],
60 [build_profile=${withval}], 28 [build_profile=${withval}],
61 [build_profile=dev]) 29 [build_profile=def_build_profile])
62 30
63case "${build_profile}" in 31case "${build_profile}" in
64 dev|debug|release) 32 dev|debug|release)
@@ -219,11 +187,7 @@ if test "x${have_windows}" = "xyes" ; then
219fi 187fi
220AM_PROG_AR 188AM_PROG_AR
221LT_INIT([win32-dll disable-static pic-only]) 189LT_INIT([win32-dll disable-static pic-only])
222EFL_LTLIBRARY_FLAGS="-no-undefined -version-info lt_cur:lt_rev:lt_age v_rel" 190EFL_INIT
223AC_SUBST(EFL_LTLIBRARY_FLAGS)
224
225EFL_LTMODULE_FLAGS="-no-undefined -avoid-version"
226AC_SUBST([EFL_LTMODULE_FLAGS])
227 191
228### gettext 192### gettext
229 193