Patchwork [Open-FCoE,libhbalinux,1/6] add libudev to the build

login
register
mail settings
Submitter Chris Leech
Date Oct. 13, 2014, 11:13 p.m.
Message ID <1413242005-17786-2-git-send-email-cleech@redhat.com>
Download mbox | patch
Permalink /patch/166/
State RFC
Headers show

Comments

Chris Leech - Oct. 13, 2014, 11:13 p.m.
Signed-off-by: Chris Leech <cleech@redhat.com>
---
 Makefile.am         | 6 +++---
 configure.ac        | 4 ++++
 libhbalinux.spec.in | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

Patch

diff --git a/Makefile.am b/Makefile.am
index 1349e7b..068dc10 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,12 +1,12 @@ 
-AM_CFLAGS = $(HBAAPI_CFLAGS) $(PCIACCESS_CFLAGS)
-AM_LDFLAGS= $(PCIACCESS_LIBS)
+AM_CFLAGS = $(HBAAPI_CFLAGS) $(PCIACCESS_CFLAGS) $(LIBUDEV_CFLAGS)
+AM_LDFLAGS= $(PCIACCESS_LIBS) $(LIBUDEV_LIBS)
 
 lib_LTLIBRARIES = libhbalinux.la
 libhbalinux_la_SOURCES = adapt.c adapt_impl.h api_lib.h bind.c bind_impl.h \
 fc_scsi.h fc_types.h lib.c lport.c net_types.h pci.c rport.c scsi.c sg.c \
 utils.c utils.h
 libhbalinux_la_LDFLAGS = -version-info 2:2:0
-libhbalinux_la_LIBADD = $(PCIACCESS_LIBS)
+libhbalinux_la_LIBADD = $(PCIACCESS_LIBS) $(LIBUDEV_LIBS)
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libhbalinux.pc
diff --git a/configure.ac b/configure.ac
index 3a8ae4c..8884e95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,6 +13,10 @@  AC_SUBST(PCIACCESS_LIBS)
 PKG_CHECK_MODULES(HBAAPI, HBAAPI)
 AC_SUBST(HBAAPI_CFLAGS)
 
+PKG_CHECK_MODULES(LIBUDEV, libudev)
+AC_SUBST(LIBUDEV_CFLAGS)
+AC_SUBST(LIBUDEV_LIBS)
+
 AC_CONFIG_FILES([Makefile libhbalinux.spec libhbalinux.pc])
 AC_OUTPUT
 
diff --git a/libhbalinux.spec.in b/libhbalinux.spec.in
index 344c166..4690da9 100644
--- a/libhbalinux.spec.in
+++ b/libhbalinux.spec.in
@@ -9,7 +9,7 @@  URL:            http://www.open-fcoe.org
 Source0:        http://www.open-fcoe.org/openfc/%{name}-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires:  libHBAAPI-devel libpciaccess-devel
+BuildRequires:  libHBAAPI-devel libpciaccess-devel systemd-devel
 Requires:       libHBAAPI
 
 %description