hc
2023-11-20 2e7bd41e4e8ab3d1efdabd9e263a2f7fe79bff8c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
From 1524a625e693b956ce0b5091c9f89f24fb7e8614 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Fri, 23 Apr 2021 15:58:36 -0400
Subject: [PATCH] configure: Add --disable-w
 
[Retrieved (and backported) from:
https://gitlab.com/procps-ng/procps/-/commit/1524a625e693b956ce0b5091c9f89f24fb7e8614]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 Makefile.am  | 21 +++++++++++++++------
 configure.ac |  6 ++++++
 2 files changed, 21 insertions(+), 6 deletions(-)
 
diff --git a/Makefile.am b/Makefile.am
index de15e137..d2356872 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,8 +47,7 @@ bin_PROGRAMS = \
     pwdx \
     tload \
     uptime \
-    vmstat \
-    w
+    vmstat
 if BUILD_PWAIT
 bin_PROGRAMS += pwait
 endif
@@ -60,8 +59,7 @@ usrbin_exec_PROGRAMS += \
     pkill \
     pmap \
     uptime \
-    vmstat \
-    w
+    vmstat
 endif
 
 lib_LTLIBRARIES = \
@@ -74,7 +72,6 @@ dist_man_MANS = \
     pmap.1 \
     uptime.1 \
     vmstat.8 \
-    w.1 \
     ps/procps.1
 
 if !CYGWIN
@@ -137,6 +134,19 @@ else
   EXTRA_DIST += kill.1
 endif
 
+if BUILD_W
+if CYGWIN
+usrbin_exec_PROGRAMS += w
+else
+bin_PROGRAMS += w
+endif
+
+dist_man_MANS += w.1
+w_SOURCES = w.c lib/fileutils.c
+else
+  EXTRA_DIST += w.1
+endif
+
 if WITH_NCURSES
 if !CYGWIN
 bin_PROGRAMS += \
@@ -213,7 +223,6 @@ endif
 tload_SOURCES = tload.c lib/strutils.c lib/fileutils.c
 uptime_SOURCES = uptime.c lib/fileutils.c
 vmstat_SOURCES = vmstat.c lib/strutils.c lib/fileutils.c
-w_SOURCES = w.c lib/fileutils.c
 
 # proc/libprocps.la
 
diff --git a/configure.ac b/configure.ac
index 750c0fbb..3e83fb88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -234,6 +234,12 @@ AC_ARG_ENABLE([kill],
   [], [enable_kill=yes]
 )
 AM_CONDITIONAL(BUILD_KILL, test "x$enable_kill" = xyes)
+AC_ARG_ENABLE([w],
+  AS_HELP_STRING([--disable-w], [do not build w]),
+  [], [enable_w=yes]
+)
+AM_CONDITIONAL(BUILD_W, test "x$enable_w" = xyes)
+
 AM_CONDITIONAL(LINUX, test "x$host_os" = xlinux-gnu)
 AM_CONDITIONAL(CYGWIN, test "x$host_os" = xcygwin)
 
-- 
GitLab