Deepak Kodihalli | 5de0957 | 2017-05-16 23:53:40 -0500 | [diff] [blame] | 1 | AC_PREREQ([2.69]) |
| 2 | AC_INIT([phosphor-settingsd], [1.0], [https://github.com/openbmc/phosphor-settingsd/issues]) |
| 3 | AC_LANG([C++]) |
| 4 | AC_CONFIG_HEADERS([config.h]) |
| 5 | AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) |
| 6 | AM_SILENT_RULES([yes]) |
| 7 | |
| 8 | AC_PROG_CXX |
| 9 | AM_PROG_AR |
| 10 | AC_PROG_INSTALL |
| 11 | AC_PROG_MAKE_SET |
| 12 | AM_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 | |
| 15 | PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],,\ |
| 16 | AC_MSG_ERROR(["Requires phosphor-dbus-interfaces package."])) |
| 17 | PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],, |
| 18 | AC_MSG_ERROR(["Requires sdbusplus package."])) |
Dhruvaraj Subhashchandran | 61d3b6a | 2017-07-25 09:36:54 -0500 | [diff] [blame] | 19 | PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\ |
| 20 | AC_MSG_ERROR(["Requires phosphor-logging package."])) |
Deepak Kodihalli | 5de0957 | 2017-05-16 23:53:40 -0500 | [diff] [blame] | 21 | |
| 22 | LT_INIT |
| 23 | |
| 24 | AX_CXX_COMPILE_STDCXX_14([noext]) |
| 25 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 26 | |
| 27 | AC_ARG_VAR(SETTINGS_BUSNAME, [The Dbus busname to own]) |
| 28 | AS_IF([test "x$SETTINGS_BUSNAME" == "x"],\ |
| 29 | [SETTINGS_BUSNAME="xyz.openbmc_project.Settings"]) |
| 30 | AC_DEFINE_UNQUOTED([SETTINGS_BUSNAME], ["$SETTINGS_BUSNAME"],\ |
| 31 | [The DBus busname to own]) |
| 32 | |
Deepak Kodihalli | 5de0957 | 2017-05-16 23:53:40 -0500 | [diff] [blame] | 33 | AS_IF([test "x$SETTINGS_YAML" == "x"], [SETTINGS_YAML="settings_example.yaml"]) |
| 34 | SETTINGSGEN="$PYTHON $srcdir/settings.py -i $SETTINGS_YAML" |
| 35 | AC_SUBST(SETTINGSGEN) |
| 36 | |
Deepak Kodihalli | 7a6f252 | 2017-06-23 23:05:47 -0500 | [diff] [blame] | 37 | AC_ARG_VAR(SETTINGS_PERSIST_PATH, \ |
| 38 | [Path of directory housing persisted settings.]) |
| 39 | AS_IF([test "x$SETTINGS_PERSIST_PATH" == "x"], \ |
| 40 | [SETTINGS_PERSIST_PATH="/var/lib/phosphor-settings-manager/settings"]) |
| 41 | AC_DEFINE_UNQUOTED([SETTINGS_PERSIST_PATH], ["$SETTINGS_PERSIST_PATH"], \ |
| 42 | [Path of directory housing persisted settings]) |
| 43 | |
Vishwanatha Subbanna | a29a3eb | 2017-09-29 19:18:20 +0530 | [diff] [blame] | 44 | AC_ARG_VAR(CLASS_VERSION, [Class version to register with Cereal]) |
| 45 | AS_IF([test "x$CLASS_VERSION" == "x"], [CLASS_VERSION=1]) |
| 46 | AC_DEFINE_UNQUOTED([CLASS_VERSION], [$CLASS_VERSION], [Class version to register with Cereal]) |
| 47 | |
Deepak Kodihalli | 5de0957 | 2017-05-16 23:53:40 -0500 | [diff] [blame] | 48 | AC_CONFIG_FILES([Makefile]) |
| 49 | AC_OUTPUT |