From 89c2c18b878e717c354e5a4246f8aa4af20ea588 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Fri, 10 Feb 2017 12:01:55 -0500 Subject: build: Use AX for pkg config Use an autoconf archive macro for pkg config so autoconf can fill out Requires.private in phosphor-dbus-interfaces.pc.in. Change-Id: Ica803a0f758871b192502be5c2cdc6e166337df2 Signed-off-by: Brad Bishop --- Makefile.am | 4 ++-- configure.ac | 4 ++-- phosphor-dbus-interfaces.pc.in | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 464c668..6927ce4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,8 +5,8 @@ nobase_include_HEADERS = ## These get filled in by Makefile.interfaces libphosphor_dbusdir = ${libdir} libphosphor_dbus_LTLIBRARIES = libphosphor_dbus.la -libphosphor_dbus_la_LDFLAGS = $(SYSTEMD_LIBS) -version-info 0:0:0 -shared -libphosphor_dbus_la_CXXFLAGS = $(SYSTEMD_CFLAGS) +libphosphor_dbus_la_LDFLAGS = $(SYSTEMD_LIBS) $(SDBUSPLUS_LIBS) -version-info 0:0:0 -shared +libphosphor_dbus_la_CXXFLAGS = $(SYSTEMD_CFLAGS) $(SDBUSPLUS_CFLAGS) BUILT_SOURCES = libphosphor_dbus.cpp CLEANFILES = libphosphor_dbus.cpp diff --git a/configure.ac b/configure.ac index 64c28bc..ee42dbe 100644 --- a/configure.ac +++ b/configure.ac @@ -28,8 +28,8 @@ AS_IF([test "x$enable_libphosphor_dbus" != "xno"], [ AC_MSG_ERROR([Cannot find sdbus++])) # Checks for libraries. - PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221],, - [AC_MSG_ERROR(["systemd required and not found."])]) + AX_PKG_CHECK_MODULES([SYSTEMD], [], [libsystemd >= 221], [], [AC_MSG_ERROR(["systemd required and not found."])]) + AX_PKG_CHECK_MODULES([SDBUSPLUS], [], [sdbusplus], [], [AC_MSG_ERROR(["sdbusplus required and not found."])]) # Checks for typedefs, structures, and compiler characteristics. AX_CXX_COMPILE_STDCXX_14([noext]) diff --git a/phosphor-dbus-interfaces.pc.in b/phosphor-dbus-interfaces.pc.in index 3240872..c669aa7 100644 --- a/phosphor-dbus-interfaces.pc.in +++ b/phosphor-dbus-interfaces.pc.in @@ -7,5 +7,6 @@ Name: phosphor-dbus-interfaces Description: Generated sdbusplus bindings for phosphor-dbus-interfaces. URL: https://github.com/openbmc/phosphor-dbus-interfaces Version: @VERSION@ +Requires.private: @AX_PACKAGE_REQUIRES_PRIVATE@ Libs: -L@libdir@ -lphosphor_dbus Cflags: -I@includedir@ -- cgit v1.2.1