]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Modernize cups-opsys.m4.
authorMichael R Sweet <msweet@msweet.org>
Sat, 6 Mar 2021 23:21:36 +0000 (18:21 -0500)
committerMichael R Sweet <msweet@msweet.org>
Sat, 6 Mar 2021 23:21:36 +0000 (18:21 -0500)
config-scripts/cups-opsys.m4
configure

index f11a9b6719b3bc2131452d90b3e01e4cd97da80f..d768fe0dec8e992b4f3c9c37cc839cc15dedab16 100644 (file)
@@ -1,6 +1,7 @@
 dnl
 dnl Operating system 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
@@ -12,21 +13,21 @@ dnl Get the build and host platforms and split the host_os value
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 
-[host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'`]
-[host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $1 $2}'`]
+[host_os_name="$(echo $host_os | sed -e '1,$s/[0-9.]*$//g')"]
+[host_os_version="$(echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $1 $2}')"]
 # Linux often does not yield an OS version we can use...
-if test "x$host_os_version" = x; then
-        host_os_version="0"
-fi
+AS_IF([test "x$host_os_version" = x], [
+    host_os_version="0"
+])
 
 dnl Determine whether we are cross-compiling...
-if test "$build" = "$host"; then
-        # No, build local targets
-       LOCALTARGET="local"
-else
-        # Yes, don't build local targets
-       LOCALTARGET=""
-fi
-AC_SUBST(LOCALTARGET)
+AS_IF([test "$build" = "$host"], [
+    # No, build local targets
+    LOCALTARGET="local"
+], [
+    # Yes, don't build local targets
+    LOCALTARGET=""
+])
+AC_SUBST([LOCALTARGET])
 
-AC_PATH_PROGS(CODE_SIGN, codesign true)
+AC_PATH_PROGS([CODE_SIGN], [codesign true])
index 1f473911da25411dec8bd6c0f6fd1b6db4910fcd..d6a8fbfd00388ea7bc56355a31d24ea95153a850 100755 (executable)
--- a/configure
+++ b/configure
@@ -3157,19 +3157,27 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 
-host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'`
-host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $1 $2}'`
+host_os_name="$(echo $host_os | sed -e '1,$s/[0-9.]*$//g')"
+host_os_version="$(echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $1 $2}')"
 # Linux often does not yield an OS version we can use...
-if test "x$host_os_version" = x; then
-        host_os_version="0"
+if test "x$host_os_version" = x
+then :
+
+    host_os_version="0"
+
 fi
 
-if test "$build" = "$host"; then
-        # No, build local targets
-       LOCALTARGET="local"
-else
-        # Yes, don't build local targets
-       LOCALTARGET=""
+if test "$build" = "$host"
+then :
+
+    # No, build local targets
+    LOCALTARGET="local"
+
+else $as_nop
+
+    # Yes, don't build local targets
+    LOCALTARGET=""
+
 fi