blob: edaf4505d7ac39eed422cf06aaf7aab1bc334333 [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
Patrick Williams2b7152f2020-04-02 07:18:32 -050012AM_PATH_PYTHON([3], [AC_SUBST([PYTHON], [echo "$PYTHON"])], [AC_MSG_ERROR(
13 [Could not find python-3 installed...python-3 is required])])
Deepak Kodihalli5de09572017-05-16 23:53:40 -050014
Patrick Venture5d3c69b2019-02-13 15:39:44 -080015PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces])
16PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
17PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
Deepak Kodihalli5de09572017-05-16 23:53:40 -050018
19LT_INIT
20
Patrick Williams75a710c2022-04-15 10:04:50 -050021AX_CXX_COMPILE_STDCXX([20], [noext])
Deepak Kodihalli5de09572017-05-16 23:53:40 -050022AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
23
24AC_ARG_VAR(SETTINGS_BUSNAME, [The Dbus busname to own])
25AS_IF([test "x$SETTINGS_BUSNAME" == "x"],\
26 [SETTINGS_BUSNAME="xyz.openbmc_project.Settings"])
27AC_DEFINE_UNQUOTED([SETTINGS_BUSNAME], ["$SETTINGS_BUSNAME"],\
28 [The DBus busname to own])
29
Deepak Kodihalli5de09572017-05-16 23:53:40 -050030AS_IF([test "x$SETTINGS_YAML" == "x"], [SETTINGS_YAML="settings_example.yaml"])
31SETTINGSGEN="$PYTHON $srcdir/settings.py -i $SETTINGS_YAML"
32AC_SUBST(SETTINGSGEN)
33
Deepak Kodihalli7a6f2522017-06-23 23:05:47 -050034AC_ARG_VAR(SETTINGS_PERSIST_PATH, \
35 [Path of directory housing persisted settings.])
36AS_IF([test "x$SETTINGS_PERSIST_PATH" == "x"], \
37 [SETTINGS_PERSIST_PATH="/var/lib/phosphor-settings-manager/settings"])
38AC_DEFINE_UNQUOTED([SETTINGS_PERSIST_PATH], ["$SETTINGS_PERSIST_PATH"], \
39 [Path of directory housing persisted settings])
40
Vishwanatha Subbannaa29a3eb2017-09-29 19:18:20 +053041AC_ARG_VAR(CLASS_VERSION, [Class version to register with Cereal])
42AS_IF([test "x$CLASS_VERSION" == "x"], [CLASS_VERSION=1])
43AC_DEFINE_UNQUOTED([CLASS_VERSION], [$CLASS_VERSION], [Class version to register with Cereal])
44
Deepak Kodihalli5de09572017-05-16 23:53:40 -050045AC_CONFIG_FILES([Makefile])
46AC_OUTPUT