Greatly simplify the man page handling.
[thirdparty/cups.git] / config-scripts / cups-manpages.m4
1 dnl
2 dnl Manpage stuff for CUPS.
3 dnl
4 dnl Copyright © 2007-2019 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
8 dnl information.
9 dnl
10
11 dnl Fix "mandir" variable...
12 if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
13         # New GNU "standards" break previous ones, so make sure we use
14         # the right default location for the operating system...
15         mandir="\${prefix}/man"
16 fi
17
18 if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
19         case "$host_os_name" in
20                 darwin* | linux* | gnu* | *bsd*)
21                         # Darwin, macOS, Linux, GNU HURD, and *BSD
22                         mandir="/usr/share/man"
23                         ;;
24                 *)
25                         # All others
26                         mandir="/usr/man"
27                         ;;
28         esac
29 fi