1 #######################################################################################################################
3 # Copyright (C) 2012 Continental Automotive Systems, Inc.
5 # Author: Jean-Pierre.Bogler@continental-corporation.com
7 # Configure template for the NodeStateManager
9 # Process this file with autoconf to produce a configure script.
11 # This Source Code Form is subject to the terms of the Mozilla Public
12 # License, v. 2.0. If a copy of the MPL was not distributed with this
13 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
15 #######################################################################################################################
18 AC_INIT([node-state-manager],[2.0.0])
19 AC_COPYRIGHT([Copyright (c) 2012 Continental Automotive GmbH])
23 AM_INIT_AUTOMAKE([tar-ustar])
24 AC_CONFIG_MACRO_DIR([m4])
25 AC_SUBST([ACLOCAL_AMFLAGS], ["$ACLOCAL_FLAGS -I m4"])
28 LT_INIT([disable-static])
30 # Check for basic programs
34 # Check for basic headers
35 AC_CHECK_HEADERS([string.h])
37 # Check for basic functions
38 AC_CHECK_FUNCS([memcpy])
40 # Check for required packages
41 PKG_CHECK_MODULES([DLT], [automotive-dlt >= 2.2.0 ])
42 PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.30.0])
43 PKG_CHECK_MODULES([GIO_UNIX], [gio-unix-2.0 >= 2.30.0])
44 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.30.0])
45 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.30.0])
46 PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.4.10])
47 PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon >= 37 ])
48 PKG_CHECK_MODULES([PCL], [persistence_client_library >= 0.6.0 ])
50 # Derive path for storing systemd service files (e. g. /lib/systemd/system)
51 AC_ARG_WITH([systemdsystemunitdir],
52 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
53 [with_systemdsystemunitdir="$withval"],
54 [with_systemdsystemunitdir=$(pkg-config --silence-errors --variable=systemdsystemunitdir systemd)])
56 if test "x${with_systemdsystemunitdir}" = "x"; then
57 with_systemdsystemunitdir="/lib/systemd/system"
60 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
62 # Derive path for storing 'dbus' service files (e. g. /usr/share/dbus-1/system-services)
63 AC_ARG_WITH([dbussystemunitdir],
64 AS_HELP_STRING([--with-dbussystemunitdir=DIR], [Directory for D-Bus system service files]),
66 [with_dbussystemunitdir=$(pkg-config --silence-errors --variable=system_bus_services_dir dbus-1)])
67 AC_SUBST([dbussystemunitdir], [$with_dbussystemunitdir])
69 # Derive path for storing 'dbus' policy files (e. g. /etc)
70 AC_ARG_WITH([dbuspolicydir],
71 AS_HELP_STRING([--with-dbuspolicydirdir=DIR], [Directory for D-Bus system policy files]),
73 [with_dbuspolicydir=$(pkg-config --silence-errors --variable=sysconfdir dbus-1)/dbus-1/system.d])
74 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
76 # Derive path for storing 'dbus' interface files (e. g. /usr/share/dbus-1/interfaces)
77 AC_ARG_WITH([dbusinterfacesdir],
78 AS_HELP_STRING([--with-dbusinterfacesdir=DIR], [Directory for D-Bus interface files]),
80 [with_dbusinterfacesdir=$(pkg-config --silence-errors --variable=interfaces_dir dbus-1)])
81 AC_SUBST([dbusinterfacesdir], [$with_dbusinterfacesdir])
83 # Define configure output
84 AC_CONFIG_FILES([Makefile
85 NodeStateManager/Makefile
86 NodeStateTest/Makefile
87 NodeStateAccess/Makefile
88 NodeStateMachineStub/Makefile
89 NodeStateManager/config/nodestatemanager-daemon.service
90 NodeStateManager/config/org.genivi.NodeStateManager.LifeCycleControl.service
91 NodeStateManager/config/node-state-manager.pc])