blob: ec6df595dfc03a520fc5fa9735ab706091b51b08 [file] [log] [blame]
Deepak Kodihalli5de09572017-05-16 23:53:40 -05001AC_PREREQ([2.69])
2AC_INIT([phosphor-settingsd], [1.0], [https://github.com/openbmc/phosphor-settingsd/issues])
3AC_LANG([C++])
4AC_CONFIG_HEADERS([config.h])
5AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
6AM_SILENT_RULES([yes])
7
8AC_PROG_CXX
9AM_PROG_AR
10AC_PROG_INSTALL
11AC_PROG_MAKE_SET
12AM_PATH_PYTHON([2.7], [AC_SUBST([PYTHON], [echo "$PYTHON"])], [AC_MSG_ERROR(
13 [Could not find python-2.7 installed...python-2.7 is required])])
14
15PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],,\
16 AC_MSG_ERROR(["Requires phosphor-dbus-interfaces package."]))
17PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,
18 AC_MSG_ERROR(["Requires sdbusplus package."]))
Dhruvaraj Subhashchandran61d3b6a2017-07-25 09:36:54 -050019PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\
20 AC_MSG_ERROR(["Requires phosphor-logging package."]))
Deepak Kodihalli5de09572017-05-16 23:53:40 -050021
22LT_INIT
23
24AX_CXX_COMPILE_STDCXX_14([noext])
25AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
26
27AC_ARG_VAR(SETTINGS_BUSNAME, [The Dbus busname to own])
28AS_IF([test "x$SETTINGS_BUSNAME" == "x"],\
29 [SETTINGS_BUSNAME="xyz.openbmc_project.Settings"])
30AC_DEFINE_UNQUOTED([SETTINGS_BUSNAME], ["$SETTINGS_BUSNAME"],\
31 [The DBus busname to own])
32
Deepak Kodihalli5de09572017-05-16 23:53:40 -050033AS_IF([test "x$SETTINGS_YAML" == "x"], [SETTINGS_YAML="settings_example.yaml"])
34SETTINGSGEN="$PYTHON $srcdir/settings.py -i $SETTINGS_YAML"
35AC_SUBST(SETTINGSGEN)
36
Deepak Kodihalli7a6f2522017-06-23 23:05:47 -050037AC_ARG_VAR(SETTINGS_PERSIST_PATH, \
38 [Path of directory housing persisted settings.])
39AS_IF([test "x$SETTINGS_PERSIST_PATH" == "x"], \
40 [SETTINGS_PERSIST_PATH="/var/lib/phosphor-settings-manager/settings"])
41AC_DEFINE_UNQUOTED([SETTINGS_PERSIST_PATH], ["$SETTINGS_PERSIST_PATH"], \
42 [Path of directory housing persisted settings])
43
Vishwanatha Subbannaa29a3eb2017-09-29 19:18:20 +053044AC_ARG_VAR(CLASS_VERSION, [Class version to register with Cereal])
45AS_IF([test "x$CLASS_VERSION" == "x"], [CLASS_VERSION=1])
46AC_DEFINE_UNQUOTED([CLASS_VERSION], [$CLASS_VERSION], [Class version to register with Cereal])
47
Deepak Kodihalli5de09572017-05-16 23:53:40 -050048AC_CONFIG_FILES([Makefile])
49AC_OUTPUT