]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Modernize cups-manpages.m4.
authorMichael R Sweet <msweet@msweet.org>
Sat, 6 Mar 2021 22:49:45 +0000 (17:49 -0500)
committerMichael R Sweet <msweet@msweet.org>
Sat, 6 Mar 2021 22:49:45 +0000 (17:49 -0500)
config-scripts/cups-manpages.m4
configure

index 2277196ad6cdf45f0eb48f1f1d2d5c4a1f0673b7..9d1ba70a55115e4c8f372d1b4d907c8d6df001a4 100644 (file)
@@ -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"
+
+    ])
+])
index 61bc807ca32e97d4f50cdcc9ddf2d767f65e217c..fcf0016753c413d1ae2bfdd0c5cc744624096888 100755 (executable)
--- 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