diff options
author | William A. Kennington III <wak@google.com> | 2019-03-21 16:23:12 -0700 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2019-04-09 02:07:06 -0700 |
commit | 01defcade1020f0f149043a722ef8dc440d95546 (patch) | |
tree | a340a06dda65be9252f733d339aa42112a2a9692 | |
parent | ce3795602ee8d7593ae1effd8e5568c823326c88 (diff) | |
download | phosphor-networkd-01defcade1020f0f149043a722ef8dc440d95546.tar.gz phosphor-networkd-01defcade1020f0f149043a722ef8dc440d95546.zip |
build: Use libnl package config instead of hardcoding
We shouldn't be hardcoding paths and link stages against libnl since it
provides the needed package config files to do that for us.
Tested:
Builds and passes unit tests in our unit test container environment.
Change-Id: I46277fff25720119c90b827b4a3d7333bbe8766b
Signed-off-by: William A. Kennington III <wak@google.com>
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index fad77d1..726507e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,10 +37,9 @@ ncsi_netlink_SOURCES = \ ncsi_netlink_LDFLAGS = \ $(PHOSPHOR_LOGGING_LIBS) \ - -lnl-3 \ - -lnl-genl-3 + $(LIBNL_LIBS) -ncsi_netlink_CPPFLAGS = -isystem /usr/include/libnl3 +ncsi_netlink_CPPFLAGS = $(LIBNL_CFLAGS) ncsi_netlink_CXXFLAGS = -flto diff --git a/configure.ac b/configure.ac index 7035723..8870fcd 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,7 @@ PKG_CHECK_MODULES([SDEVENTPLUS], [sdeventplus]) AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging]) PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces]) +PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0]) # Checks for header files. AC_CHECK_HEADER(systemd/sd-bus.h, ,\ |