Commit 924c7581 authored by Jonathan Currier's avatar Jonathan Currier

Make the libsystemd stuff optional

parent be37f259
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
sbin_PROGRAMS = mboxd mboxctl sbin_PROGRAMS = mboxd
# ATM mboxctl depends on the systemd interface
if HAVE_LIBSYSTEMD
sbin_PROGRAMS += mboxctl
endif
mboxd_SOURCES = \ mboxd_SOURCES = \
mboxd.c \ mboxd.c \
common.c \ common.c \
control.c \ control.c \
control_legacy.c \
control_dbus.c \
lpc.c \ lpc.c \
protocol.c \ protocol.c \
transport_dbus.c \
transport_mbox.c \
windows.c \ windows.c \
mtd.c mtd.c
mboxd_LINK = $(LINK) mboxd_LINK = $(LINK)
if HAVE_MBOX_TRANSPORT
mboxd_SOURCES += \
transport_mbox.c
endif
if HAVE_LIBSYSTEMD
mboxd_SOURCES += \
control_legacy.c \
control_dbus.c \
transport_dbus.c
endif
mboxd_LDFLAGS = $(LIBSYSTEMD_LIBS) mboxd_LDFLAGS = $(LIBSYSTEMD_LIBS)
mboxd_CFLAGS = $(LIBSYSTEMD_CFLAGS) mboxd_CFLAGS = $(LIBSYSTEMD_CFLAGS)
......
...@@ -21,7 +21,6 @@ AS_IF([test "$HAVE_UAPI_LINUX_LPC_CTRL_H" != ""], ...@@ -21,7 +21,6 @@ AS_IF([test "$HAVE_UAPI_LINUX_LPC_CTRL_H" != ""],
) )
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
AX_CXX_COMPILE_STDCXX(17, [noext], [mandatory])
AX_APPEND_COMPILE_FLAGS([-fpic -Wall], [CFLAGS]) AX_APPEND_COMPILE_FLAGS([-fpic -Wall], [CFLAGS])
AX_APPEND_COMPILE_FLAGS([-fpic -Wall], [CXXFLAGS]) AX_APPEND_COMPILE_FLAGS([-fpic -Wall], [CXXFLAGS])
...@@ -48,9 +47,16 @@ AS_IF([test "x$enable_oe_sdk" == "xyes"], ...@@ -48,9 +47,16 @@ AS_IF([test "x$enable_oe_sdk" == "xyes"],
AC_ARG_ENABLE([virtual-pnor], AC_ARG_ENABLE([virtual-pnor],
AS_HELP_STRING([--enable-virtual-pnor], [Turn on virtual pnor]) AS_HELP_STRING([--enable-virtual-pnor], [Turn on virtual pnor])
[
AS_IF([test "x$CXX" == "x" ],
AC_MSG_ERROR([Error virtual-pnor requires c++]))
]
) )
AS_IF([test "x$enable_virtual_pnor" == "xyes"], AS_IF([test "x$enable_virtual_pnor" == "xyes"],
[ [
AX_CXX_COMPILE_STDCXX(17, [noext], [mandatory])
PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus]) PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging]) PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces]) PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces])
...@@ -70,7 +76,18 @@ m4_ifdef([_AX_CODE_COVERAGE_RULES], ...@@ -70,7 +76,18 @@ m4_ifdef([_AX_CODE_COVERAGE_RULES],
[AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [false])]) [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [false])])
AX_ADD_AM_MACRO_STATIC([]) AX_ADD_AM_MACRO_STATIC([])
PKG_CHECK_MODULES(LIBSYSTEMD, libsystemd, , AC_MSG_ERROR([libsytemd not found])) # ATM unconditionally add mbox transport support
AM_CONDITIONAL(HAVE_MBOX_TRANSPORT, true)
PKG_CHECK_MODULES(LIBSYSTEMD,
libsystemd,
[
AM_CONDITIONAL(HAVE_LIBSYSTEMD, true)
],
[
AM_CONDITIONAL(HAVE_LIBSYSTEMD, false)
AC_MSG_WARN([libsytemd not found, building without support.])
])
AC_SUBST([LIBSYSTEMD_CFLAGS]) AC_SUBST([LIBSYSTEMD_CFLAGS])
AC_SUBST([LIBSYSTEMD_LIBS]) AC_SUBST([LIBSYSTEMD_LIBS])
...@@ -79,6 +96,7 @@ AC_DEFINE(PARTITION_FILES_RO_LOC, "/var/lib/phosphor-software-manager/pnor/ro", ...@@ -79,6 +96,7 @@ AC_DEFINE(PARTITION_FILES_RO_LOC, "/var/lib/phosphor-software-manager/pnor/ro",
AC_DEFINE(PARTITION_FILES_RW_LOC, "/var/lib/phosphor-software-manager/pnor/rw", [The path to the directory containing PNOR read write partition files.]) AC_DEFINE(PARTITION_FILES_RW_LOC, "/var/lib/phosphor-software-manager/pnor/rw", [The path to the directory containing PNOR read write partition files.])
AC_DEFINE(PARTITION_FILES_PRSV_LOC, "/var/lib/phosphor-software-manager/pnor/prsv", [The path to the directory containing PNOR preserve partition files.]) AC_DEFINE(PARTITION_FILES_PRSV_LOC, "/var/lib/phosphor-software-manager/pnor/prsv", [The path to the directory containing PNOR preserve partition files.])
AC_DEFINE(PARTITION_FILES_PATCH_LOC, "/usr/local/share/pnor", [The path to the directory containing PNOR patch partition files.]) AC_DEFINE(PARTITION_FILES_PATCH_LOC, "/usr/local/share/pnor", [The path to the directory containing PNOR patch partition files.])
# Create configured output # Create configured output
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_OUTPUT AC_OUTPUT
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment