Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 1 | AC_PREREQ([2.69]) |
| 2 | AC_INIT([openpower-occ-control], [1.0], [https://github.com/openbmc/openpower-occ-control/issues]) |
| 3 | |
| 4 | AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) |
| 5 | AM_SILENT_RULES([yes]) |
| 6 | |
| 7 | # Checks for programs |
| 8 | AC_PROG_CXX |
| 9 | AM_PROG_AR |
| 10 | AC_PROG_INSTALL |
| 11 | AC_PROG_MAKE_SET |
| 12 | |
| 13 | # Surpress the --with-libtool-sysroot error |
| 14 | LT_INIT |
| 15 | |
| 16 | PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\ |
| 17 | AC_MSG_ERROR(["Requires sdbusplus package."])) |
| 18 | PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\ |
| 19 | AC_MSG_ERROR(["Requires phosphor-logging package."])) |
| 20 | PKG_CHECK_MODULES([OPENPOWER_DBUS_INTERFACES], [openpower-dbus-interfaces],,\ |
| 21 | AC_MSG_ERROR(["Requires openpower-dbus-interfaces package."])) |
| 22 | |
Vishwanatha Subbanna | 9bb065b | 2017-04-18 14:25:26 +0530 | [diff] [blame] | 23 | # Check for sdbusplus |
| 24 | PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],, [AC_MSG_ERROR(["sdbusplus packaged required and not found"])]) |
| 25 | |
| 26 | # Check for sdbus++ tool |
| 27 | AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) |
| 28 | AS_IF([test "x$SDBUSPLUSPLUS" == "x"], AC_MSG_ERROR([Cannot find sdbus++])) |
| 29 | |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 30 | # Checks for typedefs, structures, and compiler characteristics. |
| 31 | AX_CXX_COMPILE_STDCXX_14([noext]) |
| 32 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 33 | |
Vishwanatha Subbanna | 2180b2d | 2017-06-28 14:05:57 +0530 | [diff] [blame] | 34 | AC_ARG_VAR(OCC_CONTROL_BUSNAME, [The Dbus busname to own]) |
| 35 | AS_IF([test "x$OCC_CONTROL_BUSNAME" == "x"], [OCC_CONTROL_BUSNAME="org.open_power.OCC.Control"]) |
| 36 | AC_DEFINE_UNQUOTED([OCC_CONTROL_BUSNAME], ["$OCC_CONTROL_BUSNAME"], [The DBus busname to own]) |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 37 | |
Vishwanatha Subbanna | 2180b2d | 2017-06-28 14:05:57 +0530 | [diff] [blame] | 38 | AC_ARG_VAR(OCC_CONTROL_ROOT, [The Dbus root]) |
| 39 | AS_IF([test "x$OCC_CONTROL_ROOT" == "x"], [OCC_CONTROL_ROOT="/org/open_power/control"]) |
| 40 | AC_DEFINE_UNQUOTED([OCC_CONTROL_ROOT], ["$OCC_CONTROL_ROOT"], [The Dbus root]) |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 41 | |
| 42 | AC_ARG_VAR(INVENTORY_ITEM_INTERFACE, [The Inventory.Item interface]) |
| 43 | AS_IF([test "x$INVENTORY_ITEM_INTERFACE" == "x"], [INVENTORY_ITEM_INTERFACE="xyz.openbmc_project.Inventory.Item"]) |
| 44 | AC_DEFINE_UNQUOTED([INVENTORY_ITEM_INTERFACE], ["$INVENTORY_ITEM_INTERFACE"], [The Inventory.Item root]) |
| 45 | |
Deepak Kodihalli | fd358d1 | 2017-05-08 07:11:22 -0500 | [diff] [blame] | 46 | AC_ARG_VAR(CPU_PATH, [CPU inventory path]) |
| 47 | AS_IF([test "x$CPU_PATH" == "x"], [CPU_PATH="/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu"]) |
| 48 | AC_DEFINE_UNQUOTED([CPU_PATH], ["$CPU_PATH"], [CPU inventory path]) |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 49 | |
Deepak Kodihalli | fd358d1 | 2017-05-08 07:11:22 -0500 | [diff] [blame] | 50 | AC_ARG_VAR(MAX_CPUS, [The max number of CPUs]) |
| 51 | AS_IF([test "x$MAX_CPUS" == "x"], [MAX_CPUS=2]) |
| 52 | AC_DEFINE_UNQUOTED([MAX_CPUS], [$MAX_CPUS], [The max number of CPUs]) |
| 53 | |
| 54 | AC_ARG_VAR(CPU_NAME, [The CPU object name]) |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 55 | AS_IF([test "x$CPU_NAME" == "x"], [CPU_NAME="cpu"]) |
Deepak Kodihalli | fd358d1 | 2017-05-08 07:11:22 -0500 | [diff] [blame] | 56 | AC_DEFINE_UNQUOTED([CPU_NAME], ["$CPU_NAME"], [The CPU object name]) |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 57 | |
Deepak Kodihalli | fd358d1 | 2017-05-08 07:11:22 -0500 | [diff] [blame] | 58 | AC_ARG_VAR(OCC_NAME, [The OCC object name]) |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 59 | AS_IF([test "x$OCC_NAME" == "x"], [OCC_NAME="occ"]) |
Deepak Kodihalli | fd358d1 | 2017-05-08 07:11:22 -0500 | [diff] [blame] | 60 | AC_DEFINE_UNQUOTED([OCC_NAME], ["$OCC_NAME"], [The OCC object name]) |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 61 | |
Vishwanatha Subbanna | 32e84e9 | 2017-06-28 19:17:28 +0530 | [diff] [blame^] | 62 | AC_ARG_VAR(OCC_HWMON_PATH, [The OCC hwmon path]) |
| 63 | AS_IF([test "x$OCC_HWMON_PATH" == "x"], [OCC_HWMON_PATH="/sys/bus/platform/drivers/occ-hwmon/"]) |
| 64 | AC_DEFINE_UNQUOTED([OCC_HWMON_PATH], ["$OCC_HWMON_PATH"], [The OCC hwmon path]) |
| 65 | |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 66 | AC_CONFIG_HEADERS([config.h]) |
| 67 | AC_CONFIG_FILES([Makefile]) |
| 68 | AC_OUTPUT |