apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.95k stars 464 forks source link

Complete quoting for parameters in build scripts. #4685

Closed michaelrsweet closed 9 years ago

michaelrsweet commented 9 years ago

Version: -feature CUPS.org User: elfring

I suggest to be more explicit where macro expansion will not be required in the current build scripts. https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Autoconf-Language.html https://www.gnu.org/savannah-checkouts/gnu/m4/manual/m4-1.4.17/html_node/Quoting-Arguments.html

michaelrsweet commented 9 years ago

CUPS.org User: elfring

I hope that the attached update suggestion will also help to clarify my previous request (STR #4666).

michaelrsweet commented 9 years ago

CUPS.org User: mike

Deferring to later release...

michaelrsweet commented 9 years ago

CUPS.org User: mike

This level of quoting is completely unnecessary so we will not be making these changes at this time.

michaelrsweet commented 9 years ago

"0001-Completion-of-quoting-for-parameters-in-build-scripts.patch":

From 86419b5a62bd2df57df9942a853a03a985000311 Mon Sep 17 00:00:00 2001 From: Markus Elfring elfring@users.sourceforge.net Date: Wed, 5 Aug 2015 13:48:21 +0200 Subject: [PATCH] Completion of quoting for parameters in build scripts (STR

4685)

Some build scripts can be made a bit safer by the usage of strict quoting for parameters. https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Autoconf-Language.html

Signed-off-by: Markus Elfring elfring@users.sourceforge.net

config-scripts/cups-common.m4 | 357 ++++++++++++++++++------------------- config-scripts/cups-compiler.m4 | 76 ++++---- config-scripts/cups-defaults.m4 | 242 ++++++++++++------------- config-scripts/cups-directories.m4 | 90 +++++----- config-scripts/cups-dnssd.m4 | 46 ++--- config-scripts/cups-gssapi.m4 | 76 ++++---- config-scripts/cups-largefile.m4 | 10 +- config-scripts/cups-libtool.m4 | 4 +- config-scripts/cups-manpages.m4 | 14 +- config-scripts/cups-network.m4 | 40 ++--- config-scripts/cups-pam.m4 | 28 +-- config-scripts/cups-poll.m4 | 6 +- config-scripts/cups-scripting.m4 | 50 +++--- config-scripts/cups-sharedlibs.m4 | 36 ++-- config-scripts/cups-ssl.m4 | 78 ++++---- config-scripts/cups-startup.m4 | 64 +++---- config-scripts/cups-threads.m4 | 6 +- configure.ac | 54 +++--- 18 files changed, 634 insertions(+), 643 deletions(-)

diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index bac0957..de5e866 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -14,7 +14,7 @@ dnl file is missing or damaged, see the license at "http://www.cups.org/". dnl

dnl Set the name of the config header file... -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADER([config.h])

dnl Version number information... CUPS_VERSION="AC_PACKAGE_VERSION" @@ -35,14 +35,14 @@ esac

CUPS_BUILD="cups-$CUPS_VERSION"

-AC_ARG_WITH(cups_build, [ --with-cups-build set "cups-config --build" string ],

-AC_SUBST(CUPS_VERSION) -AC_SUBST(CUPS_REVISION) -AC_SUBST(CUPS_BUILD) -AC_DEFINE_UNQUOTED(CUPS_SVERSION, "AC_PACKAGE_NAME v$CUPS_VERSION$CUPS_REVISION") -AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "AC_PACKAGE_NAME/$CUPS_VERSION$CUPS_REVISION") +AC_SUBST([CUPS_VERSION]) +AC_SUBST([CUPS_REVISION]) +AC_SUBST([CUPS_BUILD]) +AC_DEFINE_UNQUOTED([CUPS_SVERSION],["AC_PACKAGE_NAME v$CUPS_VERSION$CUPS_REVISION"]) +AC_DEFINE_UNQUOTED([CUPS_MINIMAL],["AC_PACKAGE_NAME/$CUPS_VERSION$CUPS_REVISION"])

dnl Default compiler flags... CFLAGS="${CFLAGS:=}" @@ -52,31 +52,31 @@ LDFLAGS="${LDFLAGS:=}"

dnl Checks for programs... AC_PROG_AWK -AC_PROG_CC(clang cc gcc) +AC_PROG_CC([clang cc gcc]) AC_PROG_CPP -AC_PROG_CXX(clang++ c++ g++) +AC_PROG_CXX([clang++ c++ g++]) AC_PROG_RANLIB -AC_PATH_PROG(AR,ar) -AC_PATH_PROG(CHMOD,chmod) -AC_PATH_PROG(GZIP,gzip) -AC_PATH_PROG(LD,ld) -AC_PATH_PROG(LN,ln) -AC_PATH_PROG(MV,mv) -AC_PATH_PROG(RM,rm) -AC_PATH_PROG(RMDIR,rmdir) -AC_PATH_PROG(SED,sed) -AC_PATH_PROG(XDGOPEN,xdg-open) +AC_PATH_PROG([AR],[ar]) +AC_PATH_PROG([CHMOD],[chmod]) +AC_PATH_PROG([GZIP],[gzip]) +AC_PATH_PROG([LD],[ld]) +AC_PATH_PROG([LN],[ln]) +AC_PATH_PROG([MV],[mv]) +AC_PATH_PROG([RM],[rm]) +AC_PATH_PROG([RMDIR],[rmdir]) +AC_PATH_PROG([SED],[sed]) +AC_PATH_PROG([XDGOPEN],[xdg-open]) if test "x$XDGOPEN" = x; then CUPS_HTMLVIEW="htmlview" else CUPS_HTMLVIEW="$XDGOPEN" fi -AC_SUBST(CUPS_HTMLVIEW) +AC_SUBST([CUPS_HTMLVIEW])

-AC_MSG_CHECKING(for install-sh script) +AC_MSG_CHECKING([for install-sh script]) INSTALL="pwd/install-sh" -AC_SUBST(INSTALL) -AC_MSG_RESULT(using $INSTALL) +AC_SUBST([INSTALL]) +AC_MSG_RESULT([using $INSTALL])

if test "x$AR" = x; then AC_MSG_ERROR([Unable to find required library archive command.]) @@ -87,114 +87,109 @@ fi

dnl Static library option... INSTALLSTATIC="" -AC_ARG_ENABLE(static, [ --enable-static install static libraries]) +AC_ARG_ENABLE([static],[ --enable-static install static libraries])

if test x$enable_static = xyes; then echo Installing static libraries... INSTALLSTATIC="installstatic" fi

-AC_SUBST(INSTALLSTATIC) +AC_SUBST([INSTALLSTATIC])

dnl Check for pkg-config, which is used for some other tests later on... -AC_PATH_TOOL(PKGCONFIG, pkg-config) +AC_PATH_TOOL([PKGCONFIG],[pkg-config])

dnl Check for libraries... -AC_SEARCH_LIBS(abs, m, AC_DEFINE(HAVE_ABS)) -AC_SEARCH_LIBS(crypt, crypt) -AC_SEARCH_LIBS(fmod, m) -AC_SEARCH_LIBS(getspent, sec gen) +AC_SEARCH_LIBS([abs],[m],[AC_DEFINE([HAVE_ABS],[1],[abs() function is usable.])]) +AC_SEARCH_LIBS([crypt],[crypt]) +AC_SEARCH_LIBS([fmod],[m]) +AC_SEARCH_LIBS([getspent],[sec gen])

LIBMALLOC="" -AC_ARG_ENABLE(mallinfo, [ --enable-mallinfo build with malloc debug logging]) +AC_ARG_ENABLE([mallinfo],[ --enable-mallinfo build with malloc debug logging])

if test x$enable_mallinfo = xyes; then SAVELIBS="$LIBS" LIBS=""

-AC_SUBST(LIBMALLOC) +AC_SUBST([LIBMALLOC])

dnl Check for libpaper support... -AC_ARG_ENABLE(libpaper, [ --enable-libpaper build with libpaper support]) +AC_ARG_ENABLE([libpaper],[ --enable-libpaper build with libpaper support])

if test x$enable_libpaper = xyes; then

-dnl Check for random number functions...

-AC_CHECK_FUNCS(random lrand48 arc4random)

-dnl Check for geteuid function.

-AC_CHECK_FUNCS(geteuid)

-dnl Check for setpgid function.

-AC_CHECK_FUNCS(setpgid)

-dnl Check for vsyslog function. -AC_CHECK_FUNCS(vsyslog) +AC_CHECK_FUNCS([random \ +lrand48 \ +arc4random \ +geteuid \ +setpgid \ +vsyslog])

dnl Checks for signal functions. case "$uname" in @@ -203,92 +198,89 @@ case "$uname" in ;; *)

