summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTill Kamppeter <till.kamppeter@gmail.com>2022-02-20 00:01:56 +0100
committerTill Kamppeter <till.kamppeter@gmail.com>2022-02-20 00:01:56 +0100
commitd56ebbd30ded81354936bc7d4b1caab73d5e0d6d (patch)
treec21b292625ecbdcdcd91a6667072cdbb5a7a04b4 /configure.ac
parent01794d95ce7b947d483f06cae8de0affd2451392 (diff)
downloadghostpdl-d56ebbd30ded81354936bc7d4b1caab73d5e0d6d.tar.gz
"cups" output device: Support for Apple Raster (URF) output
Apple Raster (aka URF) output: With -sDEVICE=appleraster or -sDEVICE=urf (instead of -sDEVICE=cups) the output is in the Apple Raster format and not in CUPS Raster format. The format is used by Apple's AirPrint which allows printing from iOS devices. Due to this practically all modern printers understand this format and so providing it allows easy, driverless printing. Before, in order to output Apple Raster, the gstoraster filter of cups-filters had used the "cups" output device of Ghostscript to produce CUPS Raster and after that the rastertopwg filter of CUPS had to turn this into Apple Raster. With this commit a future version of cups-filters can let gstoraster (the ghostscript() filter function) directly output Apple Raster and this way save one filter step. Outputting Apple Raster instead of PWG Raster (which we could already do via -sDEVICE=pwgraster) is trivial. One has only to tell the cupsRasterOpen() function of libcups to write Apple Raster headers instead of PWG Raster headers by a simple flag, so this commit consists mainly of the definition of the output device names "appleraster" and "urf" and make the output device set said flag when one of these device names is used. I have defined two device names for exactly the same thing, as I am not really sure which one is the better or if one could cause any problems. We could remove one later if needed. The output is absolutely identical for both. Apple Raster support was introduced to libcups in CUPS 2.2.2, so the CUPS 2.2 API does not contain it necessarily, therefore the 2.3 CUPS API is the minimum requirement by the ./configure script to build Ghostscript with Apple Raster/URF output support. The libcups which is included with the Ghostscript source is too old, and when you build with it (--with-local-cups) you will not get Apple Raster support. But remember that this build option is only for development and debugging and not for production. The commit also contains a bug fix: devs.mak hard-coded -I./cups/libs/ in the compilation command line of gdevcups.c, making always the included cups/raster.h being used instead of the system's one and so always having a too old cups/raster.h which suggests that Apple Raster is not supported. This I have fixed by removing the -I./cups/libs/, --with-local-cups works also without.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0ea1f6a7d..e752bdd0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1842,6 +1842,13 @@ if ( test -f $srcdir/cups/gdevcups.c ); then
CUPSDEV="$CUPSDEV pwgraster"
fi
+ # appleraster support arrived in cups 2.2.2, so with
+ # API version 2.2 we do not necessarily have it, but
+ # 2.3 has it for sure
+ if test "$CUPSAPIVERSION" ">" "2.2" ; then
+ CUPSDEV="$CUPSDEV appleraster urf"
+ fi
+
CUPSVERSION="`$CUPSCONFIG --version`"
LCUPSINCLUDE="include \$(GLSRCDIR)/lcups.mak"