[systemd-devel] [PATCHv2] build: add option to disable hwdb

Umut Tezduyar Lindskog umut.tezduyar at axis.com
Fri Dec 19 06:02:09 PST 2014


Umut: I can't generate man list since I am cross compiling
Please run "make update-man-list" and include changes on
Makefile-man.am.

I have updated the Makefile-man.am manually on v1, even though
very first that file says "DO NOT EDIT IT".

---
 Makefile.am  | 2 ++
 configure.ac | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index a7a2b6d..8489a6b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3607,6 +3607,7 @@ udevadm_LDADD = \
 	libudev-core.la
 
 # ------------------------------------------------------------------------------
+if ENABLE_HWDB
 INSTALL_DIRS += \
 	$(sysconfdir)/udev/hwdb.d
 
@@ -3655,6 +3656,7 @@ INSTALL_DATA_HOOKS += \
 
 hwdb-remove-hook:
 	-test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
+endif
 
 # ------------------------------------------------------------------------------
 TESTS += \
diff --git a/configure.ac b/configure.ac
index 90aa3cc..9296c25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1191,6 +1191,11 @@ AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
 AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
 
 # ------------------------------------------------------------------------------
+AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
+       enable_hwdb=$enableval, enable_hwdb=yes)
+AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
+
+# ------------------------------------------------------------------------------
 have_manpages=no
 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
 AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
@@ -1430,6 +1435,7 @@ AC_MSG_RESULT([
         dbus:                    ${have_dbus}
         nss-myhostname:          ${have_myhostname}
         gudev:                   ${enable_gudev}
+        hwdb:                    ${enable_hwdb}
         gintrospection:          ${enable_introspection}
         terminal:                ${have_terminal}
         kdbus:                   ${have_kdbus}
-- 
2.1.1



More information about the systemd-devel mailing list