Commit 2a52fcc8 authored by Slava Monich's avatar Slava Monich

[build] Pass package version to configure

The goal is to improve version check for external plugins.
parent fa47a7c2
......@@ -3,7 +3,7 @@ AC_INIT(connman, 1.32)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
AM_INIT_AUTOMAKE([foreign subdir-objects color-tests no-define])
AC_CONFIG_HEADERS([config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
......@@ -35,6 +35,18 @@ AC_PROG_LIBTOOL
gl_CONFIGMAKE_PREP
AC_ARG_WITH(version, AC_HELP_STRING([--with-version=VERSION],
[specify package version]), [connman_version=${withval}])
if (test -z "${connman_version}"); then
connman_version="${VERSION}"
else
VERSION="${connman_version}"
PACKAGE_VERSION="${connman_version}"
fi
AC_DEFINE_UNQUOTED([VERSION], ["${connman_version}"], [Actual package version])
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
[disable code optimization through compiler]), [
if (test "${enableval}" = "no"); then
......
......@@ -105,6 +105,7 @@ Documentation for connman.
%build
%reconfigure --disable-static \
--with-version=%{version} \
--enable-ethernet=builtin \
--disable-wifi \
--enable-bluetooth=builtin \
......@@ -128,7 +129,6 @@ Documentation for connman.
--with-systemdunitdir=/%{_lib}/systemd/system \
--enable-systemd \
--with-tmpfilesdir=%{_libdir}/tmpfiles.d
make %{?_smp_mflags}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment