diff --git a/Makefile.am b/Makefile.am
index 0d463798e..8e232f42b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,8 +5,7 @@ SUBDIRS = \
 
 if ENABLE_PROGRAMS
 SUBDIRS += \
-	rules \
-	test
+	rules
 endif
 
 if ENABLE_MANPAGES
diff --git a/configure.ac b/configure.ac
index 0d9a135bc..63bf800b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -252,7 +252,7 @@ AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules s
 if test "x$enable_kmod" != "xno"; then
 	PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
 	if test "x$have_kmod" = "xyes"; then
-		PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
+		PKG_CHECK_MODULES_STATIC(KMOD, [ libkmod >= 15 ],
 			[AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
 			AC_MSG_ERROR([*** kmod version >= 15 not found]))
 	fi
diff --git a/src/ata_id/Makefile.am b/src/ata_id/Makefile.am
index 01acbbafe..d84562549 100644
--- a/src/ata_id/Makefile.am
+++ b/src/ata_id/Makefile.am
@@ -11,6 +11,8 @@ udevlibexec_PROGRAMS = \
 ata_id_SOURCES = \
 	ata_id.c
 
+ata_id_LDFLAGS = -all-static
+
 ata_id_LDADD = \
 	$(top_builddir)/src/libudev/libudev-private.la \
 	$(top_builddir)/src/udev/libudev-core.la
diff --git a/src/cdrom_id/Makefile.am b/src/cdrom_id/Makefile.am
index 488edcadb..faf1d5665 100644
--- a/src/cdrom_id/Makefile.am
+++ b/src/cdrom_id/Makefile.am
@@ -10,6 +10,8 @@ udevlibexec_PROGRAMS = \
 cdrom_id_SOURCES = \
 	cdrom_id.c
 
+cdrom_id_LDFLAGS = -all-static
+
 cdrom_id_LDADD = \
 	$(top_builddir)/src/libudev/libudev-private.la \
 	$(top_builddir)/src/udev/libudev-core.la
diff --git a/src/collect/Makefile.am b/src/collect/Makefile.am
index a531a2d88..ccea1ff66 100644
--- a/src/collect/Makefile.am
+++ b/src/collect/Makefile.am
@@ -11,6 +11,8 @@ udevlibexec_PROGRAMS = \
 collect_SOURCES = \
 	collect.c
 
+collect_LDFLAGS = -all-static
+
 collect_LDADD = \
 	$(top_builddir)/src/libudev/libudev-private.la \
 	$(top_builddir)/src/udev/libudev-core.la
diff --git a/src/dmi_memory_id/Makefile.am b/src/dmi_memory_id/Makefile.am
index 69605cc6d..417887dd3 100644
--- a/src/dmi_memory_id/Makefile.am
+++ b/src/dmi_memory_id/Makefile.am
@@ -11,6 +11,8 @@ udevlibexec_PROGRAMS = \
 dmi_memory_id_SOURCES = \
 	dmi_memory_id.c
 
+dmi_memory_id_LDFLAGS = -all-static
+
 dmi_memory_id_LDADD = \
 	$(top_builddir)/src/libudev/libudev-private.la \
 	$(top_builddir)/src/udev/libudev-core.la
diff --git a/src/fido_id/Makefile.am b/src/fido_id/Makefile.am
index 255c8393b..c615121f1 100644
--- a/src/fido_id/Makefile.am
+++ b/src/fido_id/Makefile.am
@@ -13,6 +13,8 @@ fido_id_SOURCES =\
 	fido_id_desc.c \
 	fido_id_desc.h
 
+fido_id_LDFLAGS = -all-static
+
 fido_id_LDADD = \
 	$(top_builddir)/src/libudev/libudev-private.la \
 	$(top_builddir)/src/udev/libudev-core.la
diff --git a/src/mtd_probe/Makefile.am b/src/mtd_probe/Makefile.am
index 2ee2f30dc..ea400283a 100644
--- a/src/mtd_probe/Makefile.am
+++ b/src/mtd_probe/Makefile.am
@@ -6,6 +6,8 @@ AM_CPPFLAGS = \
 udevlibexec_PROGRAMS = \
 	mtd_probe
 
+mtd_probe_LDFLAGS = -all-static
+
 mtd_probe_SOURCES =  \
 	mtd_probe.c \
 	mtd_probe.h \
diff --git a/src/scsi_id/Makefile.am b/src/scsi_id/Makefile.am
index c4dad4736..398eac858 100644
--- a/src/scsi_id/Makefile.am
+++ b/src/scsi_id/Makefile.am
@@ -14,6 +14,8 @@ scsi_id_SOURCES =\
 	scsi.h \
 	scsi_id.h
 
+scsi_id_LDFLAGS = -all-static
+
 scsi_id_LDADD = \
 	$(top_builddir)/src/libudev/libudev-private.la \
 	$(top_builddir)/src/udev/libudev-core.la
diff --git a/src/shared/path-util.c b/src/shared/path-util.c
index 63e3423f3..33bbc58f9 100644
--- a/src/shared/path-util.c
+++ b/src/shared/path-util.c
@@ -116,6 +116,10 @@ char *path_make_absolute_cwd(const char *p) {
         return strjoin(cwd, "/", p, NULL);
 }
 
+static char *_strappend(const char *s, const char *suffix) {
+        return strnappend(s, suffix, suffix ? strlen(suffix) : 0);
+}
+
 char **path_strv_resolve(char **l, const char *prefix) {
         char **s;
         unsigned k = 0;
@@ -139,7 +143,7 @@ char **path_strv_resolve(char **l, const char *prefix) {
 
                 if (prefix) {
                         orig = *s;
-                        t = strappend(prefix, orig);
+                        t = _strappend(prefix, orig);
                         if (!t) {
                                 enomem = true;
                                 continue;
diff --git a/src/shared/strv.c b/src/shared/strv.c
index 1f7313475..acc3fff65 100644
--- a/src/shared/strv.c
+++ b/src/shared/strv.c
@@ -26,6 +26,7 @@
 #include "util.h"
 #include "strv.h"
 
+#if 0
 void strv_clear(char **l) {
         char **k;
 
@@ -193,20 +194,9 @@ int strv_extend(char ***l, const char *value) {
 
         return strv_consume(l, v);
 }
+#endif
 
-char **strv_uniq(char **l) {
-        char **i;
-
-        /* Drops duplicate entries. The first identical string will be
-         * kept, the others dropped */
-
-        STRV_FOREACH(i, l)
-                strv_remove(i+1, *i);
-
-        return l;
-}
-
-char **strv_remove(char **l, const char *s) {
+static char ** _strv_remove(char **l, const char *s) {
         char **f, **t;
 
         if (!l)
@@ -226,3 +216,15 @@ char **strv_remove(char **l, const char *s) {
         *t = NULL;
         return l;
 }
+
+char **strv_uniq(char **l) {
+        char **i;
+
+        /* Drops duplicate entries. The first identical string will be
+         * kept, the others dropped */
+
+        STRV_FOREACH(i, l)
+                _strv_remove(i+1, *i);
+
+        return l;
+}
diff --git a/src/shared/util.c b/src/shared/util.c
index 8b999f27d..1bffd949a 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -372,6 +372,7 @@ static size_t strcspn_escaped(const char *s, const char *reject) {
         return n - escaped;
 }
 
+#if 0
 /* Split a string into words. */
 const char* split(const char **state, size_t *l, const char *separator, bool quoted) {
         const char *current;
@@ -415,6 +416,7 @@ const char* split(const char **state, size_t *l, const char *separator, bool quo
 
         return current;
 }
+#endif
 
 char *truncate_nl(char *s) {
         assert(s);
@@ -454,9 +456,11 @@ char *strnappend(const char *s, const char *suffix, size_t b) {
         return r;
 }
 
+#if 0
 char *strappend(const char *s, const char *suffix) {
         return strnappend(s, suffix, suffix ? strlen(suffix) : 0);
 }
+#endif
 
 int rmdir_parents(const char *path, const char *stop) {
         size_t l;
diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am
index 36c887e8d..be4539768 100644
--- a/src/udev/Makefile.am
+++ b/src/udev/Makefile.am
@@ -22,6 +22,8 @@ sbin_PROGRAMS = \
 udevd_SOURCES = \
 	udevd.c
 
+udevd_LDFLAGS = -all-static
+
 udevd_LDADD = \
 	libudev-core.la
 
@@ -38,6 +40,7 @@ udevadm_SOURCES = \
 	udevadm-util.c \
 	udevadm-util.h
 
+udevadm_LDFLAGS = -all-static
 
 udevadm_LDADD = \
 	libudev-core.la
diff --git a/src/v4l_id/Makefile.am b/src/v4l_id/Makefile.am
index 6ca3da114..6dfb2f816 100644
--- a/src/v4l_id/Makefile.am
+++ b/src/v4l_id/Makefile.am
@@ -9,6 +9,8 @@ udevlibexec_PROGRAMS = \
 v4l_id_SOURCES = \
 	v4l_id.c
 
+v4l_id_LDFLAGS = -all-static
+
 v4l_id_LDADD = \
 	$(top_builddir)/src/libudev/libudev-private.la \
 	$(top_builddir)/src/udev/libudev-core.la
