build: print version on startup and add dist-version
Distributions should set dist-version at build time with the package version and revision, so for RPM-based distros you'd --with-dist-version=%{version}-%{release} which will be printed out on MM startup to help debugging.
This commit is contained in:
@@ -126,6 +126,14 @@ else
|
|||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(WITH_LOCATION_API, test "x$with_location_api" = "xyes")
|
AM_CONDITIONAL(WITH_LOCATION_API, test "x$with_location_api" = "xyes")
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Distribution version string
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=<mm-dist-version>], [Define the custom version (like distribution package name and revision)]), ac_distver=$withval, ac_distver="")
|
||||||
|
if ! test x"$ac_distver" = x""; then
|
||||||
|
AC_DEFINE_UNQUOTED(MM_DIST_VERSION, "$ac_distver", [Define the distribution version string])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
marshallers/Makefile
|
marshallers/Makefile
|
||||||
|
@@ -11,9 +11,10 @@
|
|||||||
* GNU General Public License for more details:
|
* GNU General Public License for more details:
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 - 2009 Novell, Inc.
|
* Copyright (C) 2008 - 2009 Novell, Inc.
|
||||||
* Copyright (C) 2009 Red Hat, Inc.
|
* Copyright (C) 2009 - 2010 Red Hat, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -23,7 +24,9 @@
|
|||||||
#include "mm-manager.h"
|
#include "mm-manager.h"
|
||||||
#include "mm-options.h"
|
#include "mm-options.h"
|
||||||
|
|
||||||
#define HAL_DBUS_SERVICE "org.freedesktop.Hal"
|
#if !defined(MM_DIST_VERSION)
|
||||||
|
# define MM_DIST_VERSION VERSION
|
||||||
|
#endif
|
||||||
|
|
||||||
static GMainLoop *loop = NULL;
|
static GMainLoop *loop = NULL;
|
||||||
|
|
||||||
@@ -182,6 +185,8 @@ main (int argc, char *argv[])
|
|||||||
if (!mm_options_debug ())
|
if (!mm_options_debug ())
|
||||||
logging_setup ();
|
logging_setup ();
|
||||||
|
|
||||||
|
g_message ("ModemManager (version " MM_DIST_VERSION ") starting...");
|
||||||
|
|
||||||
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err);
|
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err);
|
||||||
if (!bus) {
|
if (!bus) {
|
||||||
g_warning ("Could not get the system bus. Make sure "
|
g_warning ("Could not get the system bus. Make sure "
|
||||||
|
Reference in New Issue
Block a user