summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--sys-utils/Makemodule.am7
2 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8eaa0ecbc..871a5b7d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -438,7 +438,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char *__progname;],
AC_MSG_RESULT([no]))
dnl Static compilation
-m4_define([UL_STATIC_PROGRAMS], [losetup, mount, umount, fdisk, sfdisk, blkid])
+m4_define([UL_STATIC_PROGRAMS], [losetup, mount, umount, fdisk, sfdisk, blkid, nsenter])
AC_ARG_ENABLE([static-programs],
[AS_HELP_STRING([--enable-static-programs=LIST],
diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am
index ef793c116..15d0a9507 100644
--- a/sys-utils/Makemodule.am
+++ b/sys-utils/Makemodule.am
@@ -357,6 +357,13 @@ usrbin_exec_PROGRAMS += nsenter
dist_man_MANS += sys-utils/nsenter.1
nsenter_SOURCES = sys-utils/nsenter.c
nsenter_LDADD = $(LDADD) libcommon.la
+
+if HAVE_STATIC_NSENTER
+usrbin_exec_PROGRAMS += nsenter.static
+nsenter_static_SOURCES = $(nsenter_SOURCES)
+nsenter_static_LDFLAGS = -all-static
+nsenter_static_LDADD = $(nsenter_LDADD)
+endif
endif
if BUILD_HWCLOCK