summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2011-08-02 17:57:51 +0200
committerDidier Raboud <odyx@debian.org>2011-08-02 17:57:51 +0200
commit4f12cad09dee21cc2434689f63e0d3eb9aa29eb2 (patch)
tree1fee90b805e5f64080676d2562844f46e5d02536
parentb9ea2e219660b6e432633ef748309d7d4902945f (diff)
parent8010f81b0350b5c4beafc260171c18f3852d4f7f (diff)
Merge commit 'upstream/4.0.8'
-rw-r--r--ChangeLog43
-rw-r--r--Makefile.am9
-rw-r--r--Makefile.in220
-rw-r--r--README2
-rw-r--r--USAGE2
-rw-r--r--VERSION2
-rw-r--r--VERSION.full2
-rw-r--r--aclocal.m4192
-rw-r--r--colord.c263
-rw-r--r--colord.h24
-rwxr-xr-xcompile142
-rwxr-xr-xconfigure428
-rw-r--r--configure.ac15
-rw-r--r--foomatic-rip.1.in6
-rw-r--r--foomaticrip.c230
-rw-r--r--options.c112
-rw-r--r--options.h2
-rw-r--r--pdf.c7
-rw-r--r--renderer.c2
19 files changed, 1546 insertions, 157 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e3daac..a771044 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,48 @@
2011-02-18 Till Kamppeter <till.kamppeter@gmail.com>
+ * Tagged branch for release 4.0.8.
+
+ * VERSION, README, USAGE, configure.ac: Updated for release 4.0.8.
+
+2011-07-24 Till Kamppeter <till.kamppeter@gmail.com>
+
+ * foomaticrip.c: Removed stray characters from "pstoraster"
+ Ghostscript command line.
+
+ * foomaticrip.c, pdf.c, renderer.c: Added "-dNOINTERPOLATE" to the
+ Ghostscript command lines as this makes Ghostscript rendering
+ the pages significantly faster. Use "ps2write" instead of "pswrite"
+ as PostScript output device as Ghostscript produced huge output
+ files with "pswrite" (and "pswrite" is also deprecated now).
+
+ * foomaticrip.c: SECURITY FIX: It was possible to make CUPS executing
+ arbitrary commands as the system user "lp" when foomatic-rip was
+ used as CUPS filter. Fixed by not parsing named options (like
+ "--ppd lj.ppd") when foomatic-rip is running as CUPS filter, as
+ CUPS does not supply named options to their filters.
+
+2011-03-04 Till Kamppeter <till.kamppeter@gmail.com>
+
+ * configure.ac: Support for libdir in the ./configure script.
+
+ * pdf.c: Use mkstemp() instead of mktemp(). Thanks to Richard
+ Hughes (hughsient at gmail dot com) for supplying me this patch
+ from Red Hat.
+
+ * colord.c, colord.h, Makefile.am, configure.ac, foomaticrip.c,
+ options.c, options.h: Added support for ICC-based color managment.
+ Both colord and CUPS' ICC-related PPD extensions are supported.
+ For colord D-Bus is required. Thanks to Richard Hughes (hughsient
+ at gmail dot com) for the patch.
+
+2011-02-21 Till Kamppeter <till.kamppeter@gmail.com>
+
+ * foomatic-rip.1.in: Corrected typos in the man page for
+ foomatic-rip. Thanks to Tim Waugh from Red Hat for the patch (bug
+ #659).
+
+2011-02-18 Till Kamppeter <till.kamppeter@gmail.com>
+
* Tagged branch for release 4.0.7.
* VERSION, README, USAGE, configure.ac: Updated for release 4.0.7.
diff --git a/Makefile.am b/Makefile.am
index 03e437e..1f12fbb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,6 +53,15 @@ foomatic_rip_SOURCES = \
fileconverter.c \
fileconverter.h
+if BUILD_DBUS
+foomatic_rip_SOURCES += \
+ colord.c \
+ colord.h
+
+foomatic_rip_CFLAGS = $(DBUS_CFLAGS) -DHAVE_DBUS
+foomatic_rip_LDADD = $(DBUS_LIBS)
+endif
+
AM_CPPFLAGS = -DCONFIG_PATH='"$(sysconfdir)/foomatic"'
# Masks for trash files which have to be removed before packaging Foomatic
diff --git a/Makefile.in b/Makefile.in
index f397041..35342e2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -31,12 +31,16 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = foomatic-rip$(EXEEXT)
+@BUILD_DBUS_TRUE@am__append_1 = \
+@BUILD_DBUS_TRUE@ colord.c \
+@BUILD_DBUS_TRUE@ colord.h
+
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/beh.in $(srcdir)/config.h.in \
$(srcdir)/foomatic-rip.1.in $(top_srcdir)/configure AUTHORS \
- COPYING ChangeLog INSTALL NEWS TODO depcomp install-sh missing \
- mkinstalldirs
+ COPYING ChangeLog INSTALL NEWS TODO compile depcomp install-sh \
+ missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
@@ -50,12 +54,22 @@ CONFIG_CLEAN_FILES = beh foomatic-rip.1
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
-am_foomatic_rip_OBJECTS = foomaticrip.$(OBJEXT) options.$(OBJEXT) \
- pdf.$(OBJEXT) postscript.$(OBJEXT) util.$(OBJEXT) \
- spooler.$(OBJEXT) process.$(OBJEXT) renderer.$(OBJEXT) \
- fileconverter.$(OBJEXT)
+am__foomatic_rip_SOURCES_DIST = foomaticrip.c foomaticrip.h options.c \
+ options.h pdf.c pdf.h postscript.c postscript.h util.c util.h \
+ spooler.h spooler.c process.h process.c renderer.c renderer.h \
+ fileconverter.c fileconverter.h colord.c colord.h
+@BUILD_DBUS_TRUE@am__objects_1 = foomatic_rip-colord.$(OBJEXT)
+am_foomatic_rip_OBJECTS = foomatic_rip-foomaticrip.$(OBJEXT) \
+ foomatic_rip-options.$(OBJEXT) foomatic_rip-pdf.$(OBJEXT) \
+ foomatic_rip-postscript.$(OBJEXT) foomatic_rip-util.$(OBJEXT) \
+ foomatic_rip-spooler.$(OBJEXT) foomatic_rip-process.$(OBJEXT) \
+ foomatic_rip-renderer.$(OBJEXT) \
+ foomatic_rip-fileconverter.$(OBJEXT) $(am__objects_1)
foomatic_rip_OBJECTS = $(am_foomatic_rip_OBJECTS)
-foomatic_rip_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+@BUILD_DBUS_TRUE@foomatic_rip_DEPENDENCIES = $(am__DEPENDENCIES_1)
+foomatic_rip_LINK = $(CCLD) $(foomatic_rip_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -64,7 +78,7 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(foomatic_rip_SOURCES)
-DIST_SOURCES = $(foomatic_rip_SOURCES)
+DIST_SOURCES = $(am__foomatic_rip_SOURCES_DIST)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -100,6 +114,8 @@ CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
@@ -134,6 +150,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
POW_LIB = @POW_LIB@
# Paths for PPR
@@ -197,26 +214,12 @@ SBINDIR = $(sbindir)
MANDIR = $(mandir)
ETCDIR = $(sysconfdir)/foomatic
foomatic_ripdir = .
-foomatic_rip_SOURCES = \
- foomaticrip.c \
- foomaticrip.h \
- options.c \
- options.h \
- pdf.c \
- pdf.h \
- postscript.c \
- postscript.h \
- util.c \
- util.h \
- spooler.h \
- spooler.c \
- process.h \
- process.c \
- renderer.c \
- renderer.h \
- fileconverter.c \
- fileconverter.h
-
+foomatic_rip_SOURCES = foomaticrip.c foomaticrip.h options.c options.h \
+ pdf.c pdf.h postscript.c postscript.h util.c util.h spooler.h \
+ spooler.c process.h process.c renderer.c renderer.h \
+ fileconverter.c fileconverter.h $(am__append_1)
+@BUILD_DBUS_TRUE@foomatic_rip_CFLAGS = $(DBUS_CFLAGS) -DHAVE_DBUS
+@BUILD_DBUS_TRUE@foomatic_rip_LDADD = $(DBUS_LIBS)
AM_CPPFLAGS = -DCONFIG_PATH='"$(sysconfdir)/foomatic"'
# Masks for trash files which have to be removed before packaging Foomatic
@@ -305,7 +308,7 @@ clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
foomatic-rip$(EXEEXT): $(foomatic_rip_OBJECTS) $(foomatic_rip_DEPENDENCIES)
@rm -f foomatic-rip$(EXEEXT)
- $(LINK) $(foomatic_rip_OBJECTS) $(foomatic_rip_LDADD) $(LIBS)
+ $(foomatic_rip_LINK) $(foomatic_rip_OBJECTS) $(foomatic_rip_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -313,15 +316,16 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileconverter.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomaticrip.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postscript.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderer.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spooler.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomatic_rip-colord.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomatic_rip-fileconverter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomatic_rip-foomaticrip.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomatic_rip-options.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomatic_rip-pdf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomatic_rip-postscript.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomatic_rip-process.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomatic_rip-renderer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomatic_rip-spooler.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foomatic_rip-util.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -337,6 +341,146 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+foomatic_rip-foomaticrip.o: foomaticrip.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-foomaticrip.o -MD -MP -MF $(DEPDIR)/foomatic_rip-foomaticrip.Tpo -c -o foomatic_rip-foomaticrip.o `test -f 'foomaticrip.c' || echo '$(srcdir)/'`foomaticrip.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-foomaticrip.Tpo $(DEPDIR)/foomatic_rip-foomaticrip.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='foomaticrip.c' object='foomatic_rip-foomaticrip.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-foomaticrip.o `test -f 'foomaticrip.c' || echo '$(srcdir)/'`foomaticrip.c
+
+foomatic_rip-foomaticrip.obj: foomaticrip.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-foomaticrip.obj -MD -MP -MF $(DEPDIR)/foomatic_rip-foomaticrip.Tpo -c -o foomatic_rip-foomaticrip.obj `if test -f 'foomaticrip.c'; then $(CYGPATH_W) 'foomaticrip.c'; else $(CYGPATH_W) '$(srcdir)/foomaticrip.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-foomaticrip.Tpo $(DEPDIR)/foomatic_rip-foomaticrip.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='foomaticrip.c' object='foomatic_rip-foomaticrip.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-foomaticrip.obj `if test -f 'foomaticrip.c'; then $(CYGPATH_W) 'foomaticrip.c'; else $(CYGPATH_W) '$(srcdir)/foomaticrip.c'; fi`
+
+foomatic_rip-options.o: options.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-options.o -MD -MP -MF $(DEPDIR)/foomatic_rip-options.Tpo -c -o foomatic_rip-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-options.Tpo $(DEPDIR)/foomatic_rip-options.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='options.c' object='foomatic_rip-options.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c
+
+foomatic_rip-options.obj: options.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-options.obj -MD -MP -MF $(DEPDIR)/foomatic_rip-options.Tpo -c -o foomatic_rip-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-options.Tpo $(DEPDIR)/foomatic_rip-options.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='options.c' object='foomatic_rip-options.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi`
+
+foomatic_rip-pdf.o: pdf.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-pdf.o -MD -MP -MF $(DEPDIR)/foomatic_rip-pdf.Tpo -c -o foomatic_rip-pdf.o `test -f 'pdf.c' || echo '$(srcdir)/'`pdf.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-pdf.Tpo $(DEPDIR)/foomatic_rip-pdf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdf.c' object='foomatic_rip-pdf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-pdf.o `test -f 'pdf.c' || echo '$(srcdir)/'`pdf.c
+
+foomatic_rip-pdf.obj: pdf.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-pdf.obj -MD -MP -MF $(DEPDIR)/foomatic_rip-pdf.Tpo -c -o foomatic_rip-pdf.obj `if test -f 'pdf.c'; then $(CYGPATH_W) 'pdf.c'; else $(CYGPATH_W) '$(srcdir)/pdf.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-pdf.Tpo $(DEPDIR)/foomatic_rip-pdf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdf.c' object='foomatic_rip-pdf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-pdf.obj `if test -f 'pdf.c'; then $(CYGPATH_W) 'pdf.c'; else $(CYGPATH_W) '$(srcdir)/pdf.c'; fi`
+
+foomatic_rip-postscript.o: postscript.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-postscript.o -MD -MP -MF $(DEPDIR)/foomatic_rip-postscript.Tpo -c -o foomatic_rip-postscript.o `test -f 'postscript.c' || echo '$(srcdir)/'`postscript.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-postscript.Tpo $(DEPDIR)/foomatic_rip-postscript.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='postscript.c' object='foomatic_rip-postscript.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-postscript.o `test -f 'postscript.c' || echo '$(srcdir)/'`postscript.c
+
+foomatic_rip-postscript.obj: postscript.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-postscript.obj -MD -MP -MF $(DEPDIR)/foomatic_rip-postscript.Tpo -c -o foomatic_rip-postscript.obj `if test -f 'postscript.c'; then $(CYGPATH_W) 'postscript.c'; else $(CYGPATH_W) '$(srcdir)/postscript.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-postscript.Tpo $(DEPDIR)/foomatic_rip-postscript.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='postscript.c' object='foomatic_rip-postscript.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-postscript.obj `if test -f 'postscript.c'; then $(CYGPATH_W) 'postscript.c'; else $(CYGPATH_W) '$(srcdir)/postscript.c'; fi`
+
+foomatic_rip-util.o: util.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-util.o -MD -MP -MF $(DEPDIR)/foomatic_rip-util.Tpo -c -o foomatic_rip-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-util.Tpo $(DEPDIR)/foomatic_rip-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='foomatic_rip-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+foomatic_rip-util.obj: util.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-util.obj -MD -MP -MF $(DEPDIR)/foomatic_rip-util.Tpo -c -o foomatic_rip-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-util.Tpo $(DEPDIR)/foomatic_rip-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='foomatic_rip-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+foomatic_rip-spooler.o: spooler.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-spooler.o -MD -MP -MF $(DEPDIR)/foomatic_rip-spooler.Tpo -c -o foomatic_rip-spooler.o `test -f 'spooler.c' || echo '$(srcdir)/'`spooler.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-spooler.Tpo $(DEPDIR)/foomatic_rip-spooler.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spooler.c' object='foomatic_rip-spooler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-spooler.o `test -f 'spooler.c' || echo '$(srcdir)/'`spooler.c
+
+foomatic_rip-spooler.obj: spooler.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-spooler.obj -MD -MP -MF $(DEPDIR)/foomatic_rip-spooler.Tpo -c -o foomatic_rip-spooler.obj `if test -f 'spooler.c'; then $(CYGPATH_W) 'spooler.c'; else $(CYGPATH_W) '$(srcdir)/spooler.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-spooler.Tpo $(DEPDIR)/foomatic_rip-spooler.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spooler.c' object='foomatic_rip-spooler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-spooler.obj `if test -f 'spooler.c'; then $(CYGPATH_W) 'spooler.c'; else $(CYGPATH_W) '$(srcdir)/spooler.c'; fi`
+
+foomatic_rip-process.o: process.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-process.o -MD -MP -MF $(DEPDIR)/foomatic_rip-process.Tpo -c -o foomatic_rip-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-process.Tpo $(DEPDIR)/foomatic_rip-process.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='process.c' object='foomatic_rip-process.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c
+
+foomatic_rip-process.obj: process.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-process.obj -MD -MP -MF $(DEPDIR)/foomatic_rip-process.Tpo -c -o foomatic_rip-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-process.Tpo $(DEPDIR)/foomatic_rip-process.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='process.c' object='foomatic_rip-process.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi`
+
+foomatic_rip-renderer.o: renderer.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-renderer.o -MD -MP -MF $(DEPDIR)/foomatic_rip-renderer.Tpo -c -o foomatic_rip-renderer.o `test -f 'renderer.c' || echo '$(srcdir)/'`renderer.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-renderer.Tpo $(DEPDIR)/foomatic_rip-renderer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='renderer.c' object='foomatic_rip-renderer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-renderer.o `test -f 'renderer.c' || echo '$(srcdir)/'`renderer.c
+
+foomatic_rip-renderer.obj: renderer.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-renderer.obj -MD -MP -MF $(DEPDIR)/foomatic_rip-renderer.Tpo -c -o foomatic_rip-renderer.obj `if test -f 'renderer.c'; then $(CYGPATH_W) 'renderer.c'; else $(CYGPATH_W) '$(srcdir)/renderer.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-renderer.Tpo $(DEPDIR)/foomatic_rip-renderer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='renderer.c' object='foomatic_rip-renderer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-renderer.obj `if test -f 'renderer.c'; then $(CYGPATH_W) 'renderer.c'; else $(CYGPATH_W) '$(srcdir)/renderer.c'; fi`
+
+foomatic_rip-fileconverter.o: fileconverter.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-fileconverter.o -MD -MP -MF $(DEPDIR)/foomatic_rip-fileconverter.Tpo -c -o foomatic_rip-fileconverter.o `test -f 'fileconverter.c' || echo '$(srcdir)/'`fileconverter.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-fileconverter.Tpo $(DEPDIR)/foomatic_rip-fileconverter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fileconverter.c' object='foomatic_rip-fileconverter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-fileconverter.o `test -f 'fileconverter.c' || echo '$(srcdir)/'`fileconverter.c
+
+foomatic_rip-fileconverter.obj: fileconverter.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-fileconverter.obj -MD -MP -MF $(DEPDIR)/foomatic_rip-fileconverter.Tpo -c -o foomatic_rip-fileconverter.obj `if test -f 'fileconverter.c'; then $(CYGPATH_W) 'fileconverter.c'; else $(CYGPATH_W) '$(srcdir)/fileconverter.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-fileconverter.Tpo $(DEPDIR)/foomatic_rip-fileconverter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fileconverter.c' object='foomatic_rip-fileconverter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-fileconverter.obj `if test -f 'fileconverter.c'; then $(CYGPATH_W) 'fileconverter.c'; else $(CYGPATH_W) '$(srcdir)/fileconverter.c'; fi`
+
+foomatic_rip-colord.o: colord.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-colord.o -MD -MP -MF $(DEPDIR)/foomatic_rip-colord.Tpo -c -o foomatic_rip-colord.o `test -f 'colord.c' || echo '$(srcdir)/'`colord.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-colord.Tpo $(DEPDIR)/foomatic_rip-colord.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='colord.c' object='foomatic_rip-colord.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-colord.o `test -f 'colord.c' || echo '$(srcdir)/'`colord.c
+
+foomatic_rip-colord.obj: colord.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -MT foomatic_rip-colord.obj -MD -MP -MF $(DEPDIR)/foomatic_rip-colord.Tpo -c -o foomatic_rip-colord.obj `if test -f 'colord.c'; then $(CYGPATH_W) 'colord.c'; else $(CYGPATH_W) '$(srcdir)/colord.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/foomatic_rip-colord.Tpo $(DEPDIR)/foomatic_rip-colord.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='colord.c' object='foomatic_rip-colord.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foomatic_rip_CFLAGS) $(CFLAGS) -c -o foomatic_rip-colord.obj `if test -f 'colord.c'; then $(CYGPATH_W) 'colord.c'; else $(CYGPATH_W) '$(srcdir)/colord.c'; fi`
+
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
diff --git a/README b/README
index f28ecda..c3004ee 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
-Foomatic 4.0.7
+Foomatic 4.0.8
==============
diff --git a/USAGE b/USAGE
index e48a7d7..bd4119b 100644
--- a/USAGE
+++ b/USAGE
@@ -1,5 +1,5 @@
-Foomatic 4.0.7
+Foomatic 4.0.8
==============
foomatic-filters
diff --git a/VERSION b/VERSION
index 43beb40..a2cec7a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.0.7
+4.0.8
diff --git a/VERSION.full b/VERSION.full
index bdfc3ce..5c27782 100644
--- a/VERSION.full
+++ b/VERSION.full
@@ -1 +1 @@
-4.0.7.235
+4.0.8.239
diff --git a/aclocal.m4 b/aclocal.m4
index 2c8aa27..6cd671a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -19,6 +19,164 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ fi
+else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+ [AC_MSG_RESULT([no])
+ $4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -583,6 +741,40 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+ [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
diff --git a/colord.c b/colord.c
new file mode 100644
index 0000000..260b8c7
--- /dev/null
+++ b/colord.c
@@ -0,0 +1,263 @@
+/* colord.c
+ *
+ * Copyright (C) 2011 Richard Hughes <richard@hughsie.com>
+ *
+ * This file is part of foomatic-rip.
+ *
+ * Foomatic-rip is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Foomatic-rip is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* Common routines for accessing the colord CMS framework */
+
+#include <dbus/dbus.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "colord.h"
+
+#define QUAL_COLORSPACE 0
+#define QUAL_MEDIA 1
+#define QUAL_RESOLUTION 2
+#define QUAL_SIZE 3
+
+static char *
+get_filename_for_profile_path (DBusConnection *con,
+ const char *object_path)
+{
+ char *filename = NULL;
+ const char *interface = "org.freedesktop.ColorManager.Profile";
+ const char *property = "Filename";
+ const char *tmp;
+ DBusError error;
+ DBusMessageIter args;
+ DBusMessage *message = NULL;
+ DBusMessage *reply = NULL;
+ DBusMessageIter sub;
+
+ message = dbus_message_new_method_call("org.freedesktop.ColorManager",
+ object_path,
+ "org.freedesktop.DBus.Properties",
+ "Get");
+
+ dbus_message_iter_init_append(message, &args);
+ dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &interface);
+ dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &property);
+
+ /* send syncronous */
+ dbus_error_init(&error);
+ fprintf(stderr, "DEBUG: Calling %s.Get(%s)\n", interface, property);
+ reply = dbus_connection_send_with_reply_and_block(con,
+ message,
+ -1,
+ &error);
+ if (reply == NULL) {
+ fprintf(stderr, "DEBUG: Failed to send: %s:%s\n",
+ error.name, error.message);
+ dbus_error_free(&error);
+ goto out;
+ }
+
+ /* get reply data */
+ dbus_message_iter_init(reply, &args);
+ if (dbus_message_iter_get_arg_type(&args) != DBUS_TYPE_VARIANT) {
+ fprintf(stderr, "DEBUG: Incorrect reply type\n");
+ goto out;
+ }
+
+ dbus_message_iter_recurse(&args, &sub);
+ dbus_message_iter_get_basic(&sub, &tmp);
+ filename = strdup(tmp);
+out:
+ if (message != NULL)
+ dbus_message_unref(message);
+ if (reply != NULL)
+ dbus_message_unref(reply);
+ return filename;
+}
+
+static char *
+get_profile_for_device_path (DBusConnection *con,
+ const char *object_path,
+ const char **split)
+{
+ char **key = NULL;
+ char *profile = NULL;
+ char str[256];
+ const char *tmp;
+ DBusError error;
+ DBusMessageIter args;
+ DBusMessageIter entry;
+ DBusMessage *message = NULL;
+ DBusMessage *reply = NULL;
+ int i = 0;
+ const int max_keys = 7;
+
+ message = dbus_message_new_method_call("org.freedesktop.ColorManager",
+ object_path,
+ "org.freedesktop.ColorManager.Device",
+ "GetProfileForQualifiers");
+ dbus_message_iter_init_append(message, &args);
+
+ /* create the fallbacks */
+ key = calloc(max_keys + 1, sizeof(char*));
+
+ /* exact match */
+ i = 0;
+ snprintf(str, sizeof(str), "%s.%s.%s",
+ split[QUAL_COLORSPACE],
+ split[QUAL_MEDIA],
+ split[QUAL_RESOLUTION]);
+ key[i++] = strdup(str);
+ snprintf(str, sizeof(str), "%s.%s.*",
+ split[QUAL_COLORSPACE],
+ split[QUAL_MEDIA]);
+ key[i++] = strdup(str);
+ snprintf(str, sizeof(str), "%s.*.%s",
+ split[QUAL_COLORSPACE],
+ split[QUAL_RESOLUTION]);
+ key[i++] = strdup(str);
+ snprintf(str, sizeof(str), "%s.*.*",
+ split[QUAL_COLORSPACE]);
+ key[i++] = strdup(str);
+ key[i++] = strdup("*");
+ dbus_message_iter_open_container(&args,
+ DBUS_TYPE_ARRAY,
+ "s",
+ &entry);
+ for (i=0; key[i] != NULL; i++) {
+ dbus_message_iter_append_basic(&entry,
+ DBUS_TYPE_STRING,
+ &key[i]);
+ }
+ dbus_message_iter_close_container(&args, &entry);
+
+ /* send syncronous */
+ dbus_error_init(&error);
+ fprintf(stderr, "DEBUG: Calling GetProfileForQualifiers(%s...)\n", key[0]);
+ reply = dbus_connection_send_with_reply_and_block(con,
+ message,
+ -1,
+ &error);
+ if (reply == NULL) {
+ fprintf(stderr, "DEBUG: Failed to send: %s:%s\n",
+ error.name, error.message);
+ dbus_error_free(&error);
+ goto out;
+ }
+
+ /* get reply data */
+ dbus_message_iter_init(reply, &args);
+ if (dbus_message_iter_get_arg_type(&args) != DBUS_TYPE_OBJECT_PATH) {
+ fprintf(stderr, "DEBUG: Incorrect reply type\n");
+ goto out;
+ }
+ dbus_message_iter_get_basic(&args, &tmp);
+ fprintf(stderr, "DEBUG: Found profile %s\n", tmp);
+
+ /* get filename */
+ profile = get_filename_for_profile_path(con, tmp);
+
+out:
+ if (message != NULL)
+ dbus_message_unref(message);
+ if (reply != NULL)
+ dbus_message_unref(reply);
+ if (key != NULL) {
+ for (i=0; i < max_keys; i++)
+ free(key[i]);
+ free(key);
+ }
+ return profile;
+}
+
+static char *
+get_profile_for_device_id (DBusConnection *con,
+ const char *device_id,
+ const char **qualifier_tuple)
+{
+ char *profile = NULL;
+ const char *device_path_tmp;
+ DBusError error;
+ DBusMessageIter args;
+ DBusMessage *message = NULL;
+ DBusMessage *reply = NULL;
+
+ message = dbus_message_new_method_call("org.freedesktop.ColorManager",
+ "/org/freedesktop/ColorManager",
+ "org.freedesktop.ColorManager",
+ "FindDeviceById");
+ dbus_message_iter_init_append(message, &args);
+ dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &device_id);
+
+ /* send syncronous */
+ dbus_error_init(&error);
+ fprintf(stderr, "DEBUG: Calling FindDeviceById(%s)\n", device_id);
+ reply = dbus_connection_send_with_reply_and_block(con,
+ message,
+ -1,
+ &error);
+ if (reply == NULL) {
+ fprintf(stderr, "DEBUG: Failed to send: %s:%s\n",
+ error.name, error.message);
+ dbus_error_free(&error);
+ goto out;
+ }
+
+ /* get reply data */
+ dbus_message_iter_init(reply, &args);
+ if (dbus_message_iter_get_arg_type(&args) != DBUS_TYPE_OBJECT_PATH) {
+ fprintf(stderr, "DEBUG: Incorrect reply type\n");
+ goto out;
+ }
+ dbus_message_iter_get_basic(&args, &device_path_tmp);
+ fprintf(stderr, "DEBUG: Found device %s\n", device_path_tmp);
+ profile = get_profile_for_device_path(con, device_path_tmp, qualifier_tuple);
+out:
+ if (message != NULL)
+ dbus_message_unref(message);
+ if (reply != NULL)
+ dbus_message_unref(reply);
+ return profile;
+}
+
+char *
+colord_get_profile_for_device_id (const char *device_id,
+ const char **qualifier_tuple)
+{
+ DBusConnection *con;
+ char *filename = NULL;
+
+ /* connect to system bus */
+ con = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
+ if (con == NULL) {
+ fprintf(stderr, "ERROR: Failed to connect to system bus\n");
+ goto out;
+ }
+
+ /* get the best profile for the device */
+ filename = get_profile_for_device_id (con, device_id, qualifier_tuple);
+ if (filename == NULL) {
+ fprintf(stderr, "DEBUG: Failed to get profile filename!\n");
+ goto out;
+ }
+ fprintf(stderr, "DEBUG: Use profile filename: '%s'\n", filename);
+out:
+ if (con != NULL)
+ dbus_connection_unref(con);
+ return filename;
+}
diff --git a/colord.h b/colord.h
new file mode 100644
index 0000000..2ea98bc
--- /dev/null
+++ b/colord.h
@@ -0,0 +1,24 @@
+/* colord.h
+ *
+ * Copyright (C) 2011 Richard Hughes <richard@hughsie.com>
+ *
+ * This file is part of foomatic-rip.
+ *
+ * Foomatic-rip is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Foomatic-rip is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+char *colord_get_profile_for_device_id (const char *device_id,
+ const char **qualifier_tuple);
diff --git a/compile b/compile
new file mode 100755
index 0000000..1b1d232
--- /dev/null
+++ b/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/configure b/configure
index 1076384..e2c732c 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for foomatic-rip 4.0.7.
+# Generated by GNU Autoconf 2.61 for foomatic-rip 4.0.8.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -572,8 +572,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='foomatic-rip'
PACKAGE_TARNAME='foomatic-rip'
-PACKAGE_VERSION='4.0.7'
-PACKAGE_STRING='foomatic-rip 4.0.7'
+PACKAGE_VERSION='4.0.8'
+PACKAGE_STRING='foomatic-rip 4.0.8'
PACKAGE_BUGREPORT=''
ac_unique_file="options.c"
@@ -714,6 +714,11 @@ ENSCRIPT
MPAGE
TEXTTOPS
FILECONVERTER
+BUILD_DBUS_TRUE
+BUILD_DBUS_FALSE
+PKG_CONFIG
+DBUS_CFLAGS
+DBUS_LIBS
ECHO
EXECPATH
LTLIBOBJS'
@@ -729,7 +734,10 @@ CPPFLAGS
CXX
CXXFLAGS
CCC
-CPP'
+CPP
+PKG_CONFIG
+DBUS_CFLAGS
+DBUS_LIBS'
# Initialize some variables set by options.
@@ -1232,7 +1240,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 foomatic-rip 4.0.7 to adapt to many kinds of systems.
+\`configure' configures foomatic-rip 4.0.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1298,7 +1306,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of foomatic-rip 4.0.7:";;
+ short | recursive ) echo "Configuration of foomatic-rip 4.0.8:";;
esac
cat <<\_ACEOF
@@ -1308,6 +1316,7 @@ Optional Features:
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-file-converter-check check whether a file converter is installed default=yes
+ --enable-dbus enable DBus CMS code
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1330,6 +1339,9 @@ Some influential environment variables:
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
+ PKG_CONFIG path to pkg-config utility
+ DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config
+ DBUS_LIBS linker flags for DBUS, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1394,7 +1406,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-foomatic-rip configure 4.0.7
+foomatic-rip configure 4.0.8
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1408,7 +1420,7 @@ 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 foomatic-rip $as_me 4.0.7, which was
+It was created by foomatic-rip $as_me 4.0.8, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2098,7 +2110,7 @@ fi
# Define the identity of the package.
PACKAGE='foomatic-rip'
- VERSION='4.0.7'
+ VERSION='4.0.8'
# Some tools Automake needs.
@@ -3928,6 +3940,134 @@ echo "${ECHO_T}no" >&6; }
fi
+# Allows per-target compilation flags
+if test "x$CC" != xcc; then
+ { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; }
+else
+ { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; }
+fi
+set dummy $CC; ac_cc=`echo $2 |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest2.$ac_objext && { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest2.$ac_objext && { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+
# Checks for libraries.
@@ -6822,7 +6962,7 @@ done
ETCSEARCHPATH=${prefix}/etc:/usr/etc:/usr/local/etc
-LIBSEARCHPATH=${prefix}/lib:${prefix}/lib64:/usr/lib:/usr/lib64:/usr/local/lib:${prefix}/libexec:/usr/libexec:/usr/local/libexec
+LIBSEARCHPATH=${libdir}:/usr/lib:/usr/lib64:/usr/local/lib:${prefix}/libexec:/usr/libexec:/usr/local/libexec
uname=`uname`
uversion=`uname -r | sed -e '1,$s/[^0-9]//g'`
@@ -7402,6 +7542,256 @@ fi
echo "${ECHO_T}file-converter: $FILECONVERTER" >&6; }
+# Use DBUS
+# Check whether --enable-dbus was given.
+if test "${enable_dbus+set}" = set; then
+ enableval=$enable_dbus; enable_dbus=$enableval
+else
+ enable_dbus=yes
+fi
+
+ if test x$enable_dbus = xyes; then
+ BUILD_DBUS_TRUE=
+ BUILD_DBUS_FALSE='#'
+else
+ BUILD_DBUS_TRUE='#'
+ BUILD_DBUS_FALSE=
+fi
+
+if test x$enable_dbus = xyes; then
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ 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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ PKG_CONFIG=""
+ fi
+
+fi
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for DBUS" >&5
+echo $ECHO_N "checking for DBUS... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$DBUS_CFLAGS"; then
+ pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5
+ ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$DBUS_LIBS"; then
+ pkg_cv_DBUS_LIBS="$DBUS_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5
+ ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-1"`
+ else
+ DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$DBUS_PKG_ERRORS" >&5
+
+ { { echo "$as_me:$LINENO: error: Package requirements (dbus-1) were not met:
+
+$DBUS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables DBUS_CFLAGS
+and DBUS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (dbus-1) were not met:
+
+$DBUS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables DBUS_CFLAGS
+and DBUS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+ { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+ { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables DBUS_CFLAGS
+and DBUS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables DBUS_CFLAGS
+and DBUS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
+ DBUS_LIBS=$pkg_cv_DBUS_LIBS
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+fi
+fi
+
if test "${NOCONVERTERCHECK}" = "" -a "${A2PS}" = "" -a "${ENSCRIPT}" = "" -a "${MPAGE}" = "" -a "${TEXTTOPS}" = "" ; then
{ { echo "$as_me:$LINENO: error: cannot find a2ps, enscript, mpage, or CUPS' texttops. You need to have at least one installed" >&5
echo "$as_me: error: cannot find a2ps, enscript, mpage, or CUPS' texttops. You need to have at least one installed" >&2;}
@@ -7553,6 +7943,13 @@ echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${BUILD_DBUS_TRUE}" && test -z "${BUILD_DBUS_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"BUILD_DBUS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"BUILD_DBUS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -7853,7 +8250,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by foomatic-rip $as_me 4.0.7, which was
+This file was extended by foomatic-rip $as_me 4.0.8, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7906,7 +8303,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-foomatic-rip config.status 4.0.7
+foomatic-rip config.status 4.0.8
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -8229,12 +8626,17 @@ ENSCRIPT!$ENSCRIPT$ac_delim
MPAGE!$MPAGE$ac_delim
TEXTTOPS!$TEXTTOPS$ac_delim
FILECONVERTER!$FILECONVERTER$ac_delim
+BUILD_DBUS_TRUE!$BUILD_DBUS_TRUE$ac_delim
+BUILD_DBUS_FALSE!$BUILD_DBUS_FALSE$ac_delim
+PKG_CONFIG!$PKG_CONFIG$ac_delim
+DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
+DBUS_LIBS!$DBUS_LIBS$ac_delim
ECHO!$ECHO$ac_delim
EXECPATH!$EXECPATH$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index c0fcc46..3bbb89f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
-AC_INIT(foomatic-rip, [4.0.7])
+AC_INIT(foomatic-rip, [4.0.8])
AM_INIT_AUTOMAKE([no-define])
AC_CONFIG_SRCDIR([options.c])
@@ -16,6 +16,9 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
+# Allows per-target compilation flags
+AM_PROG_CC_C_O
+
# Checks for libraries.
AC_CHECK_LIB(m, roundf)
@@ -43,7 +46,7 @@ AC_CHECK_FUNCS([dup2 getcwd gethostname regcomp setenv strcasecmp strchr strcspn
ETCSEARCHPATH=${prefix}/etc:/usr/etc:/usr/local/etc
-LIBSEARCHPATH=${prefix}/lib:${prefix}/lib64:/usr/lib:/usr/lib64:/usr/local/lib:${prefix}/libexec:/usr/libexec:/usr/local/libexec
+LIBSEARCHPATH=${libdir}:/usr/lib:/usr/lib64:/usr/local/lib:${prefix}/libexec:/usr/libexec:/usr/local/libexec
uname=`uname`
uversion=`uname -r | sed -e '1,$s/[[^0-9]]//g'`
@@ -119,6 +122,14 @@ AC_ARG_WITH(file-converter,[ --with-file-converter=[a2ps|enscript|mpage]
AC_MSG_RESULT([file-converter: $FILECONVERTER])
AC_SUBST(FILECONVERTER)
+# Use DBUS
+AC_ARG_ENABLE(dbus, AS_HELP_STRING([--enable-dbus],[enable DBus CMS code]),
+ enable_dbus=$enableval,enable_dbus=yes)
+AM_CONDITIONAL(BUILD_DBUS, test x$enable_dbus = xyes)
+if test x$enable_dbus = xyes; then
+ PKG_CHECK_MODULES(DBUS, dbus-1)
+fi
+
if test "${NOCONVERTERCHECK}" = "" -a "${A2PS}" = "" -a "${ENSCRIPT}" = "" -a "${MPAGE}" = "" -a "${TEXTTOPS}" = "" ; then
AC_MSG_ERROR([cannot find a2ps, enscript, mpage, or CUPS' texttops. You need to have at least one installed]);
fi
diff --git a/foomatic-rip.1.in b/foomatic-rip.1.in
index d1db022..a63cb0a 100644
--- a/foomatic-rip.1.in
+++ b/foomatic-rip.1.in
@@ -84,7 +84,7 @@ program is installed, but manual configuration is also possible.
foomatic-rip does not only apply option settings supplied by the user
through the command line of the printing command, but also searches
the entire job for embedded option settings (only PostScript
-jobs). Here not only settings affectimg the whole job are taken into
+jobs). Here not only settings which affect the whole job are taken into
account, but also settings in the page headers, which are only valid
for the page where they were found, so applications which produce
PostScript code with page-specific printer option settings are fully
@@ -141,7 +141,7 @@ Put a line
.hy 0
into the PPD file, right after \fB*PPD-Adobe: "4.3"\fR, where
-\fI<command>\fR is a command into which you wnat to re-direct the
+\fI<command>\fR is a command into which you want to re-direct the
output data. Due to the restrictions of PPD files \fB<\fR, \fB>\fR, and
\fB"\fR are not allowed in the \fI<command>\fR, replace them as
follows:
@@ -203,7 +203,7 @@ therefore get ignored):
.BI textfilter: \ <command>
\fRSelects the filter for input files which are not PostScript or PDF.
\fI<command>\fR is one of \fBa2ps\fR, \fBenscript\fR, or \fBmpage\fR.
-foomatic-rip auitomatically selects the needed command line options.
+foomatic-rip automatically selects the needed command line options.
.TP 10
.B debug: 0|1
diff --git a/foomaticrip.c b/foomaticrip.c
index 41a7577..1970c7c 100644
--- a/foomaticrip.c
+++ b/foomaticrip.c
@@ -45,6 +45,9 @@
#include <signal.h>
#include <pwd.h>
+#ifdef HAVE_DBUS
+ #include "colord.h"
+#endif
/* Logging */
FILE* logh = NULL;
@@ -1045,11 +1048,17 @@ int print_file(const char *filename, int convert)
"/cups/filter") which CUPS adds to the beginning of $PATH,
so that Poppler's/XPDF's pdftops filter is called and not
the one of CUPS, as the one of CUPS has a different command
- line and does undesired page management operations */
+ line and does undesired page management operations.
+ The "-dNOINTERPOLATE" makes Ghostscript rendering
+ significantly faster.
+ Note that Ghostscript's "pswrite" output device turns text
+ into bitmaps and therefore produces huge PostScript files.
+ In addition, this output device is deprecated. Therefore
+ we use "ps2write". */
snprintf(pdf2ps_cmd, PATH_MAX,
"%spdftops -level2 -origpagesizes %s - 2>/dev/null || "
- "gs -q -sstdout=%%stderr -sDEVICE=pswrite -sOutputFile=- "
- "-dBATCH -dNOPAUSE -dPARANOIDSAFER %s 2>/dev/null",
+ "gs -q -sstdout=%%stderr -sDEVICE=ps2write -sOutputFile=- "
+ "-dBATCH -dNOPAUSE -dPARANOIDSAFER -dNOINTERPOLATE %s 2>/dev/null",
(spooler == SPOOLER_CUPS ?
"PATH=${PATH#*/cups/filter:} " : ""),
filename, filename);
@@ -1236,8 +1245,11 @@ int main(int argc, char** argv)
}
/* Check for LPRng first so we do not pick up bogus ppd files by the -ppd option */
- if (arglist_remove_flag(arglist, "--lprng"))
- spooler = SPOOLER_LPRNG;
+ if (spooler != SPOOLER_CUPS && spooler != SPOOLER_PPR &&
+ spooler != SPOOLER_PPR_INT) {
+ if (arglist_remove_flag(arglist, "--lprng"))
+ spooler = SPOOLER_LPRNG;
+ }
/* 'PRINTCAP_ENTRY' environment variable is : LPRng
the :ppd=/path/to/ppdfile printcap entry should be used */
@@ -1259,96 +1271,104 @@ int main(int argc, char** argv)
}
}
- /* PPD file name given via the command line
- allow duplicates, and use the last specified one */
- if (spooler != SPOOLER_LPRNG) {
- while ((str = arglist_get_value(arglist, "-p"))) {
- strncpy(job->ppdfile, str, 256);
- arglist_remove(arglist, "-p");
+ /* CUPS calls foomatic-rip only with 5 or 6 positional parameters,
+ not with named options, like for example "-p <string>". Also PPR
+ does not used named options. */
+ if (spooler != SPOOLER_CUPS && spooler != SPOOLER_PPR &&
+ spooler != SPOOLER_PPR_INT) {
+ /* Check for LPD/GNUlpr by typical options which the spooler puts onto
+ the filter's command line (options "-w": text width, "-l": text
+ length, "-i": indent, "-x", "-y": graphics size, "-c": raw printing,
+ "-n": user name, "-h": host name) */
+ if ((str = arglist_get_value(arglist, "-h"))) {
+ if (spooler != SPOOLER_GNULPR && spooler != SPOOLER_LPRNG)
+ spooler = SPOOLER_LPD;
+ strncpy(job->host, str, 127);
+ job->host[127] = '\0';
+ arglist_remove(arglist, "-h");
}
- }
- while ((str = arglist_get_value(arglist, "--ppd"))) {
- strncpy(job->ppdfile, str, 256);
- arglist_remove(arglist, "--ppd");
- }
-
- /* Check for LPD/GNUlpr by typical options which the spooler puts onto
- the filter's command line (options "-w": text width, "-l": text
- length, "-i": indent, "-x", "-y": graphics size, "-c": raw printing,
- "-n": user name, "-h": host name) */
- if ((str = arglist_get_value(arglist, "-h"))) {
- if (spooler != SPOOLER_GNULPR && spooler != SPOOLER_LPRNG)
- spooler = SPOOLER_LPD;
- strncpy(job->host, str, 127);
- job->host[127] = '\0';
- arglist_remove(arglist, "-h");
- }
- if ((str = arglist_get_value(arglist, "-n"))) {
- if (spooler != SPOOLER_GNULPR && spooler != SPOOLER_LPRNG)
- spooler = SPOOLER_LPD;
-
- strncpy(job->user, str, 127);
- job->user[127] = '\0';
- arglist_remove(arglist, "-n");
- }
- if (arglist_remove(arglist, "-w") ||
- arglist_remove(arglist, "-l") ||
- arglist_remove(arglist, "-x") ||
- arglist_remove(arglist, "-y") ||
- arglist_remove(arglist, "-i") ||
- arglist_remove_flag(arglist, "-c")) {
+ if ((str = arglist_get_value(arglist, "-n"))) {
if (spooler != SPOOLER_GNULPR && spooler != SPOOLER_LPRNG)
spooler = SPOOLER_LPD;
- }
- /* LPRng delivers the option settings via the "-Z" argument */
- if ((str = arglist_get_value(arglist, "-Z"))) {
- spooler = SPOOLER_LPRNG;
- dstrcatf(job->optstr, "%s ", str);
- arglist_remove(arglist, "-Z");
- }
- /* Job title and options for stock LPD */
- if ((str = arglist_get_value(arglist, "-j")) || (str = arglist_get_value(arglist, "-J"))) {
- strncpy_omit(job->title, str, 128, omit_shellescapes);
- if (spooler == SPOOLER_LPD)
- dstrcatf(job->optstr, "%s ", job->title);
- if (!arglist_remove(arglist, "-j"))
- arglist_remove(arglist, "-J");
- }
- /* Check for CPS */
- if (arglist_remove_flag(arglist, "--cps") > 0)
- spooler = SPOOLER_CPS;
-
- /* Options for spooler-less printing, CPS, or PDQ */
- while ((str = arglist_get_value(arglist, "-o"))) {
- strncpy_omit(tmp, str, 1024, omit_shellescapes);
- dstrcatf(job->optstr, "%s ", tmp);
- arglist_remove(arglist, "-o");
- /* If we don't print as PPR RIP or as CPS filter, we print
- without spooler (we check for PDQ later) */
- if (spooler != SPOOLER_PPR && spooler != SPOOLER_CPS)
- spooler = SPOOLER_DIRECT;
- }
- /* Printer for spooler-less printing or PDQ */
- if ((str = arglist_get_value(arglist, "-d"))) {
- strncpy_omit(job->printer, str, 256, omit_shellescapes);
- arglist_remove(arglist, "-d");
- }
+ strncpy(job->user, str, 127);
+ job->user[127] = '\0';
+ arglist_remove(arglist, "-n");
+ }
+ if (arglist_remove(arglist, "-w") ||
+ arglist_remove(arglist, "-l") ||
+ arglist_remove(arglist, "-x") ||
+ arglist_remove(arglist, "-y") ||
+ arglist_remove(arglist, "-i") ||
+ arglist_remove_flag(arglist, "-c")) {
+ if (spooler != SPOOLER_GNULPR && spooler != SPOOLER_LPRNG)
+ spooler = SPOOLER_LPD;
+ }
+ /* LPRng delivers the option settings via the "-Z" argument */
+ if ((str = arglist_get_value(arglist, "-Z"))) {
+ spooler = SPOOLER_LPRNG;
+ dstrcatf(job->optstr, "%s ", str);
+ arglist_remove(arglist, "-Z");
+ }
+ /* Job title and options for stock LPD */
+ if ((str = arglist_get_value(arglist, "-j")) || (str = arglist_get_value(arglist, "-J"))) {
+ strncpy_omit(job->title, str, 128, omit_shellescapes);
+ if (spooler == SPOOLER_LPD)
+ dstrcatf(job->optstr, "%s ", job->title);
+ if (!arglist_remove(arglist, "-j"))
+ arglist_remove(arglist, "-J");
+ }
- /* Printer for spooler-less printing, PDQ, or LPRng */
- if ((str = arglist_get_value(arglist, "-P"))) {
- strncpy_omit(job->printer, str, 256, omit_shellescapes);
- arglist_remove(arglist, "-P");
- }
+ /* Check for CPS */
+ if (arglist_remove_flag(arglist, "--cps") > 0)
+ spooler = SPOOLER_CPS;
+
+ /* PPD file name given via the command line
+ allow duplicates, and use the last specified one */
+ if (spooler != SPOOLER_GNULPR && spooler != SPOOLER_LPRNG &&
+ spooler != SPOOLER_LPD) {
+ while ((str = arglist_get_value(arglist, "-p"))) {
+ strncpy(job->ppdfile, str, 256);
+ arglist_remove(arglist, "-p");
+ }
+ while ((str = arglist_get_value(arglist, "--ppd"))) {
+ strncpy(job->ppdfile, str, 256);
+ arglist_remove(arglist, "--ppd");
+ }
+ }
- /* Were we called from a PDQ wrapper? */
- if (arglist_remove_flag(arglist, "--pdq"))
- spooler = SPOOLER_PDQ;
+ /* Options for spooler-less printing, CPS, or PDQ */
+ while ((str = arglist_get_value(arglist, "-o"))) {
+ strncpy_omit(tmp, str, 1024, omit_shellescapes);
+ dstrcatf(job->optstr, "%s ", tmp);
+ arglist_remove(arglist, "-o");
+ /* If we don't print as PPR RIP or as CPS filter, we print
+ without spooler (we check for PDQ later) */
+ if (spooler != SPOOLER_PPR && spooler != SPOOLER_CPS)
+ spooler = SPOOLER_DIRECT;
+ }
- /* Were we called to build the PDQ driver declaration file? */
- genpdqfile = check_pdq_file(arglist);
- if (genpdqfile)
- spooler = SPOOLER_PDQ;
+ /* Printer for spooler-less printing or PDQ */
+ if ((str = arglist_get_value(arglist, "-d"))) {
+ strncpy_omit(job->printer, str, 256, omit_shellescapes);
+ arglist_remove(arglist, "-d");
+ }
+
+ /* Printer for spooler-less printing, PDQ, or LPRng */
+ if ((str = arglist_get_value(arglist, "-P"))) {
+ strncpy_omit(job->printer, str, 256, omit_shellescapes);
+ arglist_remove(arglist, "-P");
+ }
+
+ /* Were we called from a PDQ wrapper? */
+ if (arglist_remove_flag(arglist, "--pdq"))
+ spooler = SPOOLER_PDQ;
+
+ /* Were we called to build the PDQ driver declaration file? */
+ genpdqfile = check_pdq_file(arglist);
+ if (genpdqfile)
+ spooler = SPOOLER_PDQ;
+ }
/* spooler specific initialization */
switch (spooler) {
@@ -1477,13 +1497,45 @@ int main(int argc, char** argv)
strlcat(pstoraster, " 0 '' '' 0 '%X'", 256);
break;
}
+ /* gstoraster is the new name for pstoraster */
+ strlcat(tmp, "/gstoraster", 1024);
+ if (access(tmp, X_OK) == 0) {
+ havepstoraster = 1;
+ strlcpy(pstoraster, tmp, 256);
+ strlcat(pstoraster, " 0 '' '' 0 '%X'", 256);
+ break;
+ }
}
if (!havepstoraster) {
- strcpy(pstoraster, "gs -dQUIET -dDEBUG -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOMEDIAATTRS -sDEVICE=cups -sOutputFile=-%W -");
+ const char **qualifier = NULL;
+ const char *icc_profile = NULL;
+
+ qualifier = get_ppd_qualifier();
+ _log("INFO: Using qualifer: '%s.%s.%s'\n",
+ qualifier[0], qualifier[1], qualifier[2]);
+
+ /* ask colord for the profile */
+ icc_profile = colord_get_profile_for_device_id ((const char *) getenv("PRINTER"),
+ qualifier);
+
+ /* fall back to PPD */
+ if (icc_profile == NULL) {
+ _log("INFO: need to look in PPD for matching qualifer\n");
+ icc_profile = get_icc_profile_for_qualifier(qualifier);
+ }
+
+ if (icc_profile != NULL)
+ snprintf(cmd, sizeof(cmd),
+ "-sOutputICCProfile='%s'", icc_profile);
+ else
+ cmd[0] = '\0';
+
+ snprintf(pstoraster, sizeof(pstoraster), "gs -dQUIET -dDEBUG -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -sDEVICE=cups %s -sOutputFile=- -", cmd);
}
/* build Ghostscript/CUPS driver command line */
snprintf(cmd, 1024, "%s | %s", pstoraster, cupsfilter);
+ _log("INFO: Using command line: %s\n", cmd);
/* Set environment variables */
setenv("PPD", job->ppdfile, 1);
diff --git a/options.c b/options.c
index 9a4b116..662cedd 100644
--- a/options.c
+++ b/options.c
@@ -31,6 +31,11 @@
#include <string.h>
#include <math.h>
+/* qualifier -> filename mapping entry */
+typedef struct icc_mapping_entry_s {
+ char *qualifier;
+ char *filename;
+} icc_mapping_entry_t;
/* Values from foomatic keywords in the ppd file */
char printer_model [256];
@@ -70,6 +75,8 @@ dstr_t *setupprepend;
dstr_t *pagesetupprepend;
+list_t *qualifier_data = NULL;
+char **qualifier = NULL;
option_t *optionlist = NULL;
option_t *optionlist_sorted_by_order = NULL;
@@ -78,7 +85,42 @@ int optionset_alloc, optionset_count;
char **optionsets;
+const char * get_icc_profile_for_qualifier(const char **qualifier)
+{
+ char tmp[1024];
+ char *profile = NULL;
+ listitem_t *i;
+ icc_mapping_entry_t *entry;
+
+ /* no data */
+ if (qualifier_data == NULL)
+ goto out;
+
+ /* search list for qualifier */
+ snprintf(tmp, sizeof(tmp), "%s.%s.%s",
+ qualifier[0], qualifier[1], qualifier[2]);
+ for (i = qualifier_data->first; i != NULL; i = i->next) {
+ entry = (icc_mapping_entry_t *) i->data;
+ if (strcmp(entry->qualifier, tmp) == 0) {
+ profile = entry->filename;
+ break;
+ }
+ }
+out:
+ return profile;
+}
+/* a selector is a general tri-dotted specification.
+ * The 2nd and 3rd elements of the qualifier are optionally modified by
+ * cupsICCQualifier2 and cupsICCQualifier3:
+ *
+ * [Colorspace].[{cupsICCQualifier2}].[{cupsICCQualifier3}]
+ */
+const char **
+get_ppd_qualifier ()
+{
+ return (const char**) qualifier;
+}
const char * type_name(int type)
{
@@ -239,6 +281,8 @@ void options_free()
{
option_t *opt;
int i;
+ listitem_t *item;
+ icc_mapping_entry_t *entry;
for (i = 0; i < optionset_count; i++)
free(optionsets[i]);
@@ -247,6 +291,20 @@ void options_free()
optionset_alloc = 0;
optionset_count = 0;
+ if (qualifier_data) {
+ for (item = qualifier_data->first; item != NULL; item = item->next) {
+ entry = (icc_mapping_entry_t *) item->data;
+ free(entry->qualifier);
+ free(entry->filename);
+ free(entry);
+ }
+ list_free(qualifier_data);
+ }
+
+ for (i=0; i<3; i++)
+ free(qualifier[i]);
+ free(qualifier);
+
while (optionlist) {
opt = optionlist;
optionlist = optionlist->next;
@@ -1493,6 +1551,9 @@ int optionset_equal(int optset1, int optset2, int exceptPS)
void read_ppd_file(const char *filename)
{
FILE *fh;
+ const char *tmp;
+ char *icc_qual2 = NULL;
+ char *icc_qual3 = NULL;
char line [256]; /* PPD line length is max 255 (excl. \0) */
char *p;
char key[128], name[64], text[64];
@@ -1501,6 +1562,7 @@ void read_ppd_file(const char *filename)
value_t *val;
option_t *opt, *current_opt = NULL;
param_t *param;
+ icc_mapping_entry_t *entry;
fh = fopen(filename, "r");
if (!fh) {
@@ -1511,6 +1573,7 @@ void read_ppd_file(const char *filename)
dstrassure(value, 256);
+ qualifier_data = list_create();
while (!feof(fh)) {
fgets(line, 256, fh);
@@ -1691,10 +1754,6 @@ void read_ppd_file(const char *filename)
else if (!prefixcmp(key, "Default")) {
/* Default<option>: <value> */
- /* TODO *DefaultColorSpace is a keyword and doesn't need to be extraced, does it? */
- if (!strcmp(key, "DefaultColorSpace"))
- continue;
-
opt = assure_option(&key[7]);
val = option_assure_value(opt, optionset("default"));
free(val->value);
@@ -1768,6 +1827,21 @@ void read_ppd_file(const char *filename)
/* "*FoomaticRIPOptionsEntityMaxLength: <length>" */
sscanf(value->data, "%d", &optionsentitymaxlen);
}
+ else if (!strcmp(key, "cupsICCProfile")) {
+ /* "*cupsICCProfile: <qualifier/Title> <filename>" */
+ entry = calloc(1, sizeof(icc_mapping_entry_t));
+ entry->qualifier = strdup(name);
+ entry->filename = strdup(value->data);
+ list_append (qualifier_data, entry);
+ }
+ else if (!strcmp(key, "cupsICCQualifier2")) {
+ /* "*cupsICCQualifier2: <value>" */
+ icc_qual2 = strdup(value->data);
+ }
+ else if (!strcmp(key, "cupsICCQualifier3")) {
+ /* "*cupsICCQualifier3: <value>" */
+ icc_qual3 = strdup(value->data);
+ }
}
fclose(fh);
@@ -1786,6 +1860,36 @@ void read_ppd_file(const char *filename)
defined in the PPD file */
option_set_value(opt, optionset("default"), opt->choicelist->value);
}
+
+ /* create qualifier for this PPD */
+ qualifier = calloc(4, sizeof(char*));
+
+ /* get colorspace */
+ tmp = option_get_value(find_option("ColorSpace"), optionset("default"));
+ if (tmp == NULL)
+ tmp = option_get_value(find_option("ColorModel"), optionset("default"));
+ if (tmp == NULL)
+ tmp = "";
+ qualifier[0] = strdup(tmp);
+
+ /* get selector2 */
+ if (icc_qual2 == NULL)
+ icc_qual2 = strdup("MediaType");
+ tmp = option_get_value(find_option(icc_qual2), optionset("default"));
+ if (tmp == NULL)
+ tmp = "";
+ qualifier[1] = strdup(tmp);
+
+ /* get selectors */
+ if (icc_qual3 == NULL)
+ icc_qual3 = strdup("Resolution");
+ tmp = option_get_value(find_option(icc_qual3), optionset("default"));
+ if (tmp == NULL)
+ tmp = "";
+ qualifier[2] = strdup(tmp);
+
+ free (icc_qual2);
+ free (icc_qual3);
}
int ppd_supports_pdf()
diff --git a/options.h b/options.h
index db7c3e9..242e8f2 100644
--- a/options.h
+++ b/options.h
@@ -177,6 +177,8 @@ void append_page_setup_section(dstr_t *str, int optset, int comments);
int build_commandline(int optset, dstr_t *cmdline, int pdfcmdline);
void set_options_for_page(int optset, int page);
+const char *get_icc_profile_for_qualifier(const char **qualifier);
+const char **get_ppd_qualifier(void);
#endif
diff --git a/pdf.c b/pdf.c
index c31542b..ebd6ab5 100644
--- a/pdf.c
+++ b/pdf.c
@@ -110,13 +110,14 @@ static int pdf_extract_pages(char filename[PATH_MAX],
{
char gscommand[4095];
char filename_arg[PATH_MAX], first_arg[50], last_arg[50];
+ int fd;
_log("Extracting pages %d through %d\n", first, last);
snprintf(filename, PATH_MAX, "%s/foomatic-XXXXXX", temp_dir());
- mktemp(filename);
- if (!filename[0])
+ if ((fd = mkstemp(filename)) == -1)
rip_die(EXIT_STARVED, "Unable to create temporary file!\n");
+ close (fd);
snprintf(filename_arg, PATH_MAX, "-sOutputFile=%s", filename);
snprintf(first_arg, 50, "-dFirstPage=%d", first);
@@ -125,7 +126,7 @@ static int pdf_extract_pages(char filename[PATH_MAX],
else
first_arg[0] = '\0';
- snprintf(gscommand, 4095, "%s -q -dNOPAUSE -dBATCH -dPARANOIDSAFER"
+ snprintf(gscommand, 4095, "%s -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -dNOINTERPOLATE"
"-sDEVICE=pdfwrite %s %s %s %s",
gspath, filename_arg, first_arg, last_arg, pdffilename);
diff --git a/renderer.c b/renderer.c
index 4a46e9c..e360091 100644
--- a/renderer.c
+++ b/renderer.c
@@ -43,7 +43,7 @@ int test_gs_output_redirection()
char output[10] = "";
snprintf(gstestcommand, PATH_MAX, "%s -dQUIET -dPARANOIDSAFER -dNOPAUSE "
- "-dBATCH -dNOMEDIAATTRS -sDEVICE=pswrite -sstdout=%%stderr "
+ "-dBATCH -dNOMEDIAATTRS -sDEVICE=ps2write -sstdout=%%stderr "
"-sOutputFile=/dev/null -c '(hello\n) print flush' 2>&1", gspath);
FILE *pd = popen(gstestcommand, "r");