Imported Upstream version 2.2.7
[platform/upstream/cups.git] / configure
index f8c040f..21eca26 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,11 +1,11 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69 for CUPS 2.2.7.
 #
+# Report bugs to <https://github.com/apple/cups/issues>.
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -134,6 +134,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -167,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -212,21 +238,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       # Preserve -v and -x to the replacement shell.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       case $- in # ((((
-         *v*x* | *x*v* ) as_opts=-vx ;;
-         *v* ) as_opts=-v ;;
-         *x* ) as_opts=-x ;;
-         * ) as_opts= ;;
-       esac
-       exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -236,7 +266,8 @@ fi
     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
-    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: https://github.com/apple/cups/issues about your system,
 $0: including any error possibly output before this
 $0: message. Then install a modern shell, or manually run
 $0: the script under such a shell if you do have one."
@@ -328,6 +359,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -449,6 +488,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -483,16 +526,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -504,28 +547,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -555,14 +578,13 @@ MFLAGS=
 MAKEFLAGS=
 
 # Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
-
-ac_unique_file="cups/cups.h"
+PACKAGE_NAME='CUPS'
+PACKAGE_TARNAME='cups'
+PACKAGE_VERSION='2.2.7'
+PACKAGE_STRING='CUPS 2.2.7'
+PACKAGE_BUGREPORT='https://github.com/apple/cups/issues'
+PACKAGE_URL='https://www.cups.org/'
+
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -605,48 +627,49 @@ LIBOBJS
 UNINSTALL_LANGUAGES
 INSTALL_LANGUAGES
 PYTHON
-PHPDIR
-PHPCONFIG
 PHP
 PHPCGI
 PERL
 JAVA
-PDFTOPS
-DEFAULT_PDFTOPS
-CUPS_GHOSTSCRIPT
-CUPS_PDFTOPS
 CUPS_WEBIF
-FONTS
-TEXTTOPS
-DEFAULT_TEXTTOPS
-DEFAULT_BANNERTOPS
-BANNERTOPS
 DEFAULT_IPP_PORT
 CUPS_SNMP_COMMUNITY
 CUPS_SNMP_ADDRESS
 DEFAULT_RAW_PRINTING
 CUPS_MAX_COPIES
+CUPS_DEFAULT_SMB_CONFIG_FILE
+CUPS_DEFAULT_LPD_CONFIG_FILE
 CUPS_DEFAULT_PRINTCAP
 CUPS_PRIMARY_SYSTEM_GROUP
 CUPS_SYSTEM_GROUPS
 CUPS_GROUP
 CUPS_USER
-CUPS_USE_NETWORK_DEFAULT
-CUPS_IMPLICIT_CLASSES
 CUPS_DEFAULT_SHARED
-CUPS_BROWSE_SHORT_NAMES
-CUPS_BROWSE_REMOTE_PROTOCOLS
 CUPS_BROWSE_LOCAL_PROTOCOLS
 CUPS_BROWSING
+CUPS_PAGE_LOG_FORMAT
 CUPS_ACCESS_LOG_LEVEL
 CUPS_LOG_LEVEL
 CUPS_FATAL_ERRORS
 CUPS_LOG_FILE_PERM
+CUPS_CUPSD_FILE_PERM
 CUPS_CONFIG_FILE_PERM
+CUPS_EXE_FILE_PERM
 CUPS_BUNDLEDIR
 LANGUAGES
-LAUNCHDLIBS
-DEFAULT_LAUNCHD_CONF
+XINETD
+RCSTOP
+RCSTART
+RCLEVELS
+INITDDIR
+INITDIR
+SMFMANIFESTDIR
+SYSTEMD_DIR
+LAUNCHD_DIR
+ONDEMANDLIBS
+ONDEMANDFLAGS
+IPPFIND_MAN
+IPPFIND_BIN
 DNSSD_BACKEND
 DNSSDLIBS
 LARGEFILE
@@ -659,69 +682,45 @@ EXPORT_SSLLIBS
 SSLLIBS
 SSLFLAGS
 IPPALIASES
-LIBGCRYPTCONFIG
+CUPS_SERVERKEYCHAIN
 LIBGNUTLSCONFIG
 PTHREAD_FLAGS
-LIBLDAP
+CUPS_DEFAULT_GSSSERVICENAME
 KRB5CONFIG
 LIBGSSAPI
-LIBSLP
 CUPS_LISTEN_DOMAINSOCKET
 CUPS_DEFAULT_DOMAINSOCKET
-EXPORT_LIBZ
-EXPORT_LIBTIFF
-EXPORT_LIBPNG
-EXPORT_LIBJPEG
-INSTALL_GZIP
-LIBZ
-LIBTIFF
-LIBPNG
-LIBJPEG
-IMGFILTERS
-DEFAULT_IMAGEFILTERS
-PHPOPTIONS
 RELROFLAGS
 PIEFLAGS
 CXXLIBS
-ARCH64FLAGS
-ARCH32FLAGS
 LDARCHFLAGS
 ARCHFLAGS
 UNITTESTS
 OPTIM
 INSTALL_STRIP
+LIBTOOL_INSTALL
+LIBTOOL_CXX
+LIBTOOL_CC
 LIBTOOL
+LD_CXX
+LD_CC
 EXPORT_LDFLAGS
 IMGLIBS
 DSOLIBS
 LINKCUPSIMAGE
 LINKCUPS
 EXTLINKCUPSIMAGE
-EXTLINKCUPSDRIVER
 EXTLINKCUPS
 LIBCUPSSTATIC
 LIBCUPSPPDC
 LIBCUPSMIME
 LIBCUPSIMAGE
-LIBCUPSDRIVER
 LIBCUPSCGI
 LIBCUPSBASE
 LIBCUPS
-DSO64FLAGS
-DSO32FLAGS
 DSOFLAGS
 DSOXX
 DSO
-UNINSTALL64
-LIB64DIR
-LIB64CUPSIMAGE
-LIB64CUPS
-INSTALL64
-UNINSTALL32
-LIB32DIR
-LIB32CUPSIMAGE
-LIB32CUPS
-INSTALL32
 MAN8DIR
 MAN8EXT
 MAN7EXT
@@ -742,17 +741,9 @@ MENUDIR
 ICONDIR
 CUPS_DATADIR
 CUPS_CACHEDIR
-XINETD
-SMFMANIFESTDIR
-RCSTOP
-RCSTART
-RCLEVELS
-INITDDIR
-INITDIR
 PRIVATEINCLUDE
 privateinclude
 BUILDDIRS
-LEGACY_BACKENDS
 INSTALLXPC
 CUPS_SYSTEM_AUTHKEY
 CUPS_DEFAULT_PRINTOPERATOR_AUTH
@@ -762,8 +753,12 @@ DBUSDIR
 SERVERLIBS
 BACKLIBS
 ARFLAGS
+LIBZ
+INSTALL_GZIP
 LIBWRAP
+USBQUIRKS
 LIBUSB
+LIBMXML
 EGREP
 GREP
 LIBPAPER
@@ -777,9 +772,9 @@ SED
 RMDIR
 RM
 MV
+MKDIR
 LN
 LD
-HTMLDOC
 GZIP
 CHMOD
 AR
@@ -799,6 +794,15 @@ AWK
 CUPS_BUILD
 CUPS_REVISION
 CUPS_VERSION
+LOCALTARGET
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
 target_alias
 host_alias
 build_alias
@@ -853,12 +857,6 @@ with_adminkey
 with_operkey
 with_components
 with_privateinclude
-with_rcdir
-with_rclevels
-with_rcstart
-with_rcstop
-with_smfmanifestdir
-with_xinetd
 with_lpdconfig
 with_smbconfig
 with_cachedir
@@ -867,8 +865,7 @@ with_menudir
 with_docdir
 with_fontpath
 with_logdir
-enable_32bit
-enable_64bit
+with_rundir
 enable_shared
 enable_libtool_unsupported
 with_optim
@@ -878,50 +875,44 @@ enable_debug_printfs
 enable_unit_tests
 with_archflags
 with_ldarchflags
-with_arch32flags
-with_arch64flags
 enable_relro
-enable_image
-enable_jpeg
-enable_png
-enable_tiff
 with_domainsocket
-enable_slp
-with_openslp_libs
-with_openslp_includes
 enable_gssapi
 with_gssservicename
-enable_ldap
-with_ldap_libs
-with_ldap_includes
 enable_threads
 enable_ssl
 enable_cdsassl
 enable_gnutls
-enable_openssl
-with_openssl_libs
-with_openssl_includes
 enable_pam
 with_pam_module
 enable_largefile
+enable_avahi
 enable_dnssd
 with_dnssd_libs
 with_dnssd_includes
 enable_launchd
+enable_systemd
+with_systemd
+enable_upstart
+with_smfmanifestdir
+with_rcdir
+with_rclevels
+with_rcstart
+with_rcstop
+with_xinetd
 with_languages
 with_bundledir
+with_exe_file_perm
 with_config_file_perm
+with_cupsd_file_perm
 with_log_file_perm
 with_fatal_errors
 with_log_level
 with_access_log_level
+enable_page_logging
 enable_browsing
 with_local_protocols
-with_remote_protocols
-enable_browse_short
 enable_default_shared
-enable_implicit
-enable_use_network_default
 with_cups_user
 with_cups_group
 with_system_groups
@@ -933,10 +924,7 @@ enable_raw_printing
 with_snmp_address
 with_snmp_community
 with_ipp_port
-enable_bannertops
-enable_texttops
 enable_webif
-with_pdftops
 with_java
 with_perl
 with_php
@@ -994,7 +982,7 @@ sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
 infodir='${datarootdir}/info'
 htmldir='${docdir}'
 dvidir='${docdir}'
@@ -1409,8 +1397,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1496,7 +1482,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures CUPS 2.2.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1544,7 +1530,7 @@ Fine tuning of the installation directories:
   --infodir=DIR           info documentation [DATAROOTDIR/info]
   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/cups]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1552,11 +1538,17 @@ Fine tuning of the installation directories:
 _ACEOF
 
   cat <<\_ACEOF
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
 _ACEOF
 fi
 
 if test -n "$ac_init_help"; then
-
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of CUPS 2.2.7:";;
+   esac
   cat <<\_ACEOF
 
 Optional Features:
@@ -1569,46 +1561,33 @@ Optional Features:
   --enable-libusb         use libusb for USB printing
   --enable-tcp-wrappers   use libwrap for TCP wrappers support
   --enable-acl            build with POSIX ACL support
-  --enable-dbus           build with DBUS support
-  --enable-32bit          generate 32-bit libraries on 32/64-bit systems
-  --enable-64bit          generate 64-bit libraries on 32/64-bit systems
+  --disable-dbus          build without DBUS support
   --disable-shared        do not create shared libraries
-  --enable-libtool-unsupported
+  --enable-libtool-unsupported=/path/to/libtool
                           build with libtool (UNSUPPORTED!)
   --enable-debug          build with debugging symbols
   --enable-debug-guards   build with memory allocation guards
   --enable-debug-printfs  build with CUPS_DEBUG_LOG support
   --enable-unit-tests     build and run unit tests
   --enable-relro          build with the GCC relro option
-  --enable-image          always build the image filters
-  --disable-jpeg          disable JPEG support
-  --disable-png           disable PNG support
-  --disable-tiff          disable TIFF support
-  --disable-slp           disable SLP support
   --disable-gssapi        disable GSSAPI support
-  --disable-ldap          disable LDAP support
   --disable-threads       disable multi-threading support
   --disable-ssl           disable SSL/TLS support
   --enable-cdsassl        use CDSA for SSL/TLS support, default=first
   --enable-gnutls         use GNU TLS for SSL/TLS support, default=second
-  --enable-openssl        use OpenSSL for SSL/TLS support, default=third
   --disable-pam           disable PAM support
   --disable-largefile     omit support for large files
-  --disable-dnssd         disable DNS Service Discovery support
+  --disable-avahi         disable DNS Service Discovery support using Avahi
+  --disable-dnssd         disable DNS Service Discovery support using mDNSResponder
   --disable-launchd       disable launchd support
+  --disable-systemd       disable systemd support
+  --enable-upstart        enable upstart support
+  --enable-page-logging   enable page_log by default
   --disable-browsing      disable Browsing by default
-  --disable-browse-short-names
-                         disable BrowseShortNames by default
   --disable-default-shared
                          disable DefaultShared by default
-  --disable-implicit-classes
-                          disable ImplicitClasses by default
-  --enable-use-network-default
-                          set UseNetworkDefault to Yes by default
   --disable-raw-printing  do not allow raw printing by default
-  --enable-bannertops     always build the banner filter
-  --enable-texttops       always build the text filter
-  --enable-webif          enable the web interface by default, default=no for Mac OS X
+  --enable-webif          enable the web interface by default, default=no for macOS
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1621,12 +1600,6 @@ Optional Packages:
                            - "all" (default) builds everything
                            - "core" builds libcups and ipptool
   --with-privateinclude   set path for private include files, default=none
-  --with-rcdir            set path for rc scripts
-  --with-rclevels         set run levels for rc scripts
-  --with-rcstart          set start number for rc scripts
-  --with-rcstop           set stop number for rc scripts
-  --with-smfmanifestdir   set path for Solaris SMF manifest
-  --with-xinetd           set path for xinetd config files
   --with-lpdconfig        set URI for LPD config file
   --with-smbconfig        set URI for Samba config file
   --with-cachedir         set path for cache files
@@ -1635,31 +1608,32 @@ Optional Packages:
   --with-docdir           set path for documentation
   --with-fontpath         set font path for pstoraster
   --with-logdir           set path for log files
+  --with-rundir           set transient run-time state directory
   --with-optim            set optimization flags
   --with-archflags        set default architecture flags
   --with-ldarchflags      set program architecture flags
-  --with-arch32flags      set 32-bit architecture flags
-  --with-arch64flags      set 64-bit architecture flags
   --with-domainsocket     set unix domain socket name
-  --with-openslp-libs     set directory for OpenSLP library
-  --with-openslp-includes set directory for OpenSLP includes
   --with-gssservicename   set default gss service name
-  --with-ldap-libs        set directory for LDAP library
-  --with-ldap-includes    set directory for LDAP includes
-  --with-openssl-libs     set directory for OpenSSL library
-  --with-openssl-includes set directory for OpenSSL includes
-  --with-pam-module       specify the PAM module to use
+  --with-pam-module       set the PAM module to use
   --with-dnssd-libs       set directory for DNS Service Discovery library
   --with-dnssd-includes   set directory for DNS Service Discovery includes
+  --with-systemd          set directory for systemd service files
+  --with-smfmanifestdir   set path for Solaris SMF manifest
+  --with-rcdir            set path for rc scripts
+  --with-rclevels         set run levels for rc scripts
+  --with-rcstart          set start number for rc scripts
+  --with-rcstop           set stop number for rc scripts
+  --with-xinetd           set path for xinetd config files
   --with-languages        set installed languages, default=all
-  --with-bundledir     set Mac OS X localization bundle directory
+  --with-bundledir        set macOS localization bundle directory
+  --with-exe-file-perm    set default executable permissions value, default=0555
   --with-config-file-perm set default ConfigFilePerm value, default=0640
+  --with-cupsd-file-perm  set default cupsd permissions, default=0500
   --with-log-file-perm    set default LogFilePerm value, default=0644
   --with-fatal-errors     set default FatalErrors value, default=config
   --with-log-level        set default LogLevel value, default=warn
-  --with-access-log-level set default AccessLogLevel value, default=actions
-  --with-local-protocols  set default BrowseLocalProtocols, default="CUPS"
-  --with-remote-protocols set default BrowseRemoteProtocols, default="CUPS"
+  --with-access-log-level set default AccessLogLevel value, default=none
+  --with-local-protocols  set default BrowseLocalProtocols, default=""
   --with-cups-user        set default user for CUPS
   --with-cups-group       set default group for CUPS
   --with-system-groups    set default system groups for CUPS
@@ -1670,7 +1644,6 @@ Optional Packages:
   --with-snmp-address     set SNMP query address, default=auto
   --with-snmp-community   set SNMP community, default=public
   --with-ipp-port         set port number for IPP, default=631
-  --with-pdftops          set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops
   --with-java             set Java interpreter for web interfaces
   --with-perl             set Perl interpreter for web interfaces
   --with-php              set PHP interpreter for web interfaces
@@ -1691,7 +1664,8 @@ Some influential environment variables:
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-Report bugs to the package provider.
+Report bugs to <https://github.com/apple/cups/issues>.
+CUPS home page: <https://www.cups.org/>.
 _ACEOF
 ac_status=$?
 fi
