blob: 9cf8ba2b239d1e67c24bf47de9b657b1935b05bb [file] [log] [blame]
Jayanth Othayoth224882b2017-05-04 05:46:45 -05001AC_PREREQ([2.69])
2AC_INIT([phosphor-debug-collector], [1.0], [https://github.com/openbmc/phosphor-debug-collector/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
Jayanth Othayoth23ebc262017-05-25 07:22:03 -050012AC_PROG_MKDIR_P
13AC_CHECK_PROG([DIRNAME], dirname, dirname)
Jayanth Othayoth224882b2017-05-04 05:46:45 -050014
15# Check for libraries
16PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],,\
17 AC_MSG_ERROR(["Requires phosphor-dbus-interfaces package."]))
Jayanth Othayoth23ebc262017-05-25 07:22:03 -050018PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\
Jayanth Othayoth224882b2017-05-04 05:46:45 -050019 AC_MSG_ERROR(["Requires sdbusplus package."]))
20
Jayanth Othayoth23ebc262017-05-25 07:22:03 -050021# Check for sdbus++
22AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
23AS_IF([test "x$SDBUSPLUSPLUS" == "x"],
24 AC_MSG_ERROR(["Requires sdbus++"]))
25
Jayanth Othayoth224882b2017-05-04 05:46:45 -050026# Checks for library functions
27LT_INIT # Required for systemd linking
28
29# Checks for typedefs, structures, and compiler characteristics.
30AX_CXX_COMPILE_STDCXX_14([noext])
31AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
32
33AC_ARG_VAR(DUMP_BUSNAME, [The Dbus busname to own])
34AS_IF([test "x$DUMP_BUSNAME" == "x"], [DUMP_BUSNAME="xyz.openbmc_project.Dump"])
35AC_DEFINE_UNQUOTED([DUMP_BUSNAME], ["$DUMP_BUSNAME"], [The DBus busname to own])
36
37AC_ARG_VAR(DUMP_OBJPATH, [The Dump manager Dbus root])
38AS_IF([test "x$DUMP_OBJPATH" == "x"], [DUMP_OBJPATH="/xyz/openbmc_project/dump"])
39AC_DEFINE_UNQUOTED([DUMP_OBJPATH], ["$DUMP_OBJPATH"], [The dump manager Dbus root])
40
41AC_CONFIG_FILES([Makefile])
42AC_OUTPUT