From 2fa60c5ec203040c132b27ee0f92f25b5ad75294 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 7 Jan 2015 10:59:16 +0100 Subject: [PATCH] build-sys: support nsenter.static Signed-off-by: Karel Zak --- configure.ac | 2 +- sys-utils/Makemodule.am | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8eaa0ecbc1..871a5b7d37 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 ef793c1168..15d0a95073 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 -- 2.47.2