Use sigset on other platforms, if available

-AC_CHECK_FUNCS(sigaction)

-dnl Checks for wait functions.

-AC_CHECK_FUNCS(waitpid wait3)

-dnl Check for posix_spawn -AC_CHECK_FUNCS(posix_spawn) +AC_CHECK_FUNCS([sigaction \ +waitpid \ +wait3 \ +posix_spawn])

dnl See if the tm structure has the tm_gmtoff member... -AC_MSG_CHECKING(for tm_gmtoff member in tm structure) +AC_MSG_CHECKING([for tm_gmtoff member in tm structure]) AC_TRY_COMPILE([#include ],[struct tm t; int o = t.tm_gmtoff;],

-AC_SUBST(ARFLAGS) +AC_SUBST([ARFLAGS])

dnl Prep libraries specifically for cupsd and backends... BACKLIBS="" SERVERLIBS="" -AC_SUBST(BACKLIBS) -AC_SUBST(SERVERLIBS) +AC_SUBST([BACKLIBS]) +AC_SUBST([SERVERLIBS])

dnl See if we have POSIX ACL support... SAVELIBS="$LIBS" LIBS="" -AC_ARG_ENABLE(acl, [ --enable-acl build with POSIX ACL support]) +AC_ARG_ENABLE([acl],[ --enable-acl build with POSIX ACL support]) if test "x$enable_acl" != xno; then

-AC_SUBST(DBUSDIR) -AC_SUBST(DBUS_NOTIFIER) -AC_SUBST(DBUS_NOTIFIERLIBS) +AC_SUBST([DBUSDIR]) +AC_SUBST([DBUS_NOTIFIER]) +AC_SUBST([DBUS_NOTIFIERLIBS])

dnl Extra platform-specific libraries... CUPS_DEFAULT_PRINTOPERATOR_AUTH="@SYSTEM" @@ -368,36 +360,35 @@ case $uname in LIBS="-framework SystemConfiguration -framework CoreFoundation -framework Security $LIBS"

    dnl Check for framework headers...

-AC_SUBST(CUPS_DEFAULT_PRINTOPERATOR_AUTH) -AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTOPERATOR_AUTH, "$CUPS_DEFAULT_PRINTOPERATOR_AUTH") -AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_AUTHKEY, "$CUPS_DEFAULT_SYSTEM_AUTHKEY") -AC_SUBST(CUPS_SYSTEM_AUTHKEY) -AC_SUBST(INSTALLXPC) +AC_SUBST([CUPS_DEFAULT_PRINTOPERATOR_AUTH]) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_PRINTOPERATOR_AUTH],["$CUPS_DEFAULT_PRINTOPERATOR_AUTH"]) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_SYSTEM_AUTHKEY],["$CUPS_DEFAULT_SYSTEM_AUTHKEY"]) +AC_SUBST([CUPS_SYSTEM_AUTHKEY]) +AC_SUBST([INSTALLXPC])

