blob: 1928422317623bae4a50edf6ae6456f37a11de18 [file] [log] [blame]
Gunnar Mills01a323b2017-01-18 09:48:13 -06001AC_PREREQ([2.69])
2AC_INIT([phosphor-bmc-code-mgmt], [1.0], [https://github.com/openbmc/phosphor-bmc-code-mgmt/issues])
3AC_LANG([C++])
4AC_CONFIG_HEADERS([config.h])
5AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
6AM_SILENT_RULES([yes])
7
8# Checks for programs
9AC_PROG_CXX
10AC_PROG_INSTALL #Checks/sets the install variable to be used
11AC_PROG_MAKE_SET
12
13# Check for libraries
14PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221])
Gunnar Mills32159fb2017-01-31 21:44:36 -060015PKG_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."]))
Deepak Kodihalli059e2332017-04-12 06:40:53 -050019PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\
20 AC_MSG_ERROR(["Requires phosphor-logging package."]))
Gunnar Mills01a323b2017-01-18 09:48:13 -060021
22# Checks for library functions
23LT_INIT # Required for systemd linking
24
25# Checks for typedefs, structures, and compiler characteristics.
26AX_CXX_COMPILE_STDCXX_14([noext])
27AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
28
29AC_ARG_VAR(VERSION_BUSNAME, [The Dbus busname to own])
30AS_IF([test "x$VERSION_BUSNAME" == "x"], [VERSION_BUSNAME="xyz.openbmc_project.Software.BMC.Version"])
31AC_DEFINE_UNQUOTED([VERSION_BUSNAME], ["$VERSION_BUSNAME"], [The DBus busname to own])
32
33AC_ARG_VAR(SOFTWARE_OBJPATH, [The version software manager Dbus root])
34AS_IF([test "x$SOFTWARE_OBJPATH" == "x"], [SOFTWARE_OBJPATH="/xyz/openbmc_project/software"])
35AC_DEFINE_UNQUOTED([SOFTWARE_OBJPATH], ["$SOFTWARE_OBJPATH"], [The version software manager Dbus root])
36
Gunnar Mills701e0212017-04-03 11:21:27 -050037AC_ARG_VAR(DOWNLOAD_BUSNAME, [The Dbus busname to own])
38AS_IF([test "x$DOWNLOAD_BUSNAME" == "x"],
39 [DOWNLOAD_BUSNAME="xyz.openbmc_project.Software.Download"])
40AC_DEFINE_UNQUOTED([DOWNLOAD_BUSNAME], ["$DOWNLOAD_BUSNAME"], [The DBus busname to own])
41
Deepak Kodihalli059e2332017-04-12 06:40:53 -050042AC_ARG_VAR(IMG_UPLOAD_DIR, [Directory where downloaded software images are placed])
43AS_IF([test "x$IMG_UPLOAD_DIR" == "x"], [IMG_UPLOAD_DIR="/tmp/images"])
44AC_DEFINE_UNQUOTED([IMG_UPLOAD_DIR], ["$IMG_UPLOAD_DIR"], [Directory where downloaded software images are placed])
45
Gunnar Mills01a323b2017-01-18 09:48:13 -060046# Check for header files.
47AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd developement package required])])
48AC_CHECK_HEADER(sdbusplus/server.hpp, ,[AC_MSG_ERROR([Could not find sdbusplus/server.hpp...openbmc/sdbusplus package required])])
49
50AC_CONFIG_FILES([Makefile])
51AC_OUTPUT