From: Michael R Sweet Date: Sat, 6 Mar 2021 22:49:45 +0000 (-0500) Subject: Modernize cups-manpages.m4. X-Git-Tag: v2.4b1~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8e4ca3c7dbe9c77423c9bda2b2d9c2080728f80;p=thirdparty%2Fcups.git Modernize cups-manpages.m4. --- diff --git a/config-scripts/cups-manpages.m4 b/config-scripts/cups-manpages.m4 index 2277196ad6..9d1ba70a55 100644 --- a/config-scripts/cups-manpages.m4 +++ b/config-scripts/cups-manpages.m4 @@ -1,6 +1,7 @@ dnl dnl Manpage stuff for CUPS. dnl +dnl Copyright © 2021 by OpenPrinting. dnl Copyright © 2007-2019 by Apple Inc. dnl Copyright © 1997-2006 by Easy Software Products, all rights reserved. dnl @@ -9,21 +10,19 @@ dnl information. dnl dnl Fix "mandir" variable... -if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then - # New GNU "standards" break previous ones, so make sure we use - # the right default location for the operating system... - mandir="\${prefix}/man" -fi +AS_IF([test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"], [ + # New GNU "standards" break previous ones, so make sure we use + # the right default location for the operating system... + mandir="\${prefix}/man" +]) -if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then - case "$host_os_name" in - darwin* | linux* | gnu* | *bsd*) - # Darwin, macOS, Linux, GNU HURD, and *BSD - mandir="/usr/share/man" - ;; - *) - # All others - mandir="/usr/man" - ;; - esac -fi +AS_IF([test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"], [ + AS_CASE(["$host_os_name"], [darwin* | linux* | gnu* | *bsd*], [ + # Darwin, macOS, Linux, GNU HURD, and *BSD + mandir="/usr/share/man" + ], [*], [ + # All others + mandir="/usr/man" + + ]) +]) diff --git a/configure b/configure index 61bc807ca3..fcf0016753 100755 --- a/configure +++ b/configure @@ -7549,23 +7549,34 @@ printf "%s\n" "#define CUPS_STATEDIR \"$CUPS_STATEDIR\"" >>confdefs.h -if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then - # New GNU "standards" break previous ones, so make sure we use - # the right default location for the operating system... - mandir="\${prefix}/man" +if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/" +then : + + # New GNU "standards" break previous ones, so make sure we use + # the right default location for the operating system... + mandir="\${prefix}/man" + fi -if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then - case "$host_os_name" in - darwin* | linux* | gnu* | *bsd*) - # Darwin, macOS, Linux, GNU HURD, and *BSD - mandir="/usr/share/man" - ;; - *) - # All others - mandir="/usr/man" - ;; - esac +if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/" +then : + + case "$host_os_name" in #( + darwin* | linux* | gnu* | *bsd*) : + + # Darwin, macOS, Linux, GNU HURD, and *BSD + mandir="/usr/share/man" + ;; #( + *) : + + # All others + mandir="/usr/man" + + ;; #( + *) : + ;; +esac + fi