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
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])
-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