Blame config-scripts/cups-opsys.m4

Packit 2fc92b
dnl
Packit 2fc92b
dnl Operating system stuff for CUPS.
Packit 2fc92b
dnl
Packit 2fc92b
dnl Copyright 2007-2017 by Apple Inc.
Packit 2fc92b
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
Packit 2fc92b
dnl
Packit 2fc92b
dnl These coded instructions, statements, and computer programs are the
Packit 2fc92b
dnl property of Apple Inc. and are protected by Federal copyright
Packit 2fc92b
dnl law.  Distribution and use rights are outlined in the file "LICENSE.txt"
Packit 2fc92b
dnl which should have been included with this file.  If this file is
Packit 2fc92b
dnl missing or damaged, see the license at "http://www.cups.org/".
Packit 2fc92b
dnl
Packit 2fc92b
Packit 2fc92b
dnl Get the build and host platforms and split the host_os value
Packit 2fc92b
AC_CANONICAL_BUILD
Packit 2fc92b
AC_CANONICAL_HOST
Packit 2fc92b
Packit 2fc92b
[host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'`]
Packit 2fc92b
[host_os_version=`echo $host_os | sed -e '1,$s/^[^0-9.]*//g' | awk -F. '{print $1 $2}'`]
Packit 2fc92b
# Linux often does not yield an OS version we can use...
Packit 2fc92b
if test "x$host_os_version" = x; then
Packit 2fc92b
        host_os_version="0"
Packit 2fc92b
fi
Packit 2fc92b
Packit 2fc92b
if test "$host_os_name" = darwin -a $host_os_version -lt 120; then
Packit 2fc92b
        AC_MSG_ERROR([Sorry, this version of CUPS requires macOS 10.8 or higher.])
Packit 2fc92b
fi
Packit 2fc92b
Packit 2fc92b
dnl Determine whether we are cross-compiling...
Packit 2fc92b
if test "$build" = "$host"; then
Packit 2fc92b
        # No, build local targets
Packit 2fc92b
	LOCALTARGET="local"
Packit 2fc92b
else
Packit 2fc92b
        # Yes, don't build local targets
Packit 2fc92b
	LOCALTARGET=""
Packit 2fc92b
fi
Packit 2fc92b
AC_SUBST(LOCALTARGET)