dnl Check for build components COMPONENTS="all"

-AC_ARG_WITH(components, [ --with-components set components to build: +AC_ARG_WITH([components],[ --with-components set components to build:

-AC_SUBST(BUILDDIRS) +AC_SUBST([BUILDDIRS])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4 index 3c2076a..a1e9d43 100644 --- a/config-scripts/cups-compiler.m4 +++ b/config-scripts/cups-compiler.m4 @@ -17,14 +17,14 @@ dnl Clear the debugging and non-shared library options unless the user asks dnl for them... INSTALL_STRIP="" OPTIM="" -AC_SUBST(INSTALL_STRIP) -AC_SUBST(OPTIM) +AC_SUBST([INSTALL_STRIP]) +AC_SUBST([OPTIM])

-AC_ARG_WITH(optim, [ --with-optim set optimization flags ]) -AC_ARG_ENABLE(debug, [ --enable-debug build with debugging symbols]) -AC_ARG_ENABLE(debug_guards, [ --enable-debug-guards build with memory allocation guards]) -AC_ARG_ENABLE(debug_printfs, [ --enable-debug-printfs build with CUPS_DEBUG_LOG support]) -AC_ARG_ENABLE(unit_tests, [ --enable-unit-tests build and run unit tests]) +AC_ARG_WITH([optim],[ --with-optim set optimization flags]) +AC_ARG_ENABLE([debug],[ --enable-debug build with debugging symbols]) +AC_ARG_ENABLE([debug_guards],[ --enable-debug-guards build with memory allocation guards]) +AC_ARG_ENABLE([debug_printfs],[ --enable-debug-printfs build with CUPS_DEBUG_LOG support]) +AC_ARG_ENABLE([unit_tests],[ --enable-unit-tests build and run unit tests])

dnl For debugging, keep symbols, otherwise strip them... if test x$enable_debug = xyes; then @@ -52,11 +52,11 @@ if test x$enable_unit_tests = xyes; then else UNITTESTS="" fi -AC_SUBST(UNITTESTS) +AC_SUBST([UNITTESTS])

dnl Setup general architecture flags... -AC_ARG_WITH(archflags, [ --with-archflags set default architecture flags ]) -AC_ARG_WITH(ldarchflags, [ --with-ldarchflags set program architecture flags ]) +AC_ARG_WITH([archflags],[ --with-archflags set default architecture flags]) +AC_ARG_WITH([ldarchflags],[ --with-ldarchflags set program architecture flags])

if test -z "$with_archflags"; then ARCHFLAGS="" @@ -75,21 +75,21 @@ else LDARCHFLAGS="$with_ldarchflags" fi

-AC_SUBST(ARCHFLAGS) -AC_SUBST(LDARCHFLAGS) +AC_SUBST([ARCHFLAGS]) +AC_SUBST([LDARCHFLAGS])

dnl Read-only data/program support on Linux... -AC_ARG_ENABLE(relro, [ --enable-relro build with the GCC relro option]) +AC_ARG_ENABLE([relro],[ --enable-relro build with the GCC relro option])

dnl Update compiler options... CXXLIBS="${CXXLIBS:=}" -AC_SUBST(CXXLIBS) +AC_SUBST([CXXLIBS])

PIEFLAGS="" -AC_SUBST(PIEFLAGS) +AC_SUBST([PIEFLAGS])

RELROFLAGS="" -AC_SUBST(RELROFLAGS) +AC_SUBST([RELROFLAGS])

if test -n "$GCC"; then

Add GCC-specific compiler options...

@@ -110,18 +110,18 @@ if test -n "$GCC"; then

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.

-AC_ARG_WITH(languages, [ --with-languages set installed languages, default=all ],[

-AC_SUBST(CUPS_BUNDLEDIR) +AC_SUBST([CUPS_BUNDLEDIR]) if test "x$CUPS_BUNDLEDIR" != x; then

-AC_SUBST(CUPS_BROWSE_LOCAL_PROTOCOLS) -AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS,

-AC_ARG_WITH(cups_group, [ --with-cups-group set default group for CUPS],

-AC_ARG_WITH(system_groups, [ --with-system-groups set default system groups for CUPS],

@@ -246,19 +246,19 @@ for group in $CUPS_SYSTEM_GROUPS; do fi done

-AC_SUBST(CUPS_USER) -AC_SUBST(CUPS_GROUP) -AC_SUBST(CUPS_SYSTEM_GROUPS) -AC_SUBST(CUPS_PRIMARY_SYSTEM_GROUP) +AC_SUBST([CUPS_USER]) +AC_SUBST([CUPS_GROUP]) +AC_SUBST([CUPS_SYSTEM_GROUPS]) +AC_SUBST([CUPS_PRIMARY_SYSTEM_GROUP])

-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USER, "$CUPS_USER") -AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP") -AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_GROUPS, "$CUPS_SYSTEM_GROUPS") +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_USER],["$CUPS_USER"]) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_GROUP],["$CUPS_GROUP"]) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_SYSTEM_GROUPS],["$CUPS_SYSTEM_GROUPS"])

dnl Default printcap file... -AC_ARG_WITH(printcap, [ --with-printcap set default printcap file],

-AC_SUBST(CUPS_DEFAULT_PRINTCAP) -AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP") +AC_SUBST([CUPS_DEFAULT_PRINTCAP]) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_PRINTCAP],["$CUPS_DEFAULT_PRINTCAP"])

dnl Default LPD config file... -AC_ARG_WITH(lpdconfigfile, [ --with-lpdconfigfile set default LPDConfigFile URI],

-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG_FILE, "$CUPS_DEFAULT_LPD_CONFIG_FILE") -AC_SUBST(CUPS_DEFAULT_LPD_CONFIG_FILE) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_LPD_CONFIG_FILE],["$CUPS_DEFAULT_LPD_CONFIG_FILE"]) +AC_SUBST([CUPS_DEFAULT_LPD_CONFIG_FILE])

dnl Default SMB config file... -AC_ARG_WITH(smbconfigfile, [ --with-smbconfigfile set default SMBConfigFile URI],

-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG_FILE, "$CUPS_DEFAULT_SMB_CONFIG_FILE") -AC_SUBST(CUPS_DEFAULT_SMB_CONFIG_FILE) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_SMB_CONFIG_FILE],["$CUPS_DEFAULT_SMB_CONFIG_FILE"]) +AC_SUBST([CUPS_DEFAULT_SMB_CONFIG_FILE])

dnl Default MaxCopies value... -AC_ARG_WITH(max-copies, [ --with-max-copies set default max copies value, default=9999 ],

-AC_SUBST(CUPS_MAX_COPIES) -AC_DEFINE_UNQUOTED(CUPS_DEFAULT_MAX_COPIES, $CUPS_MAX_COPIES) +AC_SUBST([CUPS_MAX_COPIES]) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_MAX_COPIES],[$CUPS_MAX_COPIES])

dnl Default raw printing state -AC_ARG_ENABLE(raw_printing, [ --disable-raw-printing do not allow raw printing by default]) +AC_ARG_ENABLE([raw_printing],[ --disable-raw-printing do not allow raw printing by default]) if test "x$enable_raw_printing" != xno; then DEFAULT_RAW_PRINTING="" else DEFAULT_RAW_PRINTING="#" fi -AC_SUBST(DEFAULT_RAW_PRINTING) +AC_SUBST([DEFAULT_RAW_PRINTING])

dnl Default SNMP options... -AC_ARG_WITH(snmp-address, [ --with-snmp-address set SNMP query address, default=auto ], +AC_ARG_WITH([snmp-address],[ --with-snmp-address set SNMP query address, default=auto], if test "x$withval" = x; then CUPS_SNMP_ADDRESS="" else @@ -368,23 +368,23 @@ AC_ARG_WITH(snmp-address, [ --with-snmp-address set SNMP query address, def CUPS_SNMP_ADDRESS="Address @LOCAL" fi)

-AC_ARG_WITH(snmp-community, [ --with-snmp-community set SNMP community, default=public ],

-AC_SUBST(CUPS_SNMP_ADDRESS) -AC_SUBST(CUPS_SNMP_COMMUNITY) +AC_SUBST([CUPS_SNMP_ADDRESS]) +AC_SUBST([CUPS_SNMP_COMMUNITY])

dnl New default port definition for IPP... -AC_ARG_WITH(ipp-port, [ --with-ipp-port set port number for IPP, default=631 ],

-AC_SUBST(DEFAULT_IPP_PORT) -AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT) +AC_SUBST([DEFAULT_IPP_PORT]) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_IPP_PORT],[$DEFAULT_IPP_PORT])

dnl Web interface... -AC_ARG_ENABLE(webif, [ --enable-webif enable the web interface by default, default=no for OS X]) +AC_ARG_ENABLE([webif],[ --enable-webif enable the web interface by default, default=no for OS X]) case "x$enable_webif" in xno) CUPS_WEBIF=No @@ -405,8 +405,8 @@ case "x$enable_webif" in ;; esac

-AC_SUBST(CUPS_WEBIF) -AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF) +AC_SUBST([CUPS_WEBIF]) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_WEBIF],[$CUPS_DEFAULT_WEBIF])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4 index 40a1703..d8b3f10 100644 --- a/config-scripts/cups-directories.m4 +++ b/config-scripts/cups-directories.m4 @@ -34,14 +34,14 @@ if test "$bindir" = "\${exec_prefix}/bin"; then bindir="$exec_prefix/bin" fi

-AC_DEFINE_UNQUOTED(CUPS_BINDIR, "$bindir") +AC_DEFINE_UNQUOTED([CUPS_BINDIR],["$bindir"])

dnl Fix "sbindir" variable... if test "$sbindir" = "\${exec_prefix}/sbin"; then sbindir="$exec_prefix/sbin" fi

-AC_DEFINE_UNQUOTED(CUPS_SBINDIR, "$sbindir") +AC_DEFINE_UNQUOTED([CUPS_SBINDIR],["$sbindir"])

dnl Fix "sharedstatedir" variable if it hasn't been specified... if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then @@ -111,19 +111,19 @@ if test "$libdir" = "\${exec_prefix}/lib"; then fi

dnl Setup private include directory... -AC_ARG_WITH(privateinclude, [ --with-privateinclude set path for private include files, default=none],privateinclude="$withval",privateinclude="") +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) +AC_SUBST([privateinclude]) +AC_SUBST([PRIVATEINCLUDE])

