From: Michael R Sweet Date: Sat, 6 Mar 2021 23:21:36 +0000 (-0500) Subject: Modernize cups-opsys.m4. X-Git-Tag: v2.4b1~219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7580c7e1ac528ddb0221a37cedb387bab77aa494;p=thirdparty%2Fcups.git Modernize cups-opsys.m4. --- diff --git a/config-scripts/cups-opsys.m4 b/config-scripts/cups-opsys.m4 index f11a9b6719..d768fe0dec 100644 --- a/config-scripts/cups-opsys.m4 +++ b/config-scripts/cups-opsys.m4 @@ -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]) diff --git a/configure b/configure index 1f473911da..d6a8fbfd00 100755 --- 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