0001-configure-Add--disable-w.patch 2.0 KB

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