dnl LPD sharing support... -AC_ARG_WITH(lpdconfig, [ --with-lpdconfig set URI for LPD config file],

-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],[ --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" @@ -203,10 +203,10 @@ else MENUDIR="$menudir" fi

-AC_SUBST(MENUDIR) +AC_SUBST([MENUDIR])

Documentation files

-AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="") +AC_ARG_WITH([docdir],[ --with-docdir set path for documentation],[docdir="$withval"],[docdir=""])

if test x$docdir = x; then CUPS_DOCROOT="$datadir/doc/cups" @@ -215,11 +215,11 @@ else CUPS_DOCROOT="$docdir" fi

-AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir") -AC_SUBST(CUPS_DOCROOT) +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="") +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" @@ -227,8 +227,8 @@ else CUPS_FONTPATH="$fontpath" fi

-AC_SUBST(CUPS_FONTPATH) -AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH") +AC_SUBST([CUPS_FONTPATH]) +AC_DEFINE_UNQUOTED([CUPS_FONTPATH],["$CUPS_FONTPATH"])

Locale data

if test "$localedir" = "\${datarootdir}/locale"; then @@ -246,25 +246,25 @@ else CUPS_LOCALEDIR="$localedir" fi

-AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR") -AC_SUBST(CUPS_LOCALEDIR) +AC_DEFINE_UNQUOTED([CUPS_LOCALEDIR],["$CUPS_LOCALEDIR"]) +AC_SUBST([CUPS_LOCALEDIR])

