]> git.ipfire.org Git - thirdparty/cups.git/blob - config-scripts/cups-manpages.m4
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / config-scripts / cups-manpages.m4
1 dnl
2 dnl Manpage stuff for CUPS.
3 dnl
4 dnl Copyright 2007-2017 by Apple Inc.
5 dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
6 dnl
7 dnl Licensed under Apache License v2.0. See the file "LICENSE" for more information.
8 dnl
9
10 dnl Fix "mandir" variable...
11 if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
12 # New GNU "standards" break previous ones, so make sure we use
13 # the right default location for the operating system...
14 mandir="\${prefix}/man"
15 fi
16
17 if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
18 case "$host_os_name" in
19 darwin* | linux* | gnu* | *bsd*)
20 # Darwin, macOS, Linux, GNU HURD, and *BSD
21 mandir="/usr/share/man"
22 AMANDIR="/usr/share/man"
23 PMANDIR="/usr/share/man"
24 ;;
25 *)
26 # All others
27 mandir="/usr/man"
28 AMANDIR="/usr/man"
29 PMANDIR="/usr/man"
30 ;;
31 esac
32 else
33 AMANDIR="$mandir"
34 PMANDIR="$mandir"
35 fi
36
37 AC_SUBST(AMANDIR)
38 AC_SUBST(PMANDIR)
39
40 dnl Setup manpage extensions...
41 case "$host_os_name" in
42 sunos*)
43 # Solaris
44 MAN1EXT=1
45 MAN5EXT=5
46 MAN7EXT=7
47 MAN8EXT=1m
48 MAN8DIR=1m
49 ;;
50 linux* | gnu* | darwin*)
51 # Linux, GNU Hurd, and macOS
52 MAN1EXT=1.gz
53 MAN5EXT=5.gz
54 MAN7EXT=7.gz
55 MAN8EXT=8.gz
56 MAN8DIR=8
57 ;;
58 *)
59 # All others
60 MAN1EXT=1
61 MAN5EXT=5
62 MAN7EXT=7
63 MAN8EXT=8
64 MAN8DIR=8
65 ;;
66 esac
67
68 AC_SUBST(MAN1EXT)
69 AC_SUBST(MAN5EXT)
70 AC_SUBST(MAN7EXT)
71 AC_SUBST(MAN8EXT)
72 AC_SUBST(MAN8DIR)