summaryrefslogtreecommitdiff
path: root/print/cups/patches/patch-config-scripts_cups-manpages.m4
blob: 43090b38810329a31efda3f4a10ab527f8d5e5fc (plain)
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
$NetBSD: patch-config-scripts_cups-manpages.m4,v 1.5 2017/09/03 11:30:54 leot Exp $

Add '--with-manext' configure option.

--- config-scripts/cups-manpages.m4.orig	2017-06-30 15:44:38.000000000 +0000
+++ config-scripts/cups-manpages.m4
@@ -11,6 +11,8 @@ dnl which should have been included with
 dnl missing or damaged, see the license at "http://www.cups.org/".
 dnl
 
+AC_ARG_WITH(manext, [  --with-manext           set man page extension style (bsd,irix,sysv,none)],manext="$withval",manext="")
+
 dnl Fix "mandir" variable...
 if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
 	# New GNU "standards" break previous ones, so make sure we use
@@ -42,7 +44,27 @@ AC_SUBST(AMANDIR)
 AC_SUBST(PMANDIR)
 
 dnl Setup manpage extensions...
-case "$host_os_name" in
+if test x$manext = x; then
+	case "$host_os_name" in
+		*bsd* | dragonfly*)
+			# *BSD and Darwin (MacOS X)
+			manext=bsd
+			;;
+		sunos* | hp-ux*)
+			# Solaris and HP-UX
+			manext=sysv
+			;;
+		linux* | gnu* | darwin*)
+			# Linux and GNU Hurd
+			manext=linux
+			;;
+		*)
+			# All others
+			;;
+	esac
+fi
+
+case "$manext" in
 	sunos*)
 		# Solaris
 		MAN1EXT=1
@@ -51,7 +73,7 @@ case "$host_os_name" in
 		MAN8EXT=1m
 		MAN8DIR=1m
 		;;
-	linux* | gnu* | darwin*)
+	linux)
 		# Linux, GNU Hurd, and macOS
 		MAN1EXT=1.gz
 		MAN5EXT=5.gz
@@ -59,7 +81,7 @@ case "$host_os_name" in
 		MAN8EXT=8.gz
 		MAN8DIR=8
 		;;
-	*)
+	none|*)
 		# All others
 		MAN1EXT=1
 		MAN5EXT=5