Log files...

-AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="") +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_SERVERBIN, "$CUPS_SERVERBIN") -AC_SUBST(CUPS_SERVERBIN) -AC_SUBST(INSTALL_SYSV) +AC_DEFINE_UNQUOTED([CUPS_SERVERBIN],["$CUPS_SERVERBIN"]) +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"]) +AC_SUBST([CUPS_SERVERROOT])

Transient run-time state

-AC_ARG_WITH(rundir, [ --with-rundir set transient run-time state directory],CUPS_STATEDIR="$withval",[

-AC_ARG_ENABLE(avahi, [ --disable-avahi disable DNS Service Discovery support using Avahi]) -AC_ARG_ENABLE(dnssd, [ --disable-dnssd disable DNS Service Discovery support using mDNSResponder]) -AC_ARG_WITH(dnssd-libs, [ --with-dnssd-libs set directory for DNS Service Discovery library],

-AC_SUBST(DNSSDLIBS) -AC_SUBST(DNSSD_BACKEND) -AC_SUBST(IPPFIND_BIN) -AC_SUBST(IPPFIND_MAN) +AC_SUBST([DNSSDLIBS]) +AC_SUBST([DNSSD_BACKEND]) +AC_SUBST([IPPFIND_BIN]) +AC_SUBST([IPPFIND_MAN])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-gssapi.m4 b/config-scripts/cups-gssapi.m4 index 531308d..377fa27 100644 --- a/config-scripts/cups-gssapi.m4 +++ b/config-scripts/cups-gssapi.m4 @@ -16,33 +16,33 @@ dnl which should have been included with this file. If this file is dnl file is missing or damaged, see the license at "http://www.cups.org/". dnl

-AC_ARG_ENABLE(gssapi, [ --disable-gssapi disable GSSAPI support]) +AC_ARG_ENABLE([gssapi],[ --disable-gssapi disable GSSAPI support])

LIBGSSAPI="" -AC_SUBST(LIBGSSAPI) +AC_SUBST([LIBGSSAPI])

if test x$enable_gssapi != xno; then

-AC_SUBST(CUPS_DEFAULT_GSSSERVICENAME) -AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GSSSERVICENAME, "$CUPS_DEFAULT_GSSSERVICENAME") +AC_SUBST([CUPS_DEFAULT_GSSSERVICENAME]) +AC_DEFINE_UNQUOTED([CUPS_DEFAULT_GSSSERVICENAME],["$CUPS_DEFAULT_GSSSERVICENAME"])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-largefile.m4 b/config-scripts/cups-largefile.m4 index 6ef4b81..eda4229 100644 --- a/config-scripts/cups-largefile.m4 +++ b/config-scripts/cups-largefile.m4 @@ -29,7 +29,7 @@ if test x$enable_largefile != xno; then LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64" fi fi -AC_SUBST(LARGEFILE) +AC_SUBST([LARGEFILE])

dnl Check for "long long" support... AC_CACHE_CHECK(for long long int, ac_cv_c_long_long, @@ -37,15 +37,15 @@ AC_CACHE_CHECK(for long long int, ac_cv_c_long_long, ac_cv_c_long_long=yes else AC_TRY_COMPILE(,[long long int i;],

-AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL)) +AC_CHECK_FUNC([strtoll],[AC_DEFINE([HAVE_STRTOLL],[1],[The strtoll() function is available.])])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-libtool.m4 b/config-scripts/cups-libtool.m4 index 5fc0d6e..37534be 100644 --- a/config-scripts/cups-libtool.m4 +++ b/config-scripts/cups-libtool.m4 @@ -13,7 +13,7 @@ dnl which should have been included with this file. If this file is dnl file is missing or damaged, see the license at "http://www.cups.org/". dnl

-AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported +AC_ARG_ENABLE([libtool_unsupported],[ --enable-libtool-unsupported build with libtool (UNSUPPORTED!)], [if test x$enable_libtool_unsupported != xno; then LIBTOOL="$enable_libtool_unsupported"

michaelrsweet commented 9 years ago

@@ -24,7 +24,7 @@ AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported LIBTOOL="" fi])

-AC_SUBST(LIBTOOL) +AC_SUBST([LIBTOOL])

if test x$LIBTOOL != x; then LIBCUPS="libcups.la" diff --git a/config-scripts/cups-manpages.m4 b/config-scripts/cups-manpages.m4 index 08aad84..f183c5f 100644 --- a/config-scripts/cups-manpages.m4 +++ b/config-scripts/cups-manpages.m4 @@ -40,8 +40,8 @@ else PMANDIR="$mandir" fi

-AC_SUBST(AMANDIR) -AC_SUBST(PMANDIR) +AC_SUBST([AMANDIR]) +AC_SUBST([PMANDIR])

dnl Setup manpage extensions... case "$uname" in @@ -71,11 +71,11 @@ case "$uname" in ;; esac

-AC_SUBST(MAN1EXT) -AC_SUBST(MAN5EXT) -AC_SUBST(MAN7EXT) -AC_SUBST(MAN8EXT) -AC_SUBST(MAN8DIR) +AC_SUBST([MAN1EXT]) +AC_SUBST([MAN5EXT]) +AC_SUBST([MAN7EXT]) +AC_SUBST([MAN8EXT]) +AC_SUBST([MAN8DIR])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-network.m4 b/config-scripts/cups-network.m4 index 636518f..40ce85c 100644 --- a/config-scripts/cups-network.m4 +++ b/config-scripts/cups-network.m4 @@ -13,37 +13,37 @@ dnl which should have been included with this file. If this file is dnl file is missing or damaged, see the license at "http://www.cups.org/". dnl

-AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H),,[ -#include <sys/socket.h> +AC_CHECK_HEADER([resolv.h],[AC_DEFINE([HAVE_RESOLV_H],[1],[This header file is available.])],, +[#include <sys/socket.h>

include <netinet/in.h>

include <arpa/inet.h>

include <netinet/in_systm.h>

include <netinet/ip.h>])

-AC_SEARCH_LIBS(socket, socket) -AC_SEARCH_LIBS(gethostbyaddr, nsl) -AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS)) -AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR)) -AC_SEARCH_LIBS(rresvport_af, nsl, AC_DEFINE(HAVE_RRESVPORT_AF)) -AC_SEARCH_LIBS(__res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),

