util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 2/2] build-sys: build prstat only when prlimit() is present
Date: Mon, 24 Oct 2011 20:50:45 +0200	[thread overview]
Message-ID: <1319482245-5515-2-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1319482245-5515-1-git-send-email-kerolasa@iki.fi>

The prlimit() appeared kernel in 2.6.36 at October 2010, and to
glic in 2.13 at February 2011.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 configure.ac          |    3 +++
 sys-utils/Makefile.am |    9 +++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 873f1b2..f2e257f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -227,6 +227,9 @@ AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
 AC_CHECK_FUNCS([ioperm iopl], [have_io=yes])
 AM_CONDITIONAL([BUILD_HWCLOCK], test "x$have_io" = xyes -o "x$linux_os" = xyes)
 
+AC_CHECK_FUNCS([prlimit], [have_prlimit=yes])
+AM_CONDITIONAL([BUILD_PRLIMIT], test "x$have_prlimit" = xyes)
+
 AC_CHECK_MEMBER(struct sockaddr.sa_len,
 		AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
 	[#include <sys/types.h>
diff --git a/sys-utils/Makefile.am b/sys-utils/Makefile.am
index 48595da..39b064c 100644
--- a/sys-utils/Makefile.am
+++ b/sys-utils/Makefile.am
@@ -2,11 +2,11 @@ include $(top_srcdir)/config/include-Makefile.am
 
 bin_PROGRAMS =
 sbin_PROGRAMS =
-usrbin_exec_PROGRAMS = flock ipcrm ipcs ipcmk renice setsid prlimit
+usrbin_exec_PROGRAMS = flock ipcrm ipcs ipcmk renice setsid
 usrsbin_exec_PROGRAMS = readprofile
 
 dist_man_MANS = flock.1 ipcrm.1 ipcs.1 ipcmk.1 renice.1 setsid.1 \
-		readprofile.8 prlimit.1
+		readprofile.8
 
 if LINUX
 bin_PROGRAMS += dmesg
@@ -41,9 +41,14 @@ dmesg_SOURCES = dmesg.c $(top_srcdir)/lib/strutils.c
 ipcmk_SOURCES = ipcmk.c $(top_srcdir)/lib/strutils.c
 ipcrm_SOURCES = ipcrm.c  $(top_srcdir)/lib/strutils.c
 flock_SOURCES = flock.c $(top_srcdir)/lib/strutils.c
+
+if BUILD_PRLIMIT
+usrbin_exec_PROGRAMS += prlimit
+dist_man_MANS += prlimit.1
 prlimit_SOURCES = prlimit.c $(top_srcdir)/lib/strutils.c \
 			$(top_srcdir)/lib/mbsalign.c \
 			$(top_srcdir)/lib/tt.c
+endif
 
 if BUILD_MOUNTPOINT
 bin_PROGRAMS += mountpoint
-- 
1.7.7


  reply	other threads:[~2011-10-24 18:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24 18:50 [PATCH 1/2] prlimit: ensure necessary definitions are present Sami Kerola
2011-10-24 18:50 ` Sami Kerola [this message]
2011-10-26 21:30 ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319482245-5515-2-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).