Commit 10920c3084446703663ccc1aa4146999dcd61f78

Guillem Jover 2024-02-12T00:06:56

build: Make name_from_id man pages conditional instead of id_from_name The code is only making the name_from_id function conditional, and assumes id_from_name are always to be included, so we need to match the logic for the man page inclusion.

diff --git a/configure.ac b/configure.ac
index c3e6fbb..e704168 100644
--- a/configure.ac
+++ b/configure.ac
@@ -263,7 +263,7 @@ need_nlist=yes
 need_strl=yes
 need_wcsl=yes
 need_strmode=yes
-need_id_from_name=yes
+need_name_from_id=yes
 need_fpurge=yes
 need_funopen=yes
 AS_CASE([$host_os],
@@ -299,7 +299,7 @@ AS_CASE([$host_os],
     need_strl=no
     need_wcsl=no
     need_strmode=no
-    need_id_from_name=no
+    need_name_from_id=no
     need_fpurge=no
     # On macOS we do not have fopencookie(), and cannot implement it.
     need_funopen=no
@@ -317,7 +317,7 @@ AM_CONDITIONAL([NEED_NLIST], [test "x$need_nlist" = "xyes"])
 AM_CONDITIONAL([NEED_STRL], [test "x$need_strl" = "xyes"])
 AM_CONDITIONAL([NEED_WCSL], [test "x$need_wcsl" = "xyes"])
 AM_CONDITIONAL([NEED_STRMODE], [test "x$need_strmode" = "xyes"])
-AM_CONDITIONAL([NEED_ID_FROM_NAME], [test "x$need_id_from_name" = "xyes"])
+AM_CONDITIONAL([NEED_NAME_FROM_ID], [test "x$need_name_from_id" = "xyes"])
 AM_CONDITIONAL([NEED_FPURGE], [test "x$need_fpurge" = "xyes"])
 AM_CONDITIONAL([NEED_FUNOPEN], [test "x$need_funopen" = "xyes"])
 AS_IF([test "x$need_funopen" = "xno" && \
diff --git a/man/Makefile.am b/man/Makefile.am
index 14bea2b..1223557 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -180,7 +180,6 @@ dist_man_MANS = \
 	getbsize.3bsd \
 	getmode.3bsd \
 	getpeereid.3bsd \
-	group_from_gid.3bsd \
 	heapsort.3bsd \
 	humanize_number.3bsd \
 	le16dec.3bsd \
@@ -236,7 +235,6 @@ dist_man_MANS = \
 	timeval.3bsd \
 	tree.3bsd \
 	unvis.3bsd \
-	user_from_uid.3bsd \
 	vis.3bsd \
 	# EOL
 
@@ -279,11 +277,16 @@ dist_man_MANS += \
 	# EOL
 endif
 
-if NEED_ID_FROM_NAME
 dist_man_MANS += \
 	uid_from_user.3bsd \
 	gid_from_group.3bsd \
 	# EOL
+
+if NEED_NAME_FROM_ID
+dist_man_MANS += \
+	group_from_gid.3bsd \
+	user_from_uid.3bsd \
+	# EOL
 endif
 
 if NEED_FPURGE