-AC_CHECK_MEMBER(struct sockaddr.sa_len,,, [#include <sys/socket.h>]) -AC_CHECK_HEADER(sys/sockio.h, AC_DEFINE(HAVE_SYS_SOCKIO_H)) +AC_CHECK_MEMBER([struct sockaddr.sa_len],,,[#include <sys/socket.h>]) +AC_CHECK_HEADER([sys/sockio.h],[AC_DEFINE([HAVE_SYS_SOCKIO_H],[1],[This header file is available.])])

CUPS_DEFAULT_DOMAINSOCKET=""

dnl Domain socket support... -AC_ARG_WITH(domainsocket, [ --with-domainsocket set unix domain socket name],

-AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET) -AC_SUBST(CUPS_LISTEN_DOMAINSOCKET) +AC_SUBST([CUPS_DEFAULT_DOMAINSOCKET]) +AC_SUBST([CUPS_LISTEN_DOMAINSOCKET])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-pam.m4 b/config-scripts/cups-pam.m4 index 0d7d9ad..a423556 100644 --- a/config-scripts/cups-pam.m4 +++ b/config-scripts/cups-pam.m4 @@ -13,8 +13,8 @@ dnl which should have been included with this file. If this file is dnl file is missing or damaged, see the license at "http://www.cups.org/". dnl

-AC_ARG_ENABLE(pam, [ --disable-pam disable PAM support]) -AC_ARG_WITH(pam_module, [ --with-pam-module specify the PAM module to use]) +AC_ARG_ENABLE([pam],[ --disable-pam disable PAM support]) +AC_ARG_WITH([pam_module],[ --with-pam-module specify the PAM module to use])

PAMDIR="" PAMFILE="pam.std" @@ -25,14 +25,14 @@ PAMMODAUTH="pam_unknown.so" if test x$enable_pam != xno; then SAVELIBS="$LIBS"

-AC_SUBST(PAMDIR) -AC_SUBST(PAMFILE) -AC_SUBST(PAMLIBS) -AC_SUBST(PAMMOD) -AC_SUBST(PAMMODAUTH) +AC_SUBST([PAMDIR]) +AC_SUBST([PAMFILE]) +AC_SUBST([PAMLIBS]) +AC_SUBST([PAMMOD]) +AC_SUBST([PAMMODAUTH])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-poll.m4 b/config-scripts/cups-poll.m4 index 901068c..e1dd0c2 100644 --- a/config-scripts/cups-poll.m4 +++ b/config-scripts/cups-poll.m4 @@ -13,9 +13,9 @@ dnl which should have been included with this file. If this file is dnl file is missing or damaged, see the license at "http://www.cups.org/". dnl

-AC_CHECK_FUNC(poll, AC_DEFINE(HAVE_POLL)) -AC_CHECK_FUNC(epoll_create, AC_DEFINE(HAVE_EPOLL)) -AC_CHECK_FUNC(kqueue, AC_DEFINE(HAVE_KQUEUE)) +AC_CHECK_FUNC([poll],[AC_DEFINE([HAVE_POLL],[1],[The poll() function is available.])]) +AC_CHECK_FUNC([epoll_create],[AC_DEFINE([HAVE_EPOLL],[1],[The epoll_create() function is available.])]) +AC_CHECK_FUNC([kqueue],[AC_DEFINE([HAVE_KQUEUE],[1],[The kqueue() function is available.])])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-scripting.m4 b/config-scripts/cups-scripting.m4 index af97a94..bd0f7af 100644 --- a/config-scripts/cups-scripting.m4 +++ b/config-scripts/cups-scripting.m4 @@ -14,74 +14,74 @@ dnl file is missing or damaged, see the license at "http://www.cups.org/". dnl

dnl Do we have Java? -AC_ARG_WITH(java, [ --with-java set Java interpreter for web interfaces ],

-AC_DEFINE_UNQUOTED(CUPS_JAVA, "$CUPS_JAVA") +AC_DEFINE_UNQUOTED([CUPS_JAVA],["$CUPS_JAVA"])

if test "x$CUPS_JAVA" != x; then

-AC_DEFINE_UNQUOTED(CUPS_PERL, "$CUPS_PERL") +AC_DEFINE_UNQUOTED([CUPS_PERL],["$CUPS_PERL"])

if test "x$CUPS_PERL" != x; then

-AC_DEFINE_UNQUOTED(CUPS_PHP, "$CUPS_PHP") +AC_DEFINE_UNQUOTED([CUPS_PHP],["$CUPS_PHP"])

if test "x$CUPS_PHP" = x; then CUPS_PHP="no" else

-AC_DEFINE_UNQUOTED(CUPS_PYTHON, "$CUPS_PYTHON") +AC_DEFINE_UNQUOTED([CUPS_PYTHON],["$CUPS_PYTHON"])

if test "x$CUPS_PYTHON" != x; then

-AC_ARG_ENABLE(shared, [ --disable-shared do not create shared libraries]) +AC_ARG_ENABLE([shared],[ --disable-shared do not create shared libraries])

cupsbase="cups" LIBCUPSBASE="lib$cupsbase" @@ -78,16 +78,16 @@ else DSOXX=":" fi

-AC_SUBST(DSO) -AC_SUBST(DSOXX) -AC_SUBST(DSOFLAGS) -AC_SUBST(LIBCUPS) -AC_SUBST(LIBCUPSBASE) -AC_SUBST(LIBCUPSCGI) -AC_SUBST(LIBCUPSIMAGE) -AC_SUBST(LIBCUPSMIME) -AC_SUBST(LIBCUPSPPDC) -AC_SUBST(LIBCUPSSTATIC) +AC_SUBST([DSO]) +AC_SUBST([DSOXX]) +AC_SUBST([DSOFLAGS]) +AC_SUBST([LIBCUPS]) +AC_SUBST([LIBCUPSBASE]) +AC_SUBST([LIBCUPSCGI]) +AC_SUBST([LIBCUPSIMAGE]) +AC_SUBST([LIBCUPSMIME]) +AC_SUBST([LIBCUPSPPDC]) +AC_SUBST([LIBCUPSSTATIC])

if test x$enable_shared = xno; then LINKCUPS="../cups/lib$cupsbase.a" @@ -103,10 +103,10 @@ else EXTLINKCUPSIMAGE="-lcupsimage" fi

-AC_SUBST(EXTLINKCUPS) -AC_SUBST(EXTLINKCUPSIMAGE) -AC_SUBST(LINKCUPS) -AC_SUBST(LINKCUPSIMAGE) +AC_SUBST([EXTLINKCUPS]) +AC_SUBST([EXTLINKCUPSIMAGE]) +AC_SUBST([LINKCUPS]) +AC_SUBST([LINKCUPSIMAGE])

dnl Update libraries for DSOs... EXPORT_LDFLAGS="" @@ -153,9 +153,9 @@ else IMGLIBS="\$(LIBZ)" fi

-AC_SUBST(DSOLIBS) -AC_SUBST(IMGLIBS) -AC_SUBST(EXPORT_LDFLAGS) +AC_SUBST([DSOLIBS]) +AC_SUBST([IMGLIBS]) +AC_SUBST([EXPORT_LDFLAGS])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-ssl.m4 b/config-scripts/cups-ssl.m4 index d48681e..22314ce 100644 --- a/config-scripts/cups-ssl.m4 +++ b/config-scripts/cups-ssl.m4 @@ -13,9 +13,9 @@ dnl which should have been included with this file. If this file is dnl file is missing or damaged, see the license at "http://www.cups.org/". dnl

-AC_ARG_ENABLE(ssl, [ --disable-ssl disable SSL/TLS support]) -AC_ARG_ENABLE(cdsassl, [ --enable-cdsassl use CDSA for SSL/TLS support, default=first]) -AC_ARG_ENABLE(gnutls, [ --enable-gnutls use GNU TLS for SSL/TLS support, default=second]) +AC_ARG_ENABLE([ssl],[ --disable-ssl disable SSL/TLS support]) +AC_ARG_ENABLE([cdsassl],[ --enable-cdsassl use CDSA for SSL/TLS support, default=first]) +AC_ARG_ENABLE([gnutls],[ --enable-gnutls use GNU TLS for SSL/TLS support, default=second])

SSLFLAGS="" SSLLIBS="" @@ -26,56 +26,56 @@ if test x$enable_ssl != xno; then dnl Look for CDSA... if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then if test $uname = Darwin; then

-AC_SUBST(CUPS_SERVERKEYCHAIN) -AC_SUBST(IPPALIASES) -AC_SUBST(SSLFLAGS) -AC_SUBST(SSLLIBS) +AC_SUBST([CUPS_SERVERKEYCHAIN]) +AC_SUBST([IPPALIASES]) +AC_SUBST([SSLFLAGS]) +AC_SUBST([SSLLIBS])

EXPORT_SSLLIBS="$SSLLIBS" -AC_SUBST(EXPORT_SSLLIBS) +AC_SUBST([EXPORT_SSLLIBS])

dnl dnl End of "$Id$". diff --git a/config-scripts/cups-startup.m4 b/config-scripts/cups-startup.m4 index 2aeeac1..35b3130 100644 --- a/config-scripts/cups-startup.m4 +++ b/config-scripts/cups-startup.m4 @@ -15,22 +15,22 @@ dnl

ONDEMANDFLAGS="" ONDEMANDLIBS="" -AC_SUBST(ONDEMANDFLAGS) -AC_SUBST(ONDEMANDLIBS) +AC_SUBST([ONDEMANDFLAGS]) +AC_SUBST([ONDEMANDLIBS])

dnl Launchd is used on OS X/Darwin... -AC_ARG_ENABLE(launchd, [ --disable-launchd disable launchd support]) +AC_ARG_ENABLE([launchd],[ --disable-launchd disable launchd support]) LAUNCHD_DIR="" -AC_SUBST(LAUNCHD_DIR) +AC_SUBST([LAUNCHD_DIR])

if test x$enable_launchd != xno; then

-AC_ARG_ENABLE(threads, [ --disable-threads disable multi-threading support]) +AC_ARG_ENABLE([threads],[ --disable-threads disable multi-threading support])

have_pthread=no PTHREAD_FLAGS=""

if test "x$enable_threads" != xno; then

-AC_SUBST(PTHREAD_FLAGS) +AC_SUBST([PTHREAD_FLAGS])

dnl dnl End of "$Id$". diff --git a/configure.ac b/configure.ac index 2145713..b9f558a 100644 --- a/configure.ac +++ b/configure.ac @@ -18,27 +18,26 @@ AC_PREREQ(2.60)

dnl Package name and version...

AC_INIT([CUPS], [2.1rc1], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])

-sinclude(config-scripts/cups-opsys.m4) -sinclude(config-scripts/cups-common.m4) -sinclude(config-scripts/cups-directories.m4)

-sinclude(config-scripts/cups-manpages.m4)

-sinclude(config-scripts/cups-sharedlibs.m4) -sinclude(config-scripts/cups-libtool.m4)

-sinclude(config-scripts/cups-compiler.m4)

-sinclude(config-scripts/cups-network.m4) -sinclude(config-scripts/cups-poll.m4) -sinclude(config-scripts/cups-gssapi.m4) -sinclude(config-scripts/cups-threads.m4) -sinclude(config-scripts/cups-ssl.m4) -sinclude(config-scripts/cups-pam.m4) -sinclude(config-scripts/cups-largefile.m4) -sinclude(config-scripts/cups-dnssd.m4) -sinclude(config-scripts/cups-startup.m4) -sinclude(config-scripts/cups-defaults.m4) -sinclude(config-scripts/cups-scripting.m4) +m4_foreach_w([area], +[opsys +common +directories +manpages +sharedlibs +libtool +compiler +network +poll +gssapi +threads +ssl +pam +largefile +dnssd +startup +defaults +scripting], +[sinclude([config-scripts/cups-]area[.m4])])

INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" @@ -60,10 +59,10 @@ elif test "x$CUPS_BUNDLEDIR" != x; then UNINSTALL_LANGUAGES="uninstall-langbundle" fi

-AC_SUBST(INSTALL_LANGUAGES) -AC_SUBST(UNINSTALL_LANGUAGES) +AC_SUBST([INSTALL_LANGUAGES]) +AC_SUBST([UNINSTALL_LANGUAGES])

-AC_OUTPUT(Makedefs +AC_CONFIG_FILES([Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs @@ -88,9 +87,10 @@ AC_OUTPUT(Makedefs scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket

2.5.0