diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:54:26 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:54:32 +0900 |
commit | cc669fe9bb14b037c6c7d88bea780cf053664b15 (patch) | |
tree | 645f5d4f7de33d361e6f83fe8ec2e815c9335840 /config-scripts | |
parent | 5ed126d6de36f982f1f800f54d468dac5730050d (diff) | |
download | cups-cc669fe9bb14b037c6c7d88bea780cf053664b15.tar.gz cups-cc669fe9bb14b037c6c7d88bea780cf053664b15.tar.bz2 cups-cc669fe9bb14b037c6c7d88bea780cf053664b15.zip |
Imported Upstream version 2.2.4upstream/2.2.4
Change-Id: I6e6af59f8c880d483a83eb33c963ac9fb5ec2e4d
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'config-scripts')
-rw-r--r-- | config-scripts/cups-common.m4 | 24 | ||||
-rw-r--r-- | config-scripts/cups-compiler.m4 | 26 | ||||
-rw-r--r-- | config-scripts/cups-defaults.m4 | 52 | ||||
-rw-r--r-- | config-scripts/cups-directories.m4 | 24 | ||||
-rw-r--r-- | config-scripts/cups-dnssd.m4 | 8 | ||||
-rw-r--r-- | config-scripts/cups-gssapi.m4 | 14 | ||||
-rw-r--r-- | config-scripts/cups-manpages.m4 | 12 | ||||
-rw-r--r-- | config-scripts/cups-network.m4 | 6 | ||||
-rw-r--r-- | config-scripts/cups-opsys.m4 | 42 | ||||
-rw-r--r-- | config-scripts/cups-pam.m4 | 6 | ||||
-rw-r--r-- | config-scripts/cups-sharedlibs.m4 | 18 | ||||
-rw-r--r-- | config-scripts/cups-ssl.m4 | 6 | ||||
-rw-r--r-- | config-scripts/cups-startup.m4 | 26 | ||||
-rw-r--r-- | config-scripts/cups-threads.m4 | 4 |
14 files changed, 145 insertions, 123 deletions
diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index b5075fd..8136ce1 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -1,7 +1,7 @@ dnl dnl Common configuration stuff for CUPS. dnl -dnl Copyright 2007-2016 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -161,7 +161,7 @@ AC_CHECK_FUNCS(statfs statvfs) dnl Checks for string functions. AC_CHECK_FUNCS(strdup strlcat strlcpy) -if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then +if test "$host_os_name" = "hp-ux" -a "$host_os_version" = "1020"; then echo Forcing snprintf emulation for HP-UX. else AC_CHECK_FUNCS(snprintf vsnprintf) @@ -180,8 +180,8 @@ dnl Check for vsyslog function. AC_CHECK_FUNCS(vsyslog) dnl Checks for signal functions. -case "$uname" in - Linux | GNU) +case "$host_os_name" in + linux* | gnu*) # Do not use sigset on Linux or GNU HURD ;; *) @@ -229,7 +229,7 @@ AC_SUBST(LIBUSB) AC_SUBST(USBQUIRKS) if test "x$PKGCONFIG" != x; then - if test x$enable_libusb != xno -a $uname != Darwin; then + if test x$enable_libusb != xno -a $host_os_name != darwin; then AC_MSG_CHECKING(for libusb-1.0) if $PKGCONFIG --exists libusb-1.0; then AC_MSG_RESULT(yes) @@ -277,8 +277,8 @@ AC_SUBST(INSTALL_GZIP) AC_SUBST(LIBZ) dnl Flags for "ar" command... -case $uname in - Darwin* | *BSD*) +case $host_os_name in + darwin* | *bsd*) ARFLAGS="-rcv" ;; *) @@ -313,7 +313,7 @@ DBUSDIR="" DBUS_NOTIFIER="" DBUS_NOTIFIERLIBS="" -if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$uname" != xDarwin; then +if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$host_os_name" != xdarwin; then AC_MSG_CHECKING(for DBUS) if $PKGCONFIG --exists dbus-1; then AC_MSG_RESULT(yes) @@ -347,8 +347,8 @@ CUPS_DEFAULT_SYSTEM_AUTHKEY="" CUPS_SYSTEM_AUTHKEY="" INSTALLXPC="" -case $uname in - Darwin*) +case $host_os_name in + darwin*) BACKLIBS="$BACKLIBS -framework IOKit" SERVERLIBS="$SERVERLIBS -framework IOKit -weak_framework ApplicationServices" LIBS="-framework SystemConfiguration -framework CoreFoundation -framework Security $LIBS" @@ -406,10 +406,10 @@ case $uname in AC_CHECK_HEADER(Security/SecBasePriv.h,AC_DEFINE(HAVE_SECBASEPRIV_H)) dnl Check for sandbox/Seatbelt support - if test $uversion -ge 100; then + if test $host_os_version -ge 100; then AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H)) fi - if test $uversion -ge 110 -a $uversion -lt 120; then + if test $host_os_version -ge 110 -a $host_os_version -lt 120; then # Broken public headers in 10.7.x... AC_MSG_CHECKING(for sandbox/private.h presence) if test -f /usr/local/include/sandbox/private.h; then diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4 index d9490a7..bf4411e 100644 --- a/config-scripts/cups-compiler.m4 +++ b/config-scripts/cups-compiler.m4 @@ -1,7 +1,7 @@ dnl dnl Compiler stuff for CUPS. dnl -dnl Copyright 2007-2014 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -46,6 +46,10 @@ fi dnl Unit tests take up time during a compile... if test x$enable_unit_tests = xyes; then + if test "$build" != "$host"; then + AC_MSG_ERROR([Sorry, cannot build unit tests when cross-compiling.]) + fi + UNITTESTS="unittests" else UNITTESTS="" @@ -63,7 +67,7 @@ else fi if test -z "$with_ldarchflags"; then - if test "$uname" = Darwin; then + if test "$host_os_name" = darwin; then # Only create Intel programs by default LDARCHFLAGS="`echo $ARCHFLAGS | sed -e '1,$s/-arch ppc64//'`" else @@ -130,8 +134,8 @@ if test -n "$GCC"; then # Not available to LSB binaries... AC_MSG_CHECKING(whether compiler supports -fPIE) OLDCFLAGS="$CFLAGS" - case "$uname" in - Darwin*) + case "$host_os_name" in + darwin*) CFLAGS="$CFLAGS -fPIE -Wl,-pie" AC_TRY_COMPILE(,,[ PIEFLAGS="-fPIE -Wl,-pie" @@ -187,8 +191,8 @@ if test -n "$GCC"; then fi fi - case "$uname" in - Darwin*) + case "$host_os_name" in + darwin*) # -D_FORTIFY_SOURCE=2 adds additional object size # checking, basically wrapping all string functions # with buffer-limited ones. Not strictly needed for @@ -197,7 +201,7 @@ if test -n "$GCC"; then CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" ;; - Linux*) + linux*) # The -z relro option is provided by the Linux linker command to # make relocatable data read-only. if test x$enable_relro = xyes; then @@ -207,8 +211,8 @@ if test -n "$GCC"; then esac else # Add vendor-specific compiler options... - case $uname in - SunOS*) + case $host_os_name in + sunos*) # Solaris if test -z "$OPTIM"; then if test "x$with_optim" = x; then @@ -235,8 +239,8 @@ else fi # Add general compiler options per platform... -case $uname in - Linux*) +case $host_os_name in + linux*) # glibc 2.8 and higher breaks peer credentials unless you # define _GNU_SOURCE... OPTIM="$OPTIM -D_GNU_SOURCE" diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4 index c29d587..9fd9968 100644 --- a/config-scripts/cups-defaults.m4 +++ b/config-scripts/cups-defaults.m4 @@ -1,7 +1,7 @@ dnl dnl Default cupsd configuration settings for CUPS. dnl -dnl Copyright 2007-2015 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 2006-2007 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -25,7 +25,7 @@ AC_SUBST(LANGUAGES) dnl macOS bundle-based localization support AC_ARG_WITH(bundledir, [ --with-bundledir set macOS localization bundle directory ], CUPS_BUNDLEDIR="$withval", - if test "x$uname" = xDarwin -a $uversion -ge 100; then + if test "x$host_os_name" = xdarwin -a $host_os_version -ge 100; then CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A" LANGUAGES="" else @@ -37,21 +37,41 @@ if test "x$CUPS_BUNDLEDIR" != x; then AC_DEFINE_UNQUOTED(CUPS_BUNDLEDIR, "$CUPS_BUNDLEDIR") fi +dnl Default executable file permissions +AC_ARG_WITH(exe_file_perm, [ --with-exe-file-perm set default exectuable permissions value, default=0555], + CUPS_EXE_FILE_PERM="$withval", + [case "$host_os_name" in + linux* | gnu*) + CUPS_EXE_FILE_PERM="755" + ;; + *) + CUPS_EXE_FILE_PERM="555" + ;; + esac]) +AC_SUBST(CUPS_EXE_FILE_PERM) + dnl Default ConfigFilePerm AC_ARG_WITH(config_file_perm, [ --with-config-file-perm set default ConfigFilePerm value, default=0640], CUPS_CONFIG_FILE_PERM="$withval", - if test "x$uname" = xDarwin; then + [if test "x$host_os_name" = xdarwin; then CUPS_CONFIG_FILE_PERM="644" else CUPS_CONFIG_FILE_PERM="640" - fi) + fi]) AC_SUBST(CUPS_CONFIG_FILE_PERM) AC_DEFINE_UNQUOTED(CUPS_DEFAULT_CONFIG_FILE_PERM, 0$CUPS_CONFIG_FILE_PERM) dnl Default permissions for cupsd AC_ARG_WITH(cupsd_file_perm, [ --with-cupsd-file-perm set default cupsd permissions, default=0500], CUPS_CUPSD_FILE_PERM="$withval", - CUPS_CUPSD_FILE_PERM="500") + [case "$host_os_name" in + linux* | gnu*) + CUPS_CUPSD_FILE_PERM="700" + ;; + *) + CUPS_CUPSD_FILE_PERM="500" + ;; + esac]) AC_SUBST(CUPS_CUPSD_FILE_PERM) dnl Default LogFilePerm @@ -141,7 +161,7 @@ dnl Determine the correct username and group for this OS... AC_ARG_WITH(cups_user, [ --with-cups-user set default user for CUPS], CUPS_USER="$withval", AC_MSG_CHECKING(for default print user) - if test x$uname = xDarwin; then + if test x$host_os_name = xdarwin; then if test x`id -u _lp 2>/dev/null` = x; then CUPS_USER="lp"; else @@ -174,7 +194,7 @@ fi AC_ARG_WITH(cups_group, [ --with-cups-group set default group for CUPS], CUPS_GROUP="$withval", AC_MSG_CHECKING(for default print group) - if test x$uname = xDarwin; then + if test x$host_os_name = xdarwin; then if test x`id -g _lp 2>/dev/null` = x; then CUPS_GROUP="lp"; else @@ -207,7 +227,7 @@ fi AC_ARG_WITH(system_groups, [ --with-system-groups set default system groups for CUPS], CUPS_SYSTEM_GROUPS="$withval", - if test x$uname = xDarwin; then + if test x$host_os_name = xdarwin; then CUPS_SYSTEM_GROUPS="admin" else AC_MSG_CHECKING(for default system groups) @@ -260,15 +280,15 @@ AC_ARG_WITH(printcap, [ --with-printcap set default printcap file], if test x$default_printcap != xno; then if test "x$default_printcap" = "xdefault"; then - case $uname in - Darwin*) - if test $uversion -ge 90; then + case $host_os_name in + darwin*) + if test $host_os_version -ge 90; then CUPS_DEFAULT_PRINTCAP="/Library/Preferences/org.cups.printers.plist" else CUPS_DEFAULT_PRINTCAP="/etc/printcap" fi ;; - SunOS*) + sunos*) CUPS_DEFAULT_PRINTCAP="/etc/printers.conf" ;; *) @@ -292,8 +312,8 @@ AC_ARG_WITH(lpdconfigfile, [ --with-lpdconfigfile set default LPDConfigFile if test x$default_lpdconfigfile != xno; then if test "x$default_lpdconfigfile" = "xdefault"; then - case $uname in - Darwin*) + case $host_os_name in + darwin*) CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist" ;; *) @@ -360,7 +380,7 @@ AC_ARG_WITH(snmp-address, [ --with-snmp-address set SNMP query address, def else CUPS_SNMP_ADDRESS="Address $withval" fi, - if test "x$uname" = xDarwin; then + if test "x$host_os_name" = xdarwin; then CUPS_SNMP_ADDRESS="" else CUPS_SNMP_ADDRESS="Address @LOCAL" @@ -393,7 +413,7 @@ case "x$enable_webif" in CUPS_DEFAULT_WEBIF=1 ;; *) - if test $uname = Darwin; then + if test $host_os_name = darwin; then CUPS_WEBIF=No CUPS_DEFAULT_WEBIF=0 else diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4 index 2ba0174..c995507 100644 --- a/config-scripts/cups-directories.m4 +++ b/config-scripts/cups-directories.m4 @@ -1,7 +1,7 @@ dnl dnl Directory stuff for CUPS. dnl -dnl Copyright 2007-2016 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -74,7 +74,7 @@ fi dnl Fix "localstatedir" variable if it hasn't been specified... if test "$localstatedir" = "\${prefix}/var"; then if test "$prefix" = "/"; then - if test "$uname" = Darwin; then + if test "$host_os_name" = darwin; then localstatedir="/private/var" else localstatedir="/var" @@ -87,7 +87,7 @@ fi dnl Fix "sysconfdir" variable if it hasn't been specified... if test "$sysconfdir" = "\${prefix}/etc"; then if test "$prefix" = "/"; then - if test "$uname" = Darwin; then + if test "$host_os_name" = darwin; then sysconfdir="/private/etc" else sysconfdir="/etc" @@ -99,8 +99,8 @@ fi dnl Fix "libdir" variable... if test "$libdir" = "\${exec_prefix}/lib"; then - case "$uname" in - Linux*) + case "$host_os_name" in + linux*) if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then libdir="$exec_prefix/lib64" fi @@ -165,7 +165,7 @@ dnl Setup default locations... AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="") if test x$cachedir = x; then - if test "x$uname" = xDarwin; then + if test "x$host_os_name" = xdarwin; then CUPS_CACHEDIR="$localstatedir/spool/cups/cache" else CUPS_CACHEDIR="$localstatedir/cache/cups" @@ -230,8 +230,8 @@ AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH") # Locale data if test "$localedir" = "\${datarootdir}/locale"; then - case "$uname" in - Linux | GNU | *BSD* | Darwin*) + case "$host_os_name" in + linux* | gnu* | *bsd* | darwin*) CUPS_LOCALEDIR="$datarootdir/locale" ;; @@ -265,8 +265,8 @@ AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups") AC_SUBST(CUPS_REQUESTS) # Server executables... -case "$uname" in - *BSD* | Darwin*) +case "$host_os_name" in + *bsd* | darwin*) # *BSD and Darwin (macOS) INSTALL_SYSV="" CUPS_SERVERBIN="$exec_prefix/libexec/cups" @@ -289,8 +289,8 @@ AC_SUBST(CUPS_SERVERROOT) # Transient run-time state AC_ARG_WITH(rundir, [ --with-rundir set transient run-time state directory],CUPS_STATEDIR="$withval",[ - case "$uname" in - Darwin*) + case "$host_os_name" in + darwin*) # Darwin (macOS) CUPS_STATEDIR="$CUPS_SERVERROOT" ;; diff --git a/config-scripts/cups-dnssd.m4 b/config-scripts/cups-dnssd.m4 index dc9cf81..31062f9 100644 --- a/config-scripts/cups-dnssd.m4 +++ b/config-scripts/cups-dnssd.m4 @@ -1,7 +1,7 @@ dnl dnl DNS Service Discovery (aka Bonjour) stuff for CUPS. dnl -dnl Copyright 2007-2016 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl dnl These coded instructions, statements, and computer programs are the dnl property of Apple Inc. and are protected by Federal copyright @@ -24,7 +24,7 @@ DNSSD_BACKEND="" IPPFIND_BIN="" IPPFIND_MAN="" -if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$uname != xDarwin; then +if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$host_os_name != xdarwin; then AC_MSG_CHECKING(for Avahi) if $PKGCONFIG --exists avahi-client; then AC_MSG_RESULT(yes) @@ -41,8 +41,8 @@ fi if test "x$DNSSD_BACKEND" = x -a x$enable_dnssd != xno; then AC_CHECK_HEADER(dns_sd.h, [ - case "$uname" in - Darwin*) + case "$host_os_name" in + darwin*) # Darwin and macOS... AC_DEFINE(HAVE_DNSSD) DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration" diff --git a/config-scripts/cups-gssapi.m4 b/config-scripts/cups-gssapi.m4 index f2687f6..974902c 100644 --- a/config-scripts/cups-gssapi.m4 +++ b/config-scripts/cups-gssapi.m4 @@ -1,7 +1,7 @@ dnl dnl GSSAPI/Kerberos library detection for CUPS. dnl -dnl Copyright 2007-2013 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 2006-2007 by Easy Software Products. dnl dnl This file contains Kerberos support code, copyright 2006 by @@ -22,8 +22,8 @@ AC_SUBST(LIBGSSAPI) if test x$enable_gssapi != xno; then AC_PATH_TOOL(KRB5CONFIG, krb5-config) if test "x$KRB5CONFIG" != x; then - case "$uname" in - Darwin) + case "$host_os_name" in + darwin) # macOS weak-links to the Kerberos framework... LIBGSSAPI="-weak_framework Kerberos" AC_MSG_CHECKING(for GSS framework) @@ -34,7 +34,7 @@ if test x$enable_gssapi != xno; then AC_MSG_RESULT(no) fi ;; - SunOS*) + sunos*) # Solaris has a non-standard krb5-config, don't use it! AC_CHECK_LIB(gss, gss_display_status, AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available]) @@ -52,13 +52,13 @@ if test x$enable_gssapi != xno; then AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available]) else # Check for vendor-specific implementations... - case "$uname" in - HP-UX*) + case "$host_os_name" in + hp-ux*) AC_CHECK_LIB(gss, gss_display_status, AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available]) LIBGSSAPI="-lgss -lgssapi_krb5") ;; - SunOS*) + sunos*) AC_CHECK_LIB(gss, gss_display_status, AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available]) LIBGSSAPI="-lgss") diff --git a/config-scripts/cups-manpages.m4 b/config-scripts/cups-manpages.m4 index 00a8c76..e693e3a 100644 --- a/config-scripts/cups-manpages.m4 +++ b/config-scripts/cups-manpages.m4 @@ -1,7 +1,7 @@ dnl dnl Manpage stuff for CUPS. dnl -dnl Copyright 2007-2016 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 1997-2006 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -19,8 +19,8 @@ if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then fi if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then - case "$uname" in - Darwin* | Linux | GNU | *BSD*) + case "$host_os_name" in + darwin* | linux* | gnu* | *bsd*) # Darwin, macOS, Linux, GNU HURD, and *BSD mandir="/usr/share/man" AMANDIR="/usr/share/man" @@ -42,8 +42,8 @@ AC_SUBST(AMANDIR) AC_SUBST(PMANDIR) dnl Setup manpage extensions... -case "$uname" in - SunOS*) +case "$host_os_name" in + sunos*) # Solaris MAN1EXT=1 MAN5EXT=5 @@ -51,7 +51,7 @@ case "$uname" in MAN8EXT=1m MAN8DIR=1m ;; - Linux* | GNU* | Darwin*) + linux* | gnu* | darwin*) # Linux, GNU Hurd, and macOS MAN1EXT=1.gz MAN5EXT=5.gz diff --git a/config-scripts/cups-network.m4 b/config-scripts/cups-network.m4 index d295368..081ef4d 100644 --- a/config-scripts/cups-network.m4 +++ b/config-scripts/cups-network.m4 @@ -28,7 +28,7 @@ AC_SEARCH_LIBS(__res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT), # Tru64 5.1b leaks file descriptors with these functions; disable until # we can come up with a test for this... -if test "$uname" != "OSF1"; then +if test "$host_os_name" != "osf1"; then AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO)) AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO)) fi @@ -45,8 +45,8 @@ AC_ARG_WITH(domainsocket, [ --with-domainsocket set unix domain socket name if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then if test "x$default_domainsocket" = x; then - case "$uname" in - Darwin*) + case "$host_os_name" in + darwin*) # Darwin and macOS do their own thing... CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd" ;; diff --git a/config-scripts/cups-opsys.m4 b/config-scripts/cups-opsys.m4 index 655a95d..d854547 100644 --- a/config-scripts/cups-opsys.m4 +++ b/config-scripts/cups-opsys.m4 @@ -1,7 +1,7 @@ dnl dnl Operating system stuff for CUPS. dnl -dnl Copyright 2007-2012 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 1997-2006 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -11,23 +11,27 @@ dnl which should have been included with this file. If this file is dnl missing or damaged, see the license at "http://www.cups.org/". dnl -dnl Get the operating system, version number, and architecture... -uname=`uname` -uversion=`uname -r | sed -e '1,$s/^[[^0-9]]*\([[0-9]]*\)\.\([[0-9]]*\).*/\1\2/'` -uarch=`uname -m` +dnl Get the build and host platforms and split the host_os value +AC_CANONICAL_BUILD +AC_CANONICAL_HOST -case "$uname" in - Darwin*) - uname="Darwin" - if test $uversion -lt 120; then - AC_MSG_ERROR([Sorry, this version of CUPS requires macOS 10.8 or higher.]) - fi - ;; +[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 - GNU* | GNU/*) - uname="GNU" - ;; - Linux*) - uname="Linux" - ;; -esac +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) diff --git a/config-scripts/cups-pam.m4 b/config-scripts/cups-pam.m4 index 00ada06..0adec38 100644 --- a/config-scripts/cups-pam.m4 +++ b/config-scripts/cups-pam.m4 @@ -1,7 +1,7 @@ dnl dnl PAM stuff for CUPS. dnl -dnl Copyright 2007-2013 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 1997-2005 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -52,8 +52,8 @@ if test x$enable_pam != xno; then LIBS="$SAVELIBS" - case "$uname" in - Darwin*) + case "$host_os_name" in + darwin*) # Darwin/macOS if test "x$with_pam_module" != x; then PAMFILE="pam.$with_pam_module" diff --git a/config-scripts/cups-sharedlibs.m4 b/config-scripts/cups-sharedlibs.m4 index 2362e38..6e6b582 100644 --- a/config-scripts/cups-sharedlibs.m4 +++ b/config-scripts/cups-sharedlibs.m4 @@ -1,7 +1,7 @@ dnl dnl Shared library support for CUPS. dnl -dnl Copyright 2007-2013 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 1997-2005 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -21,8 +21,8 @@ LIBCUPSBASE="lib$cupsbase" LIBCUPSSTATIC="lib$cupsbase.a" if test x$enable_shared != xno; then - case "$uname" in - SunOS*) + case "$host_os_name" in + sunos*) LIBCUPS="lib$cupsbase.so.2" LIBCUPSCGI="libcupscgi.so.1" LIBCUPSIMAGE="libcupsimage.so.2" @@ -32,7 +32,7 @@ if test x$enable_shared != xno; then DSOXX="\$(CXX)" DSOFLAGS="$DSOFLAGS -Wl,-h\`basename \$@\` -G \$(OPTIM)" ;; - Linux | GNU | *BSD*) + linux* | gnu* | *bsd*) LIBCUPS="lib$cupsbase.so.2" LIBCUPSCGI="libcupscgi.so.1" LIBCUPSIMAGE="libcupsimage.so.2" @@ -42,7 +42,7 @@ if test x$enable_shared != xno; then DSOXX="\$(CXX)" DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)" ;; - Darwin*) + darwin*) LIBCUPS="lib$cupsbase.2.dylib" LIBCUPSCGI="libcupscgi.1.dylib" LIBCUPSIMAGE="libcupsimage.2.dylib" @@ -120,8 +120,8 @@ if test "$DSO" != ":"; then # Tell the run-time linkers where to find a DSO. Some platforms # need this option, even when the library is installed in a # standard location... - case $uname in - SunOS*) + case $host_os_name in + sunos*) # Solaris... if test $exec_prefix != /usr; then DSOFLAGS="-R$libdir $DSOFLAGS" @@ -129,7 +129,7 @@ if test "$DSO" != ":"; then EXPORT_LDFLAGS="-R$libdir" fi ;; - *BSD*) + *bsd*) # *BSD... if test $exec_prefix != /usr; then DSOFLAGS="-Wl,-R$libdir $DSOFLAGS" @@ -137,7 +137,7 @@ if test "$DSO" != ":"; then EXPORT_LDFLAGS="-Wl,-R$libdir" fi ;; - Linux | GNU) + linux* | gnu*) # Linux, and HURD... if test $exec_prefix != /usr; then DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS" diff --git a/config-scripts/cups-ssl.m4 b/config-scripts/cups-ssl.m4 index 1604900..1902e8a 100644 --- a/config-scripts/cups-ssl.m4 +++ b/config-scripts/cups-ssl.m4 @@ -1,7 +1,7 @@ dnl dnl TLS stuff for CUPS. dnl -dnl Copyright 2007-2015 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -23,7 +23,7 @@ CUPS_SERVERKEYCHAIN="" if test x$enable_ssl != xno; then dnl Look for CDSA... if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then - if test $uname = Darwin; then + if test $host_os_name = darwin; then AC_CHECK_HEADER(Security/SecureTransport.h, [ have_ssl=1 AC_DEFINE(HAVE_SSL) @@ -52,7 +52,7 @@ if test x$enable_ssl != xno; then AC_DEFINE(HAVE_CSSMERRORSTRING) AC_DEFINE(HAVE_SECKEYCHAINOPEN)]) - if test $uversion -ge 150; then + if test $host_os_version -ge 150; then AC_DEFINE(HAVE_SSLSETENABLEDCIPHERS) fi fi diff --git a/config-scripts/cups-startup.m4 b/config-scripts/cups-startup.m4 index 04fc87d..978daae 100644 --- a/config-scripts/cups-startup.m4 +++ b/config-scripts/cups-startup.m4 @@ -1,7 +1,7 @@ dnl dnl Launch-on-demand/startup stuff for CUPS. dnl -dnl Copyright 2007-2016 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 1997-2005 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -27,16 +27,10 @@ if test x$enable_launchd != xno; then AC_DEFINE(HAVE_ONDEMAND)]) AC_CHECK_HEADER(launch.h, AC_DEFINE(HAVE_LAUNCH_H)) - case "$uname" in - Darwin*) - # Darwin, macOS - LAUNCHD_DIR="/System/Library/LaunchDaemons" - # liblaunch is already part of libSystem - ;; - *) - # All others; this test will need to be updated - ;; - esac + if test "$host_os_name" = darwin; then + LAUNCHD_DIR="/System/Library/LaunchDaemons" + # liblaunch is already part of libSystem + fi fi dnl Systemd is used on Linux... @@ -123,13 +117,13 @@ if test x$rcdir = x; then fi if test "x$rcstart" = x; then - case "$uname" in - Linux | GNU | GNU/k*BSD*) + case "$host_os_name" in + linux* | gnu*) # Linux rcstart="81" ;; - SunOS*) + sunos*) # Solaris rcstart="81" ;; @@ -142,8 +136,8 @@ if test "x$rcstart" = x; then fi if test "x$rcstop" = x; then - case "$uname" in - Linux | GNU | GNU/k*BSD*) + case "$host_os_name" in + linux* | gnu*) # Linux rcstop="36" ;; diff --git a/config-scripts/cups-threads.m4 b/config-scripts/cups-threads.m4 index d4e3f01..ae6044d 100644 --- a/config-scripts/cups-threads.m4 +++ b/config-scripts/cups-threads.m4 @@ -1,7 +1,7 @@ dnl dnl Threading stuff for CUPS. dnl -dnl Copyright 2007-2011 by Apple Inc. +dnl Copyright 2007-2017 by Apple Inc. dnl Copyright 1997-2005 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -36,7 +36,7 @@ if test "x$enable_threads" != xno; then # Solaris requires -D_POSIX_PTHREAD_SEMANTICS to # be POSIX-compliant... :( - if test $uname = SunOS; then + if test $host_os_name = sunos; then PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS" fi break |