From: Michael R Sweet Date: Sat, 6 Mar 2021 13:53:32 +0000 (-0500) Subject: Modernize cups-directories autoconf source file. X-Git-Tag: v2.4b1~236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cc87381e55a49fc0814b05f1c62b3a8d7c9c9d5;p=thirdparty%2Fcups.git Modernize cups-directories autoconf source file. Drop lpd, smb, and font path options (no longer needed) Update config.h files. --- diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4 index 1430af3a66..3f36b28ad5 100644 --- a/config-scripts/cups-directories.m4 +++ b/config-scripts/cups-directories.m4 @@ -1,8 +1,9 @@ dnl dnl Directory stuff for CUPS. dnl -dnl Copyright 2007-2017 by Apple Inc. -dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. +dnl Copyright © 2021 by OpenPrinting. +dnl Copyright © 2007-2017 by Apple Inc. +dnl Copyright © 1997-2007 by Easy Software Products, all rights reserved. dnl dnl Licensed under Apache License v2.0. See the file "LICENSE" for more information. dnl @@ -10,295 +11,235 @@ dnl AC_PREFIX_DEFAULT(/) dnl Fix "prefix" variable if it hasn't been specified... -if test "$prefix" = "NONE"; then - prefix="/" -fi +AS_IF([test "$prefix" = "NONE"], [ + prefix="/" +]) dnl Fix "exec_prefix" variable if it hasn't been specified... -if test "$exec_prefix" = "NONE"; then - if test "$prefix" = "/"; then - exec_prefix="/usr" - else - exec_prefix="$prefix" - fi -fi +AS_IF([test "$exec_prefix" = "NONE"], [ + AS_IF([test "$prefix" = "/"], [ + exec_prefix="/usr" + ], [ + exec_prefix="$prefix" + ]) +]) dnl Fix "bindir" variable... -if test "$bindir" = "\${exec_prefix}/bin"; then - bindir="$exec_prefix/bin" -fi +AS_IF([test "$bindir" = "\${exec_prefix}/bin"], [ + bindir="$exec_prefix/bin" +]) -AC_DEFINE_UNQUOTED(CUPS_BINDIR, "$bindir") +AC_DEFINE_UNQUOTED([CUPS_BINDIR], ["$bindir"], [Location of CUPS user programs.]) dnl Fix "sbindir" variable... -if test "$sbindir" = "\${exec_prefix}/sbin"; then - sbindir="$exec_prefix/sbin" -fi +AS_IF([test "$sbindir" = "\${exec_prefix}/sbin"], [ + sbindir="$exec_prefix/sbin" +]) -AC_DEFINE_UNQUOTED(CUPS_SBINDIR, "$sbindir") - -dnl Fix "sharedstatedir" variable if it hasn't been specified... -if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then - sharedstatedir="/usr/com" -fi +AC_DEFINE_UNQUOTED([CUPS_SBINDIR], ["$sbindir"], [Location of CUPS admin programs.]) dnl Fix "datarootdir" variable if it hasn't been specified... -if test "$datarootdir" = "\${prefix}/share"; then - if test "$prefix" = "/"; then - datarootdir="/usr/share" - else - datarootdir="$prefix/share" - fi -fi +AS_IF([test "$datarootdir" = "\${prefix}/share"], [ + AS_IF([test "$prefix" = "/"], [ + datarootdir="/usr/share" + ], [ + datarootdir="$prefix/share" + ]) +]) dnl Fix "datadir" variable if it hasn't been specified... -if test "$datadir" = "\${prefix}/share"; then - if test "$prefix" = "/"; then - datadir="/usr/share" - else - datadir="$prefix/share" - fi -elif test "$datadir" = "\${datarootdir}"; then - datadir="$datarootdir" -fi +AS_IF([test "$datadir" = "\${prefix}/share"], [ + AS_IF([test "$prefix" = "/"], [ + datadir="/usr/share" + ], [ + datadir="$prefix/share" + ]) +], [test "$datadir" = "\${datarootdir}"], [ + datadir="$datarootdir" +]) dnl Fix "includedir" variable if it hasn't been specified... -if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then - includedir="/usr/include" -fi +AS_IF([test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"], [ + includedir="/usr/include" +]) dnl Fix "localstatedir" variable if it hasn't been specified... -if test "$localstatedir" = "\${prefix}/var"; then - if test "$prefix" = "/"; then - if test "$host_os_name" = darwin; then - localstatedir="/private/var" - else - localstatedir="/var" - fi - else - localstatedir="$prefix/var" - fi -fi +AS_IF([test "$localstatedir" = "\${prefix}/var"], [ + AS_IF([test "$prefix" = "/"], [ + AS_IF([test "$host_os_name" = darwin], [ + localstatedir="/private/var" + ], [ + localstatedir="/var" + ]) + ], [ + localstatedir="$prefix/var" + ]) +]) dnl Fix "sysconfdir" variable if it hasn't been specified... -if test "$sysconfdir" = "\${prefix}/etc"; then - if test "$prefix" = "/"; then - if test "$host_os_name" = darwin; then - sysconfdir="/private/etc" - else - sysconfdir="/etc" - fi - else - sysconfdir="$prefix/etc" - fi -fi +AS_IF([test "$sysconfdir" = "\${prefix}/etc"], [ + AS_IF([test "$prefix" = "/"], [ + AS_IF([test "$host_os_name" = darwin], [ + sysconfdir="/private/etc" + ], [ + sysconfdir="/etc" + ]) + ], [ + sysconfdir="$prefix/etc" + ]) +]) dnl Fix "libdir" variable... -if test "$libdir" = "\${exec_prefix}/lib"; then - case "$host_os_name" in - linux*) - if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then - libdir="$exec_prefix/lib64" - fi - ;; - esac -fi - -dnl Setup private include directory... -AC_ARG_WITH(privateinclude, [ --with-privateinclude set path for private include files, default=none],privateinclude="$withval",privateinclude="") -if test "x$privateinclude" != x -a "x$privateinclude" != xnone; then - PRIVATEINCLUDE="$privateinclude/cups" -else - privateinclude="" - PRIVATEINCLUDE="" -fi -AC_SUBST(privateinclude) -AC_SUBST(PRIVATEINCLUDE) - -dnl LPD sharing support... -AC_ARG_WITH(lpdconfig, [ --with-lpdconfig set URI for LPD config file], - LPDCONFIG="$withval", LPDCONFIG="") - -if test "x$LPDCONFIG" = x; then - if test -f /System/Library/LaunchDaemons/org.cups.cups-lpd.plist; then - LPDCONFIG="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist" - elif test "x$XINETD" != x; then - LPDCONFIG="xinetd://$XINETD/cups-lpd" - fi -fi - -if test "x$LPDCONFIG" = xoff; then - AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG, "") -else - AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG, "$LPDCONFIG") -fi - -dnl SMB sharing support... -AC_ARG_WITH(smbconfig, [ --with-smbconfig set URI for Samba config file], - SMBCONFIG="$withval", SMBCONFIG="") - -if test "x$SMBCONFIG" = x; then - if test -f /System/Library/LaunchDaemons/smbd.plist; then - SMBCONFIG="launchd:///System/Library/LaunchDaemons/smbd.plist" - else - for dir in /etc /etc/samba /usr/local/etc; do - if test -f $dir/smb.conf; then - SMBCONFIG="samba://$dir/smb.conf" - break - fi - done - fi -fi - -if test "x$SMBCONFIG" = xoff; then - AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG, "") -else - AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG, "$SMBCONFIG") -fi +AS_IF([test "$libdir" = "\${exec_prefix}/lib"], [ + AS_CASE(["$host_os_name"], [linux*], [ + AS_IF([test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot], [ + libdir="$exec_prefix/lib64" + ]) + ]) +]) dnl Setup default locations... # Cache data... -AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="") - -if test x$cachedir = x; then - if test "x$host_os_name" = xdarwin; then - CUPS_CACHEDIR="$localstatedir/spool/cups/cache" - else - CUPS_CACHEDIR="$localstatedir/cache/cups" - fi -else - CUPS_CACHEDIR="$cachedir" -fi -AC_DEFINE_UNQUOTED(CUPS_CACHEDIR, "$CUPS_CACHEDIR") -AC_SUBST(CUPS_CACHEDIR) +AC_ARG_WITH([cachedir], AS_HELP_STRING([--with-cachedir], [set path for cache files]), [ + cachedir="$withval" +], [ + cachedir="" +]) + +AS_IF([test x$cachedir = x], [ + AS_IF([test "x$host_os_name" = xdarwin], [ + CUPS_CACHEDIR="$localstatedir/spool/cups/cache" + ], [ + CUPS_CACHEDIR="$localstatedir/cache/cups" + ]) +], [ + CUPS_CACHEDIR="$cachedir" +]) +AC_DEFINE_UNQUOTED([CUPS_CACHEDIR], ["$CUPS_CACHEDIR"], [Location of cache files.]) +AC_SUBST([CUPS_CACHEDIR]) # Data files CUPS_DATADIR="$datadir/cups" -AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups") -AC_SUBST(CUPS_DATADIR) +AC_DEFINE_UNQUOTED([CUPS_DATADIR], ["$datadir/cups"], [Location of data files.]) +AC_SUBST([CUPS_DATADIR]) # Icon directory -AC_ARG_WITH(icondir, [ --with-icondir set path for application icons],icondir="$withval",icondir="") +AC_ARG_WITH([icondir], AS_HELP_STRING([--with-icondir], [set path for application icons]), [ + icondir="$withval" +], [ + icondir="" +]) -if test "x$icondir" = x -a -d /usr/share/icons; then - ICONDIR="/usr/share/icons" -else - ICONDIR="$icondir" -fi +AS_IF([test "x$icondir" = x], [ + ICONDIR="/usr/share/icons" +], [ + ICONDIR="$icondir" +]) -AC_SUBST(ICONDIR) +AC_SUBST([ICONDIR]) # Menu directory -AC_ARG_WITH(menudir, [ --with-menudir set path for application menus],menudir="$withval",menudir="") +AC_ARG_WITH([menudir], AS_HELP_STRING([--with-menudir], [set path for application menus]), [ + menudir="$withval" +], [ + menudir="" +]) -if test "x$menudir" = x -a -d /usr/share/applications; then - MENUDIR="/usr/share/applications" -else - MENUDIR="$menudir" -fi +AS_IF([test "x$menudir" = x], [ + MENUDIR="/usr/share/applications" +], [ + MENUDIR="$menudir" +]) -AC_SUBST(MENUDIR) +AC_SUBST([MENUDIR]) # Documentation files -AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="") - -if test x$docdir = x; then - CUPS_DOCROOT="$datadir/doc/cups" - docdir="$datadir/doc/cups" -else - CUPS_DOCROOT="$docdir" -fi - -AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir") -AC_SUBST(CUPS_DOCROOT) - -# Fonts -AC_ARG_WITH(fontpath, [ --with-fontpath set font path for pstoraster],fontpath="$withval",fontpath="") - -if test "x$fontpath" = "x"; then - CUPS_FONTPATH="$datadir/cups/fonts" -else - CUPS_FONTPATH="$fontpath" -fi - -AC_SUBST(CUPS_FONTPATH) -AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH") +AC_ARG_WITH([docdir], AS_HELP_STRING([--with-docdir], [set path for documentation]), [ + docdir="$withval" +], [ + docdir="" +]) + +AS_IF([test x$docdir = x], [ + CUPS_DOCROOT="$datadir/doc/cups" + docdir="$datadir/doc/cups" +], [ + CUPS_DOCROOT="$docdir" +]) + +AC_DEFINE_UNQUOTED([CUPS_DOCROOT], ["$docdir"], [Location of documentation files.]) +AC_SUBST([CUPS_DOCROOT]) # Locale data -if test "$localedir" = "\${datarootdir}/locale"; then - case "$host_os_name" in - linux* | gnu* | *bsd* | darwin*) - CUPS_LOCALEDIR="$datarootdir/locale" - ;; - - *) - # This is the standard System V location... - CUPS_LOCALEDIR="$exec_prefix/lib/locale" - ;; - esac -else - CUPS_LOCALEDIR="$localedir" -fi - -AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR") -AC_SUBST(CUPS_LOCALEDIR) +AS_IF([test "$localedir" = "\${datarootdir}/locale"], [ + AS_CASE(["$host_os_name"], [linux* | gnu* | *bsd* | darwin*], [ + CUPS_LOCALEDIR="$datarootdir/locale" + ], [*], [ + # This is the standard System V location... + CUPS_LOCALEDIR="$exec_prefix/lib/locale" + ]) +], [ + CUPS_LOCALEDIR="$localedir" +]) + +AC_DEFINE_UNQUOTED([CUPS_LOCALEDIR], ["$CUPS_LOCALEDIR"], [Location of localization files.]) +AC_SUBST([CUPS_LOCALEDIR]) # Log files... -AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="") - -if test x$logdir = x; then - CUPS_LOGDIR="$localstatedir/log/cups" - AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups") -else - CUPS_LOGDIR="$logdir" -fi -AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$CUPS_LOGDIR") -AC_SUBST(CUPS_LOGDIR) +AC_ARG_WITH([logdir], AS_HELP_STRING([--with-logdir], [set path for log files]), [ + logdir="$withval" +], [ + logdir="" +]) + +AS_IF([test x$logdir = x], [ + CUPS_LOGDIR="$localstatedir/log/cups" +], [ + CUPS_LOGDIR="$logdir" +]) +AC_DEFINE_UNQUOTED([CUPS_LOGDIR], ["$CUPS_LOGDIR"], [Location of log files.]) +AC_SUBST([CUPS_LOGDIR]) # Longer-term spool data CUPS_REQUESTS="$localstatedir/spool/cups" -AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups") -AC_SUBST(CUPS_REQUESTS) +AC_DEFINE_UNQUOTED([CUPS_REQUESTS], ["$localstatedir/spool/cups"], [Location of spool directory.]) +AC_SUBST([CUPS_REQUESTS]) # Server executables... -case "$host_os_name" in - *-gnu) - # GNUs - INSTALL_SYSV="install-sysv" - CUPS_SERVERBIN="$exec_prefix/lib/cups" - ;; - *bsd* | darwin*) - # *BSD and Darwin (macOS) - INSTALL_SYSV="" - CUPS_SERVERBIN="$exec_prefix/libexec/cups" - ;; - *) - # All others - INSTALL_SYSV="install-sysv" - CUPS_SERVERBIN="$exec_prefix/lib/cups" - ;; -esac - -AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN") -AC_SUBST(CUPS_SERVERBIN) -AC_SUBST(INSTALL_SYSV) +AS_CASE(["$host_os_name"], [*-gnu], [ + # GNUs + INSTALL_SYSV="install-sysv" + CUPS_SERVERBIN="$exec_prefix/lib/cups" +], [*bsd* | darwin*], [ + # *BSD and Darwin (macOS) + INSTALL_SYSV="" + CUPS_SERVERBIN="$exec_prefix/libexec/cups" +], [*], [ + # All others + INSTALL_SYSV="install-sysv" + CUPS_SERVERBIN="$exec_prefix/lib/cups" +]) + +AC_DEFINE_UNQUOTED([CUPS_SERVERBIN], ["$CUPS_SERVERBIN"], [Location of server programs.]) +AC_SUBST([CUPS_SERVERBIN]) +AC_SUBST([INSTALL_SYSV]) # Configuration files CUPS_SERVERROOT="$sysconfdir/cups" -AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups") -AC_SUBST(CUPS_SERVERROOT) +AC_DEFINE_UNQUOTED([CUPS_SERVERROOT], ["$sysconfdir/cups"], [Location of server configuration files.]) +AC_SUBST([CUPS_SERVERROOT]) # Transient run-time state -AC_ARG_WITH(rundir, [ --with-rundir set transient run-time state directory],CUPS_STATEDIR="$withval",[ - case "$host_os_name" in - darwin*) - # Darwin (macOS) - CUPS_STATEDIR="$CUPS_SERVERROOT" - ;; - *) - # All others - CUPS_STATEDIR="$localstatedir/run/cups" - ;; - esac]) -AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR") -AC_SUBST(CUPS_STATEDIR) +AC_ARG_WITH([rundir], AS_HELP_STRING([--with-rundir], [set transient run-time state directory]), [ + CUPS_STATEDIR="$withval" +], [ + AS_CASE(["$host_os_name"], [darwin*], [ + # Darwin (macOS) + CUPS_STATEDIR="$CUPS_SERVERROOT" + ], [*], [ + # All others + CUPS_STATEDIR="$localstatedir/run/cups" + ]) +]) +AC_DEFINE_UNQUOTED([CUPS_STATEDIR], ["$CUPS_STATEDIR"], [Location of transient state files.]) +AC_SUBST([CUPS_STATEDIR]) diff --git a/config.h.in b/config.h.in index b9391d7fdd..bdf687c501 100644 --- a/config.h.in +++ b/config.h.in @@ -1,9 +1,9 @@ /* * Configuration file for CUPS. * - * Copyright 2020-2021 by OpenPrinting - * Copyright 2007-2019 by Apple Inc. - * Copyright 1997-2007 by Easy Software Products. + * Copyright © 2020-2021 by OpenPrinting + * Copyright © 2007-2019 by Apple Inc. + * Copyright © 1997-2007 by Easy Software Products. * * Licensed under Apache License v2.0. See the file "LICENSE" for more * information. @@ -79,14 +79,6 @@ #define CUPS_DEFAULT_PRINTCAP "/etc/printcap" -/* - * Default Samba and LPD config files... - */ - -#define CUPS_DEFAULT_SMB_CONFIG_FILE "" -#define CUPS_DEFAULT_LPD_CONFIG_FILE "" - - /* * Default ErrorPolicy value... */ @@ -133,7 +125,6 @@ #define CUPS_CACHEDIR "/var/cache/cups" #define CUPS_DATADIR "/usr/share/cups" #define CUPS_DOCROOT "/usr/share/doc/cups" -#define CUPS_FONTPATH "/usr/share/cups/fonts" #define CUPS_LOCALEDIR "/usr/share/locale" #define CUPS_LOGDIR "/var/logs/cups" #define CUPS_REQUESTS "/var/spool/cups" diff --git a/configure b/configure index 839e4028dc..927615f01b 100755 --- a/configure +++ b/configure @@ -748,14 +748,11 @@ CUPS_SERVERBIN CUPS_REQUESTS CUPS_LOGDIR CUPS_LOCALEDIR -CUPS_FONTPATH CUPS_DOCROOT MENUDIR ICONDIR CUPS_DATADIR CUPS_CACHEDIR -PRIVATEINCLUDE -privateinclude LIBHEADERSPRIV LIBHEADERS LIBCUPSOBJS @@ -872,14 +869,10 @@ with_dbusdir with_adminkey with_operkey with_components -with_privateinclude -with_lpdconfig -with_smbconfig with_cachedir with_icondir with_menudir with_docdir -with_fontpath with_logdir with_rundir enable_shared @@ -1635,14 +1628,10 @@ Optional Packages: everything, "core" builds libcups and ipptool, "libcups" builds just libcups, "libcupslite" builds just libcups without driver support - --with-privateinclude set path for private include files, default=none - --with-lpdconfig set URI for LPD config file - --with-smbconfig set URI for Samba config file --with-cachedir set path for cache files --with-icondir set path for application icons --with-menudir set path for application menus --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 @@ -7137,164 +7126,161 @@ esac -if test "$prefix" = "NONE"; then - prefix="/" +if test "$prefix" = "NONE" +then : + + prefix="/" + fi -if test "$exec_prefix" = "NONE"; then - if test "$prefix" = "/"; then - exec_prefix="/usr" - else - exec_prefix="$prefix" - fi +if test "$exec_prefix" = "NONE" +then : + + if test "$prefix" = "/" +then : + + exec_prefix="/usr" + +else $as_nop + + exec_prefix="$prefix" + fi -if test "$bindir" = "\${exec_prefix}/bin"; then - bindir="$exec_prefix/bin" fi +if test "$bindir" = "\${exec_prefix}/bin" +then : + + bindir="$exec_prefix/bin" + +fi + + printf "%s\n" "#define CUPS_BINDIR \"$bindir\"" >>confdefs.h -if test "$sbindir" = "\${exec_prefix}/sbin"; then - sbindir="$exec_prefix/sbin" +if test "$sbindir" = "\${exec_prefix}/sbin" +then : + + sbindir="$exec_prefix/sbin" + fi + printf "%s\n" "#define CUPS_SBINDIR \"$sbindir\"" >>confdefs.h -if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then - sharedstatedir="/usr/com" -fi +if test "$datarootdir" = "\${prefix}/share" +then : -if test "$datarootdir" = "\${prefix}/share"; then - if test "$prefix" = "/"; then - datarootdir="/usr/share" - else - datarootdir="$prefix/share" - fi -fi + if test "$prefix" = "/" +then : -if test "$datadir" = "\${prefix}/share"; then - if test "$prefix" = "/"; then - datadir="/usr/share" - else - datadir="$prefix/share" - fi -elif test "$datadir" = "\${datarootdir}"; then - datadir="$datarootdir" -fi + datarootdir="/usr/share" -if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then - includedir="/usr/include" -fi +else $as_nop -if test "$localstatedir" = "\${prefix}/var"; then - if test "$prefix" = "/"; then - if test "$host_os_name" = darwin; then - localstatedir="/private/var" - else - localstatedir="/var" - fi - else - localstatedir="$prefix/var" - fi -fi + datarootdir="$prefix/share" -if test "$sysconfdir" = "\${prefix}/etc"; then - if test "$prefix" = "/"; then - if test "$host_os_name" = darwin; then - sysconfdir="/private/etc" - else - sysconfdir="/etc" - fi - else - sysconfdir="$prefix/etc" - fi fi -if test "$libdir" = "\${exec_prefix}/lib"; then - case "$host_os_name" in - linux*) - if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then - libdir="$exec_prefix/lib64" - fi - ;; - esac fi +if test "$datadir" = "\${prefix}/share" +then : -# Check whether --with-privateinclude was given. -if test ${with_privateinclude+y} + if test "$prefix" = "/" then : - withval=$with_privateinclude; privateinclude="$withval" + + datadir="/usr/share" + else $as_nop - privateinclude="" + + datadir="$prefix/share" + fi -if test "x$privateinclude" != x -a "x$privateinclude" != xnone; then - PRIVATEINCLUDE="$privateinclude/cups" -else - privateinclude="" - PRIVATEINCLUDE="" +elif test "$datadir" = "\${datarootdir}" +then : + + datadir="$datarootdir" + fi +if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/" +then : + + includedir="/usr/include" + +fi +if test "$localstatedir" = "\${prefix}/var" +then : + if test "$prefix" = "/" +then : -# Check whether --with-lpdconfig was given. -if test ${with_lpdconfig+y} + if test "$host_os_name" = darwin then : - withval=$with_lpdconfig; LPDCONFIG="$withval" + + localstatedir="/private/var" + else $as_nop - LPDCONFIG="" -fi + localstatedir="/var" -if test "x$LPDCONFIG" = x; then - if test -f /System/Library/LaunchDaemons/org.cups.cups-lpd.plist; then - LPDCONFIG="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist" - elif test "x$XINETD" != x; then - LPDCONFIG="xinetd://$XINETD/cups-lpd" - fi fi -if test "x$LPDCONFIG" = xoff; then - printf "%s\n" "#define CUPS_DEFAULT_LPD_CONFIG \"\"" >>confdefs.h +else $as_nop -else - printf "%s\n" "#define CUPS_DEFAULT_LPD_CONFIG \"$LPDCONFIG\"" >>confdefs.h + localstatedir="$prefix/var" + +fi fi +if test "$sysconfdir" = "\${prefix}/etc" +then : -# Check whether --with-smbconfig was given. -if test ${with_smbconfig+y} + if test "$prefix" = "/" then : - withval=$with_smbconfig; SMBCONFIG="$withval" + + if test "$host_os_name" = darwin +then : + + sysconfdir="/private/etc" + else $as_nop - SMBCONFIG="" + + sysconfdir="/etc" + fi +else $as_nop + + sysconfdir="$prefix/etc" -if test "x$SMBCONFIG" = x; then - if test -f /System/Library/LaunchDaemons/smbd.plist; then - SMBCONFIG="launchd:///System/Library/LaunchDaemons/smbd.plist" - else - for dir in /etc /etc/samba /usr/local/etc; do - if test -f $dir/smb.conf; then - SMBCONFIG="samba://$dir/smb.conf" - break - fi - done - fi fi -if test "x$SMBCONFIG" = xoff; then - printf "%s\n" "#define CUPS_DEFAULT_SMB_CONFIG \"\"" >>confdefs.h +fi -else - printf "%s\n" "#define CUPS_DEFAULT_SMB_CONFIG \"$SMBCONFIG\"" >>confdefs.h +if test "$libdir" = "\${exec_prefix}/lib" +then : + + case "$host_os_name" in #( + linux*) : + + if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot +then : + + libdir="$exec_prefix/lib64" + +fi + ;; #( + *) : + ;; +esac fi @@ -7303,27 +7289,43 @@ fi # Check whether --with-cachedir was given. if test ${with_cachedir+y} then : - withval=$with_cachedir; cachedir="$withval" + withval=$with_cachedir; + cachedir="$withval" + else $as_nop - cachedir="" + + cachedir="" + fi -if test x$cachedir = x; then - if test "x$host_os_name" = xdarwin; then - CUPS_CACHEDIR="$localstatedir/spool/cups/cache" - else - CUPS_CACHEDIR="$localstatedir/cache/cups" - fi -else - CUPS_CACHEDIR="$cachedir" +if test x$cachedir = x +then : + + if test "x$host_os_name" = xdarwin +then : + + CUPS_CACHEDIR="$localstatedir/spool/cups/cache" + +else $as_nop + + CUPS_CACHEDIR="$localstatedir/cache/cups" + fi + +else $as_nop + + CUPS_CACHEDIR="$cachedir" + +fi + printf "%s\n" "#define CUPS_CACHEDIR \"$CUPS_CACHEDIR\"" >>confdefs.h # Data files CUPS_DATADIR="$datadir/cups" + printf "%s\n" "#define CUPS_DATADIR \"$datadir/cups\"" >>confdefs.h @@ -7333,16 +7335,25 @@ printf "%s\n" "#define CUPS_DATADIR \"$datadir/cups\"" >>confdefs.h # Check whether --with-icondir was given. if test ${with_icondir+y} then : - withval=$with_icondir; icondir="$withval" + withval=$with_icondir; + icondir="$withval" + else $as_nop - icondir="" + + icondir="" + fi -if test "x$icondir" = x -a -d /usr/share/icons; then - ICONDIR="/usr/share/icons" -else - ICONDIR="$icondir" +if test "x$icondir" = x +then : + + ICONDIR="/usr/share/icons" + +else $as_nop + + ICONDIR="$icondir" + fi @@ -7352,16 +7363,25 @@ fi # Check whether --with-menudir was given. if test ${with_menudir+y} then : - withval=$with_menudir; menudir="$withval" + withval=$with_menudir; + menudir="$withval" + else $as_nop - menudir="" + + menudir="" + fi -if test "x$menudir" = x -a -d /usr/share/applications; then - MENUDIR="/usr/share/applications" -else - MENUDIR="$menudir" +if test "x$menudir" = x +then : + + MENUDIR="/usr/share/applications" + +else $as_nop + + MENUDIR="$menudir" + fi @@ -7371,60 +7391,58 @@ fi # Check whether --with-docdir was given. if test ${with_docdir+y} then : - withval=$with_docdir; docdir="$withval" + withval=$with_docdir; + docdir="$withval" + else $as_nop - docdir="" -fi + docdir="" -if test x$docdir = x; then - CUPS_DOCROOT="$datadir/doc/cups" - docdir="$datadir/doc/cups" -else - CUPS_DOCROOT="$docdir" fi -printf "%s\n" "#define CUPS_DOCROOT \"$docdir\"" >>confdefs.h - +if test x$docdir = x +then : -# Fonts + CUPS_DOCROOT="$datadir/doc/cups" + docdir="$datadir/doc/cups" -# Check whether --with-fontpath was given. -if test ${with_fontpath+y} -then : - withval=$with_fontpath; fontpath="$withval" else $as_nop - fontpath="" -fi + CUPS_DOCROOT="$docdir" -if test "x$fontpath" = "x"; then - CUPS_FONTPATH="$datadir/cups/fonts" -else - CUPS_FONTPATH="$fontpath" fi -printf "%s\n" "#define CUPS_FONTPATH \"$CUPS_FONTPATH\"" >>confdefs.h +printf "%s\n" "#define CUPS_DOCROOT \"$docdir\"" >>confdefs.h + # Locale data -if test "$localedir" = "\${datarootdir}/locale"; then - case "$host_os_name" in - linux* | gnu* | *bsd* | darwin*) - CUPS_LOCALEDIR="$datarootdir/locale" - ;; +if test "$localedir" = "\${datarootdir}/locale" +then : + + case "$host_os_name" in #( + linux* | gnu* | *bsd* | darwin*) : + + CUPS_LOCALEDIR="$datarootdir/locale" + ;; #( + *) : + + # This is the standard System V location... + CUPS_LOCALEDIR="$exec_prefix/lib/locale" + ;; #( + *) : + ;; +esac + +else $as_nop + + CUPS_LOCALEDIR="$localedir" - *) - # This is the standard System V location... - CUPS_LOCALEDIR="$exec_prefix/lib/locale" - ;; - esac -else - CUPS_LOCALEDIR="$localedir" fi + printf "%s\n" "#define CUPS_LOCALEDIR \"$CUPS_LOCALEDIR\"" >>confdefs.h @@ -7434,48 +7452,63 @@ printf "%s\n" "#define CUPS_LOCALEDIR \"$CUPS_LOCALEDIR\"" >>confdefs.h # Check whether --with-logdir was given. if test ${with_logdir+y} then : - withval=$with_logdir; logdir="$withval" + withval=$with_logdir; + logdir="$withval" + else $as_nop - logdir="" + + logdir="" + fi -if test x$logdir = x; then - CUPS_LOGDIR="$localstatedir/log/cups" - printf "%s\n" "#define CUPS_LOGDIR \"$localstatedir/log/cups\"" >>confdefs.h +if test x$logdir = x +then : + + CUPS_LOGDIR="$localstatedir/log/cups" + +else $as_nop + + CUPS_LOGDIR="$logdir" -else - CUPS_LOGDIR="$logdir" fi + printf "%s\n" "#define CUPS_LOGDIR \"$CUPS_LOGDIR\"" >>confdefs.h # Longer-term spool data CUPS_REQUESTS="$localstatedir/spool/cups" + printf "%s\n" "#define CUPS_REQUESTS \"$localstatedir/spool/cups\"" >>confdefs.h # Server executables... -case "$host_os_name" in - *-gnu) - # GNUs - INSTALL_SYSV="install-sysv" - CUPS_SERVERBIN="$exec_prefix/lib/cups" - ;; - *bsd* | darwin*) - # *BSD and Darwin (macOS) - INSTALL_SYSV="" - CUPS_SERVERBIN="$exec_prefix/libexec/cups" - ;; - *) - # All others - INSTALL_SYSV="install-sysv" - CUPS_SERVERBIN="$exec_prefix/lib/cups" - ;; +case "$host_os_name" in #( + *-gnu) : + + # GNUs + INSTALL_SYSV="install-sysv" + CUPS_SERVERBIN="$exec_prefix/lib/cups" + ;; #( + *bsd* | darwin*) : + + # *BSD and Darwin (macOS) + INSTALL_SYSV="" + CUPS_SERVERBIN="$exec_prefix/libexec/cups" + ;; #( + *) : + + # All others + INSTALL_SYSV="install-sysv" + CUPS_SERVERBIN="$exec_prefix/lib/cups" + ;; #( + *) : + ;; esac + printf "%s\n" "#define CUPS_SERVERBIN \"$CUPS_SERVERBIN\"" >>confdefs.h @@ -7483,6 +7516,7 @@ printf "%s\n" "#define CUPS_SERVERBIN \"$CUPS_SERVERBIN\"" >>confdefs.h # Configuration files CUPS_SERVERROOT="$sysconfdir/cups" + printf "%s\n" "#define CUPS_SERVERROOT \"$sysconfdir/cups\"" >>confdefs.h @@ -7492,21 +7526,29 @@ printf "%s\n" "#define CUPS_SERVERROOT \"$sysconfdir/cups\"" >>confdefs.h # Check whether --with-rundir was given. if test ${with_rundir+y} then : - withval=$with_rundir; CUPS_STATEDIR="$withval" + withval=$with_rundir; + CUPS_STATEDIR="$withval" + else $as_nop - case "$host_os_name" in - darwin*) - # Darwin (macOS) - CUPS_STATEDIR="$CUPS_SERVERROOT" - ;; - *) - # All others - CUPS_STATEDIR="$localstatedir/run/cups" - ;; - esac + case "$host_os_name" in #( + darwin*) : + + # Darwin (macOS) + CUPS_STATEDIR="$CUPS_SERVERROOT" + ;; #( + *) : + + # All others + CUPS_STATEDIR="$localstatedir/run/cups" + ;; #( + *) : + ;; +esac + fi + printf "%s\n" "#define CUPS_STATEDIR \"$CUPS_STATEDIR\"" >>confdefs.h diff --git a/vcnet/config.h b/vcnet/config.h index 6705bf18ef..5577b0a58d 100644 --- a/vcnet/config.h +++ b/vcnet/config.h @@ -162,14 +162,6 @@ typedef unsigned long useconds_t; #define CUPS_DEFAULT_PRINTCAP "" -/* - * Default Samba and LPD config files... - */ - -#define CUPS_DEFAULT_SMB_CONFIG_FILE "" -#define CUPS_DEFAULT_LPD_CONFIG_FILE "" - - /* * Default ErrorPolicy value... */ @@ -216,7 +208,6 @@ typedef unsigned long useconds_t; #define CUPS_CACHEDIR "C:/CUPS/cache" #define CUPS_DATADIR "C:/CUPS/share" #define CUPS_DOCROOT "C:/CUPS/share/doc" -#define CUPS_FONTPATH "C:/CUPS/share/fonts" #define CUPS_LOCALEDIR "C:/CUPS/locale" #define CUPS_LOGDIR "C:/CUPS/logs" #define CUPS_REQUESTS "C:/CUPS/spool" diff --git a/xcode/config.h b/xcode/config.h index 668fd43648..150ac5a814 100644 --- a/xcode/config.h +++ b/xcode/config.h @@ -81,14 +81,6 @@ #define CUPS_DEFAULT_PRINTCAP "/Library/Preferences/org.cups.printers.plist" -/* - * Default Samba and LPD config files... - */ - -#define CUPS_DEFAULT_SMB_CONFIG_FILE "" -#define CUPS_DEFAULT_LPD_CONFIG_FILE "launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist" - - /* * Default ErrorPolicy value... */ @@ -135,7 +127,6 @@ #define CUPS_CACHEDIR "/private/var/spool/cups/cache" #define CUPS_DATADIR "/usr/share/cups" #define CUPS_DOCROOT "/usr/share/doc/cups" -#define CUPS_FONTPATH "/usr/share/cups/fonts" #define CUPS_LOCALEDIR "/usr/share/locale" #define CUPS_LOGDIR "/private/var/log/cups" #define CUPS_REQUESTS "/private/var/spool/cups"