[gs-cvs] rev 7970 - in trunk/gs: . contrib lib src
till at ghostscript.com
till at ghostscript.com
Mon May 14 02:34:56 PDT 2007
Author: till
Date: 2007-05-14 02:34:52 -0700 (Mon, 14 May 2007)
New Revision: 7970
Added:
trunk/gs/contrib/chp2200/
trunk/gs/contrib/contrib.mak
trunk/gs/contrib/defs.h
trunk/gs/contrib/eplaser/
trunk/gs/contrib/epson740/
trunk/gs/contrib/gdevbjc_.c
trunk/gs/contrib/gdevbjc_.h
trunk/gs/contrib/gdevbjca.c
trunk/gs/contrib/gdevcd8.c
trunk/gs/contrib/gdevcd8.h
trunk/gs/contrib/gdevdj9.c
trunk/gs/contrib/gdevgdi.c
trunk/gs/contrib/gdevhl12.c
trunk/gs/contrib/gdevln03.c
trunk/gs/contrib/gdevlx32.c
trunk/gs/contrib/gdevlx50.c
trunk/gs/contrib/gdevlx7.c
trunk/gs/contrib/gdevmd2k.c
trunk/gs/contrib/gdevop4w.c
trunk/gs/contrib/gdevxes.c
trunk/gs/contrib/gomni.c
trunk/gs/contrib/japanese/
trunk/gs/contrib/lips4/
trunk/gs/contrib/lxm3200-tweaked/
trunk/gs/contrib/md2k_md5k/
trunk/gs/contrib/opvp/
trunk/gs/contrib/pcl3/
trunk/gs/contrib/uniprint/
trunk/gs/cups/
Modified:
trunk/gs/lib/gs_init.ps
trunk/gs/lib/gs_setpd.ps
trunk/gs/src/Makefile.in
trunk/gs/src/configure.ac
trunk/gs/src/contrib.mak
trunk/gs/src/devs.mak
trunk/gs/src/gconf.c
trunk/gs/src/gdevcdj.c
trunk/gs/src/gdevdjet.c
trunk/gs/src/gdevdljm.c
trunk/gs/src/gdevdljm.h
trunk/gs/src/gdevl256.c
trunk/gs/src/gdevlbp8.c
trunk/gs/src/gdevlj56.c
trunk/gs/src/gdevpx.c
trunk/gs/src/gdevpxut.c
trunk/gs/src/gdevpxut.h
trunk/gs/src/gdevvglb.c
trunk/gs/src/gdevxalt.c
trunk/gs/src/gp_unix.c
trunk/gs/src/gs.mak
trunk/gs/src/lib.mak
trunk/gs/src/unix-aux.mak
trunk/gs/src/unix-gcc.mak
trunk/gs/src/unixinst.mak
Log:
Merged in extra functionality of ESP Ghostscript (from branch "gs-esp-gpl-merger")
Copied: trunk/gs/contrib/chp2200 (from rev 7969, branches/gs-esp-gpl-merger/contrib/chp2200)
Copied: trunk/gs/contrib/contrib.mak (from rev 7969, branches/gs-esp-gpl-merger/contrib/contrib.mak)
Copied: trunk/gs/contrib/defs.h (from rev 7969, branches/gs-esp-gpl-merger/contrib/defs.h)
Copied: trunk/gs/contrib/eplaser (from rev 7969, branches/gs-esp-gpl-merger/contrib/eplaser)
Copied: trunk/gs/contrib/epson740 (from rev 7969, branches/gs-esp-gpl-merger/contrib/epson740)
Copied: trunk/gs/contrib/gdevbjc_.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevbjc_.c)
Copied: trunk/gs/contrib/gdevbjc_.h (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevbjc_.h)
Copied: trunk/gs/contrib/gdevbjca.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevbjca.c)
Copied: trunk/gs/contrib/gdevcd8.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevcd8.c)
Copied: trunk/gs/contrib/gdevcd8.h (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevcd8.h)
Copied: trunk/gs/contrib/gdevdj9.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevdj9.c)
Copied: trunk/gs/contrib/gdevgdi.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevgdi.c)
Copied: trunk/gs/contrib/gdevhl12.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevhl12.c)
Copied: trunk/gs/contrib/gdevln03.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevln03.c)
Copied: trunk/gs/contrib/gdevlx32.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevlx32.c)
Copied: trunk/gs/contrib/gdevlx50.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevlx50.c)
Copied: trunk/gs/contrib/gdevlx7.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevlx7.c)
Copied: trunk/gs/contrib/gdevmd2k.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevmd2k.c)
Copied: trunk/gs/contrib/gdevop4w.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevop4w.c)
Copied: trunk/gs/contrib/gdevxes.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gdevxes.c)
Copied: trunk/gs/contrib/gomni.c (from rev 7969, branches/gs-esp-gpl-merger/contrib/gomni.c)
Copied: trunk/gs/contrib/japanese (from rev 7969, branches/gs-esp-gpl-merger/contrib/japanese)
Copied: trunk/gs/contrib/lips4 (from rev 7969, branches/gs-esp-gpl-merger/contrib/lips4)
Copied: trunk/gs/contrib/lxm3200-tweaked (from rev 7969, branches/gs-esp-gpl-merger/contrib/lxm3200-tweaked)
Copied: trunk/gs/contrib/md2k_md5k (from rev 7969, branches/gs-esp-gpl-merger/contrib/md2k_md5k)
Copied: trunk/gs/contrib/opvp (from rev 7969, branches/gs-esp-gpl-merger/contrib/opvp)
Copied: trunk/gs/contrib/pcl3 (from rev 7969, branches/gs-esp-gpl-merger/contrib/pcl3)
Copied: trunk/gs/contrib/uniprint (from rev 7969, branches/gs-esp-gpl-merger/contrib/uniprint)
Copied: trunk/gs/cups (from rev 7969, branches/gs-esp-gpl-merger/cups)
Modified: trunk/gs/lib/gs_init.ps
===================================================================
--- trunk/gs/lib/gs_init.ps 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/lib/gs_init.ps 2007-05-14 09:34:52 UTC (rev 7970)
@@ -152,6 +152,7 @@
currentdict /NOFONTPATH known /NOFONTPATH exch def
currentdict /NOGC known /NOGC exch def
currentdict /NOINTERPOLATE .knownget { /INTERPOLATE exch not def } if
+currentdict /NOMEDIAATTRS known /NOMEDIAATTRS exch def
currentdict /NOOUTERSAVE known /NOOUTERSAVE exch def
currentdict /NOPAGEPROMPT known /NOPAGEPROMPT exch def
currentdict /NOPAUSE known /NOPAUSE exch def
Modified: trunk/gs/lib/gs_setpd.ps
===================================================================
--- trunk/gs/lib/gs_setpd.ps 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/lib/gs_setpd.ps 2007-05-14 09:34:52 UTC (rev 7970)
@@ -164,8 +164,20 @@
% We don't include attributes such as .MediaSize, which all devices
% are guaranteed to supply on their own.
/.defaultpolicies mark
- /PolicyNotFound 1
- /PageSize 0
+ % M. Sweet, Easy Software Products
+ %
+ % Due to the fact that it is not possible to properly implement
+ % the selection policies from a Ghostscript driver, we have changed
+ % the default policy to "7" (impose) to avoid numerous problems with
+ % printing within CUPS...
+ %
+ NOMEDIAATTRS {
+ /PolicyNotFound 7
+ /PageSize 7
+ } {
+ /PolicyNotFound 1
+ /PageSize 0
+ } ifelse
/PolicyReport {
dup /.LockSafetyParams known {
% Only possible error is invalidaccess
@@ -376,22 +388,43 @@
} bind
.dicttomark readonly def
-% Define the keys used in input attribute matching.
-/.inputattrkeys [
- /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet /ManualFeed
- % The following are documented in Adobe's supplement for v2017.
- /LeadingEdge /MediaClass
-] readonly def
-% Define other keys used in media selection.
-/.inputselectionkeys [
- /MediaPosition /Orientation
-] readonly def
+% M. Sweet, Easy Software Products:
+%
+% Define NOMEDIAATTRS to turn off the default (but unimplementable) media
+% selection policies for setpagedevice. This is used by CUPS to support
+% the standard Adobe media attributes.
+NOMEDIAATTRS {
+ % Define only PageSize for input attribute matching.
+ /.inputattrkeys [
+ /PageSize
+ ] readonly def
+ % Define no other keys used in media selection.
+ /.inputselectionkeys [
+ /noInputSelectionsKeys
+ ] readonly def
-% Define the keys used in output attribute matching.
-/.outputattrkeys [
- /OutputType
-] readonly def
+ % Define no keys used in output attribute matching.
+ /.outputattrkeys [
+ /noOutputAttrKeys
+ ] readonly def
+} {
+ % Define the keys used in input attribute matching.
+ /.inputattrkeys [
+ /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet /ManualFeed
+ % The following are documented in Adobe's supplement for v2017.
+ /LeadingEdge /MediaClass
+ ] readonly def
+ % Define other keys used in media selection.
+ /.inputselectionkeys [
+ /MediaPosition /Orientation
+ ] readonly def
+ % Define the keys used in output attribute matching.
+ /.outputattrkeys [
+ /OutputType /Duplex /Tumble /ManualFeed
+ ] readonly def
+} ifelse
+
% Define all the parameters that should always be copied to the merged
% dictionary.
/.copiedkeys [
@@ -502,11 +535,22 @@
% They are expected to consume the top 2 operands.
% NOTE: we currently treat all values other than 0, 1, or 7 (for PageSize)
% the same as 0, i.e., we signal an error.
+%
+% M. Sweet, Easy Software Products:
+%
+% Define NOMEDIAATTRS to turn off the default (but unimplementable) media
+% selection policies for setpagedevice. This is used by CUPS to support
+% the standard Adobe media attributes.
0 { % Set errorinfo and signal a configurationerror.
+ NOMEDIAATTRS {
+ % NOMEDIAATTRS means that the default policy is 7...
+ pop 2 index exch 7 put
+ } {
pop dup 4 index exch get 2 array astore
$error /errorinfo 3 -1 roll put
cleartomark
/setpagedevice .systemvar /configurationerror signalerror
+ } ifelse
} bind
1 { % Roll back the failed request to its previous status.
SETPDDEBUG { (Rolling back.) = pstack flush } if
Modified: trunk/gs/src/Makefile.in
===================================================================
--- trunk/gs/src/Makefile.in 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/Makefile.in 2007-05-14 09:34:52 UTC (rev 7970)
@@ -30,6 +30,7 @@
PSLIBDIR=./lib
PSGENDIR=./obj
PSOBJDIR=./obj
+CONTRIBDIR=./contrib
# Do not edit the next group of lines.
@@ -48,6 +49,7 @@
INSTALL = $(GLSRCDIR)/instcopy -c
INSTALL_PROGRAM = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
+INSTALL_SHARED = @INSTALL_SHARED@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -56,9 +58,15 @@
libdir = @libdir@
mandir = @mandir@
man1ext = 1
+man1dir = $(mandir)/man$(man1ext)
datadir = @datadir@
-gsdir = $(datadir)/ghostscript
+datarootdir = @datarootdir@
+
+# The following must be substituted using @datadir@ and @libdir@
+# to avoid adding RPM generation paths (CUPS STR #1112)
+gsdir = @datadir@/ghostscript
gsdatadir = $(gsdir)/$(GS_DOT_VERSION)
+gssharedir = @libdir@/ghostscript/$(GS_DOT_VERSION)
docdir=$(gsdatadir)/doc
exdir=$(gsdatadir)/examples
@@ -67,7 +75,7 @@
# Define the default directory/ies for the runtime
# initialization and font files. Separate multiple directories with a :.
-GS_LIB_DEFAULT=$(gsdatadir)/lib:$(gsdatadir)/Resource:$(gsdir)/fonts
+GS_LIB_DEFAULT=$(gsdatadir)/lib:$(gsdatadir)/Resource:$(gsdir)/fonts:@fontpath@
# Define the default directory for cached data files
# this must be a single path.
@@ -232,7 +240,7 @@
CFLAGS_STANDARD=@OPT_CFLAGS@
CFLAGS_DEBUG=-g -O
CFLAGS_PROFILE=-pg @OPT_CFLAGS@
-CFLAGS_SO=-fPIC
+CFLAGS_SO=@DYNAMIC_CFLAGS@
# Define the other compilation flags. Add at most one of the following:
# -DBSD4_2 for 4.2bsd systems.
@@ -245,7 +253,7 @@
# We don't include -ansi, because this gets in the way of the platform-
# specific stuff that <math.h> typically needs; nevertheless, we expect
# gcc to accept ANSI-style function prototypes and function definitions.
-XCFLAGS=
+XCFLAGS=@DYNAMIC_FLAGS@
# defines from autoconf; note that we don't use these at present.
ACDEFS=@DEFS@
@@ -259,7 +267,7 @@
# -R /usr/local/xxx/lib:/usr/local/lib
# giving the full path names of the shared library directories.
# XLDFLAGS can be set from the command line.
-XLDFLAGS=
+XLDFLAGS=@X_LDFLAGS@
LDFLAGS=@LDFLAGS@ $(XLDFLAGS)
@@ -270,7 +278,7 @@
# Solaris may need -lnsl -lsocket -lposix4.
# (Libraries required by individual drivers are handled automatically.)
-EXTRALIBS=
+EXTRALIBS=@LIBS@ @DYNAMIC_LIBS@
# Define the standard libraries to search at the end of linking.
# Most platforms require -lpthread for the POSIX threads library;
@@ -305,10 +313,10 @@
# the -L (or whatever). It also defines X_PRE_LIBS and X_EXTRA_LIBS
# all three of which are stripped and slotted into XLIBS below.
# Usually however, all but X_LIBS are empty on modern platforms.
-XLIBDIRS=@X_LIBS@
+XLIBDIRS=@X_LDFLAGS@
XLIBDIR=
#XLIBS=Xt Xext X11
-XLIBS=@XLIBS@
+XLIBS=@X_LIBS@
# Define whether this platform has floating point hardware:
# FPU_TYPE=2 means floating point is faster than fixed point.
@@ -331,11 +339,19 @@
# Default is No sync primitives since some platforms don't have it (HP-UX)
SYNC=nosync
+# programs we use
+RM=rm -f
+
+# ------ Dynamic loader options ------- #
+SOC_CFLAGS = @SOC_CFLAGS@
+SOC_LIBS = @SOC_LIBS@
+SOC_LOADER = @SOC_LOADER@
+
# ------ Devices and features ------ #
# Choose the language feature(s) to include. See gs.mak for details.
-FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev $(PSD)fapi.dev @JBIG2DEVS@ @JPXDEVS@
+FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev $(PSD)fapi.dev @JBIG2DEVS@ @JPXDEVS@
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(GLD)pipe.dev
# The following is strictly for testing.
@@ -373,7 +389,7 @@
# Override the default device. This is set to 'display' by
# unix-dll.mak when building a shared object.
-DISPLAY_DEV=
+DISPLAY_DEV=$(DD)bbox.dev
# Define the name table capacity size of 2^(16+n).
# Setting this to a non-zero value will slow down the interpreter.
@@ -384,32 +400,59 @@
# devs.mak and contrib.mak for the list of available devices.
#DEVICE_DEVS=$(DISPLAY_DEV) $(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev
-DEVICE_DEVS=$(DISPLAY_DEV) @X11DEVS@
+#DEVICE_DEVS=$(DISPLAY_DEV) @X11DEVS@
+#DEVICE_DEVS=$(DISPLAY_DEV) @X_DEVS@
-DEVICE_DEVS1=$(DD)bmpmono.dev $(DD)bmpgray.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)bmp16.dev $(DD)bmp256.dev $(DD)bmp16m.dev $(DD)bmp32b.dev
-DEVICE_DEVS2=#$(DD)gdevjbig2.dev $(DD)gdevjpx.dev #$(DD)rinkj.dev
-DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev $(DD)lj5mono.dev $(DD)lj5gray.dev
-DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev $(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev
-DEVICE_DEVS5=$(DD)uniprint.dev @IJSDEVS@
-DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev
-DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev $(DD)cfax.dev
-DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev
-DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev
-DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
-DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiffsep.dev
-DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
+#DEVICE_DEVS1=$(DD)bmpmono.dev $(DD)bmpgray.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)bmp16.dev $(DD)bmp256.dev $(DD)bmp16m.dev $(DD)bmp32b.dev
+#DEVICE_DEVS2=#$(DD)gdevjbig2.dev $(DD)gdevjpx.dev #$(DD)rinkj.dev
+#DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev $(DD)lj5mono.dev $(DD)lj5gray.dev
+#DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev $(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev
+#DEVICE_DEVS5=$(DD)uniprint.dev @IJSDEVS@
+#DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev
+#DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev $(DD)cfax.dev
+#DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev
+#DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev
+#DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
+#DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiffsep.dev
+#DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
#DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev
-DEVICE_DEVS13=@PNGDEVS@
-DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev
-DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)ps2write.dev $(DD)epswrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
-DEVICE_DEVS16=$(DD)bbox.dev
+#DEVICE_DEVS13=@PNGDEVS@
+#DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev
+#DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)ps2write.dev $(DD)epswrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
+#DEVICE_DEVS16=$(DD)bbox.dev
+#DEVICE_DEVS17=
+#DEVICE_DEVS18=
+#DEVICE_DEVS19=
+#DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5c.dev
+#DEVICE_DEVS21=$(DD)spotcmyk.dev $(DD)devicen.dev $(DD)xcf.dev $(DD)psdcmyk.dev $(DD)psdrgb.dev
+DEVICE_DEVS=$(DISPLAY_DEV) @X_DEVS@
+DEVICE_DEVS1=@FILES@
+DEVICE_DEVS2=@PRINTERS@
+DEVICE_DEVS3=@CUPSDEV@
+DEVICE_DEVS4=@IJSDEVS@
+DEVICE_DEVS5=@OMNIDEVS@
+DEVICE_DEVS6=@PNGDEVS@
+DEVICE_DEVS7=@JBIG2DEVS@
+DEVICE_DEVS8=
+DEVICE_DEVS9=
+DEVICE_DEVS10=
+DEVICE_DEVS11=
+DEVICE_DEVS12=
+DEVICE_DEVS13=
+DEVICE_DEVS14=
+DEVICE_DEVS15=
+DEVICE_DEVS16=
DEVICE_DEVS17=
DEVICE_DEVS18=
DEVICE_DEVS19=
-DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5c.dev
-DEVICE_DEVS21=$(DD)spotcmyk.dev $(DD)devicen.dev $(DD)xcf.dev $(DD)psdcmyk.dev $(DD)psdrgb.dev
+DEVICE_DEVS20=
+DEVICE_DEVS21=
+
+# Shared library target to build.
+GS_SHARED_OBJS=@DYNAMIC_DEVS@
+
# ---------------------------- End of options --------------------------- #
# Define the name of the partial makefile that specifies options --
@@ -427,9 +470,13 @@
CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS)
CC_=$(CC) $(CCFLAGS)
CCAUX=$(CC) $(GCFLAGS)
+CC_LEAF=$(CC_)
+# note gcc can't use -fomit-frame-pointer with -pg.
+CC_LEAF_PG=$(CC_)
# These are the specific warnings we have to turn off to compile those
# specific few files that need this. We may turn off others in the future.
CC_NO_WARN=$(CC_)
+CC_SHARED=$(CC_) @DYNAMIC_LDFLAGS@
# ---------------- End of platform-specific section ---------------- #
@@ -455,6 +502,8 @@
include $(GLSRCDIR)/unix-dll.mak
include $(GLSRCDIR)/unix-end.mak
include $(GLSRCDIR)/unixinst.mak
+ at CONTRIBINCLUDE@
+ at CUPSINCLUDE@
# Clean up after the autotools scripts
# configure.ac and Makefile.in are symlinks from a subdir
Modified: trunk/gs/src/configure.ac
===================================================================
--- trunk/gs/src/configure.ac 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/configure.ac 2007-05-14 09:34:52 UTC (rev 7970)
@@ -22,6 +22,12 @@
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(src/gs.c)
+dnl Inherit compiler flags from the environment...
+CFLAGS="${CFLAGS:=}"
+CPPFLAGS="${CPPFLAGS:=}"
+CXXFLAGS="${CXXFLAGS:=}"
+LDFLAGS="${LDFLAGS:=}"
+
dnl --------------------------------------------------
dnl Check for programs
dnl --------------------------------------------------
@@ -36,6 +42,20 @@
AC_PROG_RANLIB
#AC_PROG_INSTALL
+dnl --------------------------------------------------
+dnl Allow excluding the contributed drivers
+dnl --------------------------------------------------
+
+AC_ARG_ENABLE(contrib, [ --disable-contrib do not include contributed drivers [default=include]])
+CONTRIBINCLUDE="include contrib/contrib.mak"
+INSTALL_CONTRIB="install-contrib-extras"
+if test x$enable_contrib = xno; then
+ CONTRIBINCLUDE=""
+ INSTALL_CONTRIB=""
+ CFLAGS="$CFLAGS -DNOCONTRIB"
+fi
+AC_SUBST(CONTRIBINCLUDE)
+
dnl --------------------------------------------------
dnl Set build flags based on environment
dnl --------------------------------------------------
@@ -53,6 +73,12 @@
optflags_to_try="-O"
fi
+AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]])
+if test x$enable_debug = xyes; then
+ optflags_to_try="-g"
+ CFLAGS="-DDEBUG $CFLAGS"
+fi
+
AC_MSG_CHECKING([supported compiler flags])
old_cflags=$CFLAGS
echo
@@ -144,6 +170,8 @@
GCFLAGS="$GCFLAGS -DGX_COLOR_INDEX_TYPE=\"$uint64_type\""
fi
+dnl pkg-config is used for several tests now...
+AC_PATH_PROG(PKGCONFIG, pkg-config)
dnl --------------------------------------------------
dnl Check for libraries
@@ -152,6 +180,50 @@
AC_CHECK_LIB(m, cos)
dnl AC_CHECK_LIB(pthread, pthread_create)
+dnl Tests for iconv (Needed for OpenPrinting Vector, "opvp" output device)
+AC_ARG_WITH(libiconv,
+ [AC_HELP_STRING([--with-libiconv=@<:@no/gnu/native@:>@],
+ [use the libiconv library])],,
+ [with_libiconv=maybe])
+found_iconv=no
+case $with_libiconv in
+ maybe)
+ # Check in the C library first
+ AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes])
+ # Check if we have GNU libiconv
+ if test $found_iconv = "no"; then
+ AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes])
+ fi
+ # Check if we have a iconv in -liconv, possibly from vendor
+ if test $found_iconv = "no"; then
+ AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes])
+ fi
+ ;;
+ no)
+ AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes])
+ ;;
+ gnu|yes)
+ AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes])
+ ;;
+ native)
+ AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes])
+ ;;
+esac
+if test x$found_iconv != xno -a x$with_libiconv != xno ; then
+ LIBS="$LIBS -liconv"
+fi
+
+case $with_libiconv in
+ gnu)
+ AC_DEFINE(USE_LIBICONV_GNU, 1, [Using GNU libiconv])
+ ;;
+ native)
+ AC_DEFINE(USE_LIBICONV_NATIVE, 1, [Using a native implementation of iconv in a separate library])
+ ;;
+esac
+
+AC_CHECK_LIB(dl, dlopen)
+
AC_MSG_CHECKING([for local jpeg library source])
dnl At present, we give the local source priority over the shared
dnl build, so that the D_MAX_BLOCKS_IN_MCU patch will be applied.
@@ -246,6 +318,40 @@
AC_SUBST(LIBPNGDIR)
AC_SUBST(PNGDEVS)
+dnl look for CUPS...
+AC_ARG_ENABLE(cups, [ --enable-cups turn on CUPS support, default=yes])
+
+CUPSDEV=""
+CUPSINCLUDE=""
+CUPSCONFIG="${CUPSCONFIG:=}"
+cups_datadir="/usr/share/cups"
+cups_serverroot="/etc/cups"
+cups_serverbin="/usr/lib/cups"
+
+if ( test -d cups ); then
+ if test x$enable_cups != xno; then
+ AC_PATH_PROG(CUPSCONFIG,cups-config)
+ if test "x$CUPSCONFIG" != x; then
+ dnl Use values from CUPS config...
+# LIBS="`$CUPSCONFIG --ldflags` `$CUPSCONFIG --static --image --libs | sed -e '1,$s/-lssl//'` $LIBS"
+ LIBS="`$CUPSCONFIG --ldflags` `$CUPSCONFIG --image --libs` $LIBS"
+ CFLAGS="`$CUPSCONFIG --cflags` $CFLAGS -Dgs_stderr=stderr"
+ cups_serverroot="`$CUPSCONFIG --serverroot`"
+ cups_serverbin="`$CUPSCONFIG --serverbin`"
+ cups_datadir="`$CUPSCONFIG --datadir`"
+ CUPSINCLUDE="include cups/cups.mak"
+ CUPSDEV="\$(DD)cups.dev"
+ fi
+ fi
+fi
+
+AC_SUBST(CUPSDEV)
+AC_SUBST(CUPSCONFIG)
+AC_SUBST(CUPSINCLUDE)
+AC_SUBST(cups_datadir)
+AC_SUBST(cups_serverroot)
+AC_SUBST(cups_serverbin)
+
dnl look for IJS implementation
AC_ARG_WITH(ijs, AC_HELP_STRING([--with-ijs],[include IJS driver support]))
dnl set safe defaults
@@ -370,23 +476,76 @@
AC_SUBST(SHARE_JASPER)
AC_SUBST(JPXDEVS)
+dnl look for omni implementation
+AC_ARG_WITH([omni], AC_HELP_STRING([--with-omni],
+ [build the omni driver]))
+dnl set safe defaults
+OMNIDEVS=''
+INCLUDEOMNI=yes
+if ( ! test -z "$CONTRIBINCLUDE" ) && ( test x$with_omni != xno ); then
+ OMNIDEVS='$(DD)omni.dev'
+
+ if test -n "$GCC"; then
+ LIBS="$LIBS -lstdc++"
+ fi
+fi
+AC_SUBST(OMNIDEVS)
+
dnl optional X11 for display devices
AC_PATH_XTRA
-XLIBS=''
-if test x"$no_x" = x"yes"; then
- AC_MSG_NOTICE([disabling X11 output devices])
- X11DEVS=''
-else
- # enable X11 output devices
- X11DEVS='$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev'
- # the makefile wants a list of just the library names in XLIBS
- for item in -lXt $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS; do
- stripped=`echo "$item" | sed -e 's/-l//'`
- if test "x$stripped" != "x$item"; then
- XLIBS="$XLIBS $stripped"
+
+X_LDFLAGS=""
+X_CFLAGS=""
+X_DEVS=""
+X_LIBS=""
+
+if test x$no_x != xyes; then
+ if test "$x_libraries" = "/usr/lib"; then
+ echo "Ignoring X library directory \"$x_libraries\" requested by configure."
+ x_libraries="NONE"
+ fi
+ if test ! "$x_libraries" = "NONE" -a ! "$x_libraries" = ""; then
+ LDFLAGS="-L$x_libraries $LDFLAGS"
+ X_LDFLAGS="-L$x_libraries"
+ if test "$uname" = "SunOS"; then
+ X_LDFLAGS="$X_LDFLAGS -R$x_libraries"
fi
- done
+ fi
+
+ if test "$x_includes" = "/usr/include"; then
+ echo "Ignoring X include directory \"$x_includes\" requested by configure."
+ x_includes="NONE"
+ fi
+ if test ! "$x_includes" = "NONE" -a ! "$x_includes" = ""; then
+ X_CFLAGS="-I$x_includes"
+ fi
+
+ SAVELIBS="$LIBS"
+
+ AC_CHECK_LIB(X11,XOpenDisplay)
+ AC_CHECK_LIB(Xext,XdbeQueryExtension)
+ AC_CHECK_LIB(Xt,XtAppCreateShell)
+
+ LIBS="$SAVELIBS"
+
+ if test "$ac_cv_lib_Xt_XtAppCreateShell" = yes; then
+ X11DEVS="\$(DD)x11.dev \$(DD)x11alpha.dev \$(DD)x11cmyk.dev \$(DD)x11mono.dev \$(DD)x11_.dev \$(DD)x11alt_.dev \$(DD)x11cmyk2.dev \$(DD)x11cmyk4.dev \$(DD)x11cmyk8.dev \$(DD)x11rg16x.dev \$(DD)x11rg32x.dev \$(DD)x11gray2.dev \$(DD)x11gray4.dev"
+ X_DEVS=$X11DEVS
+ # the makefile wants a list of just the library names in XLIBS
+ for item in -lXt $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS; do
+ stripped=`echo "$item" | sed -e 's/-l//'`
+ if test "x$stripped" != "x$item"; then
+ XLIBS="$XLIBS $stripped"
+ fi
+ done
+ X_LIBS=$XLIBS
+ fi
fi
+
+AC_SUBST(X_LDFLAGS)
+AC_SUBST(X_CFLAGS)
+AC_SUBST(X_LIBS)
+AC_SUBST(X_DEVS)
AC_SUBST(X11DEVS)
AC_SUBST(XLIBS)
@@ -405,6 +564,285 @@
fi])
AC_SUBST(COMPILE_INITS)
+dnl look for drivers to compile...
+AC_ARG_WITH(drivers,
+[ --with-drivers=LIST Drivers to support, separated by commas.
+ Either list the drivers or use aliases:
+ ALL = all drivers
+ FILES = all file format drivers
+ PRINTERS = all printer drivers
+ Printers:
+ APPLE = all Apple printers
+ BROTHER = all Brother printers
+ CANON = all Canon printers
+ EPSON = all Epson printers
+ HP = all HP printers
+ IBM = all IBM printers
+ JAPAN = older japanese printers
+ LEXMARK = all Lexmark printers
+ OKI = all OKI printers
+ PCLXL = all PCL XL/6 printers
+ File formats:
+ BMP = Output to bmp files
+ FAX = Output to fax files
+ JPEG = Output to JPEG files
+ JPEG2000 = Output to JPEG 2000 files
+ PBM = Output to PBM/PNM
+ PCX = Output to PCX
+ PNG = Output to PNG
+ PS = Output to PostScript/PDF
+ TIFF = Output to TIFF
+ You can mix both variants, e.g.
+ --with-drivers=HP,stcolor would build HP drivers and
+ the Epson stcolor driver.
+ Aliases must be uppercase (a 3rd party driver might
+ have the same name).
+ Default: ALL],drivers="$withval",drivers="ALL")
+
+AC_ARG_WITH(driversfile,
+[ --with-driversfile=FILE Drivers to support from file, separated by newlines.],
+driversfile="$withval",driversfile="")
+
+if test "x$driversfile" != x; then
+ # Add drivers from file...
+ drivers="`tr '\n' ',' <$driversfile`"
+fi
+
+dnl Check which drivers we'd like to support.
+P_DEVS=""
+F_DEVS=""
+
+dnl Known printers
+HP_DEVS="cdj500 djet500 djet500c dnj650c cljet5pr deskjet laserjet ljetplus ljet2p ljet3 ljet3d ljet4 ljet4d lj4dith lj5mono lj5gray cdeskjet cdjcolor cdjmono cdj550 pj pjxl pjxl300 lp2563 paintjet pjetxl cljet5 cljet5c pxlmono pxlcolor cdj670 cdj850 cdj880 cdj890 cdj970 cdj1600 chp2200 pcl3 hpdjplus hpdjportable hpdj310 hpdj320 hpdj340 hpdj400 hpdj500 hpdj500c hpdj510 hpdj520 hpdj540 hpdj550c hpdj560c hpdj600 hpdj660c hpdj670c hpdj680c hpdj690c hpdj850c hpdj855c hpdj870c hpdj890c hpdj1120c lj3100sw"
+PCLXL_DEVS="pxlmono pxlcolor"
+EPSON_DEVS="eps9high eps9mid epson epsonc escp lp8000 lq850 photoex st800 stcolor alc1900 alc2000 alc4000 alc4100 alc8500 alc8600 alc9100 lp3000c lp8000c lp8200c lp8300c lp8500c lp8800c lp9000c lp9200c lp9500c lp9800c lps6500 epl2050 epl2050p epl2120 epl2500 epl2750 epl5800 epl5900 epl6100 epl6200 lp1800 lp1900 lp2200 lp2400 lp2500 lp7500 lp7700 lp7900 lp8100 lp8300f lp8400f lp8600 lp8600f lp8700 lp8900 lp9000b lp9100 lp9200b lp9300 lp9400 lp9600 lp9600s lps4500"
+CANON_DEVS="bj10e bj200 bjc600 bjc800 lbp8 lips3 bjcmono bjcgray bjccmyk bjccolor"
+LEXMARK_DEVS="lxm5700m lx5000 lxm3200 lex2050 lex3200 lex5700 lex7000"
+BROTHER_DEVS="hl7x0 hl1240 hl1250"
+APPLE_DEVS="appledmp iwhi iwlo iwlq"
+IBM_DEVS="ibmpro jetp3852"
+OKI_DEVS="oki182 okiibm oki4w"
+JAPAN_DEVS="lips4 lips4v ljet4pjl lj4dithp dj505j picty180 lips2p bjc880j pr201 pr150 pr1000 pr1000_4 jj100 bj10v bj10vh mj700v2c mj500c mj6000c mj8000c fmpr fmlbp ml600 lbp310 lbp320 md50Mono md50Eco md1xMono escpage lp2000 npdl rpdl"
+MISC_PDEVS="uniprint ap3250 atx23 atx24 atx38 coslw2p coslwxl cp50 declj250 fs600 imagen lj250 m8510 necp6 oce9050 r4081 sj48 tek4696 t4693d2 t4693d4 t4693d8 dl2100 la50 la70 la75 la75plus ln03 xes md2k md5k gdi samsunggdi"
+OPVP_DEVS="opvp oprp"
+
+dnl Known file formats
+BMP_DEVS="bmpmono bmpgray bmpsep1 bmpsep8 bmp16 bmp256 bmp16m bmp32b bmpa16 bmpa16m bmpa256 bmpa32b bmpamono bmpasep1 bmpasep8"
+FAX_DEVS="cfax dfaxlow dfaxhigh fax tfax tiffg3 tiffg32d tiffg4 faxg3 faxg32d faxg4"
+JPEG_DEVS="jpeg jpeggray"
+JPEG2000_DEVS="jpx"
+PNG_DEVS="png16 png16m png256 pngalpha pnggray pngmono"
+TIFF_DEVS="tiffs tiff12nc tiff24nc tiffcrle tifflzw tiffpack"
+PCX_DEVS="pcxmono pcxgray pcx16 pcx256 pcx24b pcxcmyk pcx2up"
+PBM_DEVS="pbm pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw pkm pkmraw pksm pksmraw pam"
+PS_DEVS="psdf psdcmyk psdrgb pdfwrite pswrite epswrite psgray psmono psrgb bbox"
+MISC_FDEVS="ccr cgm24 cgm8 cgmmono cif inferno mag16 mag256 mgr4 mgr8 mgrgray2 mgrgray4 mgrgray8 mgrmono miff24 plan9bm sgirgb sunhmono bit bitrgb bitcmyk devicen spotcmyk xcf"
+
+while test -n "$drivers"; do
+ if echo $drivers |grep "," >/dev/null; then
+ THIS="`echo $drivers |sed -e 's/,.*//'`"
+ drivers="`echo $drivers |sed -e \"s/$THIS,//\"`"
+ else
+ THIS=$drivers
+ drivers=""
+ fi
+ case "$THIS" in
+ ALL)
+ # ALL = PRINTERS + FILES...
+ if test -z "$drivers"; then
+ drivers="PRINTERS,FILES"
+ else
+ drivers="$drivers,PRINTERS,FILES"
+ fi
+ ;;
+ PRINTERS)
+ P_DEVS="$P_DEVS $CANON_DEVS $EPSON_DEVS $HP_DEVS $LEXMARK_DEVS $BROTHER_DEVS $APPLE_DEVS $IBM_DEVS $OKI_DEVS $JAPAN_DEVS $MISC_PDEVS $OPVP_DEVS"
+ ;;
+ FILES)
+ F_DEVS="$F_DEVS $BMP_DEVS $FAX_DEVS $JPEG_DEVS $JPEG2000_DEVS $PNG_DEVS $TIFF_DEVS $PCX_DEVS $PBM_DEVS $PS_DEVS $MISC_FDEVS"
+ ;;
+ APPLE)
+ # All Apple printers
+ P_DEVS="$P_DEVS $APPLE_DEVS"
+ ;;
+ BMP)
+ # BMP file format
+ F_DEVS="$F_DEVS $BMP_DEVS"
+ ;;
+ CANON)
+ # All Canon printers
+ P_DEVS="$P_DEVS $CANON_DEVS"
+ ;;
+ EPSON)
+ # All Epson printers
+ P_DEVS="$P_DEVS $EPSON_DEVS"
+ ;;
+ FAX)
+ # Fax file formats
+ F_DEVS="$F_DEVS $FAX_DEVS"
+ ;;
+ JPEG)
+ # Jpeg file formats
+ F_DEVS="$F_DEVS $JPEG_DEVS"
+ ;;
+ JPEG2000)
+ # Jpeg file formats
+ F_DEVS="$F_DEVS $JPEG2000_DEVS"
+ ;;
+ PNG)
+ # PNG file formats
+ F_DEVS="$F_DEVS $PNG_DEVS"
+ ;;
+ TIFF)
+ # TIFF file formats
+ F_DEVS="$F_DEVS $TIFF_DEVS"
+ ;;
+ PCLXL)
+ # PCL XL/PCL 6 drivers
+ F_DEVS="$F_DEVS $PCLXL_DEVS"
+ ;;
+ PCX)
+ # PCX file formats
+ F_DEVS="$F_DEVS $PCX_DEVS"
+ ;;
+ PBM)
+ # PBM file formats
+ F_DEVS="$F_DEVS $PBM_DEVS"
+ ;;
+ HP)
+ # All HP printers
+ P_DEVS="$P_DEVS $HP_DEVS"
+ ;;
+ LEXMARK)
+ # All Lexmark printers
+ P_DEVS="$P_DEVS $LEXMARK_DEVS"
+ ;;
+ BROTHER)
+ # All Brother printers
+ P_DEVS="$P_DEVS $BROTHER_DEVS"
+ ;;
+ OKI)
+ # All OKI printers
+ P_DEVS="$P_DEVS $OKI_DEVS"
+ ;;
+ IBM)
+ # All IBM printers
+ P_DEVS="$P_DEVS $IBM_DEVS"
+ ;;
+ JAPAN)
+ # All old japanese printers
+ P_DEVS="$P_DEVS $JAPAN_DEVS"
+ ;;
+ PS)
+ # PostScript/PDF writing
+ F_DEVS="$F_DEVS $PS_DEVS"
+ ;;
+ opvp)
+ # Open Vector Printing driver...
+ if test x$ac_cv_lib_dl_dlopen != xno -a x$found_iconv != xno; then
+ P_DEVS="$P_DEVS $OPVP_DEVS"
+ else
+ AC_MSG_WARN(Unable to include opvp/oprp driver due to missing prerequisites...)
+ fi
+ ;;
+ *)
+ # It's a driver name (or a user messup)
+ P_DEVS="$P_DEVS `echo $THIS |sed -e 's,\.dev$,,'`"
+ ;;
+ esac
+done
+# No need to include opvp/oprp driver without iconv/libiconv.
+if test -n "$P_DEVS"; then
+ if test x$found_iconv = xno ; then
+ P_DEVS=`echo $P_DEVS | sed -e 's|opvp||' -e 's|oprp||'`
+ AC_MSG_WARN(Unable to include opvp/oprp driver due to missing iconv/libiconv...)
+ fi
+
+# Remove contributed drivers if requested and make sure we don't have any
+# duplicates in there, add $(DD)foo.dev constructs
+ PRINTERS=`(for i in $P_DEVS; do d='$(DD)'${i}.dev; if ( grep -q '^'$d src/*.mak ) || ( ! test -z "$CONTRIBINCLUDE" ); then echo $d; fi; done) | sort | uniq | tr '\012' ' '`
+fi
+if test -n "$F_DEVS"; then
+ noncontribmakefiles=`find . -name '*.mak' -print | grep -v '^\./contrib/'`
+ FILES=`(for i in $F_DEVS; do d='$(DD)'${i}.dev; if ( grep -q '^'$d $noncontribmakefiles ) || ( ! test -z "$CONTRIBINCLUDE" ); then echo $d; fi; done) | sort | uniq | tr '\012' ' '`
+fi
+AC_SUBST(PRINTERS)
+AC_SUBST(FILES)
+
+dnl Dynamic device support.
+DYNAMIC_CFLAGS=""
+DYNAMIC_DEVS=""
+DYNAMIC_FLAGS=""
+DYNAMIC_LDFLAGS=""
+DYNAMIC_LIBS=""
+INSTALL_SHARED=""
+
+AC_ARG_ENABLE(dynamic, [ --enable-dynamic enable dynamically loaded drivers (default=no)],
+[ case `uname` in
+ Linux*)
+ INSTALL_SHARED="install-shared"
+ DYNAMIC_CFLAGS="-fPIC"
+ if test "x$X_DEVS" != x; then
+ DYNAMIC_DEVS="\$(GLOBJDIR)/X11.so"
+ else
+ DYNAMIC_DEVS=""
+ fi
+ DYNAMIC_FLAGS="-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\\\"\$(gssharedir)\\\""
+ DYNAMIC_LDFLAGS="-fPIC -shared"
+ DYNAMIC_LIBS="-rdynamic -ldl"
+ X_DEVS=""
+ ;;
+ *BSD)
+ DYNAMIC_CFLAGS="-fPIC"
+ DYNAMIC_DEVS="\$(GLOBJDIR)/X11.so"
+ DYNAMIC_FLAGS="-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\\\"\$(gssharedir)\\\""
+ DYNAMIC_LDFLAGS="-fPIC -shared"
+ DYNAMIC_LIBS=""
+ X_DEVS=""
+ ;;
+ *)
+ AC_MSG_ERROR([Sorry, dynamic driver support not available on this platform!])
+ ;;
+ esac
+])
+
+AC_SUBST(DYNAMIC_CFLAGS)
+AC_SUBST(DYNAMIC_DEVS)
+AC_SUBST(DYNAMIC_FLAGS)
+AC_SUBST(DYNAMIC_LDFLAGS)
+AC_SUBST(DYNAMIC_LIBS)
+AC_SUBST(INSTALL_SHARED)
+
+dnl look for default font path...
+AC_ARG_WITH(fontpath, [ --with-fontpath set font path for gs],fontpath="$withval",fontpath="")
+
+dnl Fix "prefix" variable...
+if test "x$prefix" = xNONE; then
+ prefix=/usr/local
+fi
+
+dnl Fix "datadir" variable...
+if test "x$datadir" = 'x${prefix}/share'; then
+ datadir="$prefix/share"
+fi
+
+dnl Fix "fontpath" variable...
+if test "x$fontpath" = "x"; then
+ # These font directories are used by various Linux distributions...
+ fontpath="$datadir/fonts/default/ghostscript"
+ fontpath="${fontpath}:$datadir/fonts/default/Type1"
+ fontpath="${fontpath}:$datadir/fonts/default/TrueType"
+
+ # These font directories are used by IRIX...
+ fontpath="${fontpath}:/usr/lib/DPS/outline/base"
+
+ # These font directories are used by Solaris...
+ fontpath="${fontpath}:/usr/openwin/lib/X11/fonts/Type1"
+ fontpath="${fontpath}:/usr/openwin/lib/X11/fonts/TrueType"
+fi
+
+AC_SUBST(fontpath)
+
dnl --------------------------------------------------
dnl Check for library functions
dnl --------------------------------------------------
@@ -433,4 +871,6 @@
AC_SUBST(OPT_CFLAGS)
AC_SUBST(GCFLAGS)
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile cups/pstopxl cups/pstoraster)
+
+chmod +x cups/pstopxl cups/pstoraster
Modified: trunk/gs/src/contrib.mak
===================================================================
--- trunk/gs/src/contrib.mak 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/contrib.mak 2007-05-14 09:34:52 UTC (rev 7970)
@@ -472,16 +472,6 @@
$(GLOBJ)gdevstc4.$(OBJ) : $(GLSRC)gdevstc4.c $(gdevstc_h) $(PDEVH)
$(GLCC) $(GLO_)gdevstc4.$(OBJ) $(C_) $(GLSRC)gdevstc4.c
-###--------------- Added Omni --------------------------###
-
-epclr_h1=$(GLSRC)defs.h
-
-$(DD)omni.dev : $(GLOBJ)gomni.$(OBJ) $(DD)page.dev
- $(SETPDEV) $(DD)omni $(GLOBJ)gomni.$(OBJ)
-
-$(GLOBJ)gomni.$(OBJ) : $(GLSRC)gomni.c $(epclr_h1) $(PDEVH)
- $(GLCC) $(GLO_)gomni.$(OBJ) $(C_) $(GLSRC)gomni.c
-
### --------------- Ugly/Update -> Unified Printer Driver ---------------- ###
### For questions about this driver, please contact: ###
### Gunther Hess (gunther at elmos.de) ###
@@ -847,3 +837,24 @@
$(GLOBJ)gdevsunr.$(OBJ) : $(GLSRC)gdevsunr.c $(PDEVH)
$(GLCC) $(GLO_)gdevsunr.$(OBJ) $(C_) $(GLSRC)gdevsunr.c
+
+#########################################################################
+### --------------------Japanese printer addons --------------------- ###
+#########################################################################
+
+### These drivers are based on patches on existing device drivers in the
+### src/ directory, therefore they are not in addons/
+
+$(DD)ljet4pjl.dev: $(HPMONO) $(DD)page.dev
+ $(SETPDEV) $(DD)ljet4pjl $(HPMONO)
+
+$(DD)lj4dithp.dev: $(cdeskjet_) $(DD)page.dev
+ $(SETPDEV) $(DD)lj4dithp $(cdeskjet_)
+
+$(DD)dj505j.dev: $(cdeskjet_)
+ $(SETPDEV) $(DD)dj505j $(cdeskjet_)
+
+$(DD)picty180.dev: $(cdeskjet_)
+ $(SETPDEV) $(DD)picty180 $(cdeskjet_)
+
+#########################################################################
Modified: trunk/gs/src/devs.mak
===================================================================
--- trunk/gs/src/devs.mak 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/devs.mak 2007-05-14 09:34:52 UTC (rev 7970)
@@ -412,7 +412,7 @@
$(ADDMOD) $(DD)lvga256 -lib vga vgagl
$(GLOBJ)gdevl256.$(OBJ) : $(GLSRC)gdevl256.c $(GDEV) $(memory__h)
- $(GLCC) $(GLO_)gdevl256.$(OBJ) $(C_) $(GLSRC)gdevl256.c
+ $(GLCCSHARED) $(GLO_)gdevl256.$(OBJ) $(C_) $(GLSRC)gdevl256.c
vgalib_=$(GLOBJ)gdevvglb.$(OBJ) $(GLOBJ)gdevpccm.$(OBJ)
$(DD)vgalib.dev : $(DEVS_MAK) $(vgalib_)
@@ -420,8 +420,19 @@
$(ADDMOD) $(DD)vgalib -lib vga
$(GLOBJ)gdevvglb.$(OBJ) : $(GLSRC)gdevvglb.c $(GDEV) $(gdevpccm_h) $(gsparam_h)
- $(GLCC) $(GLO_)gdevvglb.$(OBJ) $(C_) $(GLSRC)gdevvglb.c
+ $(GLCCSHARED) $(GLO_)gdevvglb.$(OBJ) $(C_) $(GLSRC)gdevvglb.c
+### Shared library object supporting vgalib.
+### NON PORTABLE, ONLY UNIX WITH GCC SUPPORT
+
+$(GLOBJ)lvga256.so: $(lvga256_)
+ $(CCLD) -shared -Wl,'-solvga256.so' $(lvga256_) -lvga -lvgagl
+ mv lvga256.so $(GLOBJ)lvga256.so
+
+$(GLOBJ)vgalib.so: $(vgalib_)
+ $(CCLD) -shared -Wl,'-sovgalib.so' $(vgalib_) -lvga -lvgagl
+ mv vgalib.so $(GLOBJ)vgalib.so
+
### -------------------------- The X11 device -------------------------- ###
# Please note that Aladdin Enterprises does not support Ghostview.
@@ -450,14 +461,14 @@
$(GLOBJ)gdevx.$(OBJ) : $(GLSRC)gdevx.c $(GDEVX) $(math__h) $(memory__h)\
$(gscoord_h) $(gsdevice_h) $(gsiparm2_h) $(gsmatrix_h) $(gsparam_h)\
$(gxdevmem_h) $(gxgetbit_h) $(gxiparam_h) $(gxpath_h)
- $(GLCC) $(XINCLUDE) $(GLO_)gdevx.$(OBJ) $(C_) $(GLSRC)gdevx.c
+ $(GLCCSHARED) $(XINCLUDE) $(GLO_)gdevx.$(OBJ) $(C_) $(GLSRC)gdevx.c
$(GLOBJ)gdevxcmp.$(OBJ) : $(GLSRC)gdevxcmp.c $(GDEVX) $(math__h)
$(GLCC) $(XINCLUDE) $(GLO_)gdevxcmp.$(OBJ) $(C_) $(GLSRC)gdevxcmp.c
$(GLOBJ)gdevxini.$(OBJ) : $(GLSRC)gdevxini.c $(GDEVX) $(memory__h)\
$(gserrors_h) $(gsparamx_h) $(gxdevmem_h) $(gdevbbox_h)
- $(GLCC) $(XINCLUDE) $(GLO_)gdevxini.$(OBJ) $(C_) $(GLSRC)gdevxini.c
+ $(GLCCSHARED) $(XINCLUDE) $(GLO_)gdevxini.$(OBJ) $(C_) $(GLSRC)gdevxini.c
# We have to compile gdevxres without warnings, because there is a
# const/non-const cast required by the X headers that we can't work around.
@@ -467,7 +478,7 @@
$(GLOBJ)gdevxxf.$(OBJ) : $(GLSRC)gdevxxf.c $(GDEVX) $(math__h) $(memory__h)\
$(gsstruct_h) $(gsutil_h) $(gxxfont_h)
- $(GLCC) $(XINCLUDE) $(GLO_)gdevxxf.$(OBJ) $(C_) $(GLSRC)gdevxxf.c
+ $(GLCCSHARED) $(XINCLUDE) $(GLO_)gdevxxf.$(OBJ) $(C_) $(GLSRC)gdevxxf.c
# Alternate X11-based devices to help debug other drivers.
# x11alpha pretends to have 4 bits of alpha channel.
@@ -517,8 +528,15 @@
$(GLOBJ)gdevxalt.$(OBJ) : $(GLSRC)gdevxalt.c $(GDEVX) $(math__h) $(memory__h)\
$(gsdevice_h) $(gsparam_h) $(gsstruct_h)
- $(GLCC) $(XINCLUDE) $(GLO_)gdevxalt.$(OBJ) $(C_) $(GLSRC)gdevxalt.c
+ $(GLCCSHARED) $(XINCLUDE) $(GLO_)gdevxalt.$(OBJ) $(C_) $(GLSRC)gdevxalt.c
+### Shared library object supporting X11.
+### NON PORTABLE, ONLY UNIX WITH GCC SUPPORT
+
+$(GLOBJ)X11.so: $(x11alt_) $(x11_)
+ $(CCLD) -shared -Wl,'-soX11.so' $(x11alt_) $(x11_) -L/usr/X11R6/lib -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS)
+ mv X11.so $(GLOBJ)X11.so
+
###### --------------- Memory-buffered printer devices --------------- ######
### ---------------- Practical Automation label printers ---------------- ###
Modified: trunk/gs/src/gconf.c
===================================================================
--- trunk/gs/src/gconf.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gconf.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -88,7 +88,8 @@
/* Set up the device table. */
#define device_(dev) (const gx_device *)&dev,
#define device2_(dev) &dev,
-private const gx_device *const gx_device_list[] = {
+private gx_device *gx_device_list[1024] = {
+ /* as shared library are adding drivers here, so removed constness */
#include "gconf.h"
0
};
@@ -169,9 +170,29 @@
gs_lib_device_list(const gx_device * const **plist,
gs_memory_struct_type_t ** pst)
{
+ int i;
+
if (plist != 0)
*plist = gx_device_list;
if (pst != 0)
*pst = NULL;
- return countof(gx_device_list) - 1;
+
+ for (i = 0; i < countof(gx_device_list) - 1; ++i)
+ if (!gx_device_list[i])
+ break;
+ return i;
}
+
+#ifdef GS_DEVS_SHARED
+void
+gs_lib_register_device(const gx_device *dev)
+{
+ int i;
+
+ for (i = 0; i < countof(gx_device_list) - 1; ++i)
+ if (!gx_device_list[i]) {
+ gx_device_list[i] = dev;
+ return;
+ }
+}
+#endif
Modified: trunk/gs/src/gdevcdj.c
===================================================================
--- trunk/gs/src/gdevcdj.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevcdj.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -13,6 +13,16 @@
/* $Id$*/
/* HP and Canon colour printer drivers */
+/*
+ * HP DeskJet 505J Support (dj505j.dev)
+ * -- taken from dj505j driver for Ghostscript 2.6.1 by Kazunori Asayama
+ * NEC PICTY180 (PC-PR101J/180) Support (picty180.dev)
+ * HP LaserJet 4V/4LJ Pro dither Suport (lj4dithp.dev)
+ *
+ * Norihito Ohmori <ohmori at p.chiba-u.ac.jp>
+ * April 15, 1999
+ */
+
/****************************************************************
* The code in this file was contributed by the authors whose names and/or
* e-mail addresses appear below: Aladdin Enterprises takes no
@@ -105,6 +115,8 @@
* 10 - bjc600: BJC 600//4000 printers
*** The BJC800 driver is based on the bjc600 one. By YA too.
* 11 - bjc800: BJC 800 printer
+ * 12 - dj505j: HP DeskJet 505J
+ * 13 - pixty180: NEC PICTY 180 (PC-PR101J/180)
***/
/*
@@ -173,6 +185,8 @@
/* Margins are left, bottom, right, top. */
#define DESKJET_MARGINS_LETTER (float)0.25, (float)0.50, (float)0.25, (float)0.167
#define DESKJET_MARGINS_A4 (float)0.125, (float)0.50, (float)0.143, (float)0.167
+#define DESKJET_505J_MARGINS (float)0.125, (float)0.50, (float)0.125, (float)0.167
+#define DESKJET_505J_MARGINS_COLOR (float)0.125, (float)0.665, (float)0.125, (float)0.167
#define LJET4_MARGINS (float)0.26, (float)0.0, (float)0.0, (float)0.0
/* The PaintJet and DesignJet seem to have the same margins */
/* regardless of paper size. */
@@ -217,15 +231,16 @@
/* Printer types */
#define DJ500C 0
#define DJ550C 1
-#define PJXL300 2
-#define PJ180 3
-#define PJXL180 4
-#define DECLJ250 5
-#define DNJ650C 6
-#define LJ4DITH 7
-#define ESC_P 8
-#define BJC600 9
-#define BJC800 10
+#define DJ505J 2
+#define PJXL300 3
+#define PJ180 4
+#define PJXL180 5
+#define DECLJ250 6
+#define DNJ650C 7
+#define LJ4DITH 8
+#define ESC_P 9
+#define BJC600 10
+#define BJC800 11
/* No. of ink jets (used to minimise head movements) */
#define HEAD_ROWS_MONO 50
@@ -242,6 +257,7 @@
/* Print-page, parameters and miscellaneous procedures */
private dev_proc_open_device(dj500c_open);
private dev_proc_open_device(dj550c_open);
+private dev_proc_open_device(dj505j_open);
private dev_proc_open_device(dnj650c_open);
private dev_proc_open_device(lj4dith_open);
private dev_proc_open_device(pj_open);
@@ -253,8 +269,11 @@
private dev_proc_print_page(declj250_print_page);
private dev_proc_print_page(dj500c_print_page);
private dev_proc_print_page(dj550c_print_page);
+private dev_proc_print_page(dj505j_print_page);
+private dev_proc_print_page(picty180_print_page);
private dev_proc_print_page(dnj650c_print_page);
private dev_proc_print_page(lj4dith_print_page);
+private dev_proc_print_page(lj4dithp_print_page);
private dev_proc_print_page(pj_print_page);
private dev_proc_print_page(pjxl_print_page);
private dev_proc_print_page(pjxl300_print_page);
@@ -519,6 +538,9 @@
cmyk_colour_procs(dj550c_open, cdj_get_params, cdj_put_params);
#endif
+private gx_device_procs dj505j_procs =
+hp_colour_procs(dj505j_open, cdj_get_params, cdj_put_params);
+
private gx_device_procs dnj650c_procs =
hp_colour_procs(dnj650c_open, cdj_get_params, cdj_put_params);
@@ -567,6 +589,14 @@
};
#endif
+gx_device_cdj far_data gs_picty180_device =
+cdj_device(cdj550_procs, "picty180", 300, 300, BITSPERPIXEL,
+ picty180_print_page, 0, 2, 1);
+
+gx_device_cdj far_data gs_dj505j_device =
+cdj_device(dj505j_procs, "dj505j", 300, 300, 1,
+ dj505j_print_page, 4, 0, 1);
+
gx_device_pj far_data gs_declj250_device =
pj_device(pj_procs, "declj250", 180, 180, BITSPERPIXEL,
declj250_print_page);
@@ -579,6 +609,10 @@
cdj_device(lj4dith_procs, "lj4dith", 600, 600, 8,
lj4dith_print_page, 4, 0, 1);
+gx_device_cdj far_data gs_lj4dithp_device =
+cdj_device(lj4dith_procs, "lj4dithp", 600, 600, 8,
+ lj4dithp_print_page, 4, 0, 1);
+
gx_device_pj far_data gs_pj_device =
pj_device(pj_procs, "pj", 180, 180, BITSPERPIXEL,
pj_print_page);
@@ -678,6 +712,11 @@
}
private int
+dj505j_open(gx_device *pdev)
+{ return hp_colour_open(pdev, DJ505J);
+}
+
+private int
dnj650c_open(gx_device *pdev)
{ return hp_colour_open(pdev, DNJ650C);
}
@@ -717,6 +756,8 @@
{ /* Change the margins if necessary. */
static const float dj_a4[4] = { DESKJET_MARGINS_A4 };
static const float dj_letter[4] = { DESKJET_MARGINS_LETTER };
+ static const float dj_505j[4] = { DESKJET_505J_MARGINS };
+ static const float dj_505jc[4] = { DESKJET_505J_MARGINS_COLOR };
static const float lj4_all[4] = { LJET4_MARGINS };
static const float pj_all[4] = { PAINTJET_MARGINS };
static const float dnj_all[4] = { DESIGNJET_MARGINS };
@@ -743,6 +784,9 @@
m = (gdev_pcl_paper_size(pdev) == PAPER_SIZE_A4 ? dj_a4 :
dj_letter);
break;
+ case DJ505J:
+ m = pdev->color_info.num_components > 1 ? dj_505jc : dj_505j;
+ break;
case DNJ650C:
m = dnj_all;
break;
@@ -1228,6 +1272,26 @@
return hp_colour_print_page(pdev, prn_stream, DJ550C);
}
+/* The Picty180C can compress (mode 9) */
+/* This printer need switching mode using PJL */
+private int
+picty180_print_page(gx_device_printer * pdev, FILE * prn_stream)
+{ int ret_code;
+ /* Ensure we're operating in PCL mode */
+ fputs("\033%-12345X at PJL ENTER LANGUAGE = PCLSLEEK\n", prn_stream);
+ ret_code = hp_colour_print_page(pdev, prn_stream, DJ550C);
+ /* Reenter switch-configured language */
+ fputs("\033%-12345X", prn_stream);
+ return ret_code;
+}
+
+/* The DeskJet505J can compress */
+private int
+dj505j_print_page(gx_device_printer * pdev, FILE * prn_stream)
+{
+ return hp_colour_print_page(pdev, prn_stream, DJ505J);
+}
+
/* The DesignJet650C can compress (mode 1) */
private int
dnj650c_print_page(gx_device_printer * pdev, FILE * prn_stream)
@@ -1241,6 +1305,17 @@
return hp_colour_print_page(pdev, prn_stream, LJ4DITH);
}
+private int
+lj4dithp_print_page(gx_device_printer * pdev, FILE * prn_stream)
+{ int ret_code;
+ /* Ensure we're operating in PCL mode */
+ fputs("\033%-12345X at PJL\r\n at PJL ENTER LANGUAGE = PCL\r\n", prn_stream);
+ ret_code = hp_colour_print_page(pdev, prn_stream, LJ4DITH);
+ /* Reenter switch-configured language */
+ fputs("\033%-12345X", prn_stream);
+ return ret_code;
+}
+
/* The PJXL300 can compress (modes 2 & 3) */
private int
pjxl300_print_page(gx_device_printer * pdev, FILE * prn_stream)
@@ -2106,7 +2181,11 @@
}
/* Initialize printer. */
- if (ptype == BJC600 || ptype == BJC800) {
+ if (ptype == DJ505J) {
+ fputs("\033@",prn_stream); /* Reset printer */
+ fprintf(prn_stream,"\033_R%c%c", /* Set resolution */
+ (int)x_dpi & 0xff,((int)x_dpi >> 8) & 0xff);
+ } else if (ptype == BJC600 || ptype == BJC800) {
bjc_init_page(pdev, prn_stream);
} else {
if (ptype == LJ4DITH) {
@@ -2149,6 +2228,24 @@
/* Select data compression */
compression = 9;
break;
+ case DJ505J:
+ /* Set depletion and shingling levels */
+ fprintf(prn_stream, "\033_D%c\033_E%c",
+ cdj->depletion, cdj->shingling);
+ /* Move to top left of printed area */
+ fwrite("\033_N\000", 4, 1, prn_stream);
+ fwrite("\033_J\xc4\xff", 5, 1, prn_stream);
+ /* Set number of planes ((-)1 is mono, (-)3 is (cmy)rgb, -4 is cmyk),
+ * and raster width, then start raster graphics */
+ fprintf(prn_stream, "\033_U%c%c",
+ (0xffff - num_comps + 1) & 0xff, ((0xffff - num_comps + 1) >> 8) & 0xff);
+ fprintf(prn_stream,
+ "\033_S%c%c", raster_width & 0xff, (raster_width >> 8) & 0xff);
+ /* set origin */
+ fwrite("\033_A\001", 4, 1, prn_stream);
+ compression = 1;
+ combined_escapes = 0;
+ break;
case DNJ650C:
if (pdev->x_pixels_per_inch == 600) {
/* set resolution to 600dpi 1st through PJL command */
@@ -2275,7 +2372,9 @@
* omission is that 'mode 9' compression is not supported, as this
* mode can give both computational and PCL file size advantages. */
- if (combined_escapes) {
+ if (ptype == DJ505J) {
+ fprintf(prn_stream, "\033_M%c", compression);
+ } else if (combined_escapes) {
/* From now on, all escape commands start with \033*b, so we
* combine them (if the printer supports this). */
fputs("\033*b", prn_stream);
@@ -2356,7 +2455,10 @@
}
/* Skip blank lines if any */
if (num_blank_lines > 0) {
- if (ptype == ESC_P) {
+ if (ptype == DJ505J) {
+ fprintf(prn_stream,"\033_Y%c%c",
+ num_blank_lines & 0xff, (num_blank_lines >> 8) & 0xff);
+ } else if (ptype == ESC_P) {
ep_print_image(prn_stream, 'B', 0, num_blank_lines);
} else if (ptype == BJC600 || ptype == BJC800) {
bjc_v_skip(num_blank_lines, pdev, prn_stream);
@@ -2540,6 +2642,13 @@
fputc('v', prn_stream);
}
break;
+ case DJ505J:
+ out_count = gdev_pcl_mode1compress((const byte *)
+ plane_data[scan][i],
+ (const byte *)
+ plane_data[scan][i] + plane_size - 1,
+ out_data);
+ break;
case PJ180:
case DNJ650C:
if (num_comps > 1)
@@ -2609,7 +2718,10 @@
break;
}
if (output_plane) {
- if (combined_escapes)
+ if (ptype == DJ505J)
+ fprintf(prn_stream, "\033_%c%c%c",
+ "WVVV"[i], out_count & 0xff, (out_count >> 8) & 0xff);
+ else if (combined_escapes)
fprintf(prn_stream, "%d%c", out_count, "wvvv"[i]);
else if (ptype == BJC600 || ptype == BJC800) {
if (out_count)
@@ -2638,13 +2750,16 @@
/* end raster graphics */
if (ptype == BJC600 || ptype == BJC800) {
bjc_finish_page(pdev, prn_stream);
- }
+ } else if (ptype == DJ505J)
+ fputs("\033_C", prn_stream);
else if (ptype != ESC_P)
fputs("\033*rbC\033E", prn_stream);
/* eject page */
if (ptype == PJ180)
fputc('\f', prn_stream);
+ else if (ptype == DJ505J)
+ fputs("\f\033@", prn_stream);
else if (ptype == DNJ650C)
fputs ("\033*rC\033%0BPG;", prn_stream);
else if (ptype == BJC600 || ptype == BJC800)
Modified: trunk/gs/src/gdevdjet.c
===================================================================
--- trunk/gs/src/gdevdjet.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevdjet.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -95,6 +95,7 @@
/* The device descriptors */
private dev_proc_open_device(hpjet_open);
private dev_proc_close_device(hpjet_close);
+private dev_proc_close_device(ljet4pjl_close);
private dev_proc_print_page_copies(djet_print_page_copies);
private dev_proc_print_page_copies(djet500_print_page_copies);
private dev_proc_print_page_copies(fs600_print_page_copies);
@@ -107,6 +108,7 @@
private dev_proc_print_page_copies(ljet4d_print_page_copies);
private dev_proc_print_page_copies(lp2563_print_page_copies);
private dev_proc_print_page_copies(oce9050_print_page_copies);
+private dev_proc_print_page_copies(ljet4pjl_print_page_copies);
private dev_proc_get_params(hpjet_get_params);
private dev_proc_put_params(hpjet_put_params);
@@ -114,6 +116,10 @@
prn_params_procs(hpjet_open, gdev_prn_output_page, hpjet_close,
hpjet_get_params, hpjet_put_params);
+private gx_device_procs prn_ljet4pjl_procs =
+prn_params_procs(hpjet_open, gdev_prn_output_page, ljet4pjl_close,
+ gdev_prn_get_params, gdev_prn_put_params);
+
typedef struct gx_device_hpjet_s gx_device_hpjet;
struct gx_device_hpjet_s {
@@ -215,6 +221,13 @@
0, 0, 0, 0, /* margins */
1, oce9050_print_page_copies);
+const gx_device_printer gs_ljet4pjl_device =
+prn_device_copies(prn_ljet4pjl_procs, "ljet4pjl",
+ DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
+ X_DPI2, Y_DPI2,
+ 0, 0, 0, 0, /* margins */
+ 1, ljet4pjl_print_page_copies);
+
/* Open the printer, adjusting the margins if necessary. */
private int
hpjet_open(gx_device * pdev)
@@ -276,6 +289,22 @@
return gdev_prn_close(pdev);
}
+private int
+ljet4pjl_close(gx_device *pdev)
+{
+ gx_device_printer *const ppdev = (gx_device_printer *)pdev;
+ int code = gdev_prn_open_printer(pdev, 1);
+
+ if (code < 0)
+ return code;
+ if ( ppdev->Duplex_set >= 0 && ppdev->Duplex ) {
+ gdev_prn_open_printer(ppdev, 1);
+ fputs("\033&l0H", ppdev->file) ;
+ }
+ fputs("\033%-12345X", ppdev->file);
+ return gdev_prn_close(ppdev);
+}
+
/* ------ Internal routines ------ */
/* Make an init string that contains paper tray selection. The resulting
@@ -425,6 +454,22 @@
dots_per_inch, PCL_LJ4D_FEATURES,
init);
}
+
+/* LaserJet 4 series compresses, and it needs a special sequence to */
+/* allow it to specify coordinates at 600 dpi. */
+/* It too needs its coordinate system translated slightly. */
+private int
+ljet4pjl_print_page_copies(gx_device_printer *pdev, FILE *prn_stream,
+ int num_copies)
+{ int dots_per_inch = (int)pdev->y_pixels_per_inch;
+ char real_init[60];
+
+ sprintf(real_init, "\033&l-180u36Z\033*r0F\033&u%dD", dots_per_inch);
+ return dljet_mono_print_page_copies(pdev, prn_stream, num_copies,
+ dots_per_inch, PCL_LJ4PJL_FEATURES,
+ real_init);
+}
+
/* The 2563B line printer can't compress */
/* and doesn't support *p+ or *b vertical spacing. */
private int
Modified: trunk/gs/src/gdevdljm.c
===================================================================
--- trunk/gs/src/gdevdljm.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevdljm.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -100,6 +100,10 @@
/* Initialize printer. */
if (pdev->PageCount == 0) {
+ if (features & HACK__IS_A_LJET4PJL) {
+ fputs("\033%-12345X at PJL\r\n at PJL ENTER LANGUAGE = PCL\r\n",
+ prn_stream);
+ }
fputs("\033E", prn_stream); /* reset printer */
/* If the printer supports it, set the paper size */
/* based on the actual requested size. */
Modified: trunk/gs/src/gdevdljm.h
===================================================================
--- trunk/gs/src/gdevdljm.h 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevdljm.h 2007-05-14 09:34:52 UTC (rev 7970)
@@ -48,6 +48,7 @@
#define PCL_HAS_DUPLEX 64 /* <esc>&l<duplex>S supported */
#define PCL_CAN_SET_PAPER_SIZE 128 /* <esc>&l<sizecode>A supported */
#define PCL_CAN_PRINT_COPIES 256 /* <esc>&l<copies>X supported */
+#define HACK__IS_A_LJET4PJL 512
/* Shorthands for the most common spacing/compression combinations. */
#define PCL_MODE0 PCL3_SPACING
@@ -102,6 +103,12 @@
(PCL_MODE3 |\
PCL_CAN_SET_PAPER_SIZE | PCL_CAN_PRINT_COPIES)
+ /* H-P LaserJet 4 PL */
+#define PCL_LJ4PJL_FEATURES\
+ (PCL_MODE3 |\
+ PCL_CAN_SET_PAPER_SIZE | PCL_CAN_PRINT_COPIES | HACK__IS_A_LJET4PJL)
+
+
/* H-P LaserJet 4d */
#define PCL_LJ4D_FEATURES\
(PCL_MODE3 |\
Modified: trunk/gs/src/gdevl256.c
===================================================================
--- trunk/gs/src/gdevl256.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevl256.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -301,3 +301,12 @@
gl_line(x0, y0, x1, y1, color);
return 0;
}
+
+#ifdef GS_DEVS_SHARED
+extern void gs_lib_register_device(const gx_device *dev);
+void
+gs_shared_init(void)
+{
+ gs_lib_register_device(&gs_lvga256_device);
+}
+#endif
Modified: trunk/gs/src/gdevlbp8.c
===================================================================
--- trunk/gs/src/gdevlbp8.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevlbp8.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -43,7 +43,9 @@
/* The device descriptors */
private dev_proc_print_page(lbp8_print_page);
+#ifdef NOCONTRIB
private dev_proc_print_page(lips3_print_page);
+#endif
const gx_device_printer far_data gs_lbp8_device =
prn_device(prn_std_procs, "lbp8",
@@ -52,6 +54,7 @@
0.16, 0.2, 0.32, 0.21, /* margins: left, bottom, right, top */
1, lbp8_print_page);
+#ifdef NOCONTRIB
const gx_device_printer far_data gs_lips3_device =
prn_device(prn_std_procs, "lips3",
82, /* width_10ths, 8.3" */
@@ -59,6 +62,7 @@
X_DPI, Y_DPI,
0.16, 0.27, 0.23, 0.27, /* margins */
1, lips3_print_page);
+#endif
/* ------ Internal routines ------ */
@@ -78,6 +82,7 @@
static const char *lbp8_end = NULL;
+#ifdef NOCONTRIB
static const char lips3_init[] = {
ESC, '<', /* soft reset */
DCS, '0', 'J', ST, /* JOB END */
@@ -94,6 +99,7 @@
static const char lips3_end[] = {
DCS, '0', 'J', ST /* JOB END */
};
+#endif
/* Send the page to the printer. */
private int
@@ -199,9 +205,11 @@
lbp8_end, sizeof(lbp8_end));
}
+#ifdef NOCONTRIB
/* Print a LIPS III page. */
private int
lips3_print_page(gx_device_printer *pdev, FILE *prn_stream)
{ return can_print_page(pdev, prn_stream, lips3_init, sizeof(lips3_init),
lips3_end, sizeof(lips3_end));
}
+#endif
Modified: trunk/gs/src/gdevlj56.c
===================================================================
--- trunk/gs/src/gdevlj56.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevlj56.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -142,7 +142,7 @@
};
px_write_page_header(s, (gx_device *)pdev);
- px_write_select_media(s, (gx_device *)pdev, NULL, NULL);
+ px_write_select_media(s, (gx_device *)pdev, NULL, NULL, 0, false, false);
PX_PUT_LIT(s, page_header);
if (pdev->color_info.depth == 1)
PX_PUT_LIT(s, mono_header);
Modified: trunk/gs/src/gdevpx.c
===================================================================
--- trunk/gs/src/gdevpx.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevpx.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -54,8 +54,11 @@
pxeMediaSize_t media_size;
bool ManualFeed; /* map ps setpage commands to pxl */
bool ManualFeed_set;
- int MediaPosition;
- int MediaPosition_set;
+ int MediaPosition; /* MediaPosition attribute */
+ int MediaPosition_set;
+ int page; /* Page number starting at 0 */
+ bool Duplex; /* Duplex attribute */
+ bool Tumble; /* Tumble attribute */
gx_path_type_t fill_rule; /* ...winding_number or ...even_odd */
gx_path_type_t clip_rule; /* ditto */
pxeColorSpace_t color_space;
@@ -780,6 +783,12 @@
stream *s = vdev->strm;
byte media_source = eAutoSelect; /* default */
+ xdev->page ++;
+
+ errprintf("PAGE: %d %d\n", xdev->page, xdev->NumCopies);
+ errprintf("INFO: Printing page %d...\n", xdev->page);
+ errflush();
+
px_write_page_header(s, (const gx_device *)vdev);
if (xdev->ManualFeed_set && xdev->ManualFeed)
@@ -787,7 +796,9 @@
else if (xdev->MediaPosition_set && xdev->MediaPosition >= 0 )
media_source = xdev->MediaPosition;
- px_write_select_media(s, (const gx_device *)vdev, &xdev->media_size, &media_source );
+ px_write_select_media(s, (const gx_device *)vdev, &xdev->media_size,
+ &media_source,
+ xdev->page, xdev->Duplex, xdev->Tumble);
spputc(s, pxtBeginPage);
return 0;
@@ -1126,6 +1137,12 @@
VECTOR_OPEN_FILE_SEQUENTIAL);
if (code < 0)
return code;
+
+ xdev->page = 0;
+ xdev->Duplex = false;
+ xdev->MediaPosition = 0;
+ xdev->Tumble = false;
+
pclxl_page_init(xdev);
px_write_file_header(vdev->strm, dev);
xdev->media_size = pxeMediaSize_next; /* no size selected */
@@ -1610,60 +1627,100 @@
return code;
}
-/* Get parameters. */
-int
-pclxl_get_params(gx_device *dev, gs_param_list *plist)
+/*
+ * 'pclxl_get_params()' - Get pagedevice parameters.
+ */
+
+private int /* O - Error status */
+pclxl_get_params(gx_device *dev, /* I - Device info */
+ gs_param_list *plist) /* I - Parameter list */
{
- gx_device_pclxl *pdev = (gx_device_pclxl *) dev;
- int code = gdev_vector_get_params(dev, plist);
+ gx_device_pclxl *xdev; /* PCL XL device */
+ int code; /* Return code */
- if (code < 0)
- return code;
- if (code >= 0)
- code = param_write_bool(plist, "ManualFeed", &pdev->ManualFeed);
- return code;
+ /*
+ * First process the "standard" page device parameters...
+ */
+
+ if ((code = gdev_vector_get_params(dev, plist)) < 0)
+ return (code);
+
+ /*
+ * Then write the PCL-XL parameters...
+ */
+
+ xdev = (gx_device_pclxl *)dev;
+
+ if ((code = param_write_bool(plist, "Duplex", &(xdev->Duplex))) < 0)
+ return (code);
+
+ if ((code = param_write_int(plist, "MediaPosition",
+ &(xdev->MediaPosition))) < 0)
+ return (code);
+
+ if ((code = param_write_bool(plist, "Tumble", &(xdev->Tumble))) < 0)
+ return (code);
+
+ return (0);
}
-/* Put parameters. */
-int
-pclxl_put_params(gx_device * dev, gs_param_list * plist)
+
+/*
+ * 'pclxl_put_params()' - Set pagedevice parameters.
+ */
+
+private int /* O - Error status */
+pclxl_put_params(gx_device *dev, /* I - Device info */
+ gs_param_list *plist) /* I - Parameter list */
{
- gx_device_pclxl *pdev = (gx_device_pclxl *) dev;
- int code = 0;
- bool ManualFeed;
- bool ManualFeed_set = false;
- int MediaPosition;
- bool MediaPosition_set = false;
+ gx_device_pclxl *xdev; /* PCL XL device */
+ int code; /* Error code */
+ int intval; /* Integer value */
+ bool boolval; /* Boolean value */
- code = param_read_bool(plist, "ManualFeed", &ManualFeed);
- if (code == 0)
- ManualFeed_set = true;
- if (code >= 0) {
- code = param_read_int(plist, "%MediaSource", &MediaPosition);
- if (code == 0)
- MediaPosition_set = true;
- else if (code < 0) {
- if (param_read_null(plist, "%MediaSource") == 0) {
- code = 0;
- }
- }
- }
- /* note this handles not opening/closing the device */
- code = gdev_vector_put_params(dev, plist);
- if (code < 0)
- return code;
+ /*
+ * Process PCL-XL driver parameters...
+ */
- if (code >= 0) {
- if (ManualFeed_set) {
- pdev->ManualFeed = ManualFeed;
- pdev->ManualFeed_set = true;
- }
- if (MediaPosition_set) {
- pdev->MediaPosition = MediaPosition;
- pdev->MediaPosition_set = true;
- }
- }
- return code;
+ xdev = (gx_device_pclxl *)dev;
+
+#define intoption(name, sname, type) \
+ if ((code = param_read_int(plist, sname, &intval)) < 0) \
+ { \
+ param_signal_error(plist, sname, code); \
+ return (code); \
+ } \
+ else if (code == 0) \
+ { \
+ xdev->name = (type)intval; \
+ }
+
+#define booloption(name, sname) \
+ if ((code = param_read_bool(plist, sname, &boolval)) < 0) \
+ { \
+ if ((code = param_read_null(plist, sname)) < 0) \
+ { \
+ param_signal_error(plist, sname, code); \
+ return (code); \
+ } \
+ if (code == 0) \
+ xdev->name = false; \
+ } \
+ else if (code == 0) \
+ xdev->name = (bool)boolval;
+
+ booloption(Duplex, "Duplex")
+ intoption(MediaPosition, "MediaPosition", int)
+ booloption(Tumble, "Tumble")
+
+ /*
+ * Then process standard page device parameters...
+ */
+
+ if ((code = gdev_vector_put_params(dev, plist)) < 0)
+ return (code);
+
+ return (0);
}
Modified: trunk/gs/src/gdevpxut.c
===================================================================
--- trunk/gs/src/gdevpxut.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevpxut.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -81,7 +81,8 @@
/* Write the media selection command if needed, updating the media size. */
int
px_write_select_media(stream *s, const gx_device *dev,
- pxeMediaSize_t *pms, byte *media_source)
+ pxeMediaSize_t *pms, byte *media_source,
+ int page, bool Duplex, bool Tumble)
{
#define MSD(ms, res, w, h)\
{ ms, (float)((w) * 1.0 / (res)), (float)((h) * 1.0 / res) },
@@ -115,6 +116,22 @@
if (media_source != NULL)
tray = *media_source;
px_put_uba(s, tray, pxaMediaSource);
+
+ if (Duplex)
+ {
+ if (Tumble)
+ px_put_uba(s, (byte)eDuplexHorizontalBinding, pxaDuplexPageMode);
+ else
+ px_put_uba(s, (byte)eDuplexVerticalBinding, pxaDuplexPageMode);
+
+ if (page & 1)
+ px_put_uba(s, (byte)eFrontMediaSide, pxaDuplexPageSide);
+ else
+ px_put_uba(s, (byte)eBackMediaSide, pxaDuplexPageSide);
+ }
+ else
+ px_put_uba(s, (byte)eSimplexFrontSide, pxaSimplexPageMode);
+
if (pms)
*pms = size;
Modified: trunk/gs/src/gdevpxut.h
===================================================================
--- trunk/gs/src/gdevpxut.h 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevpxut.h 2007-05-14 09:34:52 UTC (rev 7970)
@@ -29,7 +29,8 @@
/* Write the media selection command if needed, updating the media size. */
int px_write_select_media(stream *s, const gx_device *dev,
pxeMediaSize_t *pms,
- byte *media_source);
+ byte *media_source,
+ int page, bool Duplex, bool Tumble);
/*
* Write the file trailer. Note that this takes a FILE *, not a stream *,
Modified: trunk/gs/src/gdevvglb.c
===================================================================
--- trunk/gs/src/gdevvglb.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevvglb.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -368,3 +368,12 @@
}
return 0;
}
+
+#ifdef GS_DEVS_SHARED
+extern void gs_lib_register_device(const gx_device *dev);
+void
+gs_shared_init(void)
+{
+ gs_lib_register_device(&gs_vgalib_device);
+}
+#endif
Modified: trunk/gs/src/gdevxalt.c
===================================================================
--- trunk/gs/src/gdevxalt.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gdevxalt.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -25,6 +25,7 @@
#include "gdevx.h"
extern const gx_device_X gs_x11_device;
+extern const gx_device_X gs_x11alpha_device;
/*
* Define a forwarding device with a cache for the first 16 colors,
@@ -842,3 +843,20 @@
rgb[2] = ((color >> 11) & 0x3ff) * gx_max_color_value / 0x3ff;
return -1;
}
+
+#ifdef GS_DEVS_SHARED
+extern void gs_lib_register_device(const gx_device *dev);
+void
+gs_shared_init(void)
+{
+ gs_lib_register_device(&gs_x11_device);
+ gs_lib_register_device(&gs_x11alpha_device);
+ gs_lib_register_device(&gs_x11cmyk_device);
+ gs_lib_register_device(&gs_x11cmyk2_device);
+ gs_lib_register_device(&gs_x11cmyk4_device);
+ gs_lib_register_device(&gs_x11cmyk8_device);
+ gs_lib_register_device(&gs_x11gray2_device);
+ gs_lib_register_device(&gs_x11gray4_device);
+ gs_lib_register_device(&gs_x11mono_device);
+}
+#endif
Modified: trunk/gs/src/gp_unix.c
===================================================================
--- trunk/gs/src/gp_unix.c 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gp_unix.c 2007-05-14 09:34:52 UTC (rev 7970)
@@ -36,11 +36,56 @@
extern char *getenv(const char *);
#endif
+#ifdef GS_DEVS_SHARED
+#ifndef GS_DEVS_SHARED_DIR
+# define GS_DEVS_SHARED_DIR "/usr/lib/ghostscript/8.16"
+#endif
+/*
+ * use shared library for drivers, always load them when starting, this
+ * avoid too many modifications, and since it is supported only under linux
+ * and applied as a patch (preferable).
+ */
+#include <sys/types.h>
+#include <dirent.h>
+#include <dlfcn.h>
+#include <string.h>
+
+void
+gp_init(void)
+{
+ DIR* dir = NULL;
+ struct dirent* dirent;
+ char buff[1024];
+ char* pbuff;
+ void* handle;
+ void (*gs_shared_init)(void);
+
+ strncpy(buff, GS_DEVS_SHARED_DIR, sizeof(buff) - 2);
+ pbuff = buff + strlen(buff);
+ *pbuff++ = '/'; *pbuff = '\0';
+
+ dir = opendir(GS_DEVS_SHARED_DIR);
+ if (dir == 0) return;
+
+ while ((dirent = readdir(dir)) != 0) {
+ strncpy(pbuff, dirent->d_name, sizeof(buff) - (pbuff - buff) - 1);
+ if ((handle = dlopen(buff, RTLD_NOW)) != 0) {
+ if ((gs_shared_init = dlsym(handle, "gs_shared_init")) != 0) {
+ (*gs_shared_init)();
+ } else {
+ }
+ }
+ }
+
+ closedir(dir);
+}
+#else
/* Do platform-dependent initialization. */
void
gp_init(void)
{
}
+#endif
/* Do platform-dependent cleanup. */
void
Modified: trunk/gs/src/gs.mak
===================================================================
--- trunk/gs/src/gs.mak 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/gs.mak 2007-05-14 09:34:52 UTC (rev 7970)
@@ -258,7 +258,8 @@
gconfigf_h=$(GLGENDIR)$(D)gconfxc.h
gconfigd_h=$(GLGENDIR)$(D)gconfigd.h
-all default : $(GS_XE)
+all default : $(GS_XE) $(GS_SHARED_OBJS)
+ $(RM_) _temp_*
$(NO_OP)
# the distclean and maintainer-clean targets (if any)
@@ -271,6 +272,7 @@
clean : mostlyclean
$(RM_) $(GSGEN)arch.h
$(RM_) $(GS_XE)
+ $(RM_) $(GS_SHARED_OBJS)
#****** FOLLOWING IS WRONG, NEEDS TO BE PER-SUBSYSTEM ******
mostlyclean : config-clean
Modified: trunk/gs/src/lib.mak
===================================================================
--- trunk/gs/src/lib.mak 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/lib.mak 2007-05-14 09:34:52 UTC (rev 7970)
@@ -33,9 +33,9 @@
GLJASCC=$(CC_) $(I_)$(JPXI_) $(II)$(GLI_)$(_I) $(JPXCF_) $(GLF_)
GLLDFJB2CC=$(CC_) $(I_)$(LDF_JB2I_) $(II)$(GLI_)$(_I) $(JB2CF_) $(GLF_)
GLLWFJPXCC=$(CC_) $(I_)$(LWF_JPXI_) $(II)$(GLI_)$(_I) $(JPXCF_) $(GLF_)
+GLCCSHARED=$(CC_SHARED) $(I_)$(GLI_)$(_I) $(GLF_)
# All top-level makefiles define GLD.
#GLD=$(GLGEN)
-
# Define the name of this makefile.
LIB_MAK=$(GLSRC)lib.mak
Modified: trunk/gs/src/unix-aux.mak
===================================================================
--- trunk/gs/src/unix-aux.mak 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/unix-aux.mak 2007-05-14 09:34:52 UTC (rev 7970)
@@ -83,7 +83,7 @@
$(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gsutil.$(OBJ)
$(MKROMFS_XE): $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS)
- $(CCAUX) $(GENOPT) $(CFLAGS_DEBUG) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE) $(MKROMFS_OBJS) -lm
+ $(CCAUX) $(GENOPT) $(CFLAGS_DEBUG) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE) $(MKROMFS_OBJS) -lm $(LDFLAGS) $(EXTRALIBS)
# Query the environment to construct gconfig_.h.
# The "else true;" is required because Ultrix's implementation of sh -e
Modified: trunk/gs/src/unix-gcc.mak
===================================================================
--- trunk/gs/src/unix-gcc.mak 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/unix-gcc.mak 2007-05-14 09:34:52 UTC (rev 7970)
@@ -235,7 +235,7 @@
# We don't include -ansi, because this gets in the way of the platform-
# specific stuff that <math.h> typically needs; nevertheless, we expect
# gcc to accept ANSI-style function prototypes and function definitions.
-XCFLAGS=
+XCFLAGS=-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"$(gssharedir)\"
CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)
@@ -257,7 +257,7 @@
# Solaris may need -lnsl -lsocket -lposix4.
# (Libraries required by individual drivers are handled automatically.)
-EXTRALIBS=
+EXTRALIBS=-rdynamic -ldl
# Define the standard libraries to search at the end of linking.
# Most platforms require -lpthread for the POSIX threads library;
@@ -412,6 +412,10 @@
DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5c.dev
DEVICE_DEVS21=$(DD)spotcmyk.dev $(DD)devicen.dev $(DD)xcf.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)bmp16m.dev $(DD)bmp32b.dev $(DD)psdcmyk.dev $(DD)psdrgb.dev
+# Shared library target to build.
+GS_SHARED_OBJS=$(GLOBJDIR)/X11.so $(GLOBJDIR)/lvga256.so $(GLOBJDIR)/vgalib.so
+#GS_SHARED_OBJS=$(GLOBJDIR)/X11.so
+
# ---------------------------- End of options --------------------------- #
# Define the name of the partial makefile that specifies options --
@@ -434,6 +438,7 @@
# These are the specific warnings we have to turn off to compile those
# specific few files that need this. We may turn off others in the future.
CC_NO_WARN=$(CC_) -Wno-cast-qual -Wno-traditional
+CC_SHARED=$(CC_) -fPIC -shared
# ---------------- End of platform-specific section ---------------- #
Modified: trunk/gs/src/unixinst.mak
===================================================================
--- trunk/gs/src/unixinst.mak 2007-05-14 00:11:57 UTC (rev 7969)
+++ trunk/gs/src/unixinst.mak 2007-05-14 09:34:52 UTC (rev 7970)
@@ -15,7 +15,7 @@
# containing the `install' targets.
# This is the very last part of the makefile for these configurations.
-install: install-exec install-scripts install-data
+install: install-exec install-scripts install-data $(INSTALL_SHARED) $(INSTALL_CONTRIB)
# The sh -c in the rules below is required because Ultrix's implementation
# of sh -e terminates execution of a command if any error occurs, even if
@@ -169,3 +169,9 @@
ridt91.eps ;\
do $(INSTALL_DATA) $(PSEXDIR)/$$f $(DESTDIR)$(exdir) ;\
done
+
+install-shared: $(GS_SHARED_OBJS)
+ -mkdir -p $(gssharedir)
+ $(SH) -c 'for obj in $(GS_SHARED_OBJS); do \
+ $(INSTALL_PROGRAM) $$obj $(gssharedir)/; done'
+
More information about the gs-cvs
mailing list