@@ -1754,10 +1728,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.68
+CUPS configure 2.2.7
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1908,7 +1882,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+        test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -2039,6 +2013,10 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## --------------------------------------------------- ##
+## Report this to https://github.com/apple/cups/issues ##
+## --------------------------------------------------- ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
@@ -2214,8 +2192,8 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by $as_me, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+It was created by CUPS $as_me 2.2.7, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2564,34 +2542,133 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-uname=`uname`
-uversion=`uname -r | sed -e '1,$s/^[^0-9]*\([0-9]*\)\.\([0-9]*\).*/\1\2/'`
-uarch=`uname -m`
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
-case "$uname" in
-       GNU* | GNU/*)
-               uname="GNU"
-               ;;
-       IRIX*)
-               uname="IRIX"
-               ;;
-       Linux*)
-               uname="Linux"
-               ;;
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+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}'`
+# 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
+        as_fn_error $? "Sorry, this version of CUPS requires macOS 10.8 or higher." "$LINENO" 5
+fi
 
+if test "$build" = "$host"; then
+        # No, build local targets
+       LOCALTARGET="local"
+else
+        # Yes, don't build local targets
+       LOCALTARGET=""
+fi
 
 
 
 ac_config_headers="$ac_config_headers config.h"
 
 
-CUPS_VERSION=1.5.3
-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_VERSION="2.2.7"
+CUPS_REVISION=""
 CUPS_BUILD="cups-$CUPS_VERSION"
 
 
@@ -2636,7 +2713,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AWK="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2666,197 +2743,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
+  for ac_prog in clang cc gcc
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -2874,7 +2761,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2900,7 +2787,7 @@ fi
 fi
 if test -z "$CC"; then
   ac_ct_CC=$CC
-  for ac_prog in cl.exe
+  for ac_prog in clang cc gcc
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -2918,7 +2805,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2955,8 +2842,6 @@ esac
   fi
 fi
 
-fi
-
 
 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -3364,8 +3249,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3597,7 +3481,7 @@ if test -z "$CXX"; then
     CXX=$CCC
   else
     if test -n "$ac_tool_prefix"; then
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  for ac_prog in clang++ c++ g++
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -3615,7 +3499,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3641,7 +3525,7 @@ fi
 fi
 if test -z "$CXX"; then
   ac_ct_CXX=$CXX
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  for ac_prog in clang++ c++ g++
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -3659,7 +3543,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CXX="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3861,7 +3745,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3901,7 +3785,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3954,7 +3838,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3994,7 +3878,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4034,7 +3918,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4056,16 +3940,16 @@ $as_echo "no" >&6; }
 fi
 
 
-# Extract the first word of "htmldoc", so it can be a program name with args.
-set dummy htmldoc; ac_word=$2
+# Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_HTMLDOC+:} false; then :
+if ${ac_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $HTMLDOC in
+  case $LD in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_HTMLDOC="$HTMLDOC" # Let the user override the test with a path.
+  ac_cv_path_LD="$LD" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4074,8 +3958,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_HTMLDOC="$as_dir/$ac_word$ac_exec_ext"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_LD="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4086,26 +3970,26 @@ IFS=$as_save_IFS
   ;;
 esac
 fi
-HTMLDOC=$ac_cv_path_HTMLDOC
-if test -n "$HTMLDOC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HTMLDOC" >&5
-$as_echo "$HTMLDOC" >&6; }
+LD=$ac_cv_path_LD
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-# Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
+# Extract the first word of "ln", so it can be a program name with args.
+set dummy ln; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LD+:} false; then :
+if ${ac_cv_path_LN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $LD in
+  case $LN in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_LD="$LD" # Let the user override the test with a path.
+  ac_cv_path_LN="$LN" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4114,8 +3998,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_LD="$as_dir/$ac_word$ac_exec_ext"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4126,26 +4010,26 @@ IFS=$as_save_IFS
   ;;
 esac
 fi
-LD=$ac_cv_path_LD
-if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+LN=$ac_cv_path_LN
+if test -n "$LN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
+$as_echo "$LN" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-# Extract the first word of "ln", so it can be a program name with args.
-set dummy ln; ac_word=$2
+# Extract the first word of "mkdir", so it can be a program name with args.
+set dummy mkdir; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LN+:} false; then :
+if ${ac_cv_path_MKDIR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $LN in
+  case $MKDIR in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_LN="$LN" # Let the user override the test with a path.
+  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4154,8 +4038,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4166,10 +4050,10 @@ IFS=$as_save_IFS
   ;;
 esac
 fi
-LN=$ac_cv_path_LN
-if test -n "$LN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
-$as_echo "$LN" >&6; }
+MKDIR=$ac_cv_path_MKDIR
+if test -n "$MKDIR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
+$as_echo "$MKDIR" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -4194,7 +4078,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4234,7 +4118,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4274,7 +4158,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4314,7 +4198,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4354,7 +4238,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_XDGOPEN="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4411,8 +4295,9 @@ fi
 
 
 
-# Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_PKGCONFIG+:} false; then :
@@ -4429,7 +4314,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4451,11 +4336,68 @@ $as_echo "no" >&6; }
 fi
 
 
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
+
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmod" >&5
-$as_echo_n "checking for library containing fmod... " >&6; }
-if ${ac_cv_search_fmod+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing abs" >&5
+$as_echo_n "checking for library containing abs... " >&6; }
+if ${ac_cv_search_abs+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -4468,11 +4410,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char fmod ();
+char abs ();
 int
 main ()
 {
-return fmod ();
+return abs ();
   ;
   return 0;
 }
@@ -4485,27 +4427,28 @@ for ac_lib in '' m; do
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
   if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_fmod=$ac_res
+  ac_cv_search_abs=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if ${ac_cv_search_fmod+:} false; then :
+  if ${ac_cv_search_abs+:} false; then :
   break
 fi
 done
-if ${ac_cv_search_fmod+:} false; then :
+if ${ac_cv_search_abs+:} false; then :
 
 else
-  ac_cv_search_fmod=no
+  ac_cv_search_abs=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmod" >&5
-$as_echo "$ac_cv_search_fmod" >&6; }
-ac_res=$ac_cv_search_fmod
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_abs" >&5
+$as_echo "$ac_cv_search_abs" >&6; }
+ac_res=$ac_cv_search_abs
 if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_ABS 1" >>confdefs.h
 
 fi
 
@@ -4565,6 +4508,62 @@ if test "$ac_res" != no; then :
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmod" >&5
+$as_echo_n "checking for library containing fmod... " >&6; }
+if ${ac_cv_search_fmod+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char fmod ();
+int
+main ()
+{
+return fmod ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' m; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_fmod=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_fmod+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_fmod+:} false; then :
+
+else
+  ac_cv_search_fmod=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmod" >&5
+$as_echo "$ac_cv_search_fmod" >&6; }
+ac_res=$ac_cv_search_fmod
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getspent" >&5
 $as_echo_n "checking for library containing getspent... " >&6; }
 if ${ac_cv_search_getspent+:} false; then :
@@ -4768,7 +4767,7 @@ do
     for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+      as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -4834,7 +4833,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -5011,6 +5010,13 @@ fi
 done
 
 
+ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
+  $as_echo "#define HAVE_STDLIB_H 1" >>confdefs.h
+
+fi
+
+
 ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
 if test "x$ac_cv_header_crypt_h" = xyes; then :
   $as_echo "#define HAVE_CRYPT_H 1" >>confdefs.h
@@ -5039,6 +5045,13 @@ if test "x$ac_cv_header_shadow_h" = xyes; then :
 fi
 
 
+ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes; then :
+  $as_echo "#define HAVE_STDINT_H 1" >>confdefs.h
+
+fi
+
+
 ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
 if test "x$ac_cv_header_string_h" = xyes; then :
   $as_echo "#define HAVE_STRING_H 1" >>confdefs.h
@@ -5060,13 +5073,6 @@ if test "x$ac_cv_header_bstring_h" = xyes; then :
 fi
 
 
-ac_fn_c_check_header_mongrel "$LINENO" "usersec.h" "ac_cv_header_usersec_h" "$ac_includes_default"
-if test "x$ac_cv_header_usersec_h" = xyes; then :
-  $as_echo "#define HAVE_USERSEC_H 1" >>confdefs.h
-
-fi
-
-
 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
 if test "x$ac_cv_header_sys_ioctl_h" = xyes; then :
   $as_echo "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
@@ -5088,13 +5094,6 @@ if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
 fi
 
 
-ac_fn_c_check_header_mongrel "$LINENO" "scsi/sg.h" "ac_cv_header_scsi_sg_h" "$ac_includes_default"
-if test "x$ac_cv_header_scsi_sg_h" = xyes; then :
-  $as_echo "#define HAVE_SCSI_SG_H 1" >>confdefs.h
-
-fi
-
-
 
 ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
 if test "x$ac_cv_header_iconv_h" = xyes; then :
@@ -5158,70 +5157,196 @@ if test "$ac_res" != no; then :
                SAVELIBS="$SAVELIBS $LIBS"
 fi
 
-       LIBS="$SAVELIBS"
-fi
-
-
-
-ac_fn_c_check_header_mongrel "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_mount_h" = xyes; then :
-  $as_echo "#define HAVE_SYS_MOUNT_H 1" >>confdefs.h
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing libiconv_open" >&5
+$as_echo_n "checking for library containing libiconv_open... " >&6; }
+if ${ac_cv_search_libiconv_open+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char libiconv_open ();
+int
+main ()
+{
+return libiconv_open ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' iconv; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_libiconv_open=$ac_res
 fi
-
-
-ac_fn_c_check_header_mongrel "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_statfs_h" = xyes; then :
-  $as_echo "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_libiconv_open+:} false; then :
+  break
 fi
+done
+if ${ac_cv_search_libiconv_open+:} false; then :
 
-
-ac_fn_c_check_header_mongrel "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_statvfs_h" = xyes; then :
-  $as_echo "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h
-
+else
+  ac_cv_search_libiconv_open=no
 fi
-
-
-ac_fn_c_check_header_mongrel "$LINENO" "sys/vfs.h" "ac_cv_header_sys_vfs_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_vfs_h" = xyes; then :
-  $as_echo "#define HAVE_SYS_VFS_H 1" >>confdefs.h
-
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_libiconv_open" >&5
+$as_echo "$ac_cv_search_libiconv_open" >&6; }
+ac_res=$ac_cv_search_libiconv_open
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_ICONV_H 1" >>confdefs.h
 
-
-for ac_func in statfs statvfs
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
+               SAVELIBS="$SAVELIBS $LIBS"
 fi
-done
 
+       LIBS="$SAVELIBS"
+fi
 
-for ac_func in strdup strlcat strlcpy
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
-fi
-done
 
-if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
-       echo Forcing snprintf emulation for HP-UX.
+LIBMXML=""
+ac_fn_c_check_header_mongrel "$LINENO" "mxml.h" "ac_cv_header_mxml_h" "$ac_includes_default"
+if test "x$ac_cv_header_mxml_h" = xyes; then :
+  SAVELIBS="$LIBS"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mmxlNewElement" >&5
+$as_echo_n "checking for library containing mmxlNewElement... " >&6; }
+if ${ac_cv_search_mmxlNewElement+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-       for ac_func in snprintf vsnprintf
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mmxlNewElement ();
+int
+main ()
+{
+return mmxlNewElement ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' mxml; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_mmxlNewElement=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_mmxlNewElement+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_mmxlNewElement+:} false; then :
+
+else
+  ac_cv_search_mmxlNewElement=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mmxlNewElement" >&5
+$as_echo "$ac_cv_search_mmxlNewElement" >&6; }
+ac_res=$ac_cv_search_mmxlNewElement
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_MXML_H 1" >>confdefs.h
+
+               LIBMXML="-lmxml"
+fi
+
+       LIBS="$SAVELIBS"
+fi
+
+
+
+
+ac_fn_c_check_header_mongrel "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mount_h" = xyes; then :
+  $as_echo "#define HAVE_SYS_MOUNT_H 1" >>confdefs.h
+
+fi
+
+
+ac_fn_c_check_header_mongrel "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_statfs_h" = xyes; then :
+  $as_echo "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
+
+fi
+
+
+ac_fn_c_check_header_mongrel "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_statvfs_h" = xyes; then :
+  $as_echo "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h
+
+fi
+
+
+ac_fn_c_check_header_mongrel "$LINENO" "sys/vfs.h" "ac_cv_header_sys_vfs_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_vfs_h" = xyes; then :
+  $as_echo "#define HAVE_SYS_VFS_H 1" >>confdefs.h
+
+fi
+
+
+for ac_func in statfs statvfs
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in strdup strlcat strlcpy
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+if test "$host_os_name" = "hp-ux" -a "$host_os_version" = "1020"; then
+       echo Forcing snprintf emulation for HP-UX.
+else
+       for ac_func in snprintf vsnprintf
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
@@ -5282,8 +5407,8 @@ fi
 done
 
 
-case "$uname" in
-       Linux | GNU)
+case "$host_os_name" in
+       linux* | gnu*)
                # Do not use sigset on Linux or GNU HURD
                ;;
        *)
@@ -5327,6 +5452,30 @@ fi
 done
 
 
+for ac_func in posix_spawn
+do :
+  ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
+if test "x$ac_cv_func_posix_spawn" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_POSIX_SPAWN 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in getgrouplist
+do :
+  ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
+if test "x$ac_cv_func_getgrouplist" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETGROUPLIST 1
+_ACEOF
+
+fi
+done
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff member in tm structure" >&5
 $as_echo_n "checking for tm_gmtoff member in tm structure... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5396,10 +5545,12 @@ fi
 
 
 LIBUSB=""
+USBQUIRKS=""
+
 
 
 if test "x$PKGCONFIG" != x; then
-       if test x$enable_libusb = xyes -o $uname != Darwin; then
+       if test x$enable_libusb != xno -a $host_os_name != darwin; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb-1.0" >&5
 $as_echo_n "checking for libusb-1.0... " >&6; }
                if $PKGCONFIG --exists libusb-1.0; then
@@ -5409,9 +5560,13 @@ $as_echo "yes" >&6; }
 
                        CFLAGS="$CFLAGS `$PKGCONFIG --cflags libusb-1.0`"
                        LIBUSB="`$PKGCONFIG --libs libusb-1.0`"
+                       USBQUIRKS="\$(DATADIR)/usb"
                else
                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+                       if test x$enable_libusb = xyes; then
+                               as_fn_error $? "libusb required for --enable-libusb." "$LINENO" 5
+                       fi
                fi
        fi
 elif test x$enable_libusb = xyes; then
@@ -5478,8 +5633,105 @@ fi
 
 fi
 
-case $uname in
-        Darwin* | *BSD*)
+INSTALL_GZIP=""
+LIBZ=""
+ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzgets in -lz" >&5
+$as_echo_n "checking for gzgets in -lz... " >&6; }
+if ${ac_cv_lib_z_gzgets+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gzgets ();
+int
+main ()
+{
+return gzgets ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_gzgets=yes
+else
+  ac_cv_lib_z_gzgets=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzgets" >&5
+$as_echo "$ac_cv_lib_z_gzgets" >&6; }
+if test "x$ac_cv_lib_z_gzgets" = xyes; then :
+  $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
+
+       LIBZ="-lz"
+       LIBS="$LIBS -lz"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
+$as_echo_n "checking for inflateCopy in -lz... " >&6; }
+if ${ac_cv_lib_z_inflateCopy+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflateCopy ();
+int
+main ()
+{
+return inflateCopy ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_inflateCopy=yes
+else
+  ac_cv_lib_z_inflateCopy=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
+$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
+if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
+  $as_echo "#define HAVE_INFLATECOPY 1" >>confdefs.h
+
+fi
+
+       if test "x$GZIP" != z; then
+               INSTALL_GZIP="-z"
+       fi
+fi
+
+fi
+
+
+
+
+
+case $host_os_name in
+        darwin* | *bsd*)
                 ARFLAGS="-rcv"
                 ;;
         *)
@@ -5563,12 +5815,6 @@ fi
 fi
 LIBS="$SAVELIBS"
 
-if test -d /etc/dbus-1; then
-       DBUSDIR="/etc/dbus-1"
-else
-       DBUSDIR=""
-fi
-
 # Check whether --enable-dbus was given.
 if test "${enable_dbus+set}" = set; then :
   enableval=$enable_dbus;
@@ -5581,10 +5827,11 @@ if test "${with_dbusdir+set}" = set; then :
 fi
 
 
+DBUSDIR=""
 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
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
 $as_echo_n "checking for DBUS... " >&6; }
        if $PKGCONFIG --exists dbus-1; then
@@ -5604,7 +5851,16 @@ if test "x$ac_cv_func_dbus_message_iter_init_append" = xyes; then :
 
 fi
 
+               ac_fn_c_check_func "$LINENO" "dbus_threads_init" "ac_cv_func_dbus_threads_init"
+if test "x$ac_cv_func_dbus_threads_init" = xyes; then :
+  $as_echo "#define HAVE_DBUS_THREADS_INIT 1" >>confdefs.h
+
+fi
+
                LIBS="$SAVELIBS"
+               if test -d /etc/dbus-1; then
+                       DBUSDIR="/etc/dbus-1"
+               fi
        else
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -5616,13 +5872,12 @@ fi
 
 
 CUPS_DEFAULT_PRINTOPERATOR_AUTH="@SYSTEM"
+CUPS_DEFAULT_SYSTEM_AUTHKEY=""
 CUPS_SYSTEM_AUTHKEY=""
 INSTALLXPC=""
-LEGACY_BACKENDS="parallel"
 
-case $uname in
-        Darwin*)
-               LEGACY_BACKENDS=""
+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"
@@ -5655,13 +5910,6 @@ if test "x$ac_cv_header_CoreFoundation_CFBundlePriv_h" = xyes; then :
 fi
 
 
-               ac_fn_c_check_header_mongrel "$LINENO" "IOKit/pwr_mgt/IOPMLibPrivate.h" "ac_cv_header_IOKit_pwr_mgt_IOPMLibPrivate_h" "$ac_includes_default"
-if test "x$ac_cv_header_IOKit_pwr_mgt_IOPMLibPrivate_h" = xyes; then :
-  $as_echo "#define HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H 1" >>confdefs.h
-
-fi
-
-
 
                                for ac_func in SCDynamicStoreCopyComputerName
 do :
@@ -5675,21 +5923,6 @@ fi
 done
 
 
-                               SAVELIBS="$LIBS"
-               LIBS="$LIBS -framework ApplicationServices"
-               for ac_func in ColorSyncRegisterDevice
-do :
-  ac_fn_c_check_func "$LINENO" "ColorSyncRegisterDevice" "ac_cv_func_ColorSyncRegisterDevice"
-if test "x$ac_cv_func_ColorSyncRegisterDevice" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_COLORSYNCREGISTERDEVICE 1
-_ACEOF
-
-fi
-done
-
-               LIBS="$SAVELIBS"
-
                                ac_fn_c_check_header_mongrel "$LINENO" "membership.h" "ac_cv_header_membership_h" "$ac_includes_default"
 if test "x$ac_cv_header_membership_h" = xyes; then :
   $as_echo "#define HAVE_MEMBERSHIP_H 1" >>confdefs.h
@@ -5716,18 +5949,6 @@ fi
 done
 
 
-                               for ac_func in vproc_transaction_begin
-do :
-  ac_fn_c_check_func "$LINENO" "vproc_transaction_begin" "ac_cv_func_vproc_transaction_begin"
-if test "x$ac_cv_func_vproc_transaction_begin" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_VPROC_TRANSACTION_BEGIN 1
-_ACEOF
-
-fi
-done
-
-
                                ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
   $as_echo "#define HAVE_DLFCN_H 1" >>confdefs.h
@@ -5780,18 +6001,16 @@ if test "x$ac_cv_header_Security_Authorization_h" = xyes; then :
 
                        if test "x$default_adminkey" != xdefault; then
                                CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey $default_adminkey"
-                       elif grep -q system.print.operator /etc/authorization; then
-                               CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.print.admin"
+                               CUPS_DEFAULT_SYSTEM_AUTHKEY="$default_adminkey"
                        else
-                               CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"
+                               CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.print.admin"
+                               CUPS_DEFAULT_SYSTEM_AUTHKEY="system.print.admin"
                        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
 fi
 
@@ -5804,7 +6023,7 @@ fi
 
 
 
-                               if test $uversion -ge 100; then
+                               if test $host_os_version -ge 100; then
                        ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
 if test "x$ac_cv_header_sandbox_h" = xyes; then :
   $as_echo "#define HAVE_SANDBOX_H 1" >>confdefs.h
@@ -5813,8 +6032,8 @@ fi
 
 
                fi
-               if test $uversion -ge 110; then
-                       # Broken public headers in 10.7...
+               if test $host_os_version -ge 110 -a $host_os_version -lt 120; then
+                       # Broken public headers in 10.7.x...
                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sandbox/private.h presence" >&5
 $as_echo_n "checking for sandbox/private.h presence... " >&6; }
                        if test -f /usr/local/include/sandbox/private.h; then
@@ -5835,6 +6054,13 @@ if test "x$ac_cv_header_xpc_xpc_h" = xyes; then :
 fi
 
 
+               ac_fn_c_check_header_mongrel "$LINENO" "xpc/private.h" "ac_cv_header_xpc_private_h" "$ac_includes_default"
+if test "x$ac_cv_header_xpc_private_h" = xyes; then :
+  $as_echo "#define HAVE_XPC_PRIVATE_H 1" >>confdefs.h
+
+fi
+
+
                 ;;
 esac
 
@@ -5843,6 +6069,9 @@ cat >>confdefs.h <<_ACEOF
 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH "$CUPS_DEFAULT_PRINTOPERATOR_AUTH"
 _ACEOF
 
+cat >>confdefs.h <<_ACEOF
+#define CUPS_DEFAULT_SYSTEM_AUTHKEY "$CUPS_DEFAULT_SYSTEM_AUTHKEY"
+_ACEOF
 
 
 
@@ -5858,7 +6087,7 @@ fi
 
 case "$COMPONENTS" in
        all)
-               BUILDDIRS="filter backend berkeley cgi-bin driver monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
+               BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
                ;;
 
        core)
@@ -5875,7 +6104,6 @@ esac
 
 
 
-
 if test "$prefix" = "NONE"; then
        prefix="/"
 fi
@@ -5934,7 +6162,7 @@ fi
 
 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"
@@ -5946,7 +6174,7 @@ fi
 
 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"
@@ -5957,20 +6185,12 @@ if test "$sysconfdir" = "\${prefix}/etc"; then
 fi
 
 if test "$libdir" = "\${exec_prefix}/lib"; then
-       case "$uname" in
-               IRIX*)
-                       libdir="$exec_prefix/lib32"
-                       ;;
-               Linux*)
-                       if test -d /usr/lib64; then
+       case "$host_os_name" in
+               linux*)
+                       if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
                                libdir="$exec_prefix/lib64"
                        fi
                        ;;
-               HP-UX*)
-                       if test -d /usr/lib/hpux32; then
-                               libdir="$exec_prefix/lib/hpux32"
-                       fi
-                       ;;
        esac
 fi
 
@@ -5992,166 +6212,6 @@ fi
 
 
 
-# Check whether --with-rcdir was given.
-if test "${with_rcdir+set}" = set; then :
-  withval=$with_rcdir; rcdir="$withval"
-else
-  rcdir=""
-fi
-
-
-# Check whether --with-rclevels was given.
-if test "${with_rclevels+set}" = set; then :
-  withval=$with_rclevels; rclevels="$withval"
-else
-  rclevels="2 3 5"
-fi
-
-
-# Check whether --with-rcstart was given.
-if test "${with_rcstart+set}" = set; then :
-  withval=$with_rcstart; rcstart="$withval"
-else
-  rcstart="99"
-fi
-
-
-# Check whether --with-rcstop was given.
-if test "${with_rcstop+set}" = set; then :
-  withval=$with_rcstop; rcstop="$withval"
-else
-  rcstop="00"
-fi
-
-
-# Check whether --with-smfmanifestdir was given.
-if test "${with_smfmanifestdir+set}" = set; then :
-  withval=$with_smfmanifestdir; smfmanifestdir="$withval"
-else
-  smfmanifestdir=""
-fi
-
-
-INITDIR=""
-INITDDIR=""
-RCLEVELS="$rclevels"
-RCSTART="$rcstart"
-RCSTOP="$rcstop"
-SMFMANIFESTDIR=""
-
-if test x$rcdir = x; then
-       case "$uname" in
-               AIX*)
-                       INITDIR="/etc/rc.d"
-                       ;;
-
-               Darwin*)
-                       # Darwin and MacOS X...
-                       if test -x /sbin/launchd; then
-                               INITDDIR="/System/Library/LaunchDaemons"
-                       else
-                               INITDDIR="/System/Library/StartupItems/PrintingServices"
-                       fi
-                       ;;
-
-               FreeBSD* | OpenBSD* | MirBSD* | ekkoBSD*)
-                       # FreeBSD and OpenBSD
-                       ;;
-
-               HP-UX*)
-                       INITDIR="/sbin"
-                       RCLEVELS="2"
-                       RCSTART="380"
-                       RCSTOP="620"
-                       ;;
-
-               IRIX*)
-                       # IRIX
-                       INITDIR="/etc"
-                       RCSTART="60"
-                       RCSTOP="25"
-                       ;;
-
-               Linux | GNU | GNU/k*BSD*)
-                       # Linux/HURD seems to choose an init.d directory at random...
-                       if test -d /sbin/init.d; then
-                               # SuSE
-                               INITDIR="/sbin/init.d"
-                       else
-                               if test -d /etc/init.d; then
-                                       # Others
-                                       INITDIR="/etc"
-                               else
-                                       # RedHat
-                                       INITDIR="/etc/rc.d"
-                               fi
-                       fi
-                       RCSTART="81"
-                       RCSTOP="36"
-                       ;;
-
-               NetBSD*)
-                       # NetBSD
-                       INITDDIR="/etc/rc.d"
-                       ;;
-
-               OSF1*)
-                       INITDIR="/sbin"
-                       ;;
-
-               SunOS*)
-                       # Solaris
-                       if test "x$smfmanifestdir" != x; then
-                               SMFMANIFESTDIR=$smfmanifestdir
-                       else
-                               INITDIR="/etc"
-                               RCSTART="81"
-                       fi
-                       ;;
-
-               *)
-                       INITDIR="/etc"
-                       ;;
-
-       esac
-elif test "x$rcdir" != xno; then
-       if test "x$rclevels" = x; then
-               INITDDIR="$rcdir"
-       else
-               INITDIR="$rcdir"
-       fi
-fi
-
-
-
-
-
-
-
-
-
-# Check whether --with-xinetd was given.
-if test "${with_xinetd+set}" = set; then :
-  withval=$with_xinetd; XINETD="$withval"
-else
-  XINETD=""
-fi
-
-
-if test "x$XINETD" = x -a ! -x /sbin/launchd; then
-       for dir in /private/etc/xinetd.d /etc/xinetd.d /usr/local/etc/xinetd.d; do
-               if test -d $dir; then
-                       XINETD="$dir"
-                       break
-               fi
-       done
-elif test "x$XINETD" = xno; then
-       XINETD=""
-fi
-
-
-
-
 # Check whether --with-lpdconfig was given.
 if test "${with_lpdconfig+set}" = set; then :
   withval=$with_lpdconfig; LPDCONFIG="$withval"
@@ -6225,7 +6285,7 @@ fi
 
 
 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"
@@ -6330,15 +6390,11 @@ _ACEOF
 
 # 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"
                        ;;
 
-               OSF1* | AIX*)
-                       CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
-                       ;;
-
                *)
                        # This is the standard System V location...
                        CUPS_LOCALEDIR="$exec_prefix/lib/locale"
@@ -6388,9 +6444,9 @@ _ACEOF
 
 
 # Server executables...
-case "$uname" in
-       *BSD* | Darwin*)
-               # *BSD and Darwin (MacOS X)
+case "$host_os_name" in
+       *bsd* | darwin*)
+               # *BSD and Darwin (macOS)
                INSTALL_SYSV=""
                CUPS_SERVERBIN="$exec_prefix/libexec/cups"
                ;;
@@ -6417,16 +6473,24 @@ _ACEOF
 
 
 # Transient run-time state
-case "$uname" in
-       Darwin*)
-               # Darwin (Mac OS X)
-               CUPS_STATEDIR="$CUPS_SERVERROOT"
-               ;;
-       *)
-               # All others
-               CUPS_STATEDIR="$localstatedir/run/cups"
-               ;;
-esac
+
+# Check whether --with-rundir was given.
+if test "${with_rundir+set}" = set; then :
+  withval=$with_rundir; CUPS_STATEDIR="$withval"
+else
+
+       case "$host_os_name" in
+               darwin*)
+                       # Darwin (macOS)
+                       CUPS_STATEDIR="$CUPS_SERVERROOT"
+                       ;;
+               *)
+                       # All others
+                       CUPS_STATEDIR="$localstatedir/run/cups"
+                       ;;
+       esac
+fi
+
 cat >>confdefs.h <<_ACEOF
 #define CUPS_STATEDIR "$CUPS_STATEDIR"
 _ACEOF
@@ -6434,7 +6498,6 @@ _ACEOF
 
 
 
-
 if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
        # New GNU "standards" break previous ones, so make sure we use
        # the right default location for the operating system...
@@ -6442,19 +6505,13 @@ if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
 fi
 
 if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
-       case "$uname" in
-               Darwin* | Linux | GNU | *BSD* | AIX*)
-                       # Darwin, MacOS X, Linux, GNU HURD, *BSD, and AIX
+       case "$host_os_name" in
+               darwin* | linux* | gnu* | *bsd*)
+                       # Darwin, macOS, Linux, GNU HURD, and *BSD
                        mandir="/usr/share/man"
                        AMANDIR="/usr/share/man"
                        PMANDIR="/usr/share/man"
                        ;;
-               IRIX)
-                       # SGI IRIX
-                       mandir="/usr/share/catman/u_man"
-                       AMANDIR="/usr/share/catman/a_man"
-                       PMANDIR="/usr/share/catman/p_man"
-                       ;;
                *)
                        # All others
                        mandir="/usr/man"
@@ -6470,25 +6527,17 @@ fi
 
 
 
-case "$uname" in
-       IRIX*)
-               # SGI IRIX
-               MAN1EXT=1
-               MAN5EXT=5
-               MAN7EXT=7
-               MAN8EXT=1m
-               MAN8DIR=1
-               ;;
-       SunOS* | HP-UX*)
-               # Solaris and HP-UX
+case "$host_os_name" in
+       sunos*)
+               # Solaris
                MAN1EXT=1
                MAN5EXT=5
                MAN7EXT=7
                MAN8EXT=1m
                MAN8DIR=1m
                ;;
-       Linux* | GNU* | Darwin*)
-               # Linux, GNU Hurd, and Mac OS X
+       linux* | gnu* | darwin*)
+               # Linux, GNU Hurd, and macOS
                MAN1EXT=1.gz
                MAN5EXT=5.gz
                MAN7EXT=7.gz
@@ -6513,138 +6562,6 @@ esac
 
 
 
-
-# Check whether --enable-32bit was given.
-if test "${enable_32bit+set}" = set; then :
-  enableval=$enable_32bit;
-fi
-
-
-INSTALL32=""
-LIB32CUPS=""
-LIB32CUPSIMAGE=""
-LIB32DIR=""
-UNINSTALL32=""
-
-
-
-
-
-
-
-# Check whether --enable-64bit was given.
-if test "${enable_64bit+set}" = set; then :
-  enableval=$enable_64bit;
-fi
-
-
-INSTALL64=""
-LIB64CUPS=""
-LIB64CUPSIMAGE=""
-LIB64DIR=""
-UNINSTALL64=""
-
-
-
-
-
-
-
-case "$uname" in
-       HP-UX*)
-               if test "x$enable_32bit" = xyes; then
-                       # Build 32-bit libraries, 64-bit base...
-                       INSTALL32="install32bit"
-                       LIB32CUPS="32bit/libcups.so.2"
-                       LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
-                       LIB32DIR="$exec_prefix/lib"
-                       if test -d /usr/lib/hpux32; then
-                               LIB32DIR="${LIB32DIR}/hpux32"
-                       fi
-                       UNINSTALL32="uninstall32bit"
-               fi
-
-               if test "x$enable_64bit" = xyes; then
-                       # Build 64-bit libraries, 32-bit base...
-                       INSTALL64="install64bit"
-                       LIB64CUPS="64bit/libcups.so.2"
-                       LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
-                       LIB64DIR="$exec_prefix/lib"
-                       if test -d /usr/lib/hpux64; then
-                               LIB64DIR="${LIB64DIR}/hpux64"
-                       fi
-                       UNINSTALL64="uninstall64bit"
-               fi
-               ;;
-
-       IRIX)
-               if test "x$enable_32bit" = xyes; then
-                       INSTALL32="install32bit"
-                       LIB32CUPS="32bit/libcups.so.2"
-                       LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
-                       LIB32DIR="$prefix/lib32"
-                       UNINSTALL32="uninstall32bit"
-               fi
-
-               if test "x$enable_64bit" = xyes; then
-                       # Build 64-bit libraries, 32-bit base...
-                       INSTALL64="install64bit"
-                       LIB64CUPS="64bit/libcups.so.2"
-                       LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
-                       LIB64DIR="$prefix/lib64"
-                       UNINSTALL64="uninstall64bit"
-               fi
-               ;;
-
-       Linux*)
-               if test "x$enable_32bit" = xyes; then
-                       # Build 32-bit libraries, 64-bit base...
-                       INSTALL32="install32bit"
-                       LIB32CUPS="32bit/libcups.so.2"
-                       LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
-                       LIB32DIR="$exec_prefix/lib"
-                       if test -d /usr/lib32; then
-                               LIB32DIR="${LIB32DIR}32"
-                       fi
-                       UNINSTALL32="uninstall32bit"
-               fi
-
-               if test "x$enable_64bit" = xyes; then
-                       # Build 64-bit libraries, 32-bit base...
-                       INSTALL64="install64bit"
-                       LIB64CUPS="64bit/libcups.so.2"
-                       LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
-                       LIB64DIR="$exec_prefix/lib"
-                       if test -d /usr/lib64; then
-                               LIB64DIR="${LIB64DIR}64"
-                       fi
-                       UNINSTALL64="uninstall64bit"
-               fi
-               ;;
-
-       SunOS*)
-               if test "x$enable_32bit" = xyes; then
-                       # Build 32-bit libraries, 64-bit base...
-                       INSTALL32="install32bit"
-                       LIB32CUPS="32bit/libcups.so.2"
-                       LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
-                       LIB32DIR="$exec_prefix/lib/32"
-                       UNINSTALL32="uninstall32bit"
-               fi
-
-               if test "x$enable_64bit" = xyes; then
-                       # Build 64-bit libraries, 32-bit base...
-                       INSTALL64="install64bit"
-                       LIB64CUPS="64bit/libcups.so.2"
-                       LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
-                       LIB64DIR="$exec_prefix/lib/64"
-                       UNINSTALL64="uninstall64bit"
-               fi
-               ;;
-esac
-
-
-
 PICFLAG=1
 DSOFLAGS="${DSOFLAGS:=}"
 
@@ -6659,11 +6576,10 @@ 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"
-                       LIBCUPSDRIVER="libcupsdriver.so.1"
                        LIBCUPSIMAGE="libcupsimage.so.2"
                        LIBCUPSMIME="libcupsmime.so.1"
                        LIBCUPSPPDC="libcupsppdc.so.1"
@@ -6671,58 +6587,9 @@ if test x$enable_shared != xno; then
                        DSOXX="\$(CXX)"
                        DSOFLAGS="$DSOFLAGS -Wl,-h\`basename \$@\` -G \$(OPTIM)"
                        ;;
-               UNIX_S*)
-                       LIBCUPS="lib$cupsbase.so.2"
-                       LIBCUPSCGI="libcupscgi.so.1"
-                       LIBCUPSDRIVER="libcupsdriver.so.1"
-                       LIBCUPSIMAGE="libcupsimage.so.2"
-                       LIBCUPSMIME="libcupsmime.so.1"
-                       LIBCUPSPPDC="libcupsppdc.so.1"
-                       DSO="\$(CC)"
-                       DSOXX="\$(CXX)"
-                       DSOFLAGS="$DSOFLAGS -Wl,-h,\`basename \$@\` -G \$(OPTIM)"
-                       ;;
-               HP-UX*)
-                       case "$uarch" in
-                               ia64)
-                                       LIBCUPS="lib$cupsbase.so.2"
-                                       LIBCUPSCGI="libcupscgi.so.1"
-                                       LIBCUPSDRIVER="libcupsdriver.so.1"
-                                       LIBCUPSIMAGE="libcupsimage.so.2"
-                                       LIBCUPSMIME="libcupsmime.so.1"
-                                       LIBCUPSPPDC="libcupsppdc.so.1"
-                                       DSO="\$(CC)"
-                                       DSOXX="\$(CXX)"
-                                       DSOFLAGS="$DSOFLAGS -Wl,-b,-z,+h,\`basename \$@\`"
-                                       ;;
-                               *)
-                                       LIBCUPS="lib$cupsbase.sl.2"
-                                       LIBCUPSCGI="libcupscgi.sl.1"
-                                       LIBCUPSDRIVER="libcupsdriver.sl.1"
-                                       LIBCUPSIMAGE="libcupsimage.sl.2"
-                                       LIBCUPSMIME="libcupsmime.sl.1"
-                                       LIBCUPSPPDC="libcupsppdc.sl.1"
-                                       DSO="\$(LD)"
-                                       DSOXX="\$(LD)"
-                                       DSOFLAGS="$DSOFLAGS -b -z +h \`basename \$@\`"
-                                       ;;
-                       esac
-                       ;;
-               IRIX)
-                       LIBCUPS="lib$cupsbase.so.2"
-                       LIBCUPSCGI="libcupscgi.so.1"
-                       LIBCUPSDRIVER="libcupsdriver.so.1"
-                       LIBCUPSIMAGE="libcupsimage.so.2"
-                       LIBCUPSMIME="libcupsmime.so.1"
-                       LIBCUPSPPDC="libcupsppdc.so.1"
-                       DSO="\$(CC)"
-                       DSOXX="\$(CXX)"
-                       DSOFLAGS="$DSOFLAGS -set_version,sgi2.6,-soname,\`basename \$@\` -shared \$(OPTIM)"
-                       ;;
-               OSF1* | Linux | GNU | *BSD*)
+               linux* | gnu* | *bsd*)
                        LIBCUPS="lib$cupsbase.so.2"
                        LIBCUPSCGI="libcupscgi.so.1"
-                       LIBCUPSDRIVER="libcupsdriver.so.1"
                        LIBCUPSIMAGE="libcupsimage.so.2"
                        LIBCUPSMIME="libcupsmime.so.1"
                        LIBCUPSPPDC="libcupsppdc.so.1"
@@ -6730,10 +6597,9 @@ 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"
-                       LIBCUPSDRIVER="libcupsdriver.1.dylib"
                        LIBCUPSIMAGE="libcupsimage.2.dylib"
                        LIBCUPSMIME="libcupsmime.1.dylib"
                        LIBCUPSPPDC="libcupsppdc.1.dylib"
@@ -6741,24 +6607,11 @@ if test x$enable_shared != xno; then
                        DSOXX="\$(CXX)"
                        DSOFLAGS="$DSOFLAGS -dynamiclib -single_module -lc"
                        ;;
-               AIX*)
-                       LIBCUPS="lib${cupsbase}_s.a"
-                       LIBCUPSBASE="${cupsbase}_s"
-                       LIBCUPSCGI="libcupscgi_s.a"
-                       LIBCUPSDRIVER="libcupsdriver_s.a"
-                       LIBCUPSIMAGE="libcupsimage_s.a"
-                       LIBCUPSMIME="libcupsmime_s.a"
-                       LIBCUPSPPDC="libcupsppdc_s.a"
-                       DSO="\$(CC)"
-                       DSOXX="\$(CXX)"
-                       DSOFLAGS="$DSOFLAGS -Wl,-bexpall,-bM:SRE,-bnoentry,-blibpath:\$(libdir)"
-                       ;;
                *)
                        echo "Warning: shared libraries may not be supported.  Trying -shared"
                        echo "         option with compiler."
                        LIBCUPS="lib$cupsbase.so.2"
                        LIBCUPSCGI="libcupscgi.so.1"
-                       LIBCUPSDRIVER="libcupsdriver.so.1"
                        LIBCUPSIMAGE="libcupsimage.so.2"
                        LIBCUPSMIME="libcupsmime.so.1"
                        LIBCUPSPPDC="libcupsppdc.so.1"
@@ -6771,7 +6624,6 @@ else
        PICFLAG=0
        LIBCUPS="lib$cupsbase.a"
        LIBCUPSCGI="libcupscgi.a"
-       LIBCUPSDRIVER="libcupsdriver.a"
        LIBCUPSIMAGE="libcupsimage.a"
        LIBCUPSMIME="libcupsmime.a"
        LIBCUPSPPDC="libcupsppdc.a"
@@ -6779,14 +6631,6 @@ else
        DSOXX=":"
 fi
 
-# 32-bit and 64-bit libraries need variations of the standard
-# DSOFLAGS...
-DSO32FLAGS="$DSOFLAGS"
-DSO64FLAGS="$DSOFLAGS"
-
-
-
-
 
 
 
@@ -6803,24 +6647,13 @@ if test x$enable_shared = xno; then
        LINKCUPSIMAGE="../filter/libcupsimage.a"
 
        EXTLINKCUPS="-lcups"
-       EXTLINKCUPSDRIVER="-lcupsdriver"
        EXTLINKCUPSIMAGE="-lcupsimage"
 else
-       if test $uname = AIX; then
-               LINKCUPS="-l${cupsbase}_s"
-               LINKCUPSIMAGE="-lcupsimage_s"
-
-               EXTLINKCUPS="-lcups_s"
-               EXTLINKCUPSDRIVER="-lcupsdriver_s"
-               EXTLINKCUPSIMAGE="-lcupsimage_s"
-       else
-               LINKCUPS="-l${cupsbase}"
-               LINKCUPSIMAGE="-lcupsimage"
+       LINKCUPS="-l${cupsbase}"
+       LINKCUPSIMAGE="-lcupsimage"
 
-               EXTLINKCUPS="-lcups"
-               EXTLINKCUPSDRIVER="-lcupsdriver"
-               EXTLINKCUPSIMAGE="-lcupsimage"
-       fi
+       EXTLINKCUPS="-lcups"
+       EXTLINKCUPSIMAGE="-lcupsimage"
 fi
 
 
@@ -6828,7 +6661,6 @@ fi
 
 
 
-
 EXPORT_LDFLAGS=""
 
 if test "$DSO" != ":"; then
@@ -6836,56 +6668,33 @@ if test "$DSO" != ":"; then
        # rather than to the executables.  This makes things smaller if you
        # are using any static libraries, and it also allows us to distribute
        # a single DSO rather than a bunch...
-       DSOLIBS="\$(LIBTIFF) \$(LIBPNG) \$(LIBJPEG) \$(LIBZ)"
+       DSOLIBS="\$(LIBZ)"
        IMGLIBS=""
 
        # 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
-                HP-UX*)
-                       # HP-UX needs the path, even for /usr/lib...
-                       case "$uarch" in
-                               ia64)
-                                       DSOFLAGS="-Wl,+s,+b,$libdir $DSOFLAGS"
-                                       DSO32FLAGS="-Wl,+s,+b,$LIB32DIR $DSO32FLAGS"
-                                       DSO64FLAGS="-Wl,+s,+b,$LIB64DIR $DSO64FLAGS"
-                                       ;;
-                               *)
-                                       DSOFLAGS="+s +b $libdir $DSOFLAGS"
-                                       DSO32FLAGS="+s +b $LIB32DIR $DSO32FLAGS"
-                                       DSO64FLAGS="+s +b $LIB64DIR $DSO64FLAGS"
-                                       ;;
-                       esac
-                       LDFLAGS="$LDFLAGS -Wl,+s,+b,$libdir"
-                       EXPORT_LDFLAGS="-Wl,+s,+b,$libdir"
-                       ;;
-                SunOS*)
+       case $host_os_name in
+                sunos*)
                        # Solaris...
                        if test $exec_prefix != /usr; then
                                DSOFLAGS="-R$libdir $DSOFLAGS"
-                               DSO32FLAGS="-R$LIB32DIR $DSO32FLAGS"
-                               DSO64FLAGS="-R$LIB64DIR $DSO64FLAGS"
                                LDFLAGS="$LDFLAGS -R$libdir"
                                EXPORT_LDFLAGS="-R$libdir"
                        fi
                        ;;
-                *BSD*)
+                *bsd*)
                         # *BSD...
                        if test $exec_prefix != /usr; then
                                DSOFLAGS="-Wl,-R$libdir $DSOFLAGS"
-                               DSO32FLAGS="-Wl,-R$LIB32DIR $DSO32FLAGS"
-                               DSO64FLAGS="-Wl,-R$LIB64DIR $DSO64FLAGS"
                                LDFLAGS="$LDFLAGS -Wl,-R$libdir"
                                EXPORT_LDFLAGS="-Wl,-R$libdir"
                        fi
                        ;;
-                IRIX | Linux | GNU)
-                        # IRIX, Linux, and HURD...
+                linux* | gnu*)
+                        # Linux, and HURD...
                        if test $exec_prefix != /usr; then
                                DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
-                               DSO32FLAGS="-Wl,-rpath,$LIB32DIR $DSO32FLAGS"
-                               DSO64FLAGS="-Wl,-rpath,$LIB64DIR $DSO64FLAGS"
                                LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
                                EXPORT_LDFLAGS="-Wl,-rpath,$libdir"
                        fi
@@ -6893,7 +6702,7 @@ if test "$DSO" != ":"; then
        esac
 else
        DSOLIBS=""
-       IMGLIBS="\$(LIBTIFF) \$(LIBPNG) \$(LIBJPEG) \$(LIBZ)"
+       IMGLIBS="\$(LIBZ)"
 fi
 
 
@@ -6901,10 +6710,12 @@ fi
 
 
 
-
 # Check whether --enable-libtool_unsupported was given.
 if test "${enable_libtool_unsupported+set}" = set; then :
   enableval=$enable_libtool_unsupported; if test x$enable_libtool_unsupported != xno; then
+               if test x$enable_libtool_unsupported == xyes; then
+                       as_fn_error $? "Use --enable-libtool-unsupported=/path/to/libtool." "$LINENO" 5
+               fi
                LIBTOOL="$enable_libtool_unsupported"
                enable_shared=no
                echo "WARNING: libtool is not supported or endorsed by Apple Inc."
@@ -6915,18 +6726,45 @@ if test "${enable_libtool_unsupported+set}" = set; then :
 fi
 
 
+if test x$LIBTOOL != x; then
+       DSO="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
+       DSOXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
 
+       LD_CC="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
+       LD_CXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
 
-if test x$LIBTOOL != x; then
        LIBCUPS="libcups.la"
+       LIBCUPSSTATIC="libcups.la"
+       LIBCUPSCGI="libcupscgi.la"
        LIBCUPSIMAGE="libcupsimage.la"
+       LIBCUPSMIME="libcupsmime.la"
+       LIBCUPSPPDC="libcupsppdc.la"
+
+       LIBTOOL_CC="\$(LIBTOOL) --mode=compile --tag=CC"
+       LIBTOOL_CXX="\$(LIBTOOL) --mode=compile --tag=CXX"
+       LIBTOOL_INSTALL="\$(LIBTOOL) --mode=install"
+
        LINKCUPS="../cups/\$(LIBCUPS)"
        LINKCUPSIMAGE="../filter/\$(LIBCUPSIMAGE)"
-       DSO="\$(CC)"
+
+else
+       LD_CC="\$(CC)"
+       LD_CXX="\$(CXX)"
+
+       LIBTOOL_CC=""
+       LIBTOOL_CXX=""
+       LIBTOOL_INSTALL=""
 fi
 
 
 
+
+
+
+
+
+
+
 INSTALL_STRIP=""
 OPTIM=""
 
@@ -6976,6 +6814,10 @@ if test x$enable_debug_guards = xyes; then
 fi
 
 if test x$enable_unit_tests = xyes; then
+        if test "$build" != "$host"; then
+                as_fn_error $? "Sorry, cannot build unit tests when cross-compiling." "$LINENO" 5
+        fi
+
        UNITTESTS="unittests"
 else
        UNITTESTS=""
@@ -7002,9 +6844,9 @@ else
 fi
 
 if test -z "$with_ldarchflags"; then
-       if test "$uname" = Darwin; then
-               # Only create 32-bit programs by default
-               LDARCHFLAGS="`echo $ARCHFLAGS | sed -e '1,$s/-arch x86_64//' -e '1,$s/-arch ppc64//'`"
+       if test "$host_os_name" = darwin; then
+               # Only create Intel programs by default
+               LDARCHFLAGS="`echo $ARCHFLAGS | sed -e '1,$s/-arch ppc64//'`"
        else
                LDARCHFLAGS="$ARCHFLAGS"
        fi
@@ -7015,24 +6857,6 @@ fi
 
 
 
-
-# Check whether --with-arch32flags was given.
-if test "${with_arch32flags+set}" = set; then :
-  withval=$with_arch32flags;
-fi
-
-ARCH32FLAGS=""
-
-
-
-# Check whether --with-arch64flags was given.
-if test "${with_arch64flags+set}" = set; then :
-  withval=$with_arch64flags;
-fi
-
-ARCH64FLAGS=""
-
-
 # Check whether --enable-relro was given.
 if test "${enable_relro+set}" = set; then :
   enableval=$enable_relro;
@@ -7048,9 +6872,6 @@ PIEFLAGS=""
 RELROFLAGS=""
 
 
-PHPOPTIONS=""
-
-
 if test -n "$GCC"; then
        # Add GCC-specific compiler options...
        if test -z "$OPTIM"; then
@@ -7063,15 +6884,15 @@ if test -n "$GCC"; then
        fi
 
        # Generate position-independent code as needed...
-       if test $PICFLAG = 1 -a $uname != AIX; then
+       if test $PICFLAG = 1; then
                OPTIM="-fPIC $OPTIM"
        fi
 
        # The -fstack-protector option is available with some versions of
        # GCC and adds "stack canaries" which detect when the return address
        # has been overwritten, preventing many types of exploit attacks.
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GCC supports -fstack-protector" >&5
-$as_echo_n "checking if GCC supports -fstack-protector... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -fstack-protector" >&5
+$as_echo_n "checking whether compiler supports -fstack-protector... " >&6; }
        OLDCFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS -fstack-protector"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7086,7 +6907,12 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  OPTIM="$OPTIM -fstack-protector"
+  if test "x$LSB_BUILD" = xy; then
+                       # Can't use stack-protector with LSB binaries...
+                       OPTIM="$OPTIM -fno-stack-protector"
+               else
+                       OPTIM="$OPTIM -fstack-protector"
+               fi
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else
@@ -7097,14 +6923,19 @@ rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
        CFLAGS="$OLDCFLAGS"
 
-       # The -fPIE option is available with some versions of GCC and adds
-       # randomization of addresses, which avoids another class of exploits
-       # that depend on a fixed address for common functions.
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GCC supports -fPIE" >&5
-$as_echo_n "checking if GCC supports -fPIE... " >&6; }
-       OLDCFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS -fPIE"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+       if test "x$LSB_BUILD" != xy; then
+               # The -fPIE option is available with some versions of GCC and
+               # adds randomization of addresses, which avoids another class of
+               # exploits that depend on a fixed address for common functions.
+               #
+               # Not available to LSB binaries...
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -fPIE" >&5
+$as_echo_n "checking whether compiler supports -fPIE... " >&6; }
+               OLDCFLAGS="$CFLAGS"
+               case "$host_os_name" in
+                       darwin*)
+                               CFLAGS="$CFLAGS -fPIE -Wl,-pie"
+                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -7116,37 +6947,20 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  case "$CC" in
-                       *clang)
-                               PIEFLAGS="-fPIE -Wl,-pie"
-                               ;;
-                       *)
-                               PIEFLAGS="-fPIE -pie"
-                               ;;
-               esac
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+
+                                       PIEFLAGS="-fPIE -Wl,-pie"
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       CFLAGS="$OLDCFLAGS"
-
-       if test "x$with_optim" = x; then
-               # Add useful warning options for tracking down problems...
-               OPTIM="-Wall -Wno-format-y2k -Wunused $OPTIM"
+                               ;;
 
-               # Additional warning options for development testing...
-               if test -d .svn; then
-                       OPTIM="-Wshadow -Werror $OPTIM"
-                       PHPOPTIONS="-Wno-shadow"
-               else
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GCC supports -Wno-tautological-compare" >&5
-$as_echo_n "checking if GCC supports -Wno-tautological-compare... " >&6; }
-                       OLDCFLAGS="$CFLAGS"
-                       CFLAGS="$CFLAGS -Werror -Wno-tautological-compare"
-                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                       *)
+                               CFLAGS="$CFLAGS -fPIE -pie"
+                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -7158,1225 +6972,208 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  OPTIM="$OPTIM -Wno-tautological-compare"
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-                       CFLAGS="$OLDCFLAGS"
-               fi
-       fi
-
-       case "$uname" in
-               Darwin*)
-                       # -D_FORTIFY_SOURCE=2 adds additional object size
-                       # checking, basically wrapping all string functions
-                       # with buffer-limited ones.  Not strictly needed for
-                       # CUPS since we already use buffer-limited calls, but
-                       # this will catch any additions that are broken.
-                       CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
-                       ;;
-
-               HP-UX*)
-                       if test "x$enable_32bit" = xyes; then
-                               # Build 32-bit libraries, 64-bit base...
-                               if test -z "$with_arch32flags"; then
-                                       ARCH32FLAGS="-milp32"
-                               else
-                                       ARCH32FLAGS="$with_arch32flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch64flags"; then
-                                               ARCHFLAGS="-mlp64"
-                                       else
-                                               ARCHFLAGS="$with_arch64flags"
-                                       fi
-                               fi
-                       fi
-
-                       if test "x$enable_64bit" = xyes; then
-                               # Build 64-bit libraries, 32-bit base...
-                               if test -z "$with_arch64flags"; then
-                                       ARCH64FLAGS="-mlp64"
-                               else
-                                       ARCH64FLAGS="$with_arch64flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch32flags"; then
-                                               ARCHFLAGS="-milp32"
-                                       else
-                                               ARCHFLAGS="$with_arch32flags"
-                                       fi
-                               fi
-                       fi
-                       ;;
-
-               IRIX)
-                       if test "x$enable_32bit" = xyes; then
-                               # Build 32-bit libraries, 64-bit base...
-                               if test -z "$with_arch32flags"; then
-                                       ARCH32FLAGS="-n32 -mips3"
-                               else
-                                       ARCH32FLAGS="$with_arch32flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch64flags"; then
-                                               ARCHFLAGS="-64 -mips4"
-                                       else
-                                               ARCHFLAGS="$with_arch64flags"
-                                       fi
-                               fi
-                       fi
-
-                       if test "x$enable_64bit" = xyes; then
-                               # Build 64-bit libraries, 32-bit base...
-                               if test -z "$with_arch64flags"; then
-                                       ARCH64FLAGS="-64 -mips4"
-                               else
-                                       ARCH64FLAGS="$with_arch64flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch32flags"; then
-                                               ARCHFLAGS="-n32 -mips3"
-                                       else
-                                               ARCHFLAGS="$with_arch32flags"
-                                       fi
-                               fi
-                       fi
-                       ;;
-
-               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
-                               RELROFLAGS="-Wl,-z,relro"
-                       fi
-
-                       if test "x$enable_32bit" = xyes; then
-                               # Build 32-bit libraries, 64-bit base...
-                               if test -z "$with_arch32flags"; then
-                                       ARCH32FLAGS="-m32"
-                               else
-                                       ARCH32FLAGS="$with_arch32flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch64flags"; then
-                                               ARCHFLAGS="-m64"
-                                       else
-                                               ARCHFLAGS="$with_arch64flags"
-                                       fi
-                               fi
-                       fi
-
-                       if test "x$enable_64bit" = xyes; then
-                               # Build 64-bit libraries, 32-bit base...
-                               if test -z "$with_arch64flags"; then
-                                       ARCH64FLAGS="-m64"
-                               else
-                                       ARCH64FLAGS="$with_arch64flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch32flags"; then
-                                               ARCHFLAGS="-m32"
-                                       else
-                                               ARCHFLAGS="$with_arch32flags"
-                                       fi
-                               fi
-                       fi
-                       ;;
-
-               SunOS*)
-                       if test "x$enable_32bit" = xyes; then
-                               # Build 32-bit libraries, 64-bit base...
-                               if test -z "$with_arch32flags"; then
-                                       ARCH32FLAGS="-m32"
-                               else
-                                       ARCH32FLAGS="$with_arch32flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch64flags"; then
-                                               ARCHFLAGS="-m64"
-                                       else
-                                               ARCHFLAGS="$with_arch64flags"
-                                       fi
-                               fi
-                       fi
-
-                       if test "x$enable_64bit" = xyes; then
-                               # Build 64-bit libraries, 32-bit base...
-                               if test -z "$with_arch64flags"; then
-                                       ARCH64FLAGS="-m64"
-                               else
-                                       ARCH64FLAGS="$with_arch64flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch32flags"; then
-                                               ARCHFLAGS="-m32"
-                                       else
-                                               ARCHFLAGS="$with_arch32flags"
-                                       fi
-                               fi
-                       fi
-                       ;;
-       esac
-else
-       # Add vendor-specific compiler options...
-       case $uname in
-               AIX*)
-                       if test -z "$OPTIM"; then
-                               if test "x$with_optim" = x; then
-                                       OPTIM="-O2 -qmaxmem=6000"
-                               else
-                                       OPTIM="$with_optim $OPTIM"
-                               fi
-                       fi
-                       ;;
-               HP-UX*)
-                       if test -z "$OPTIM"; then
-                               if test "x$with_optim" = x; then
-                                       OPTIM="+O2"
-                               else
-                                       OPTIM="$with_optim $OPTIM"
-                               fi
-                       fi
-
-                       CFLAGS="-Ae $CFLAGS"
-
-                       if test $PICFLAG = 1; then
-                               OPTIM="+z $OPTIM"
-                       fi
-
-                       if test "x$enable_32bit" = xyes; then
-                               # Build 32-bit libraries, 64-bit base...
-                               if test -z "$with_arch32flags"; then
-                                       ARCH32FLAGS="+DD32"
-                               else
-                                       ARCH32FLAGS="$with_arch32flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch64flags"; then
-                                               ARCHFLAGS="+DD64"
-                                       else
-                                               ARCHFLAGS="$with_arch64flags"
-                                       fi
-                               fi
-                       fi
-
-                       if test "x$enable_64bit" = xyes; then
-                               # Build 64-bit libraries, 32-bit base...
-                               if test -z "$with_arch64flags"; then
-                                       ARCH64FLAGS="+DD64"
-                               else
-                                       ARCH64FLAGS="$with_arch64flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch32flags"; then
-                                               ARCHFLAGS="+DD32"
-                                       else
-                                               ARCHFLAGS="$with_arch32flags"
-                                       fi
-                               fi
-                       fi
-                       ;;
-               IRIX)
-                       if test -z "$OPTIM"; then
-                               if test "x$with_optim" = x; then
-                                       OPTIM="-O2"
-                               else
-                                       OPTIM="$with_optim $OPTIM"
-                               fi
-                       fi
-
-                       if test "x$with_optim" = x; then
-                               OPTIM="-fullwarn -woff 1183,1209,1349,1506,3201 $OPTIM"
-                       fi
-
-                       if test "x$enable_32bit" = xyes; then
-                               # Build 32-bit libraries, 64-bit base...
-                               if test -z "$with_arch32flags"; then
-                                       ARCH32FLAGS="-n32 -mips3"
-                               else
-                                       ARCH32FLAGS="$with_arch32flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch64flags"; then
-                                               ARCHFLAGS="-64 -mips4"
-                                       else
-                                               ARCHFLAGS="$with_arch64flags"
-                                       fi
-                               fi
-                       fi
-
-                       if test "x$enable_64bit" = xyes; then
-                               # Build 64-bit libraries, 32-bit base...
-                               if test -z "$with_arch64flags"; then
-                                       ARCH64FLAGS="-64 -mips4"
-                               else
-                                       ARCH64FLAGS="$with_arch64flags"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch32flags"; then
-                                               ARCHFLAGS="-n32 -mips3"
-                                       else
-                                               ARCHFLAGS="$with_arch32flags"
-                                       fi
-                               fi
-                       fi
-                       ;;
-               OSF*)
-                       # Tru64 UNIX aka Digital UNIX aka OSF/1
-                       if test -z "$OPTIM"; then
-                               if test "x$with_optim" = x; then
-                                       OPTIM="-O"
-                               else
-                                       OPTIM="$with_optim"
-                               fi
-                       fi
-                       ;;
-               SunOS*)
-                       # Solaris
-                       if test -z "$OPTIM"; then
-                               if test "x$with_optim" = x; then
-                                       OPTIM="-xO2"
-                               else
-                                       OPTIM="$with_optim $OPTIM"
-                               fi
-                       fi
-
-                       if test $PICFLAG = 1; then
-                               OPTIM="-KPIC $OPTIM"
-                       fi
-
-                       if test "x$enable_32bit" = xyes; then
-                               # Compiling on a Solaris system, build 64-bit
-                               # binaries with separate 32-bit libraries...
-                               ARCH32FLAGS="-xarch=generic"
-
-                               if test "x$with_optim" = x; then
-                                       # Suppress all of Sun's questionable
-                                       # warning messages, and default to
-                                       # 64-bit compiles of everything else...
-                                       OPTIM="-w $OPTIM"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch64flags"; then
-                                               ARCHFLAGS="-xarch=generic64"
-                                       else
-                                               ARCHFLAGS="$with_arch64flags"
-                                       fi
-                               fi
-                       else
-                               if test "x$enable_64bit" = xyes; then
-                                       # Build 64-bit libraries...
-                                       ARCH64FLAGS="-xarch=generic64"
-                               fi
-
-                               if test "x$with_optim" = x; then
-                                       # Suppress all of Sun's questionable
-                                       # warning messages, and default to
-                                       # 32-bit compiles of everything else...
-                                       OPTIM="-w $OPTIM"
-                               fi
-
-                               if test -z "$with_archflags"; then
-                                       if test -z "$with_arch32flags"; then
-                                               ARCHFLAGS="-xarch=generic"
-                                       else
-                                               ARCHFLAGS="$with_arch32flags"
-                                       fi
-                               fi
-                       fi
-                       ;;
-               UNIX_SVR*)
-                       # UnixWare
-                       if test -z "$OPTIM"; then
-                               if test "x$with_optim" = x; then
-                                       OPTIM="-O"
-                               else
-                                       OPTIM="$with_optim $OPTIM"
-                               fi
-                       fi
-
-                       if test $PICFLAG = 1; then
-                               OPTIM="-KPIC $OPTIM"
-                       fi
-                       ;;
-               *)
-                       # Running some other operating system; inform the user they
-                       # should contribute the necessary options to
-                       # cups-support@cups.org...
-                       echo "Building CUPS with default compiler optimizations; contact"
-                       echo "cups-bugs@cups.org with uname and compiler options needed"
-                       echo "for your platform, or set the CFLAGS and LDFLAGS environment"
-                       echo "variables before running configure."
-                       ;;
-       esac
-fi
-
-# Add general compiler options per platform...
-case $uname in
-       HP-UX*)
-               # HP-UX 10.20 (at least) needs this definition to get the
-               # h_errno global...
-               OPTIM="$OPTIM -D_XOPEN_SOURCE_EXTENDED"
-
-               # HP-UX 11.00 (at least) needs this definition to get the
-               # u_short type used by the IP headers...
-               OPTIM="$OPTIM -D_INCLUDE_HPUX_SOURCE"
-
-               # HP-UX 11.23 (at least) needs this definition to get the
-               # IPv6 header to work...
-               OPTIM="$OPTIM -D_HPUX_SOURCE"
-               ;;
-
-       Linux*)
-               # glibc 2.8 and higher breaks peer credentials unless you
-               # define _GNU_SOURCE...
-               OPTIM="$OPTIM -D_GNU_SOURCE"
-               ;;
-
-       OSF*)
-               # Tru64 UNIX aka Digital UNIX aka OSF/1 need to be told
-               # to be POSIX-compliant...
-               OPTIM="$OPTIM -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_OSF_SOURCE"
-               ;;
-esac
-
-
-
-
-# Check whether --enable-image was given.
-if test "${enable_image+set}" = set; then :
-  enableval=$enable_image;
-fi
-
-
-DEFAULT_IMAGEFILTERS="#"
-IMGFILTERS=""
-if test "x$enable_image" != xno; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build image filters" >&5
-$as_echo_n "checking whether to build image filters... " >&6; }
-        if test "x$enable_image" = xyes -o $uname != Darwin; then
-               IMGFILTERS="imagetops imagetoraster"
-               DEFAULT_IMAGEFILTERS=""
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        else
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        fi
-fi
-
-
-
-
-# Check whether --enable-jpeg was given.
-if test "${enable_jpeg+set}" = set; then :
-  enableval=$enable_jpeg;
-fi
-
-# Check whether --enable-png was given.
-if test "${enable_png+set}" = set; then :
-  enableval=$enable_png;
-fi
-
-# Check whether --enable-tiff was given.
-if test "${enable_tiff+set}" = set; then :
-  enableval=$enable_tiff;
-fi
-
-
-LIBJPEG=""
-LIBPNG=""
-LIBTIFF=""
-LIBZ=""
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5
-$as_echo_n "checking for library containing pow... " >&6; }
-if ${ac_cv_search_pow+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pow ();
-int
-main ()
-{
-return pow ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' m; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_pow=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_pow+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_pow+:} false; then :
-
-else
-  ac_cv_search_pow=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5
-$as_echo "$ac_cv_search_pow" >&6; }
-ac_res=$ac_cv_search_pow
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-
-SAVELIBS="$LIBS"
-
-if test x$enable_jpeg != xno; then
-    ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
-if test "x$ac_cv_header_jpeglib_h" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_decompress in -ljpeg" >&5
-$as_echo_n "checking for jpeg_destroy_decompress in -ljpeg... " >&6; }
-if ${ac_cv_lib_jpeg_jpeg_destroy_decompress+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ljpeg  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char jpeg_destroy_decompress ();
-int
-main ()
-{
-return jpeg_destroy_decompress ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_jpeg_jpeg_destroy_decompress=yes
-else
-  ac_cv_lib_jpeg_jpeg_destroy_decompress=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_decompress" >&5
-$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_decompress" >&6; }
-if test "x$ac_cv_lib_jpeg_jpeg_destroy_decompress" = xyes; then :
-  $as_echo "#define HAVE_LIBJPEG 1" >>confdefs.h
-
-           LIBJPEG="-ljpeg"
-           LIBS="$LIBS -ljpeg"
-fi
-
-fi
-
-
-else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: JPEG support disabled with --disable-jpeg." >&5
-$as_echo "$as_me: JPEG support disabled with --disable-jpeg." >&6;}
-fi
-
-INSTALL_GZIP=""
-ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzgets in -lz" >&5
-$as_echo_n "checking for gzgets in -lz... " >&6; }
-if ${ac_cv_lib_z_gzgets+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gzgets ();
-int
-main ()
-{
-return gzgets ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_gzgets=yes
-else
-  ac_cv_lib_z_gzgets=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzgets" >&5
-$as_echo "$ac_cv_lib_z_gzgets" >&6; }
-if test "x$ac_cv_lib_z_gzgets" = xyes; then :
-  $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
-
-       LIBZ="-lz"
-       LIBS="$LIBS -lz"
-       if test "x$GZIP" != x; then
-               INSTALL_GZIP="-z"
-       fi
-fi
-
-fi
-
-
-
-
-if test x$enable_png != xno; then
-    ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
-if test "x$ac_cv_header_png_h" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_read_struct in -lpng" >&5
-$as_echo_n "checking for png_create_read_struct in -lpng... " >&6; }
-if ${ac_cv_lib_png_png_create_read_struct+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char png_create_read_struct ();
-int
-main ()
-{
-return png_create_read_struct ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_png_png_create_read_struct=yes
-else
-  ac_cv_lib_png_png_create_read_struct=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_create_read_struct" >&5
-$as_echo "$ac_cv_lib_png_png_create_read_struct" >&6; }
-if test "x$ac_cv_lib_png_png_create_read_struct" = xyes; then :
-  $as_echo "#define HAVE_LIBPNG 1" >>confdefs.h
-
-           LIBPNG="-lpng"
-fi
-
-fi
-
-
-else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: PNG support disabled with --disable-png." >&5
-$as_echo "$as_me: PNG support disabled with --disable-png." >&6;}
-fi
-
-if test x$enable_tiff != xno; then
-    ac_fn_c_check_header_mongrel "$LINENO" "tiff.h" "ac_cv_header_tiff_h" "$ac_includes_default"
-if test "x$ac_cv_header_tiff_h" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFReadScanline in -ltiff" >&5
-$as_echo_n "checking for TIFFReadScanline in -ltiff... " >&6; }
-if ${ac_cv_lib_tiff_TIFFReadScanline+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltiff  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char TIFFReadScanline ();
-int
-main ()
-{
-return TIFFReadScanline ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tiff_TIFFReadScanline=yes
-else
-  ac_cv_lib_tiff_TIFFReadScanline=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFReadScanline" >&5
-$as_echo "$ac_cv_lib_tiff_TIFFReadScanline" >&6; }
-if test "x$ac_cv_lib_tiff_TIFFReadScanline" = xyes; then :
-  $as_echo "#define HAVE_LIBTIFF 1" >>confdefs.h
-
-       LIBTIFF="-ltiff"
-fi
-
-fi
-
-
-else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: TIFF support disabled with --disable-tiff." >&5
-$as_echo "$as_me: TIFF support disabled with --disable-tiff." >&6;}
-fi
-
-LIBS="$SAVELIBS"
-
-EXPORT_LIBJPEG="$LIBJPEG"
-EXPORT_LIBPNG="$LIBPNG"
-EXPORT_LIBTIFF="$LIBTIFF"
-EXPORT_LIBZ="$LIBZ"
-
-
-
-
-
-
-ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
-  $as_echo "#define HAVE_STDLIB_H 1" >>confdefs.h
-
-fi
-
-
-
-
-
-ac_fn_c_check_header_mongrel "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default"
-if test "x$ac_cv_header_resolv_h" = xyes; then :
-  $as_echo "#define HAVE_RESOLV_H 1" >>confdefs.h
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
-$as_echo_n "checking for library containing socket... " >&6; }
-if ${ac_cv_search_socket+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socket ();
-int
-main ()
-{
-return socket ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' socket; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_socket=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_socket+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_socket+:} false; then :
-
-else
-  ac_cv_search_socket=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
-$as_echo "$ac_cv_search_socket" >&6; }
-ac_res=$ac_cv_search_socket
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyaddr" >&5
-$as_echo_n "checking for library containing gethostbyaddr... " >&6; }
-if ${ac_cv_search_gethostbyaddr+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyaddr ();
-int
-main ()
-{
-return gethostbyaddr ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' nsl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_gethostbyaddr=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_gethostbyaddr+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_gethostbyaddr+:} false; then :
-
-else
-  ac_cv_search_gethostbyaddr=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyaddr" >&5
-$as_echo "$ac_cv_search_gethostbyaddr" >&6; }
-ac_res=$ac_cv_search_gethostbyaddr
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getifaddrs" >&5
-$as_echo_n "checking for library containing getifaddrs... " >&6; }
-if ${ac_cv_search_getifaddrs+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getifaddrs ();
-int
-main ()
-{
-return getifaddrs ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' nsl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_getifaddrs=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_getifaddrs+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_getifaddrs+:} false; then :
 
+                                       PIEFLAGS="-fPIE -pie"
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  ac_cv_search_getifaddrs=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getifaddrs" >&5
-$as_echo "$ac_cv_search_getifaddrs" >&6; }
-ac_res=$ac_cv_search_getifaddrs
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+                               ;;
+               esac
+               CFLAGS="$OLDCFLAGS"
+       fi
 
-fi
+       if test "x$with_optim" = x; then
+               # Add useful warning options for tracking down problems...
+               OPTIM="-Wall -Wno-format-y2k -Wunused $OPTIM"
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing hstrerror" >&5
-$as_echo_n "checking for library containing hstrerror... " >&6; }
-if ${ac_cv_search_hstrerror+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Wno-unused-result" >&5
+$as_echo_n "checking whether compiler supports -Wno-unused-result... " >&6; }
+               OLDCFLAGS="$CFLAGS"
+               CFLAGS="$CFLAGS -Werror -Wno-unused-result"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char hstrerror ();
 int
 main ()
 {
-return hstrerror ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' nsl socket resolv; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_hstrerror=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_hstrerror+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_hstrerror+:} false; then :
-
-else
-  ac_cv_search_hstrerror=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_hstrerror" >&5
-$as_echo "$ac_cv_search_hstrerror" >&6; }
-ac_res=$ac_cv_search_hstrerror
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  $as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rresvport_af" >&5
-$as_echo_n "checking for library containing rresvport_af... " >&6; }
-if ${ac_cv_search_rresvport_af+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char rresvport_af ();
-int
-main ()
-{
-return rresvport_af ();
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' nsl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_rresvport_af=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_rresvport_af+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_rresvport_af+:} false; then :
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  OPTIM="$OPTIM -Wno-unused-result"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  ac_cv_search_rresvport_af=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rresvport_af" >&5
-$as_echo "$ac_cv_search_rresvport_af" >&6; }
-ac_res=$ac_cv_search_rresvport_af
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  $as_echo "#define HAVE_RRESVPORT_AF 1" >>confdefs.h
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+               CFLAGS="$OLDCFLAGS"
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing __res_init" >&5
-$as_echo_n "checking for library containing __res_init... " >&6; }
-if ${ac_cv_search___res_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Wsign-conversion" >&5
+$as_echo_n "checking whether compiler supports -Wsign-conversion... " >&6; }
+               OLDCFLAGS="$CFLAGS"
+               CFLAGS="$CFLAGS -Werror -Wsign-conversion"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char __res_init ();
 int
 main ()
 {
-return __res_init ();
+
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' resolv bind; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search___res_init=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search___res_init+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search___res_init+:} false; then :
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  OPTIM="$OPTIM -Wsign-conversion"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  ac_cv_search___res_init=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___res_init" >&5
-$as_echo "$ac_cv_search___res_init" >&6; }
-ac_res=$ac_cv_search___res_init
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+               CFLAGS="$OLDCFLAGS"
 
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
-$as_echo_n "checking for library containing res_9_init... " >&6; }
-if ${ac_cv_search_res_9_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Wno-tautological-compare" >&5
+$as_echo_n "checking whether compiler supports -Wno-tautological-compare... " >&6; }
+               OLDCFLAGS="$CFLAGS"
+               CFLAGS="$CFLAGS -Werror -Wno-tautological-compare"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_9_init ();
 int
 main ()
 {
-return res_9_init ();
+
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' resolv bind; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_res_9_init=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_res_9_init+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_res_9_init+:} false; then :
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  OPTIM="$OPTIM -Wno-tautological-compare"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  ac_cv_search_res_9_init=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
-$as_echo "$ac_cv_search_res_9_init" >&6; }
-ac_res=$ac_cv_search_res_9_init
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+               CFLAGS="$OLDCFLAGS"
 
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
-$as_echo_n "checking for library containing res_init... " >&6; }
-if ${ac_cv_search_res_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Wno-format-truncation" >&5
+$as_echo_n "checking whether compiler supports -Wno-format-truncation... " >&6; }
+               OLDCFLAGS="$CFLAGS"
+               CFLAGS="$CFLAGS -Werror -Wno-format-truncation"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_init ();
 int
 main ()
 {
-return res_init ();
+
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' resolv bind; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_res_init=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_res_init+:} false; then :
-  break
+if ac_fn_c_try_compile "$LINENO"; then :
+  OPTIM="$OPTIM -Wno-format-truncation"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-done
-if ${ac_cv_search_res_init+:} false; then :
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+               CFLAGS="$OLDCFLAGS"
+
+               # Additional warning options for development testing...
+               if test -d .svn; then
+                       OPTIM="-Werror $OPTIM"
+               fi
+       fi
+
+       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
+                       # CUPS since we already use buffer-limited calls, but
+                       # this will catch any additions that are broken.
+                       CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+                       ;;
 
+               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
+                               RELROFLAGS="-Wl,-z,relro,-z,now"
+                       fi
+                       ;;
+       esac
 else
-  ac_cv_search_res_init=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
-$as_echo "$ac_cv_search_res_init" >&6; }
-ac_res=$ac_cv_search_res_init
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
+       # Add vendor-specific compiler options...
+       case $host_os_name in
+               sunos*)
+                       # Solaris
+                       if test -z "$OPTIM"; then
+                               if test "x$with_optim" = x; then
+                                       OPTIM="-xO2"
+                               else
+                                       OPTIM="$with_optim $OPTIM"
+                               fi
+                       fi
 
+                       if test $PICFLAG = 1; then
+                               OPTIM="-KPIC $OPTIM"
+                       fi
+                       ;;
+               *)
+                       # Running some other operating system; inform the user they
+                       # should contribute the necessary options to
+                       # cups-support@cups.org...
+                       echo "Building CUPS with default compiler optimizations; contact"
+                       echo "cups-devel@cups.org with uname and compiler options needed"
+                       echo "for your platform, or set the CFLAGS and LDFLAGS environment"
+                       echo "variables before running configure."
+                       ;;
+       esac
 fi
 
-fi
+# Add general compiler options per platform...
+case $host_os_name in
+       linux*)
+               # glibc 2.8 and higher breaks peer credentials unless you
+               # define _GNU_SOURCE...
+               OPTIM="$OPTIM -D_GNU_SOURCE"
+               ;;
+esac
+
+
+
+ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
+"
+if test "x$ac_cv_header_resolv_h" = xyes; then :
+  $as_echo "#define HAVE_RESOLV_H 1" >>confdefs.h
 
 fi
 
 
-# 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
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
-$as_echo_n "checking for library containing getaddrinfo... " >&6; }
-if ${ac_cv_search_getaddrinfo+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
+$as_echo_n "checking for library containing socket... " >&6; }
+if ${ac_cv_search_socket+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -8389,16 +7186,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char getaddrinfo ();
+char socket ();
 int
 main ()
 {
-return getaddrinfo ();
+return socket ();
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' nsl; do
+for ac_lib in '' socket; do
   if test -z "$ac_lib"; then
     ac_res="none required"
   else
@@ -8406,34 +7203,33 @@ for ac_lib in '' nsl; do
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
   if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_getaddrinfo=$ac_res
+  ac_cv_search_socket=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if ${ac_cv_search_getaddrinfo+:} false; then :
+  if ${ac_cv_search_socket+:} false; then :
   break
 fi
 done
-if ${ac_cv_search_getaddrinfo+:} false; then :
+if ${ac_cv_search_socket+:} false; then :
 
 else
-  ac_cv_search_getaddrinfo=no
+  ac_cv_search_socket=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
-$as_echo "$ac_cv_search_getaddrinfo" >&6; }
-ac_res=$ac_cv_search_getaddrinfo
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
+$as_echo "$ac_cv_search_socket" >&6; }
+ac_res=$ac_cv_search_socket
 if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
 
 fi
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getnameinfo" >&5
-$as_echo_n "checking for library containing getnameinfo... " >&6; }
-if ${ac_cv_search_getnameinfo+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyaddr" >&5
+$as_echo_n "checking for library containing gethostbyaddr... " >&6; }
+if ${ac_cv_search_gethostbyaddr+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -8446,11 +7242,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char getnameinfo ();
+char gethostbyaddr ();
 int
 main ()
 {
-return getnameinfo ();
+return gethostbyaddr ();
   ;
   return 0;
 }
@@ -8463,157 +7259,93 @@ for ac_lib in '' nsl; do
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
   if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_getnameinfo=$ac_res
+  ac_cv_search_gethostbyaddr=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if ${ac_cv_search_getnameinfo+:} false; then :
+  if ${ac_cv_search_gethostbyaddr+:} false; then :
   break
 fi
 done
-if ${ac_cv_search_getnameinfo+:} false; then :
+if ${ac_cv_search_gethostbyaddr+:} false; then :
 
 else
-  ac_cv_search_getnameinfo=no
+  ac_cv_search_gethostbyaddr=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getnameinfo" >&5
-$as_echo "$ac_cv_search_getnameinfo" >&6; }
-ac_res=$ac_cv_search_getnameinfo
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyaddr" >&5
+$as_echo "$ac_cv_search_gethostbyaddr" >&6; }
+ac_res=$ac_cv_search_gethostbyaddr
 if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  $as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h
-
-fi
-
-fi
-
-ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
-"
-if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
 
 fi
 
-ac_fn_c_check_header_mongrel "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_sockio_h" = xyes; then :
-  $as_echo "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
-
-fi
-
-
-
-CUPS_DEFAULT_DOMAINSOCKET=""
-
-
-# Check whether --with-domainsocket was given.
-if test "${with_domainsocket+set}" = set; then :
-  withval=$with_domainsocket; default_domainsocket="$withval"
-else
-  default_domainsocket=""
-fi
-
-
-if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
-       if test "x$default_domainsocket" = x; then
-               case "$uname" in
-                       Darwin*)
-                               # Darwin and MaxOS X do their own thing...
-                               CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
-                               ;;
-                       *)
-                               # All others use FHS standard...
-                               CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock"
-                               ;;
-               esac
-       else
-               CUPS_DEFAULT_DOMAINSOCKET="$default_domainsocket"
-       fi
-
-       CUPS_LISTEN_DOMAINSOCKET="Listen $CUPS_DEFAULT_DOMAINSOCKET"
-
-       cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_DOMAINSOCKET "$CUPS_DEFAULT_DOMAINSOCKET"
-_ACEOF
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getifaddrs" >&5
+$as_echo_n "checking for library containing getifaddrs... " >&6; }
+if ${ac_cv_search_getifaddrs+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-       CUPS_LISTEN_DOMAINSOCKET=""
-fi
-
-
-
-
-for ac_header in AppleTalk/at_proto.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "AppleTalk/at_proto.h" "ac_cv_header_AppleTalk_at_proto_h" "#include <netat/appletalk.h>
-"
-if test "x$ac_cv_header_AppleTalk_at_proto_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_APPLETALK_AT_PROTO_H 1
-_ACEOF
- $as_echo "#define HAVE_APPLETALK_AT_PROTO_H 1" >>confdefs.h
-
-fi
-
-done
-
-
-
-
-ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
-if test "x$ac_cv_func_poll" = xyes; then :
-  $as_echo "#define HAVE_POLL 1" >>confdefs.h
-
-fi
-
-ac_fn_c_check_func "$LINENO" "epoll_create" "ac_cv_func_epoll_create"
-if test "x$ac_cv_func_epoll_create" = xyes; then :
-  $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getifaddrs ();
+int
+main ()
+{
+return getifaddrs ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' nsl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_getifaddrs=$ac_res
 fi
-
-ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue"
-if test "x$ac_cv_func_kqueue" = xyes; then :
-  $as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_getifaddrs+:} false; then :
+  break
 fi
+done
+if ${ac_cv_search_getifaddrs+:} false; then :
 
-
-
-
-# Check whether --enable-slp was given.
-if test "${enable_slp+set}" = set; then :
-  enableval=$enable_slp;
+else
+  ac_cv_search_getifaddrs=no
 fi
-
-
-# Check whether --with-openslp-libs was given.
-if test "${with_openslp_libs+set}" = set; then :
-  withval=$with_openslp_libs; LDFLAGS="-L$withval $LDFLAGS"
-    DSOFLAGS="-L$withval $DSOFLAGS"
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getifaddrs" >&5
+$as_echo "$ac_cv_search_getifaddrs" >&6; }
+ac_res=$ac_cv_search_getifaddrs
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
 
-
-# Check whether --with-openslp-includes was given.
-if test "${with_openslp_includes+set}" = set; then :
-  withval=$with_openslp_includes; CFLAGS="-I$withval $CFLAGS"
-    CPPFLAGS="-I$withval $CPPFLAGS"
 fi
 
-
-LIBSLP=""
-
-if test x$enable_slp != xno; then
-    ac_fn_c_check_header_mongrel "$LINENO" "slp.h" "ac_cv_header_slp_h" "$ac_includes_default"
-if test "x$ac_cv_header_slp_h" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
-$as_echo_n "checking for SLPOpen in -lslp... " >&6; }
-if ${ac_cv_lib_slp_SLPOpen+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing hstrerror" >&5
+$as_echo_n "checking for library containing hstrerror... " >&6; }
+if ${ac_cv_search_hstrerror+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lslp  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8623,117 +7355,111 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char SLPOpen ();
+char hstrerror ();
 int
 main ()
 {
-return SLPOpen ();
+return hstrerror ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_slp_SLPOpen=yes
-else
-  ac_cv_lib_slp_SLPOpen=no
+for ac_lib in '' nsl socket resolv; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_hstrerror=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
-$as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
-if test "x$ac_cv_lib_slp_SLPOpen" = xyes; then :
-  $as_echo "#define HAVE_LIBSLP 1" >>confdefs.h
-
-           LIBSLP="-lslp"
+    conftest$ac_exeext
+  if ${ac_cv_search_hstrerror+:} false; then :
+  break
 fi
+done
+if ${ac_cv_search_hstrerror+:} false; then :
 
+else
+  ac_cv_search_hstrerror=no
 fi
-
-
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_hstrerror" >&5
+$as_echo "$ac_cv_search_hstrerror" >&6; }
+ac_res=$ac_cv_search_hstrerror
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
 
-
-
-
-
-
-# Check whether --enable-gssapi was given.
-if test "${enable_gssapi+set}" = set; then :
-  enableval=$enable_gssapi;
 fi
 
-
-LIBGSSAPI=""
-
-
-if test x$enable_gssapi != xno; then
-       # Extract the first word of "krb5-config", so it can be a program name with args.
-set dummy krb5-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_KRB5CONFIG+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rresvport_af" >&5
+$as_echo_n "checking for library containing rresvport_af... " >&6; }
+if ${ac_cv_search_rresvport_af+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $KRB5CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_KRB5CONFIG="$KRB5CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char rresvport_af ();
+int
+main ()
+{
+return rresvport_af ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' nsl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_rresvport_af=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_rresvport_af+:} false; then :
+  break
+fi
 done
-  done
-IFS=$as_save_IFS
+if ${ac_cv_search_rresvport_af+:} false; then :
 
-  ;;
-esac
-fi
-KRB5CONFIG=$ac_cv_path_KRB5CONFIG
-if test -n "$KRB5CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONFIG" >&5
-$as_echo "$KRB5CONFIG" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_search_rresvport_af=no
 fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rresvport_af" >&5
+$as_echo "$ac_cv_search_rresvport_af" >&6; }
+ac_res=$ac_cv_search_rresvport_af
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_RRESVPORT_AF 1" >>confdefs.h
 
+fi
 
-       if test "x$KRB5CONFIG" != x; then
-               case "$uname" in
-                       Darwin)
-                               # Mac OS X weak-links to the Kerberos framework...
-                               LIBGSSAPI="-weak_framework Kerberos"
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS framework" >&5
-$as_echo_n "checking for GSS framework... " >&6; }
-                               if test -d /System/Library/Frameworks/GSS.framework; then
-                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                                       LIBGSSAPI="$LIBGSSAPI -weak_framework GSS"
-                               else
-                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                               fi
-                               ;;
-                       SunOS*)
-                               # Solaris has a non-standard krb5-config, don't use it!
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_display_status in -lgss" >&5
-$as_echo_n "checking for gss_display_status in -lgss... " >&6; }
-if ${ac_cv_lib_gss_gss_display_status+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing __res_init" >&5
+$as_echo_n "checking for library containing __res_init... " >&6; }
+if ${ac_cv_search___res_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgss  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8743,57 +7469,53 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char gss_display_status ();
+char __res_init ();
 int
 main ()
 {
-return gss_display_status ();
+return __res_init ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_gss_gss_display_status=yes
-else
-  ac_cv_lib_gss_gss_display_status=no
+for ac_lib in '' resolv bind; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search___res_init=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+    conftest$ac_exeext
+  if ${ac_cv_search___res_init+:} false; then :
+  break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_display_status" >&5
-$as_echo "$ac_cv_lib_gss_gss_display_status" >&6; }
-if test "x$ac_cv_lib_gss_gss_display_status" = xyes; then :
-
-$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
+done
+if ${ac_cv_search___res_init+:} false; then :
 
-                                       CFLAGS="`$KRB5CONFIG --cflags` $CFLAGS"
-                                       CPPFLAGS="`$KRB5CONFIG --cflags` $CPPFLAGS"
-                                       LIBGSSAPI="-lgss `$KRB5CONFIG --libs`"
+else
+  ac_cv_search___res_init=no
 fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___res_init" >&5
+$as_echo "$ac_cv_search___res_init" >&6; }
+ac_res=$ac_cv_search___res_init
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
 
-                               ;;
-                       *)
-                               # Other platforms just ask for GSSAPI
-                               CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
-                               CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
-                               LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
-                               ;;
-               esac
-
-$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
-
-       else
-               # Check for vendor-specific implementations...
-               case "$uname" in
-                       HP-UX*)
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_display_status in -lgss" >&5
-$as_echo_n "checking for gss_display_status in -lgss... " >&6; }
-if ${ac_cv_lib_gss_gss_display_status+:} false; then :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
+$as_echo_n "checking for library containing res_9_init... " >&6; }
+if ${ac_cv_search_res_9_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgss  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8803,42 +7525,53 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char gss_display_status ();
+char res_9_init ();
 int
 main ()
 {
-return gss_display_status ();
+return res_9_init ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_gss_gss_display_status=yes
-else
-  ac_cv_lib_gss_gss_display_status=no
+for ac_lib in '' resolv bind; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_res_9_init=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+    conftest$ac_exeext
+  if ${ac_cv_search_res_9_init+:} false; then :
+  break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_display_status" >&5
-$as_echo "$ac_cv_lib_gss_gss_display_status" >&6; }
-if test "x$ac_cv_lib_gss_gss_display_status" = xyes; then :
-
-$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
+done
+if ${ac_cv_search_res_9_init+:} false; then :
 
-                                       LIBGSSAPI="-lgss -lgssapi_krb5"
+else
+  ac_cv_search_res_9_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
+$as_echo "$ac_cv_search_res_9_init" >&6; }
+ac_res=$ac_cv_search_res_9_init
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
 
-                               ;;
-                       SunOS*)
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_display_status in -lgss" >&5
-$as_echo_n "checking for gss_display_status in -lgss... " >&6; }
-if ${ac_cv_lib_gss_gss_display_status+:} false; then :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
+$as_echo_n "checking for library containing res_init... " >&6; }
+if ${ac_cv_search_res_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgss  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8848,320 +7581,380 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char gss_display_status ();
+char res_init ();
 int
 main ()
 {
-return gss_display_status ();
+return res_init ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_gss_gss_display_status=yes
-else
-  ac_cv_lib_gss_gss_display_status=no
+for ac_lib in '' resolv bind; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_res_init=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_display_status" >&5
-$as_echo "$ac_cv_lib_gss_gss_display_status" >&6; }
-if test "x$ac_cv_lib_gss_gss_display_status" = xyes; then :
-
-$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
-
-                                       LIBGSSAPI="-lgss"
-fi
-
-                               ;;
-               esac
-       fi
-
-       if test "x$LIBGSSAPI" != x; then
-               ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
-if test "x$ac_cv_header_krb5_h" = xyes; then :
-  $as_echo "#define HAVE_KRB5_H 1" >>confdefs.h
-
+    conftest$ac_exeext
+  if ${ac_cv_search_res_init+:} false; then :
+  break
 fi
+done
+if ${ac_cv_search_res_init+:} false; then :
 
-
-               if test -d /System/Library/Frameworks/GSS.framework; then
-                       gssdir="/System/Library/Frameworks/GSS.framework"
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS/gssapi.h presence" >&5
-$as_echo_n "checking for GSS/gssapi.h presence... " >&6; }
-                       if test -f $gssdir/Headers/gssapi.h; then
-                               $as_echo "#define HAVE_GSS_GSSAPI_H 1" >>confdefs.h
-
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       else
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       fi
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS/gssapi_generic.h presence" >&5
-$as_echo_n "checking for GSS/gssapi_generic.h presence... " >&6; }
-                       if test -f $gssdir/Headers/gssapi_generic.h; then
-                               $as_echo "#define HAVE_GSSAPI_GENERIC_H 1" >>confdefs.h
-
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       else
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       fi
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS/gssapi_krb5.h presence" >&5
-$as_echo_n "checking for GSS/gssapi_krb5.h presence... " >&6; }
-                       if test -f $gssdir/Headers/gssapi_krb5.h; then
-                               $as_echo "#define HAVE_GSSAPI_KRB5_H 1" >>confdefs.h
-
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       else
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       fi
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS/gssapi_spi.h presence" >&5
-$as_echo_n "checking for GSS/gssapi_spi.h presence... " >&6; }
-                       if test -f $gssdir/PrivateHeaders/gssapi_spi.h; then
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS/gssapi_spi.h usability" >&5
-$as_echo_n "checking for GSS/gssapi_spi.h usability... " >&6; }
-                               if test -s $gssdir/PrivateHeaders/gssapi_spi.h; then
-                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                                       $as_echo "#define HAVE_GSS_GSSAPI_SPI_H 1" >>confdefs.h
-
-                               else
-                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                               fi
-                       else
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                               if test $uversion -ge 110; then
-                                       # Broken public headers in 10.7...
-                                       as_fn_error $? "Run 'sudo mkdir -p $gssdir/PrivateHeaders' and 'sudo touch $gssdir/PrivateHeaders/gssapi_spi.h' to build CUPS." "$LINENO" 5
-                               fi
-                       fi
-               else
-                       ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
-if test "x$ac_cv_header_gssapi_h" = xyes; then :
-  $as_echo "#define HAVE_GSSAPI_H 1" >>confdefs.h
-
+else
+  ac_cv_search_res_init=no
 fi
-
-
-                       ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
-if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
-  $as_echo "#define HAVE_GSSAPI_GSSAPI_H 1" >>confdefs.h
-
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
-
-
-                       ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_generic.h" "ac_cv_header_gssapi_gssapi_generic_h" "$ac_includes_default"
-if test "x$ac_cv_header_gssapi_gssapi_generic_h" = xyes; then :
-  $as_echo "#define HAVE_GSSAPI_GENERIC_H 1" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
+$as_echo "$ac_cv_search_res_init" >&6; }
+ac_res=$ac_cv_search_res_init
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
 
 fi
 
-
-                       ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_krb5.h" "ac_cv_header_gssapi_gssapi_krb5_h" "$ac_includes_default"
-if test "x$ac_cv_header_gssapi_gssapi_krb5_h" = xyes; then :
-  $as_echo "#define HAVE_GSSAPI_KRB5_H 1" >>confdefs.h
-
 fi
 
-
-               fi
-
-               SAVELIBS="$LIBS"
-               LIBS="$LIBS $LIBGSSAPI"
-
-               ac_fn_c_check_func "$LINENO" "__ApplePrivate_gss_acquire_cred_ex_f" "ac_cv_func___ApplePrivate_gss_acquire_cred_ex_f"
-if test "x$ac_cv_func___ApplePrivate_gss_acquire_cred_ex_f" = xyes; then :
-  $as_echo "#define HAVE_GSS_ACQUIRE_CRED_EX_F 1" >>confdefs.h
-
 fi
 
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS_C_NT_HOSTBASED_SERVICE" >&5
-$as_echo_n "checking for GSS_C_NT_HOSTBASED_SERVICE... " >&6; }
-               if test x$ac_cv_header_gssapi_gssapi_h = xyes; then
-                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+# Tru64 5.1b leaks file descriptors with these functions; disable until
+# we can come up with a test for this...
+if test "$host_os_name" != "osf1"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
+$as_echo_n "checking for library containing getaddrinfo... " >&6; }
+if ${ac_cv_search_getaddrinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <gssapi/gssapi.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getaddrinfo ();
 int
 main ()
 {
- gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE;
+return getaddrinfo ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  $as_echo "#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1" >>confdefs.h
+for ac_lib in '' nsl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_getaddrinfo=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_getaddrinfo+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_getaddrinfo+:} false; then :
 
-                                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_search_getaddrinfo=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-               elif test x$ac_cv_header_gss_gssapi_h = xyes; then
-                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- #include <GSS/gssapi.h>
-int
-main ()
-{
- gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  $as_echo "#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1" >>confdefs.h
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
+$as_echo "$ac_cv_search_getaddrinfo" >&6; }
+ac_res=$ac_cv_search_getaddrinfo
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
 
-                                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-               else
-                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getnameinfo" >&5
+$as_echo_n "checking for library containing getnameinfo... " >&6; }
+if ${ac_cv_search_getnameinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <gssapi.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getnameinfo ();
 int
 main ()
 {
- gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE;
+return getnameinfo ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  $as_echo "#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1" >>confdefs.h
+for ac_lib in '' nsl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_getnameinfo=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_getnameinfo+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_getnameinfo+:} false; then :
 
-                                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_search_getnameinfo=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-               fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getnameinfo" >&5
+$as_echo "$ac_cv_search_getnameinfo" >&6; }
+ac_res=$ac_cv_search_getnameinfo
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h
 
-               LIBS="$SAVELIBS"
-       fi
 fi
 
+fi
 
-# Check whether --with-gssservicename was given.
-if test "${with_gssservicename+set}" = set; then :
-  withval=$with_gssservicename; default_gssservicename="$withval"
+ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
+"
+if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
+
+fi
+
+ac_fn_c_check_header_mongrel "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sockio_h" = xyes; then :
+  $as_echo "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
+
+fi
+
+
+
+CUPS_DEFAULT_DOMAINSOCKET=""
+
+
+# Check whether --with-domainsocket was given.
+if test "${with_domainsocket+set}" = set; then :
+  withval=$with_domainsocket; default_domainsocket="$withval"
 else
-  default_gssservicename="default"
+  default_domainsocket=""
 fi
 
 
-if test x$default_gssservicename != xno; then
-       if test "x$default_gssservicename" = "xdefault"; then
-               CUPS_DEFAULT_GSSSERVICENAME="host"
+if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
+       if test "x$default_domainsocket" = x; then
+               case "$host_os_name" in
+                       darwin*)
+                               # Darwin and macOS do their own thing...
+                               CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
+                               ;;
+                       *)
+                               # All others use FHS standard...
+                               CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock"
+                               ;;
+               esac
        else
-               CUPS_DEFAULT_GSSSERVICENAME="$default_gssservicename"
+               CUPS_DEFAULT_DOMAINSOCKET="$default_domainsocket"
        fi
+
+       CUPS_LISTEN_DOMAINSOCKET="Listen $CUPS_DEFAULT_DOMAINSOCKET"
+
+       cat >>confdefs.h <<_ACEOF
+#define CUPS_DEFAULT_DOMAINSOCKET "$CUPS_DEFAULT_DOMAINSOCKET"
+_ACEOF
+
 else
-       CUPS_DEFAULT_GSSSERVICENAME=""
+       CUPS_LISTEN_DOMAINSOCKET=""
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_GSSSERVICENAME "$CUPS_DEFAULT_GSSSERVICENAME"
-_ACEOF
 
 
 
 
-# Check whether --enable-ldap was given.
-if test "${enable_ldap+set}" = set; then :
-  enableval=$enable_ldap;
+ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
+if test "x$ac_cv_func_poll" = xyes; then :
+  $as_echo "#define HAVE_POLL 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "epoll_create" "ac_cv_func_epoll_create"
+if test "x$ac_cv_func_epoll_create" = xyes; then :
+  $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
+
 fi
 
+ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue"
+if test "x$ac_cv_func_kqueue" = xyes; then :
+  $as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
 
-# Check whether --with-ldap-libs was given.
-if test "${with_ldap_libs+set}" = set; then :
-  withval=$with_ldap_libs; LDFLAGS="-L$withval $LDFLAGS"
-    DSOFLAGS="-L$withval $DSOFLAGS"
 fi
 
 
-# Check whether --with-ldap-includes was given.
-if test "${with_ldap_includes+set}" = set; then :
-  withval=$with_ldap_includes; CFLAGS="-I$withval $CFLAGS"
-    CPPFLAGS="-I$withval $CPPFLAGS"
+
+# Check whether --enable-gssapi was given.
+if test "${enable_gssapi+set}" = set; then :
+  enableval=$enable_gssapi;
 fi
 
 
-LIBLDAP=""
+LIBGSSAPI=""
 
-if test x$enable_ldap != xno; then
-    ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
-if test "x$ac_cv_header_ldap_h" = xyes; then :
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_initialize in -lldap" >&5
-$as_echo_n "checking for ldap_initialize in -lldap... " >&6; }
-if ${ac_cv_lib_ldap_ldap_initialize+:} false; then :
+if test x$enable_gssapi != xno; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}krb5-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}krb5-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_KRB5CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lldap  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  case $KRB5CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_KRB5CONFIG="$KRB5CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ldap_initialize ();
-int
-main ()
-{
-return ldap_initialize ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ldap_ldap_initialize=yes
+  ;;
+esac
+fi
+KRB5CONFIG=$ac_cv_path_KRB5CONFIG
+if test -n "$KRB5CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONFIG" >&5
+$as_echo "$KRB5CONFIG" >&6; }
 else
-  ac_cv_lib_ldap_ldap_initialize=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+
+fi
+if test -z "$ac_cv_path_KRB5CONFIG"; then
+  ac_pt_KRB5CONFIG=$KRB5CONFIG
+  # Extract the first word of "krb5-config", so it can be a program name with args.
+set dummy krb5-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_KRB5CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_KRB5CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_KRB5CONFIG="$ac_pt_KRB5CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_KRB5CONFIG=$ac_cv_path_ac_pt_KRB5CONFIG
+if test -n "$ac_pt_KRB5CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_KRB5CONFIG" >&5
+$as_echo "$ac_pt_KRB5CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_initialize" >&5
-$as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; }
-if test "x$ac_cv_lib_ldap_ldap_initialize" = xyes; then :
-  $as_echo "#define HAVE_LDAP 1" >>confdefs.h
 
-           $as_echo "#define HAVE_OPENLDAP 1" >>confdefs.h
+  if test "x$ac_pt_KRB5CONFIG" = x; then
+    KRB5CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    KRB5CONFIG=$ac_pt_KRB5CONFIG
+  fi
+else
+  KRB5CONFIG="$ac_cv_path_KRB5CONFIG"
+fi
 
-           LIBLDAP="-lldap"
-           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls in -lldap" >&5
-$as_echo_n "checking for ldap_start_tls in -lldap... " >&6; }
-if ${ac_cv_lib_ldap_ldap_start_tls+:} false; then :
+       if test "x$KRB5CONFIG" != x; then
+               case "$host_os_name" in
+                       darwin)
+                               # macOS weak-links to the Kerberos framework...
+                               LIBGSSAPI="-weak_framework Kerberos"
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS framework" >&5
+$as_echo_n "checking for GSS framework... " >&6; }
+                               if test -d /System/Library/Frameworks/GSS.framework; then
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                                       LIBGSSAPI="$LIBGSSAPI -weak_framework GSS"
+                               else
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                               fi
+                               ;;
+                       sunos*)
+                               # Solaris has a non-standard krb5-config, don't use it!
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_display_status in -lgss" >&5
+$as_echo_n "checking for gss_display_status in -lgss... " >&6; }
+if ${ac_cv_lib_gss_gss_display_status+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lldap  $LIBS"
+LIBS="-lgss  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -9171,39 +7964,57 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ldap_start_tls ();
+char gss_display_status ();
 int
 main ()
 {
-return ldap_start_tls ();
+return gss_display_status ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ldap_ldap_start_tls=yes
+  ac_cv_lib_gss_gss_display_status=yes
 else
-  ac_cv_lib_ldap_ldap_start_tls=no
+  ac_cv_lib_gss_gss_display_status=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_start_tls" >&5
-$as_echo "$ac_cv_lib_ldap_ldap_start_tls" >&6; }
-if test "x$ac_cv_lib_ldap_ldap_start_tls" = xyes; then :
-  $as_echo "#define HAVE_LDAP_SSL 1" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_display_status" >&5
+$as_echo "$ac_cv_lib_gss_gss_display_status" >&6; }
+if test "x$ac_cv_lib_gss_gss_display_status" = xyes; then :
 
+$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
+
+                                       CFLAGS="`$KRB5CONFIG --cflags` $CFLAGS"
+                                       CPPFLAGS="`$KRB5CONFIG --cflags` $CPPFLAGS"
+                                       LIBGSSAPI="-lgss `$KRB5CONFIG --libs`"
 fi
 
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -lldap" >&5
-$as_echo_n "checking for ldap_init in -lldap... " >&6; }
-if ${ac_cv_lib_ldap_ldap_init+:} false; then :
+                               ;;
+                       *)
+                               # Other platforms just ask for GSSAPI
+                               CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
+                               CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
+                               LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
+                               ;;
+               esac
+
+$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
+
+       else
+               # Check for vendor-specific implementations...
+               case "$host_os_name" in
+                       hp-ux*)
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_display_status in -lgss" >&5
+$as_echo_n "checking for gss_display_status in -lgss... " >&6; }
+if ${ac_cv_lib_gss_gss_display_status+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lldap  $LIBS"
+LIBS="-lgss  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -9213,47 +8024,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ldap_init ();
+char gss_display_status ();
 int
 main ()
 {
-return ldap_init ();
+return gss_display_status ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ldap_ldap_init=yes
+  ac_cv_lib_gss_gss_display_status=yes
 else
-  ac_cv_lib_ldap_ldap_init=no
+  ac_cv_lib_gss_gss_display_status=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_init" >&5
-$as_echo "$ac_cv_lib_ldap_ldap_init" >&6; }
-if test "x$ac_cv_lib_ldap_ldap_init" = xyes; then :
-  $as_echo "#define HAVE_LDAP 1" >>confdefs.h
-
-               $as_echo "#define HAVE_MOZILLA_LDAP 1" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_display_status" >&5
+$as_echo "$ac_cv_lib_gss_gss_display_status" >&6; }
+if test "x$ac_cv_lib_gss_gss_display_status" = xyes; then :
 
-               LIBLDAP="-lldap"
-               ac_fn_c_check_header_compile "$LINENO" "ldap_ssl.h" "ac_cv_header_ldap_ssl_h" "#include <ldap.h>
-"
-if test "x$ac_cv_header_ldap_ssl_h" = xyes; then :
-  $as_echo "#define HAVE_LDAP_SSL_H 1" >>confdefs.h
+$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
 
+                                       LIBGSSAPI="-lgss -lgssapi_krb5"
 fi
 
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -lldap" >&5
-$as_echo_n "checking for ldapssl_init in -lldap... " >&6; }
-if ${ac_cv_lib_ldap_ldapssl_init+:} false; then :
+                               ;;
+                       sunos*)
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_display_status in -lgss" >&5
+$as_echo_n "checking for gss_display_status in -lgss... " >&6; }
+if ${ac_cv_lib_gss_gss_display_status+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lldap  $LIBS"
+LIBS="-lgss  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -9263,85 +8069,191 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ldapssl_init ();
+char gss_display_status ();
 int
 main ()
 {
-return ldapssl_init ();
+return gss_display_status ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ldap_ldapssl_init=yes
+  ac_cv_lib_gss_gss_display_status=yes
 else
-  ac_cv_lib_ldap_ldapssl_init=no
+  ac_cv_lib_gss_gss_display_status=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldapssl_init" >&5
-$as_echo "$ac_cv_lib_ldap_ldapssl_init" >&6; }
-if test "x$ac_cv_lib_ldap_ldapssl_init" = xyes; then :
-  $as_echo "#define HAVE_LDAP_SSL 1" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_display_status" >&5
+$as_echo "$ac_cv_lib_gss_gss_display_status" >&6; }
+if test "x$ac_cv_lib_gss_gss_display_status" = xyes; then :
+
+$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
+
+                                       LIBGSSAPI="-lgss"
+fi
+
+                               ;;
+               esac
+       fi
+
+       if test "x$LIBGSSAPI" != x; then
+               ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
+if test "x$ac_cv_header_krb5_h" = xyes; then :
+  $as_echo "#define HAVE_KRB5_H 1" >>confdefs.h
+
+fi
+
+
+               if test -d /System/Library/Frameworks/GSS.framework; then
+                       ac_fn_c_check_header_mongrel "$LINENO" "GSS/gssapi.h" "ac_cv_header_GSS_gssapi_h" "$ac_includes_default"
+if test "x$ac_cv_header_GSS_gssapi_h" = xyes; then :
+  $as_echo "#define HAVE_GSS_GSSAPI_H 1" >>confdefs.h
 
 fi
 
+
+                       ac_fn_c_check_header_mongrel "$LINENO" "GSS/gssapi_generic.h" "ac_cv_header_GSS_gssapi_generic_h" "$ac_includes_default"
+if test "x$ac_cv_header_GSS_gssapi_generic_h" = xyes; then :
+  $as_echo "#define HAVE_GSS_GSSAPI_GENERIC_H 1" >>confdefs.h
+
 fi
 
 
+                       ac_fn_c_check_header_mongrel "$LINENO" "GSS/gssapi_spi.h" "ac_cv_header_GSS_gssapi_spi_h" "$ac_includes_default"
+if test "x$ac_cv_header_GSS_gssapi_spi_h" = xyes; then :
+  $as_echo "#define HAVE_GSS_GSSAPI_SPI_H 1" >>confdefs.h
+
 fi
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_set_rebind_proc in -lldap" >&5
-$as_echo_n "checking for ldap_set_rebind_proc in -lldap... " >&6; }
-if ${ac_cv_lib_ldap_ldap_set_rebind_proc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lldap  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+               else
+                       ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
+if test "x$ac_cv_header_gssapi_h" = xyes; then :
+  $as_echo "#define HAVE_GSSAPI_H 1" >>confdefs.h
+
+fi
+
+
+                       ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
+if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
+  $as_echo "#define HAVE_GSSAPI_GSSAPI_H 1" >>confdefs.h
+
+fi
+
+
+               fi
+
+               SAVELIBS="$LIBS"
+               LIBS="$LIBS $LIBGSSAPI"
+
+               ac_fn_c_check_func "$LINENO" "__ApplePrivate_gss_acquire_cred_ex_f" "ac_cv_func___ApplePrivate_gss_acquire_cred_ex_f"
+if test "x$ac_cv_func___ApplePrivate_gss_acquire_cred_ex_f" = xyes; then :
+  $as_echo "#define HAVE_GSS_ACQUIRE_CRED_EX_F 1" >>confdefs.h
+
+fi
+
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS_C_NT_HOSTBASED_SERVICE" >&5
+$as_echo_n "checking for GSS_C_NT_HOSTBASED_SERVICE... " >&6; }
+               if test x$ac_cv_header_gssapi_gssapi_h = xyes; then
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+ #include <gssapi/gssapi.h>
+int
+main ()
+{
+ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  $as_echo "#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1" >>confdefs.h
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ldap_set_rebind_proc ();
+                                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+               elif test x$ac_cv_header_gss_gssapi_h = xyes; then
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <GSS/gssapi.h>
 int
 main ()
 {
-return ldap_set_rebind_proc ();
+ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ldap_ldap_set_rebind_proc=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  $as_echo "#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1" >>confdefs.h
+
+                                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  ac_cv_lib_ldap_ldap_set_rebind_proc=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+               else
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <gssapi.h>
+int
+main ()
+{
+ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  $as_echo "#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1" >>confdefs.h
+
+                                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_set_rebind_proc" >&5
-$as_echo "$ac_cv_lib_ldap_ldap_set_rebind_proc" >&6; }
-if test "x$ac_cv_lib_ldap_ldap_set_rebind_proc" = xyes; then :
-  $as_echo "#define HAVE_LDAP_REBIND_PROC 1" >>confdefs.h
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+               fi
 
+               LIBS="$SAVELIBS"
+       fi
 fi
 
 
+# Check whether --with-gssservicename was given.
+if test "${with_gssservicename+set}" = set; then :
+  withval=$with_gssservicename; default_gssservicename="$withval"
+else
+  default_gssservicename="default"
 fi
 
 
+if test x$default_gssservicename != xno; then
+       if test "x$default_gssservicename" = "xdefault"; then
+               CUPS_DEFAULT_GSSSERVICENAME="host"
+       else
+               CUPS_DEFAULT_GSSSERVICENAME="$default_gssservicename"
+       fi
+else
+       CUPS_DEFAULT_GSSSERVICENAME=""
 fi
 
 
-
+cat >>confdefs.h <<_ACEOF
+#define CUPS_DEFAULT_GSSSERVICENAME "$CUPS_DEFAULT_GSSSERVICENAME"
+_ACEOF
 
 
 
@@ -9395,7 +8307,7 @@ $as_echo "$have_pthread" >&6; }
 
                                # 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
@@ -9407,7 +8319,6 @@ fi
 
 
 
-
 # Check whether --enable-ssl was given.
 if test "${enable_ssl+set}" = set; then :
   enableval=$enable_ssl;
@@ -9423,33 +8334,15 @@ if test "${enable_gnutls+set}" = set; then :
   enableval=$enable_gnutls;
 fi
 
-# Check whether --enable-openssl was given.
-if test "${enable_openssl+set}" = set; then :
-  enableval=$enable_openssl;
-fi
-
-
-# Check whether --with-openssl-libs was given.
-if test "${with_openssl_libs+set}" = set; then :
-  withval=$with_openssl_libs; LDFLAGS="-L$withval $LDFLAGS"
-    DSOFLAGS="-L$withval $DSOFLAGS"
-fi
-
-
-# Check whether --with-openssl-includes was given.
-if test "${with_openssl_includes+set}" = set; then :
-  withval=$with_openssl_includes; CFLAGS="-I$withval $CFLAGS"
-    CPPFLAGS="-I$withval $CPPFLAGS"
-fi
-
 
 SSLFLAGS=""
 SSLLIBS=""
 have_ssl=0
+CUPS_SERVERKEYCHAIN=""
 
 if test x$enable_ssl != xno; then
         if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then
-       if test $uname = Darwin; then
+       if test $host_os_name = darwin; then
            ac_fn_c_check_header_mongrel "$LINENO" "Security/SecureTransport.h" "ac_cv_header_Security_SecureTransport_h" "$ac_includes_default"
 if test "x$ac_cv_header_Security_SecureTransport_h" = xyes; then :
 
@@ -9458,6 +8351,7 @@ if test "x$ac_cv_header_Security_SecureTransport_h" = xyes; then :
 
                $as_echo "#define HAVE_CDSASSL 1" >>confdefs.h
 
+               CUPS_SERVERKEYCHAIN="/Library/Keychains/System.keychain"
 
                                ac_fn_c_check_header_mongrel "$LINENO" "Security/SecureTransportPriv.h" "ac_cv_header_Security_SecureTransportPriv_h" "$ac_includes_default"
 if test "x$ac_cv_header_Security_SecureTransportPriv_h" = xyes; then :
@@ -9517,62 +8411,25 @@ fi
 
 
 
-                               SAVELIBS="$LIBS"
-               LIBS="$LIBS -framework Security"
-               ac_fn_c_check_func "$LINENO" "SSLSetProtocolVersionMax" "ac_cv_func_SSLSetProtocolVersionMax"
-if test "x$ac_cv_func_SSLSetProtocolVersionMax" = xyes; then :
-
-fi
-
-               LIBS="$SAVELIBS"
-
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SecCertificateCopyData" >&5
-$as_echo_n "checking for SecCertificateCopyData... " >&6; }
-               if test $uversion -ge 100; then
-                   $as_echo "#define HAVE_SECCERTIFICATECOPYDATA 1" >>confdefs.h
-
-                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-               else
-                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               fi
-
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SecIdentitySearchCreateWithPolicy" >&5
-$as_echo_n "checking for SecIdentitySearchCreateWithPolicy... " >&6; }
-               if test $uversion -ge 80; then
-                   $as_echo "#define HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY 1" >>confdefs.h
-
-                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-               else
-                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               fi
+               $as_echo "#define HAVE_CSSMERRORSTRING 1" >>confdefs.h
 
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SecPolicyCreateSSL" >&5
-$as_echo_n "checking for SecPolicyCreateSSL... " >&6; }
-               if test $uversion -ge 110; then
-                   $as_echo "#define HAVE_SECPOLICYCREATESSL 1" >>confdefs.h
+               $as_echo "#define HAVE_SECKEYCHAINOPEN 1" >>confdefs.h
 
-                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-               else
-                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               fi
 fi
 
 
 
-               $as_echo "#define HAVE_CSSMERRORSTRING 1" >>confdefs.h
+               if test $host_os_version -ge 150; then
+                       $as_echo "#define HAVE_SSLSETENABLEDCIPHERS 1" >>confdefs.h
 
+               fi
        fi
     fi
 
         if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
-       # Extract the first word of "libgnutls-config", so it can be a program name with args.
-set dummy libgnutls-config; ac_word=$2
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}libgnutls-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}libgnutls-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_LIBGNUTLSCONFIG+:} false; then :
@@ -9589,7 +8446,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_LIBGNUTLSCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9611,16 +8468,19 @@ $as_echo "no" >&6; }
 fi
 
 
-       # Extract the first word of "libgcrypt-config", so it can be a program name with args.
-set dummy libgcrypt-config; ac_word=$2
+fi
+if test -z "$ac_cv_path_LIBGNUTLSCONFIG"; then
+  ac_pt_LIBGNUTLSCONFIG=$LIBGNUTLSCONFIG
+  # Extract the first word of "libgnutls-config", so it can be a program name with args.
+set dummy libgnutls-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LIBGCRYPTCONFIG+:} false; then :
+if ${ac_cv_path_ac_pt_LIBGNUTLSCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $LIBGCRYPTCONFIG in
+  case $ac_pt_LIBGNUTLSCONFIG in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_LIBGCRYPTCONFIG="$LIBGCRYPTCONFIG" # Let the user override the test with a path.
+  ac_cv_path_ac_pt_LIBGNUTLSCONFIG="$ac_pt_LIBGNUTLSCONFIG" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9629,8 +8489,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_LIBGCRYPTCONFIG="$as_dir/$ac_word$ac_exec_ext"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_LIBGNUTLSCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -9641,119 +8501,67 @@ IFS=$as_save_IFS
   ;;
 esac
 fi
-LIBGCRYPTCONFIG=$ac_cv_path_LIBGCRYPTCONFIG
-if test -n "$LIBGCRYPTCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGCRYPTCONFIG" >&5
-$as_echo "$LIBGCRYPTCONFIG" >&6; }
+ac_pt_LIBGNUTLSCONFIG=$ac_cv_path_ac_pt_LIBGNUTLSCONFIG
+if test -n "$ac_pt_LIBGNUTLSCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LIBGNUTLSCONFIG" >&5
+$as_echo "$ac_pt_LIBGNUTLSCONFIG" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-
-       if $PKGCONFIG --exists gnutls; then
-           have_ssl=1
-           SSLLIBS=`$PKGCONFIG --libs gnutls`
-           SSLFLAGS=`$PKGCONFIG --cflags gnutls`
-           $as_echo "#define HAVE_SSL 1" >>confdefs.h
-
-           $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
-
-       elif test "x$LIBGNUTLSCONFIG" != x; then
-           have_ssl=1
-           SSLLIBS=`$LIBGNUTLSCONFIG --libs`
-           SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
-           $as_echo "#define HAVE_SSL 1" >>confdefs.h
-
-           $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
-
-       fi
-
-       if test $have_ssl = 1; then
-            if $PKGCONFIG --exists gcrypt; then
-               SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`"
-               SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`"
-           elif test "x$LIBGCRYPTCONFIG" != x; then
-               SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`"
-               SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`"
-           fi
-       fi
-    fi
-
-        if test $have_ssl = 0 -a "x$enable_openssl" != "xno"; then
-       ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
-                   SAVELIBS="$LIBS"
-
-
-           for libcrypto in \
-               "-lcrypto" \
-               "-lcrypto -lrsaref" \
-               "-lcrypto -lRSAglue -lrsaref"
-           do
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
-$as_echo_n "checking for SSL_new in -lssl... " >&6; }
-if ${ac_cv_lib_ssl_SSL_new+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lssl $libcrypto $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char SSL_new ();
-int
-main ()
-{
-return SSL_new ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ssl_SSL_new=yes
+  if test "x$ac_pt_LIBGNUTLSCONFIG" = x; then
+    LIBGNUTLSCONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LIBGNUTLSCONFIG=$ac_pt_LIBGNUTLSCONFIG
+  fi
 else
-  ac_cv_lib_ssl_SSL_new=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  LIBGNUTLSCONFIG="$ac_cv_path_LIBGNUTLSCONFIG"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
-$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
-if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
-  have_ssl=1
-                    SSLFLAGS="-DOPENSSL_DISABLE_OLD_DES_SUPPORT"
-                    SSLLIBS="-lssl $libcrypto"
-                    $as_echo "#define HAVE_SSL 1" >>confdefs.h
 
-                    $as_echo "#define HAVE_LIBSSL 1" >>confdefs.h
+       if $PKGCONFIG --exists gnutls; then
+           have_ssl=1
+           SSLLIBS=`$PKGCONFIG --libs gnutls`
+           SSLFLAGS=`$PKGCONFIG --cflags gnutls`
+           $as_echo "#define HAVE_SSL 1" >>confdefs.h
 
-fi
+           $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
+
+       elif test "x$LIBGNUTLSCONFIG" != x; then
+           have_ssl=1
+           SSLLIBS=`$LIBGNUTLSCONFIG --libs`
+           SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
+           $as_echo "#define HAVE_SSL 1" >>confdefs.h
 
+           $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
 
-               if test "x${SSLLIBS}" != "x"; then
-                   LIBS="$SAVELIBS $SSLLIBS"
-                   ac_fn_c_check_func "$LINENO" "SSL_set_tlsext_host_name" "ac_cv_func_SSL_set_tlsext_host_name"
-if test "x$ac_cv_func_SSL_set_tlsext_host_name" = xyes; then :
-  $as_echo "#define HAVE_SSL_SET_TLSEXT_HOST_NAME 1" >>confdefs.h
+       fi
 
-fi
+       if test $have_ssl = 1; then
+           CUPS_SERVERKEYCHAIN="ssl"
 
-                   break
-               fi
-           done
+           SAVELIBS="$LIBS"
+           LIBS="$LIBS $SSLLIBS"
+           ac_fn_c_check_func "$LINENO" "gnutls_transport_set_pull_timeout_function" "ac_cv_func_gnutls_transport_set_pull_timeout_function"
+if test "x$ac_cv_func_gnutls_transport_set_pull_timeout_function" = xyes; then :
+  $as_echo "#define HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION 1" >>confdefs.h
 
-           LIBS="$SAVELIBS"
 fi
 
+           ac_fn_c_check_func "$LINENO" "gnutls_priority_set_direct" "ac_cv_func_gnutls_priority_set_direct"
+if test "x$ac_cv_func_gnutls_priority_set_direct" = xyes; then :
+  $as_echo "#define HAVE_GNUTLS_PRIORITY_SET_DIRECT 1" >>confdefs.h
+
+fi
 
+           LIBS="$SAVELIBS"
+       fi
     fi
 fi
 
@@ -9764,7 +8572,7 @@ $as_echo "    Using SSLLIBS=\"$SSLLIBS\"" >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: result:     Using SSLFLAGS=\"$SSLFLAGS\"" >&5
 $as_echo "    Using SSLFLAGS=\"$SSLFLAGS\"" >&6; }
     IPPALIASES="http https ipps"
-elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes -o x$enable_openssl = xyes; then
+elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes; then
     as_fn_error $? "Unable to enable SSL support." "$LINENO" 5
 fi
 
@@ -9772,8 +8580,8 @@ fi
 
 
 
-EXPORT_SSLLIBS="$SSLLIBS"
 
+EXPORT_SSLLIBS="$SSLLIBS"
 
 
 
@@ -9789,10 +8597,6 @@ if test "${with_pam_module+set}" = set; then :
 fi
 
 
-if test $uname = AIX; then
-       enable_pam=no
-fi
-
 PAMDIR=""
 PAMFILE="pam.std"
 PAMLIBS=""
@@ -10009,9 +8813,9 @@ fi
 
        LIBS="$SAVELIBS"
 
-       case "$uname" in
-               Darwin*)
-                       # Darwin/Mac OS X
+       case "$host_os_name" in
+               darwin*)
+                       # Darwin/macOS
                        if test "x$with_pam_module" != x; then
                                PAMFILE="pam.$with_pam_module"
                        elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
@@ -10048,7 +8852,6 @@ fi
 
 
 
-
 # Check whether --enable-largefile was given.
 if test "${enable_largefile+set}" = set; then :
   enableval=$enable_largefile;
@@ -10245,6 +9048,8 @@ _ACEOF
 esac
 rm -rf conftest*
   fi
+
+
 fi
 
 
@@ -10305,6 +9110,10 @@ fi
 
 
 
+# Check whether --enable-avahi was given.
+if test "${enable_avahi+set}" = set; then :
+  enableval=$enable_avahi;
+fi
 
 # Check whether --enable-dnssd was given.
 if test "${enable_dnssd+set}" = set; then :
 
 DNSSDLIBS=""
 DNSSD_BACKEND=""
+IPPFIND_BIN=""
+IPPFIND_MAN=""
+
+if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$host_os_name != xdarwin; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Avahi" >&5
+$as_echo_n "checking for Avahi... " >&6; }
+       if $PKGCONFIG --exists avahi-client; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+               CFLAGS="$CFLAGS `$PKGCONFIG --cflags avahi-client`"
+               DNSSDLIBS="`$PKGCONFIG --libs avahi-client`"
+               DNSSD_BACKEND="dnssd"
+               IPPFIND_BIN="ippfind"
+               IPPFIND_MAN="ippfind.\$(MAN1EXT)"
+               $as_echo "#define HAVE_AVAHI 1" >>confdefs.h
+
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
+fi
 
-if test x$enable_dnssd != xno; then
+if test "x$DNSSD_BACKEND" = x -a x$enable_dnssd != xno; then
        ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
 
-               case "$uname" in
-                       Darwin*)
-                               # Darwin and MacOS X...
+               case "$host_os_name" in
+                       darwin*)
+                               # Darwin and macOS...
                                $as_echo "#define HAVE_DNSSD 1" >>confdefs.h
 
-                               $as_echo "#define HAVE_COREFOUNDATION 1" >>confdefs.h
-
-                               $as_echo "#define HAVE_SYSTEMCONFIGURATION 1" >>confdefs.h
-
                                DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
                                DNSSD_BACKEND="dnssd"
+                               IPPFIND_BIN="ippfind"
+                               IPPFIND_MAN="ippfind.\$(MAN1EXT)"
                                ;;
                        *)
                                # All others...
@@ -10374,7 +9202,9 @@ $as_echo "yes" >&6; }
                                        DNSSDLIBS="-ldns_sd"
                                        DNSSD_BACKEND="dnssd"
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  IPPFIND_BIN="ippfind"
+                                       IPPFIND_MAN="ippfind.\$(MAN1EXT)"
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
 
+ONDEMANDFLAGS=""
+ONDEMANDLIBS=""
+
+
+
 # Check whether --enable-launchd was given.
 if test "${enable_launchd+set}" = set; then :
   enableval=$enable_launchd;
 fi
 
+LAUNCHD_DIR=""
 
-DEFAULT_LAUNCHD_CONF=""
-LAUNCHDLIBS=""
 
 if test x$enable_launchd != xno; then
-       ac_fn_c_check_func "$LINENO" "launch_msg" "ac_cv_func_launch_msg"
-if test "x$ac_cv_func_launch_msg" = xyes; then :
-  $as_echo "#define HAVE_LAUNCHD 1" >>confdefs.h
+       ac_fn_c_check_func "$LINENO" "launch_activate_socket" "ac_cv_func_launch_activate_socket"
+if test "x$ac_cv_func_launch_activate_socket" = xyes; then :
+
+               $as_echo "#define HAVE_LAUNCHD 1" >>confdefs.h
+
+               $as_echo "#define HAVE_ONDEMAND 1" >>confdefs.h
 
 fi
 
 
 
 
-       case "$uname" in
-               Darwin*)
-                       # Darwin, MacOS X
-                       DEFAULT_LAUNCHD_CONF="/System/Library/LaunchDaemons/org.cups.cupsd.plist"
-                       # liblaunch is already part of libSystem
-                       ;;
-               *)
-                       # All others; this test will need to be updated
+       if test "$host_os_name" = darwin; then
+               LAUNCHD_DIR="/System/Library/LaunchDaemons"
+               # liblaunch is already part of libSystem
+       fi
+fi
+
+# Check whether --enable-systemd was given.
+if test "${enable_systemd+set}" = set; then :
+  enableval=$enable_systemd;
+fi
+
+
+# Check whether --with-systemd was given.
+if test "${with_systemd+set}" = set; then :
+  withval=$with_systemd; SYSTEMD_DIR="$withval"
+else
+  SYSTEMD_DIR=""
+fi
+
+
+
+if test x$enable_systemd != xno; then
+       if test "x$PKGCONFIG" = x; then
+               if test x$enable_systemd = xyes; then
+                       as_fn_error $? "Need pkg-config to enable systemd support." "$LINENO" 5
+                fi
+        else
+               have_systemd=no
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd" >&5
+$as_echo_n "checking for libsystemd... " >&6; }
+                if $PKGCONFIG --exists libsystemd; then
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                        have_systemd=yes
+                        ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd`
+                        ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd`
+               elif $PKGCONFIG --exists libsystemd-daemon; then
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - legacy" >&5
+$as_echo "yes - legacy" >&6; }
+                        have_systemd=yes
+                       ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
+                       ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
+
+                       if $PKGCONFIG --exists libsystemd-journal; then
+                               ONDEMANDFLAGS="$ONDEMANDFLAGS `$PKGCONFIG --cflags libsystemd-journal`"
+                               ONDEMANDLIBS="$ONDEMANDLIBS `$PKGCONFIG --libs libsystemd-journal`"
+                       fi
+                else
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                fi
+
+               if test $have_systemd = yes; then
+                        $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
+
+                        $as_echo "#define HAVE_ONDEMAND 1" >>confdefs.h
+
+                       ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-journal.h" "ac_cv_header_systemd_sd_journal_h" "$ac_includes_default"
+if test "x$ac_cv_header_systemd_sd_journal_h" = xyes; then :
+  $as_echo "#define HAVE_SYSTEMD_SD_JOURNAL_H 1" >>confdefs.h
+
+fi
+
+
+                       if test "x$SYSTEMD_DIR" = x; then
+                               SYSTEMD_DIR="`$PKGCONFIG --variable=systemdsystemunitdir systemd`"
+                        fi
+                fi
+        fi
+fi
+
+# Check whether --enable-upstart was given.
+if test "${enable_upstart+set}" = set; then :
+  enableval=$enable_upstart;
+fi
+
+if test "x$enable_upstart" = "xyes"; then
+       if test "x$have_systemd" = "xyes"; then
+               as_fn_error $? "Cannot support both systemd and upstart." "$LINENO" 5
+       fi
+       $as_echo "#define HAVE_UPSTART 1" >>confdefs.h
+
+       $as_echo "#define HAVE_ONDEMAND 1" >>confdefs.h
+
+fi
+
+SMFMANIFESTDIR=""
+
+
+# Check whether --with-smfmanifestdir was given.
+if test "${with_smfmanifestdir+set}" = set; then :
+  withval=$with_smfmanifestdir; SMFMANIFESTDIR="$withval"
+fi
+
+
+
+# Check whether --with-rcdir was given.
+if test "${with_rcdir+set}" = set; then :
+  withval=$with_rcdir; rcdir="$withval"
+else
+  rcdir=""
+fi
+
+
+# Check whether --with-rclevels was given.
+if test "${with_rclevels+set}" = set; then :
+  withval=$with_rclevels; rclevels="$withval"
+else
+  rclevels="2 3 5"
+fi
+
+
+# Check whether --with-rcstart was given.
+if test "${with_rcstart+set}" = set; then :
+  withval=$with_rcstart; rcstart="$withval"
+else
+  rcstart=""
+fi
+
+
+# Check whether --with-rcstop was given.
+if test "${with_rcstop+set}" = set; then :
+  withval=$with_rcstop; rcstop="$withval"
+else
+  rcstop=""
+fi
+
+
+if test x$rcdir = x; then
+       if test x$LAUNCHD_DIR = x -a x$SYSTEMD_DIR = x -a x$SMFMANIFESTDIR = x; then
+                # Fall back on "init", the original service startup interface...
+                if test -d /sbin/init.d; then
+                        # SuSE
+                        rcdir="/sbin/init.d"
+                elif test -d /etc/init.d; then
+                        # Others
+                        rcdir="/etc"
+                else
+                        # RedHat, NetBSD
+                        rcdir="/etc/rc.d"
+                fi
+        else
+               rcdir="no"
+       fi
+fi
+
+if test "x$rcstart" = x; then
+       case "$host_os_name" in
+               linux* | gnu*)
+                       # Linux
+                        rcstart="81"
+                       ;;
+
+               sunos*)
+                       # Solaris
+                        rcstart="81"
                        ;;
+
+                *)
+                        # Others
+                        rcstart="99"
+                        ;;
+       esac
+fi
+
+if test "x$rcstop" = x; then
+       case "$host_os_name" in
+               linux* | gnu*)
+                       # Linux
+                        rcstop="36"
+                       ;;
+
+                *)
+                        # Others
+                        rcstop="00"
+                        ;;
        esac
 fi
 
+INITDIR=""
+INITDDIR=""
+RCLEVELS="$rclevels"
+RCSTART="$rcstart"
+RCSTOP="$rcstop"
+
+
+
+
+
+
+if test "x$rcdir" != xno; then
+       if test "x$rclevels" = x; then
+               INITDDIR="$rcdir"
+       else
+               INITDIR="$rcdir"
+       fi
+fi
+
 
+# Check whether --with-xinetd was given.
+if test "${with_xinetd+set}" = set; then :
+  withval=$with_xinetd; xinetd="$withval"
+else
+  xinetd=""
+fi
 
+XINETD=""
 
 
+if test "x$xinetd" = x; then
+       if test ! -x /sbin/launchd; then
+                for dir in /etc/xinetd.d /usr/local/etc/xinetd.d; do
+                        if test -d $dir; then
+                                XINETD="$dir"
+                                break
+                        fi
+                done
+        fi
+elif test "x$xinetd" != xno; then
+       XINETD="$xinetd"
+fi
 
-LANGUAGES="`ls -1 locale/cups_*.po | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' '`"
+
+LANGUAGES="`ls -1 locale/cups_*.po 2>/dev/null | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' '`"
 
 
 # Check whether --with-languages was given.
@@ -10454,7 +9497,7 @@ fi
 if test "${with_bundledir+set}" = set; then :
   withval=$with_bundledir; CUPS_BUNDLEDIR="$withval"
 else
-  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
@@ -10472,11 +9515,28 @@ _ACEOF
 fi
 
 
+# Check whether --with-exe_file_perm was given.
+if test "${with_exe_file_perm+set}" = set; then :
+  withval=$with_exe_file_perm; CUPS_EXE_FILE_PERM="$withval"
+else
+  case "$host_os_name" in
+               linux* | gnu*)
+                       CUPS_EXE_FILE_PERM="755"
+                       ;;
+               *)
+                       CUPS_EXE_FILE_PERM="555"
+                       ;;
+       esac
+fi
+
+
+
+
 # Check whether --with-config_file_perm was given.
 if test "${with_config_file_perm+set}" = set; then :
   withval=$with_config_file_perm; CUPS_CONFIG_FILE_PERM="$withval"
 else
-  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"
@@ -10490,6 +9550,23 @@ _ACEOF
 
 
 
+# Check whether --with-cupsd_file_perm was given.
+if test "${with_cupsd_file_perm+set}" = set; then :
+  withval=$with_cupsd_file_perm; CUPS_CUPSD_FILE_PERM="$withval"
+else
+  case "$host_os_name" in
+               linux* | gnu*)
+                       CUPS_CUPSD_FILE_PERM="700"
+                       ;;
+               *)
+                       CUPS_CUPSD_FILE_PERM="500"
+                       ;;
+       esac
+fi
+
+
+
+
 # Check whether --with-log_file_perm was given.
 if test "${with_log_file_perm+set}" = set; then :
   withval=$with_log_file_perm; CUPS_LOG_FILE_PERM="$withval"
@@ -10518,7 +9595,6 @@ _ACEOF
 
 
 
-
 # Check whether --with-log_level was given.
 if test "${with_log_level+set}" = set; then :
   withval=$with_log_level; CUPS_LOG_LEVEL="$withval"
@@ -10537,7 +9613,7 @@ _ACEOF
 if test "${with_access_log_level+set}" = set; then :
   withval=$with_access_log_level; CUPS_ACCESS_LOG_LEVEL="$withval"
 else
-  CUPS_ACCESS_LOG_LEVEL="actions"
+  CUPS_ACCESS_LOG_LEVEL="none"
 fi
 
 
@@ -10546,6 +9622,18 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+# Check whether --enable-page_logging was given.
+if test "${enable_page_logging+set}" = set; then :
+  enableval=$enable_page_logging;
+fi
+
+if test "x$enable_page_logging" = xyes; then
+       CUPS_PAGE_LOG_FORMAT=""
+else
+       CUPS_PAGE_LOG_FORMAT="PageLogFormat"
+fi
+
+
 # Check whether --enable-browsing was given.
 if test "${enable_browsing+set}" = set; then :
   enableval=$enable_browsing;
 
 if test x$with_local_protocols != xno; then
        if test "x$default_local_protocols" = "xdefault"; then
-               if test "x$DNSSDLIBS" != "x"; then
-               CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS dnssd"
-       else
-               CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS"
+               if test "x$DNSSD_BACKEND" != "x"; then
+                       CUPS_BROWSE_LOCAL_PROTOCOLS="dnssd"
+               else
+                       CUPS_BROWSE_LOCAL_PROTOCOLS=""
                fi
        else
                CUPS_BROWSE_LOCAL_PROTOCOLS="$default_local_protocols"
@@ -10595,55 +9683,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-
-# Check whether --with-remote_protocols was given.
-if test "${with_remote_protocols+set}" = set; then :
-  withval=$with_remote_protocols; default_remote_protocols="$withval"
-else
-  default_remote_protocols="default"
-fi
-
-
-if test x$with_remote_protocols != xno; then
-       if test "x$default_remote_protocols" = "xdefault"; then
-               if test "$uname" = "Darwin" -a $uversion -ge 90; then
-                       CUPS_BROWSE_REMOTE_PROTOCOLS=""
-               else
-                       CUPS_BROWSE_REMOTE_PROTOCOLS="CUPS"
-               fi
-       else
-               CUPS_BROWSE_REMOTE_PROTOCOLS="$default_remote_protocols"
-       fi
-else
-       CUPS_BROWSE_REMOTE_PROTOCOLS=""
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS "$CUPS_BROWSE_REMOTE_PROTOCOLS"
-_ACEOF
-
-
-# Check whether --enable-browse_short was given.
-if test "${enable_browse_short+set}" = set; then :
-  enableval=$enable_browse_short;
-fi
-
-if test "x$enable_browse_short" = xno; then
-       CUPS_BROWSE_SHORT_NAMES="No"
-       cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_BROWSE_SHORT_NAMES 0
-_ACEOF
-
-else
-       CUPS_BROWSE_SHORT_NAMES="Yes"
-       cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_BROWSE_SHORT_NAMES 1
-_ACEOF
-
-fi
-
-
 # Check whether --enable-default_shared was given.
 if test "${enable_default_shared+set}" = set; then :
   enableval=$enable_default_shared;
 if test "x$enable_default_shared" = xno; then
        CUPS_DEFAULT_SHARED="No"
        cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_DEFAULT_SHARED 0
-_ACEOF
-
-else
-       CUPS_DEFAULT_SHARED="Yes"
-       cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_DEFAULT_SHARED 1
-_ACEOF
-
-fi
-
-
-# Check whether --enable-implicit was given.
-if test "${enable_implicit+set}" = set; then :
-  enableval=$enable_implicit;
-fi
-
-if test "x$enable_implicit" = xno; then
-       CUPS_IMPLICIT_CLASSES="No"
-       cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_IMPLICIT_CLASSES 0
-_ACEOF
-
-else
-       CUPS_IMPLICIT_CLASSES="Yes"
-       cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_IMPLICIT_CLASSES 1
-_ACEOF
-
-fi
-
-
-# Check whether --enable-use_network_default was given.
-if test "${enable_use_network_default+set}" = set; then :
-  enableval=$enable_use_network_default;
-fi
-
-if test "x$enable_use_network_default" != xno; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use network default printers" >&5
-$as_echo_n "checking whether to use network default printers... " >&6; }
-       if test "x$enable_use_network_default" = xyes -o $uname != Darwin; then
-               CUPS_USE_NETWORK_DEFAULT="Yes"
-               cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_USE_NETWORK_DEFAULT 1
-_ACEOF
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       else
-               CUPS_USE_NETWORK_DEFAULT="No"
-               cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_USE_NETWORK_DEFAULT 0
+#define CUPS_DEFAULT_DEFAULT_SHARED 0
 _ACEOF
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       fi
 else
-       CUPS_USE_NETWORK_DEFAULT="No"
+       CUPS_DEFAULT_SHARED="Yes"
        cat >>confdefs.h <<_ACEOF
-#define CUPS_DEFAULT_USE_NETWORK_DEFAULT 0
+#define CUPS_DEFAULT_DEFAULT_SHARED 1
 _ACEOF
 
 fi
@@ -10725,7 +9710,7 @@ if test "${with_cups_user+set}" = set; then :
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default print user" >&5
 $as_echo_n "checking for default print user... " >&6; }
-       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
@@ -10768,7 +9753,7 @@ if test "${with_cups_group+set}" = set; then :
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default print group" >&5
 $as_echo_n "checking for default print group... " >&6; }
-       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
@@ -10810,7 +9795,7 @@ fi
 if test "${with_system_groups+set}" = set; then :
   withval=$with_system_groups; CUPS_SYSTEM_GROUPS="$withval"
 else
-  if test x$uname = xDarwin; then
+  if test x$host_os_name = xdarwin; then
                CUPS_SYSTEM_GROUPS="admin"
        else
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default system groups" >&5
 
 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"
                                ;;
                        *)
@@ -10921,8 +9906,8 @@ fi
 
 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"
                                ;;
                        *)
@@ -10946,6 +9931,7 @@ _ACEOF
 
 
 
+
 # Check whether --with-smbconfigfile was given.
 if test "${with_smbconfigfile+set}" = set; then :
   withval=$with_smbconfigfile; default_smbconfigfile="$withval"
@@ -10974,6 +9960,7 @@ _ACEOF
 
 
 
+
 # Check whether --with-max-copies was given.
 if test "${with_max_copies+set}" = set; then :
   withval=$with_max_copies; CUPS_MAX_COPIES="$withval"
@@ -11009,7 +9996,7 @@ if test "${with_snmp_address+set}" = set; then :
                CUPS_SNMP_ADDRESS="Address $withval"
        fi
 else
-  if test "x$uname" = xDarwin; then
+  if test "x$host_os_name" = xdarwin; then
                CUPS_SNMP_ADDRESS=""
        else
                CUPS_SNMP_ADDRESS="Address @LOCAL"
@@ -11044,58 +10031,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-# Check whether --enable-bannertops was given.
-if test "${enable_bannertops+set}" = set; then :
-  enableval=$enable_bannertops;
-fi
-
-# Check whether --enable-texttops was given.
-if test "${enable_texttops+set}" = set; then :
-  enableval=$enable_texttops;
-fi
-
-
-if test "x$enable_bannertops" = xno; then
-       BANNERTOPS=""
-       DEFAULT_BANNERTOPS="#"
-elif test "x$enable_bannertops" = xyes; then
-       BANNERTOPS="bannertops"
-       DEFAULT_BANNERTOPS=""
-elif test $uname = Darwin; then
-       BANNERTOPS=""
-       DEFAULT_BANNERTOPS="#"
-else
-       BANNERTOPS="bannertops"
-       DEFAULT_BANNERTOPS=""
-fi
-
-if test "x$enable_texttops" = xno; then
-       TEXTTOPS=""
-       DEFAULT_TEXTTOPS="#"
-elif test "x$enable_texttops" = xyes; then
-       TEXTTOPS="texttops"
-       DEFAULT_TEXTTOPS=""
-elif test $uname = Darwin; then
-       TEXTTOPS=""
-       DEFAULT_TEXTTOPS="#"
-else
-       TEXTTOPS="texttops"
-       DEFAULT_TEXTTOPS=""
-fi
-
-
-
-
-
-
-if test "x$BANNERTOPS" = x -a "x$TEXTTOPS" = x; then
-       FONTS=""
-else
-       FONTS="fonts"
-fi
-
-
-
 # Check whether --enable-webif was given.
 if test "${enable_webif+set}" = set; then :
   enableval=$enable_webif;
@@ -11111,7 +10046,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
@@ -11129,294 +10064,15 @@ _ACEOF
 
 
 
-
-# Check whether --with-pdftops was given.
-if test "${with_pdftops+set}" = set; then :
-  withval=$with_pdftops;
-fi
-
-
-PDFTOPS=""
-CUPS_PDFTOPS=""
-CUPS_GHOSTSCRIPT=""
-
-case "x$with_pdftops" in
-       x) # Default/auto
-       if test $uname != Darwin; then
-               # Extract the first word of "pdftops", so it can be a program name with args.
-set dummy pdftops; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CUPS_PDFTOPS+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CUPS_PDFTOPS in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CUPS_PDFTOPS="$CUPS_PDFTOPS" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CUPS_PDFTOPS="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CUPS_PDFTOPS=$ac_cv_path_CUPS_PDFTOPS
-if test -n "$CUPS_PDFTOPS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_PDFTOPS" >&5
-$as_echo "$CUPS_PDFTOPS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-               if test "x$CUPS_PDFTOPS" != x; then
-                       $as_echo "#define HAVE_PDFTOPS 1" >>confdefs.h
-
-                       PDFTOPS="pdftops"
-               else
-                       # Extract the first word of "gs", so it can be a program name with args.
-set dummy gs; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CUPS_GHOSTSCRIPT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CUPS_GHOSTSCRIPT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CUPS_GHOSTSCRIPT="$CUPS_GHOSTSCRIPT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CUPS_GHOSTSCRIPT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CUPS_GHOSTSCRIPT=$ac_cv_path_CUPS_GHOSTSCRIPT
-if test -n "$CUPS_GHOSTSCRIPT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_GHOSTSCRIPT" >&5
-$as_echo "$CUPS_GHOSTSCRIPT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-                       if test "x$CUPS_GHOSTSCRIPT" != x; then
-                               $as_echo "#define HAVE_GHOSTSCRIPT 1" >>confdefs.h
-
-                               PDFTOPS="pdftops"
-                       fi
-               fi
-       fi
-       ;;
-
-       xgs)
-       # Extract the first word of "gs", so it can be a program name with args.
-set dummy gs; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CUPS_GHOSTSCRIPT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CUPS_GHOSTSCRIPT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CUPS_GHOSTSCRIPT="$CUPS_GHOSTSCRIPT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CUPS_GHOSTSCRIPT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CUPS_GHOSTSCRIPT=$ac_cv_path_CUPS_GHOSTSCRIPT
-if test -n "$CUPS_GHOSTSCRIPT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_GHOSTSCRIPT" >&5
-$as_echo "$CUPS_GHOSTSCRIPT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-       if test "x$CUPS_GHOSTSCRIPT" != x; then
-               $as_echo "#define HAVE_GHOSTSCRIPT 1" >>confdefs.h
-
-               PDFTOPS="pdftops"
-       else
-               as_fn_error $? "Unable to find gs program!" "$LINENO" 5
-               exit 1
-       fi
-       ;;
-
-       x/*/gs) # Use /path/to/gs without any check:
-       CUPS_GHOSTSCRIPT="$with_pdftops"
-       $as_echo "#define HAVE_GHOSTSCRIPT 1" >>confdefs.h
-
-       PDFTOPS="pdftops"
-       ;;
-
-       xpdftops)
-       # Extract the first word of "pdftops", so it can be a program name with args.
-set dummy pdftops; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CUPS_PDFTOPS+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CUPS_PDFTOPS in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CUPS_PDFTOPS="$CUPS_PDFTOPS" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CUPS_PDFTOPS="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CUPS_PDFTOPS=$ac_cv_path_CUPS_PDFTOPS
-if test -n "$CUPS_PDFTOPS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_PDFTOPS" >&5
-$as_echo "$CUPS_PDFTOPS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-       if test "x$CUPS_PDFTOPS" != x; then
-               $as_echo "#define HAVE_PDFTOPS 1" >>confdefs.h
-
-               PDFTOPS="pdftops"
-       else
-               as_fn_error $? "Unable to find pdftops program!" "$LINENO" 5
-               exit 1
-       fi
-       ;;
-
-       x/*/pdftops) # Use /path/to/pdftops without any check:
-       CUPS_PDFTOPS="$with_pdftops"
-       $as_echo "#define HAVE_PDFTOPS 1" >>confdefs.h
-
-       PDFTOPS="pdftops"
-       ;;
-
-       xnone) # Make no pdftops filter if with_pdftops=none:
-       ;;
-
-       *) # Invalid with_pdftops value:
-       as_fn_error $? "Invalid with_pdftops value!" "$LINENO" 5
-       exit 1
-       ;;
-esac
-
-if test "x$CUPS_PDFTOPS" != x; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pdftops supports -origpagesizes" >&5
-$as_echo_n "checking whether pdftops supports -origpagesizes... " >&6; }
-       if ($CUPS_PDFTOPS -h 2>&1 | grep -q -- -origpagesizes); then
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-               $as_echo "#define HAVE_PDFTOPS_WITH_ORIGPAGESIZES 1" >>confdefs.h
-
-       else
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       fi
-
-       DEFAULT_PDFTOPS=""
-elif test "x$CUPS_GHOSTSCRIPT" != x; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gs supports the ps2write device" >&5
-$as_echo_n "checking whether gs supports the ps2write device... " >&6; }
-       if ($CUPS_GHOSTSCRIPT -h 2>&1 | grep -q ps2write); then
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-               $as_echo "#define HAVE_GHOSTSCRIPT_PS2WRITE 1" >>confdefs.h
-
-       else
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       fi
-
-       DEFAULT_PDFTOPS=""
-else
-       DEFAULT_PDFTOPS="#"
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define CUPS_PDFTOPS "$CUPS_PDFTOPS"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define CUPS_GHOSTSCRIPT "$CUPS_GHOSTSCRIPT"
-_ACEOF
-
-
-
-
-
-
-
 # Check whether --with-java was given.
 if test "${with_java+set}" = set; then :
   withval=$with_java; CUPS_JAVA="$withval"
 else
-  CUPS_JAVA=""
+  CUPS_JAVA="auto"
 fi
 
 
-if test "x$CUPS_JAVA" = x; then
+if test "x$CUPS_JAVA" = xauto; then
        # Extract the first word of "java", so it can be a program name with args.
 set dummy java; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -11435,7 +10091,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -11458,6 +10114,8 @@ fi
 
 
        CUPS_JAVA="$JAVA"
+elif test "x$CUPS_JAVA" = xno; then
+        CUPS_JAVA=""
 fi
 
 cat >>confdefs.h <<_ACEOF
 if test "${with_perl+set}" = set; then :
   withval=$with_perl; CUPS_PERL="$withval"
 else
-  CUPS_PERL=""
+  CUPS_PERL="auto"
 fi
 
 
-if test "x$CUPS_PERL" = x; then
+if test "x$CUPS_PERL" = xauto; then
        # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -11498,7 +10156,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -11521,6 +10179,8 @@ fi
 
 
        CUPS_PERL="$PERL"
+elif test "x$CUPS_PERL" = xno; then
+        CUPS_PERL=""
 fi
 
 cat >>confdefs.h <<_ACEOF
 if test "${with_php+set}" = set; then :
   withval=$with_php; CUPS_PHP="$withval"
 else
-  CUPS_PHP=""
+  CUPS_PHP="auto"
 fi
 
 
-if test "x$CUPS_PHP" = x; then
+if test "x$CUPS_PHP" = xauto; then
        # Extract the first word of "php-cgi", so it can be a program name with args.
 set dummy php-cgi; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -11561,7 +10221,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PHPCGI="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -11602,7 +10262,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PHP="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -11628,6 +10288,8 @@ fi
        else
                CUPS_PHP="$PHPCGI"
        fi
+elif test "x$CUPS_PHP" = xno; then
+        CUPS_PHP=""
 fi
 
 cat >>confdefs.h <<_ACEOF
@@ -11642,66 +10304,16 @@ else
 
 fi
 
-PHPDIR=""
-if test "x$CUPS_PHP" != xno; then
-       # Extract the first word of "php-config", so it can be a program name with args.
-set dummy php-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PHPCONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PHPCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PHPCONFIG="$PHPCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PHPCONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PHPCONFIG=$ac_cv_path_PHPCONFIG
-if test -n "$PHPCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHPCONFIG" >&5
-$as_echo "$PHPCONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-       if test "x$PHPCONFIG" != x; then
-               PHPDIR="scripting/php"
-       fi
-fi
-
-
-
 
 # Check whether --with-python was given.
 if test "${with_python+set}" = set; then :
   withval=$with_python; CUPS_PYTHON="$withval"
 else
-  CUPS_PYTHON=""
+  CUPS_PYTHON="auto"
 fi
 
 
-if test "x$CUPS_PYTHON" = x; then
+if test "x$CUPS_PYTHON" = xauto; then
        # Extract the first word of "python", so it can be a program name with args.
 set dummy python; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -11720,7 +10332,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -11743,6 +10355,8 @@ fi
 
 
        CUPS_PYTHON="$PYTHON"
+elif test "x$CUPS_PYTHON" = xno; then
+        CUPS_PYTHON=""
 fi
 
 cat >>confdefs.h <<_ACEOF
@@ -11756,7 +10370,6 @@ if test "x$CUPS_PYTHON" != x; then
 fi
 
 
-
 INSTALL_LANGUAGES=""
 UNINSTALL_LANGUAGES=""
 LANGFILES=""
@@ -11780,7 +10393,7 @@ fi
 
 
 
-ac_config_files="$ac_config_files Makedefs conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups-config data/testprint desktop/cups.desktop doc/help/ref-cupsd-conf.html doc/help/standard.html doc/index.html man/client.conf.man man/cups-deviced.man man/cups-driverd.man man/cups-lpd.man man/cupsaddsmb.man man/cupsd.conf.man man/cupsd.man man/lpoptions.man scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist templates/header.tmpl packaging/cups.list $LANGFILES"
+ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups-config desktop/cups.desktop doc/index.html man/client.conf.man man/cups-files.conf.man man/cups-lpd.man man/cups-snmp.man man/cupsaddsmb.man man/cupsd.conf.man man/cupsd.man man/lpoptions.man scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cups-lpdAT.service scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket templates/header.tmpl packaging/cups.list $LANGFILES"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -12189,16 +10802,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -12258,28 +10871,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -12300,8 +10901,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+This file was extended by CUPS $as_me 2.2.7, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -12356,17 +10957,18 @@ $config_files
 Configuration headers:
 $config_headers
 
-Report bugs to the package provider."
+Report bugs to <https://github.com/apple/cups/issues>.
+CUPS home page: <https://www.cups.org/>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.68,
+CUPS config.status 2.2.7
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -12455,7 +11057,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
   case $ac_config_target in
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makedefs") CONFIG_FILES="$CONFIG_FILES Makedefs" ;;
+    "conf/cups-files.conf") CONFIG_FILES="$CONFIG_FILES conf/cups-files.conf" ;;
     "conf/cupsd.conf") CONFIG_FILES="$CONFIG_FILES conf/cupsd.conf" ;;
     "conf/mime.convs") CONFIG_FILES="$CONFIG_FILES conf/mime.convs" ;;
     "conf/pam.std") CONFIG_FILES="$CONFIG_FILES conf/pam.std" ;;
     "conf/snmp.conf") CONFIG_FILES="$CONFIG_FILES conf/snmp.conf" ;;
     "cups-config") CONFIG_FILES="$CONFIG_FILES cups-config" ;;
-    "data/testprint") CONFIG_FILES="$CONFIG_FILES data/testprint" ;;
     "desktop/cups.desktop") CONFIG_FILES="$CONFIG_FILES desktop/cups.desktop" ;;
-    "doc/help/ref-cupsd-conf.html") CONFIG_FILES="$CONFIG_FILES doc/help/ref-cupsd-conf.html" ;;
-    "doc/help/standard.html") CONFIG_FILES="$CONFIG_FILES doc/help/standard.html" ;;
     "doc/index.html") CONFIG_FILES="$CONFIG_FILES doc/index.html" ;;
     "man/client.conf.man") CONFIG_FILES="$CONFIG_FILES man/client.conf.man" ;;
-    "man/cups-deviced.man") CONFIG_FILES="$CONFIG_FILES man/cups-deviced.man" ;;
-    "man/cups-driverd.man") CONFIG_FILES="$CONFIG_FILES man/cups-driverd.man" ;;
+    "man/cups-files.conf.man") CONFIG_FILES="$CONFIG_FILES man/cups-files.conf.man" ;;
     "man/cups-lpd.man") CONFIG_FILES="$CONFIG_FILES man/cups-lpd.man" ;;
+    "man/cups-snmp.man") CONFIG_FILES="$CONFIG_FILES man/cups-snmp.man" ;;
     "man/cupsaddsmb.man") CONFIG_FILES="$CONFIG_FILES man/cupsaddsmb.man" ;;
     "man/cupsd.conf.man") CONFIG_FILES="$CONFIG_FILES man/cupsd.conf.man" ;;
     "man/cupsd.man") CONFIG_FILES="$CONFIG_FILES man/cupsd.man" ;;
     "scheduler/cups.sh") CONFIG_FILES="$CONFIG_FILES scheduler/cups.sh" ;;
     "scheduler/cups.xml") CONFIG_FILES="$CONFIG_FILES scheduler/cups.xml" ;;
     "scheduler/org.cups.cups-lpd.plist") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cups-lpd.plist" ;;
+    "scheduler/org.cups.cups-lpdAT.service") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cups-lpdAT.service" ;;
+    "scheduler/org.cups.cupsd.path") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cupsd.path" ;;
+    "scheduler/org.cups.cupsd.service") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cupsd.service" ;;
+    "scheduler/org.cups.cupsd.socket") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cupsd.socket" ;;
     "templates/header.tmpl") CONFIG_FILES="$CONFIG_FILES templates/header.tmpl" ;;
     "packaging/cups.list") CONFIG_FILES="$CONFIG_FILES packaging/cups.list" ;;
     "$LANGFILES") CONFIG_FILES="$CONFIG_FILES $LANGFILES" ;;
@@ -13094,4 +11698,3 @@ fi
 
 
 chmod +x cups-config
-