Gunnar Mills | 01a323b | 2017-01-18 09:48:13 -0600 | [diff] [blame] | 1 | AC_PREREQ([2.69]) |
| 2 | AC_INIT([phosphor-bmc-code-mgmt], [1.0], [https://github.com/openbmc/phosphor-bmc-code-mgmt/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 | # Checks for programs |
| 9 | AC_PROG_CXX |
| 10 | AC_PROG_INSTALL #Checks/sets the install variable to be used |
| 11 | AC_PROG_MAKE_SET |
| 12 | |
| 13 | # Check for libraries |
| 14 | PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221]) |
Gunnar Mills | 32159fb | 2017-01-31 21:44:36 -0600 | [diff] [blame] | 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."])) |
Deepak Kodihalli | 059e233 | 2017-04-12 06:40:53 -0500 | [diff] [blame] | 19 | PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\ |
| 20 | AC_MSG_ERROR(["Requires phosphor-logging package."])) |
Gunnar Mills | 01a323b | 2017-01-18 09:48:13 -0600 | [diff] [blame] | 21 | |
| 22 | # Checks for library functions |
| 23 | LT_INIT # Required for systemd linking |
| 24 | |
| 25 | # Checks for typedefs, structures, and compiler characteristics. |
| 26 | AX_CXX_COMPILE_STDCXX_14([noext]) |
| 27 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 28 | |
| 29 | AC_ARG_VAR(VERSION_BUSNAME, [The Dbus busname to own]) |
| 30 | AS_IF([test "x$VERSION_BUSNAME" == "x"], [VERSION_BUSNAME="xyz.openbmc_project.Software.BMC.Version"]) |
| 31 | AC_DEFINE_UNQUOTED([VERSION_BUSNAME], ["$VERSION_BUSNAME"], [The DBus busname to own]) |
| 32 | |
| 33 | AC_ARG_VAR(SOFTWARE_OBJPATH, [The version software manager Dbus root]) |
| 34 | AS_IF([test "x$SOFTWARE_OBJPATH" == "x"], [SOFTWARE_OBJPATH="/xyz/openbmc_project/software"]) |
| 35 | AC_DEFINE_UNQUOTED([SOFTWARE_OBJPATH], ["$SOFTWARE_OBJPATH"], [The version software manager Dbus root]) |
| 36 | |
Gunnar Mills | 701e021 | 2017-04-03 11:21:27 -0500 | [diff] [blame] | 37 | AC_ARG_VAR(DOWNLOAD_BUSNAME, [The Dbus busname to own]) |
| 38 | AS_IF([test "x$DOWNLOAD_BUSNAME" == "x"], |
| 39 | [DOWNLOAD_BUSNAME="xyz.openbmc_project.Software.Download"]) |
| 40 | AC_DEFINE_UNQUOTED([DOWNLOAD_BUSNAME], ["$DOWNLOAD_BUSNAME"], [The DBus busname to own]) |
| 41 | |
Deepak Kodihalli | 059e233 | 2017-04-12 06:40:53 -0500 | [diff] [blame] | 42 | AC_ARG_VAR(IMG_UPLOAD_DIR, [Directory where downloaded software images are placed]) |
| 43 | AS_IF([test "x$IMG_UPLOAD_DIR" == "x"], [IMG_UPLOAD_DIR="/tmp/images"]) |
| 44 | AC_DEFINE_UNQUOTED([IMG_UPLOAD_DIR], ["$IMG_UPLOAD_DIR"], [Directory where downloaded software images are placed]) |
| 45 | |
Gunnar Mills | 01a323b | 2017-01-18 09:48:13 -0600 | [diff] [blame] | 46 | # Check for header files. |
| 47 | AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd developement package required])]) |
| 48 | AC_CHECK_HEADER(sdbusplus/server.hpp, ,[AC_MSG_ERROR([Could not find sdbusplus/server.hpp...openbmc/sdbusplus package required])]) |
| 49 | |
| 50 | AC_CONFIG_FILES([Makefile]) |
| 51 | AC_OUTPUT |