dnl
-dnl "$Id$"
-dnl
dnl Common configuration stuff for CUPS.
dnl
-dnl Copyright 2007-2014 by Apple Inc.
-dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
+dnl Copyright © 2007-2018 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
-dnl property of Apple Inc. and are protected by Federal copyright
-dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
-dnl which should have been included with this file. If this file is
-dnl file is missing or damaged, see the license at "http://www.cups.org/".
+dnl Licensed under Apache License v2.0. See the file "LICENSE" for more
+dnl information.
dnl
-dnl We need at least autoconf 2.60...
-AC_PREREQ(2.60)
-
dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Version number information...
-CUPS_VERSION="2.1b1"
+CUPS_VERSION="AC_PACKAGE_VERSION"
CUPS_REVISION=""
-#if test -z "$CUPS_REVISION" -a -d .svn; then
-# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
-#fi
CUPS_BUILD="cups-$CUPS_VERSION"
AC_ARG_WITH(cups_build, [ --with-cups-build set "cups-config --build" string ],
AC_SUBST(CUPS_VERSION)
AC_SUBST(CUPS_REVISION)
AC_SUBST(CUPS_BUILD)
-AC_DEFINE_UNQUOTED(CUPS_SVERSION, "CUPS v$CUPS_VERSION$CUPS_REVISION")
-AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "CUPS/$CUPS_VERSION$CUPS_REVISION")
+AC_DEFINE_UNQUOTED(CUPS_SVERSION, "AC_PACKAGE_NAME v$CUPS_VERSION$CUPS_REVISION")
+AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "AC_PACKAGE_NAME/$CUPS_VERSION$CUPS_REVISION")
dnl Default compiler flags...
CFLAGS="${CFLAGS:=}"
AC_PATH_PROG(GZIP,gzip)
AC_PATH_PROG(LD,ld)
AC_PATH_PROG(LN,ln)
+AC_PATH_PROG(MKDIR,mkdir)
AC_PATH_PROG(MV,mv)
AC_PATH_PROG(RM,rm)
AC_PATH_PROG(RMDIR,rmdir)
AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
AC_CHECK_HEADER(sys/param.h,AC_DEFINE(HAVE_SYS_PARAM_H))
AC_CHECK_HEADER(sys/ucred.h,AC_DEFINE(HAVE_SYS_UCRED_H))
-AC_CHECK_HEADER(asl.h,AC_DEFINE(HAVE_ASL_H))
dnl Checks for iconv.h and iconv_open
AC_CHECK_HEADER(iconv.h,
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)
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
;;
*)
dnl Check for posix_spawn
AC_CHECK_FUNCS(posix_spawn)
+dnl Check for getgrouplist
+AC_CHECK_FUNCS(getgrouplist)
+
dnl See if the tm structure has the tm_gmtoff member...
AC_MSG_CHECKING(for tm_gmtoff member in tm structure)
AC_TRY_COMPILE([#include <time.h>],[struct tm t;
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)
AC_SUBST(LIBZ)
dnl Flags for "ar" command...
-case $uname in
- Darwin* | *BSD*)
+case $host_os_name in
+ darwin* | *bsd*)
ARFLAGS="-rcv"
;;
*)
LIBS="$SAVELIBS"
dnl Check for DBUS support
-AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support])
+AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support])
AC_ARG_WITH(dbusdir, [ --with-dbusdir set DBUS configuration directory ],
DBUSDIR="$withval")
DBUS_NOTIFIER=""
DBUS_NOTIFIERLIBS=""
-if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; 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)
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"
if test "x$default_adminkey" != xdefault; then
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey $default_adminkey"
CUPS_DEFAULT_SYSTEM_AUTHKEY="$default_adminkey"
- elif grep -q system.print.operator /etc/authorization; then
+ else
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.print.admin"
CUPS_DEFAULT_SYSTEM_AUTHKEY="system.print.admin"
- else
- CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"
- CUPS_DEFAULT_SYSTEM_AUTHKEY="system.preferences"
fi
if test "x$default_operkey" != xdefault; then
CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY($default_operkey) @admin @lpadmin"
- elif grep -q system.print.operator /etc/authorization; then
- CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.operator) @admin @lpadmin"
else
- CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.admin) @admin @lpadmin"
+ CUPS_DEFAULT_PRINTOPERATOR_AUTH="@AUTHKEY(system.print.operator) @admin @lpadmin"
fi])
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
AC_ARG_WITH(components, [ --with-components set components to build:
- "all" (default) builds everything
- - "core" builds libcups and ipptool],
+ - "core" builds libcups and ipptool
+ - "libcups" builds just libcups],
COMPONENTS="$withval")
case "$COMPONENTS" in
all)
- BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
+ BUILDDIRS="test filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
;;
core)
- BUILDDIRS="data locale"
+ BUILDDIRS="test locale"
+ ;;
+
+ libcups)
+ BUILDDIRS="locale"
;;
*)
esac
AC_SUBST(BUILDDIRS)
-
-dnl
-dnl End of "$Id$".
-dnl