summaryrefslogtreecommitdiff
path: root/config-scripts/cups-opsys.m4
blob: 36dfa7369a5e6bbb18b389e3d678732d588a86ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
dnl
dnl Operating system stuff for CUPS.
dnl
dnl Copyright 2007-2018 by Apple Inc.
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
dnl
dnl Licensed under Apache License v2.0.  See the file "LICENSE" for more
dnl information.
dnl

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}'`]
# Linux often does not yield an OS version we can use...
if test "x$host_os_version" = x; then
        host_os_version="0"
fi

if test "$host_os_name" = darwin -a $host_os_version -lt 120; then
        AC_MSG_ERROR([Sorry, this version of CUPS requires macOS 10.8 or higher.])
fi

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)

AC_PATH_PROGS(CODE_SIGN, codesign true)