blob: 083d6237b0e76ee59f1d115cae1d8e9ac9341a5d [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."]))
19
20LT_INIT
21
22AX_CXX_COMPILE_STDCXX_14([noext])
23AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
24
25AC_ARG_VAR(SETTINGS_BUSNAME, [The Dbus busname to own])
26AS_IF([test "x$SETTINGS_BUSNAME" == "x"],\
27 [SETTINGS_BUSNAME="xyz.openbmc_project.Settings"])
28AC_DEFINE_UNQUOTED([SETTINGS_BUSNAME], ["$SETTINGS_BUSNAME"],\
29 [The DBus busname to own])
30
Deepak Kodihalli5de09572017-05-16 23:53:40 -050031AS_IF([test "x$SETTINGS_YAML" == "x"], [SETTINGS_YAML="settings_example.yaml"])
32SETTINGSGEN="$PYTHON $srcdir/settings.py -i $SETTINGS_YAML"
33AC_SUBST(SETTINGSGEN)
34
Deepak Kodihalli7a6f2522017-06-23 23:05:47 -050035AC_ARG_VAR(SETTINGS_PERSIST_PATH, \
36 [Path of directory housing persisted settings.])
37AS_IF([test "x$SETTINGS_PERSIST_PATH" == "x"], \
38 [SETTINGS_PERSIST_PATH="/var/lib/phosphor-settings-manager/settings"])
39AC_DEFINE_UNQUOTED([SETTINGS_PERSIST_PATH], ["$SETTINGS_PERSIST_PATH"], \
40 [Path of directory housing persisted settings])
41
Deepak Kodihalli5de09572017-05-16 23:53:40 -050042AC_CONFIG_FILES([Makefile])
43AC_OUTPUT