--- magicfilter-1.2.orig/debian/changelog +++ magicfilter-1.2/debian/changelog @@ -0,0 +1,628 @@ +magicfilter (1.2-57) unstable; urgency=high + + * fixed reference to package gs in magicfilterconfig (closes: #250181) + * reverted to the old method of automatically stopping/starting daemon + and writing /etc/printcap (closes: #249616) + + -- David Frey Wed, 26 May 2004 00:02:55 +0200 + +magicfilter (1.2-56) unstable; urgency=low + + * remove pbmplus and pnmtopng from Build-depends and + Recommends list (closes: #215335). + * Replace Latin1-encoded characters in description with transliteration. + + -- David Frey Wed, 15 Oct 2003 00:34:51 +0200 + +magicfilter (1.2-55) unstable; urgency=low + + * add conflicts with printfilters-ppd (closes: #179877) + * do not set link to /usr/doc in postinst (fixes lintian bug) + + -- David Frey Sun, 16 Feb 2003 18:57:43 +0100 + +magicfilter (1.2-54) unstable; urgency=low + + * fix spelling error in magicfilterconfig (closes: #144308, #154173, #157932) + * changed "postscript" to "text" in the PostScript filters (closes + #106304, #155558) + * fixed typo in gs argument (closes: #145508) + + -- David Frey Sun, 25 Aug 2002 21:15:06 +0200 + +magicfilter (1.2-53) unstable; urgency=high + + * re-arranged netpbm Build-depends for autobuilder (closes: #142956) + + -- David Frey Mon, 15 Apr 2002 21:19:39 +0200 + +magicfilter (1.2-52) unstable; urgency=medium + + * introduced DJ670C and changed it from pcl3 to cdj670 (closes: #142734) + + -- David Frey Sun, 14 Apr 2002 23:24:21 +0200 + +magicfilter (1.2-51) unstable; urgency=medium + + * moved Build-Depends into top-part of control file (closes: #140893) + * depends now on enscript (closes: #138144) + * fix help text in magicfilterconfig (closes: #137200) + + -- David Frey Sat, 13 Apr 2002 23:56:25 +0200 + +magicfilter (1.2-50) unstable; urgency=low + + * recommend xpdf-utils due to split of xpdf package, closes: #134616 + * correctly distinguish between local and remote printer (does not + insert an "lp=" capability for remote printers), closes: #133827 + * fix gdi filter, closes: #130338 + * add Deskjet 630C filter (thanks to Dale Kemp) + * add instructions how to use generated printcap, + updated manpage, + do not stop lpd, + closes: #130607 + + -- David Frey Sun, 24 Feb 2002 23:31:37 +0100 + +magicfilter + (1.2-49) unstable; urgency=low + + * update for gs6.51: + - added pcl3 filter and removed dj690c (closes: #118653) + - added gdi filter + * added depends on libpaperg (closes: #123401) + + -- David Frey Sun, 16 Dec 2001 17:06:43 +0100 + +magicfilter (1.2-48) unstable; urgency=medium + + * fix postrm not to complain about commented out filters (closes: #64364) + * fix and clean up magicfilterconfig + + -- David Frey Thu, 1 Nov 2001 00:33:14 +0100 + +magicfilter (1.2-47) unstable; urgency=low + + * generate printcap into /var/tmp (closes: #113092) + * do not insist to configure the printing system (as mentioned in #113092) + * Build-depend on all packages in order to build correctly on all + architectures (closes: #117002) + * added notice about reading the suggests line, when configured printer is + not a remote printer (closes: #112790) + * added troff magic, thanks to Arnaud Giersch (closes: #107210) + + -- David Frey Sun, 28 Oct 2001 18:49:14 +0100 + +magicfilter (1.2-46) unstable; urgency=low + + * moved xpdf from suggested to recommends (closes: Bug#104359) + * updated configure.sub and configure.guess + * changed psonly* filters to support PDF (closes: Bug#96284) + * updated JPEG magic (closes: Bug#40599) + * add filtering line for broken StarOffice postscript (closes: Bug#93387) + + -- David Frey Sun, 15 Jul 2001 22:21:23 +0200 + +magicfilter (1.2-45) unstable; urgency=low + + * fixed recode line for NEC P6, closes: #61015 + (had redefinition of #define-statements wrong) + * new sytax in recode: replaced latin1:ibmpc with latin1..ibmpc + * changed `ffilter pdftops' to a `fpipe pdftops' for non PS-filters. + * enhanced Suggests line. + + -- David Frey Fri, 9 Mar 2001 22:14:13 +0100 + +magicfilter (1.2-44) unstable; urgency=high + + * threw out debconf thing altogether. Caused too much trouble, closes: + #83561, #84188, #83634, #83120 + * fixed double '-c quit' in NEC P6 filter, closes: #87016 + * added recode line for NEC P6, closes: #61015 + * lintianed the package. + + -- David Frey Thu, 1 Mar 2001 23:35:32 +0100 + +magicfilter (1.2-43) unstable; urgency=medium + + * added debconf dependancy, closes: #84713. + * write `printcap' into current directory, closes: #84398 + + -- David Frey Sat, 10 Feb 2001 23:13:19 +0100 + +magicfilter (1.2-42) unstable; urgency=high + + * moved recode from recommends down to suggests. + * more checks against unasked questions if config. + + -- David Frey Mon, 29 Jan 2001 00:35:20 +0100 + +magicfilter (1.2-41) unstable; urgency=high + + * applied patch for templates file (thanks to Mattia Monga), + closes: #83080, #83719, #83697, #83660, #83788. + * fixed typo in program description, closes #83738. + * moved recommends of djtools down to suggest again, got + a complaint about recommending djtools (that had to be expected, + you can do what you want and it is wrong for some people...), + closes #83090, + * corrected default printer name (lp) aliasing, closes #83120, + * added clarification about "printer-configuration", closes #83075, + * made the config-script exit at wrong inputs instead of looping + (XXX, temporary solution) + + -- David Frey Sun, 28 Jan 2001 21:47:00 +0100 + +magicfilter (1.2-40) unstable; urgency=low + + * recompile for woody. + * added support for Lexmark Optra E312, closes: #80338 + * PJL and PCL support for ljet4050, closes: #76619, #66019 + * made magicfilter recommend recode, closes: #78980 + * made magicfilter recommend djscript, closes: #69535, #64341 + * made magicfilter suggest xpdf and pdftops, closes: #70566 + (the bug report states that pdf2ps fails on included graphics and + pdftops [from the xpdf package] does not.) + * change stc1520.upp to stc1520h.upp, closes: #70499 + * applied debconf support patch from John Goerzen (thanks John!): + --------------------------------------------------------------------8<--- + magicfilter (1.2-39progeny1) unstable; urgency=low + + * Fixed for preinstall problem + + -- John Goerzen Tue, 5 Sep 2000 17:13:09 -0500 + + magicfilter (1.2-39progeny) unstable; urgency=low + + * Added debconf support. + * Edited magicfilterconfig to call debconf. + * Modified postinst to use the debconf information to generate printcap. + (Used some code from magicfilerconfig for this.) + * With these changes, it is possible to reconfigure your printers + without clobbering printcap. + * Added editing printer support. + * Added setting default printer support. + * postinst is now Perl. + * Merged my debconfhelper.pm into postinst. + * Added appropriate db_purge call to postrm. + * Fixed network printer device generation in printcap. + * Bugfix: fixed debian/rules to clean debian/tmp. + * Redirected various postinst and postrm messages to stderr to avoid + conflicting with debconf. + + -- John Goerzen Mon, 17 Jul 2000 17:26:51 + -0500 + --------------------------------------------------------------------8<--- + + -- David Frey Mon, 8 Jan 2001 00:03:15 +0100 + +magicfilter (1.2-39) frozen unstable; urgency=low + + * moved `gs' and `enscript' from `Suggests:' to `Recommends:' in order to + accomodate users, who are installing trough GUI-tools which do not + honor the `Suggests:'-line (e.g. apt) (fixes Bug#61025) + * updated bj6?0-filter to print through enscript. + * fixed copy/paste bug in bj800 filter (filter instead of pipe) + + -- David Frey Mon, 1 May 2000 22:05:31 +0200 + +magicfilter (1.2-38) frozen unstable; urgency=medium + + * Fixed postrm script to not remove the filters twice (closes Bug#59883: + Purging fails). + * changed default line in the stylus800-filter according to other + Stylus*-filters (closes Bug#59882: stylus800-filter: No entry for + default.) + * Removed "HANDLE_TEXT" for native PostScript printers in order to use + enscript(1). + * uses now pdf2ps for native PostScript printers. + * added HP Laserjet 4050 filter. (copied and adapted ljet4m filter) + (closes Bug#57378: lj4050 support?) + * added HP 690C filter (thanks to Christian Marillat + for the filter) + * included bzip patch. (thanks to Frodo Looijaard for + the patch) + + -- David Frey Tue, 14 Mar 2000 00:01:18 +0100 + +magicfilter (1.2-37) unstable; urgency=low + + * changing `lp=/dev/null' to `lp=' for remote printers (fixes Bug + #54230) + * fixed wrong StylusColor-800@360dpi-Filter (fixes Bug #55150) + * fixed typo in 720dpi for Stylus-Color (fixes Bug #54063) + + -- David Frey Sat, 15 Jan 2000 16:47:31 +0100 + +magicfilter (1.2-36) unstable; urgency=low + + * added -a option for tiff2ps (fixes Bug #52260) + * replaced ibmpc with cp437 to fix printing problem + with "sz" and possible others. Thank to Dirk for + pointing this one out. + + -- David Frey Sun, 2 Jan 2000 20:13:59 +0100 + +magicfilter (1.2-35) unstable; urgency=high + + * fixed wrong prerm script. + + -- David Frey Tue, 16 Nov 1999 23:18:28 +0100 + +magicfilter (1.2-34) unstable; urgency=low + + * added updated Epson-Stylus drivers from Dirk Ritter. + Many thanks to Dirk for his work! + * added PNG support (fixes Bug#49171: magicfilter: Could use pngtopnm to + print png files) + + -- David Frey Sat, 13 Nov 1999 15:13:43 +0100 + +magicfilter (1.2-33) unstable; urgency=low + + * fixed compiler warnings about possibly unitialized variables. + * added `lpr_bounce'-option into generated printcap if magicfilter is + used in conjunction with lprng (Bug#47899, 47243) + * use enscript on BJC-2000 and on PS-printers which are not able to + print text natively (Bug#46200). + * use pdf2ps for PS-printers to handle PDF. + + -- David Frey Tue, 2 Nov 1999 00:07:22 +0100 + +magicfilter (1.2-32) unstable; urgency=low + + * update for FHS compliance: + - mention new location of the GPL, + - move manpage to /usr/share/man/man1/ + - moved documentation to /usr/share/doc/magicfilter/ + * updated JPEG magic to match file 3.27-4. + * do not reject PDFs in the ljet4m-filter (closes Bug#43631) + * fixed `Bug#45457: magicfilterconfig perl script uses unitialized + variable' (closes Bug#45457, #47079) + + -- David Frey Sun, 19 Sep 1999 16:06:42 +0200 + +magicfilter (1.2-31) unstable; urgency=low + + * Change default for second printer to `done' for better installation + closes Bug#37890) + * Added support for printing PDF-files on PS printers by adding PDF-rule + on PS printers too (closes Bug#38105) + * removed versioned suggests on gs to allow use of virtual package gs + (closes Bug#30368, Bug#35378) + * Added another JPEG-magic entry to fix Bug#40599: jpeg file not recognized + + -- David Frey Sun, 15 Aug 1999 23:26:04 +0200 + +magicfilter (1.2-30) unstable; urgency=low + + * Moved gs from recommends to suggests (closes bug #37325) + * switched to unified printer parameter-files, where applicable. + * added BJC610. + + -- David Frey Sun, 16 May 1999 00:05:57 +0200 + +magicfilter (1.2-29) unstable; urgency=low + + * Removed gs-aladin recommends; + * Added suggests for enscript; + * Added suggests for psptools (suggestion from Jake Hamby, thanks for + pointing out that psptools exist). + * Added suggests for recode (Bug#34884), + * added -c quit for gs in the PDF-filter as a GhostScript-workaround + (Bug#35443) + + -- David Frey Sun, 4 Apr 1999 22:46:29 +0200 + +magicfilter (1.2-28) frozen unstable; urgency=low + + * fixed dj550c-filter for Umlaut-printing (fixes Bug#30745: magicfilter: + DJ 550C does not print German umlauts) + * Promoted gs from Suggests to Recommends (for PDF printing, fixes + Bug#30673: magicfilter: Magicfilter should depend on gs) + * changed "press a key to continue" to the correct + "Press to continue." (fixes Bug#29491: magicfilter: bad prompt + in /usr/sbin/magicfilterconfig) + * added explanatory text as suggested by Carl R. Witty for the + filter-selection (fixes Bug#29834: magicfilter should describe the input + filters) + + -- David Frey Fri, 1 Jan 1999 20:28:36 +0100 + +magicfilter (1.2-27) frozen unstable; urgency=low + + * Reverted filter scripts to 1.2-25; undoes Bug#27773, since the bug + report was bogus. + + -- David Frey Sat, 7 Nov 1998 20:29:06 +0100 + +magicfilter (1.2-26) unstable; urgency=low + + * fixes 'Re: Bug#27285: magicfilter should not ask before creating spool + dir'. + * Set default filter back to HANDLE_TEXT in order not to break samba + networking (Bug #27773). + This means, that the people out there who print directly, i.e. most of + us, and who had some filters (djscript, recode etc) in use have to + edit their magicfilter files. + * added remote printing support (closes Bug #16011) + * added dj600 + * magicfilterconfig uses now the paperconf program. + * experimental serial printer (e.g. plotter) support. + + -- David Frey Sun, 25 Oct 1998 21:33:16 +0100 + +magicfilter (1.2-25) unstable; urgency=low + + * removed '1>&3' indirections (fixes Bugs #28352 et. al.) + * remove "." as a troff magic, as a leading dot is also used in other + file formats (e.g. BLIF = berkeley logic interchange format). + (fixes Bug #19681) + + -- David Frey Sat, 19 Sep 1998 23:03:32 +0200 + +magicfilter (1.2-24) frozen unstable; urgency=low + + * fixes bug #23579 (should suggest libjpeg-progs | libjpeg-gif, gs | + gs-aladdin) + + -- David Frey Wed, 8 Jul 1998 21:59:29 +0200 + +magicfilter (1.2-23) frozen unstable; urgency=low + + * added recode dependendy: fixes 'Bug#23524: magicfilter: depends on recode' + * corrected gargabe Samba magic, fixes 'Bug #22866: magicfilter: + Incorrect magic for Win95/Samba print jobs' + * implemented LPUSERNAME-idea (fixes Bug#24052: magicfilter could + provide gecos entry of print job owner). + + -- David Frey Tue, 30 Jun 1998 20:24:22 +0200 + +magicfilter (1.2-22) unstable; urgency=low + + * fixed typo in magicfilterconfig (it's instead of its) (Bug#22021) + * fixed Bug#22913: magicfilter: bug in postrm + + -- David Frey Sun, 7 Jun 1998 23:13:56 +0200 + +magicfilter (1.2-21) frozen unstable; urgency=medium + + * Fix /tmp-exploits bug reported by Thomas Rössler (Bug#21251: + magicfilter: magicfilter-1.2 contains a tmpnam() race condition). + He also donated the patch (thanks!). + * Added bj600[_draft]-filters (donated by Paul J Thompson) + * Changed text printing rules for Stylus (part of Bug#20905) + + -- David Frey Tue, 21 Apr 1998 21:54:00 +0200 + +magicfilter (1.2-20) unstable; urgency=low + + * fixes typo in stylus_color_360_dpi-filter and pjxl-filter.x + (closes Bug#19093) + + -- David Frey Sat, 7 Mar 1998 20:12:39 +0100 + +magicfilter (1.2-19) unstable; urgency=low + + * fixed nuisance that the README-files had the x-bits set. + * fixed Bug#18796: magicfilter: source extraction requires interaction + + -- David Frey Tue, 3 Mar 1998 21:59:34 +0100 + +magicfilter (1.2-18) unstable; urgency=low + + * made all the magicfilter scripts conffiles (Fixes Bug #4834, but + wastes space) + * changed maintainer address to working debian.org address. + * fixed bugs found by lintian: old FSF address and non-relative md5sum's + paths. + * added suggestion from Christian , to warn + DJ-* users to install the djtools or to change the default line to text. + + -- David Frey Mon, 16 Feb 1998 21:47:21 +0100 + +magicfilter (1.2-17) unstable; urgency=low + + * added Michael Meskes djscript filter and suggested djtools. + * added Marco Pistore's trick of redirecting stdout in order to avoid + stderr's messages on the printer output. + * encorporated tiff2ps changes (fixes Bug#15189) + + -- David Frey Sun, 18 Jan 1998 14:17:42 +0100 + +magicfilter (1.2-16) unstable; urgency=low + + * changed maintainer address back to + * updated to Standard 2.3.0.1 + + -- David Frey Sun, 21 Dec 1997 23:16:54 +0100 + +magicfilter (1.2-15) unstable; urgency=low + + * Changed PDF processing: uses now standard ghostscript; + using xpdf for PDF processing would make magicfilter + go into contrib, which we definitely want to avoid. + + -- David Frey Sun, 16 Nov 1997 23:04:20 +0100 + +magicfilter (1.2-14) unstable; urgency=low + + * added binary-arch to enable dpkg-buildpackage -B to succeed. + (fixes Bug #14310) + + * added PDF entry (Bug #9766). magicfilter depends now on xpdf, + since it uses pdftops for the processing. + + * Add Samba-degarbaging script (Bug #9928); untested. + + -- David Frey Mon, 3 Nov 1997 23:14:03 +0100 + +magicfilter (1.2-13) unstable; urgency=low + + * added libjpeg-progs in the Suggests: line (fixes Bug #13901) + + -- David Frey Wed, 22 Oct 1997 22:03:19 +0200 + +magicfilter (1.2-12) unstable; urgency=low + + * recompiled for libc6 + + * moved examples directory from /usr/doc/examples/magicfilter to + /usr/doc/magicfilter/examples (Bug #9724) + + * fixed unitialized variable in magicfilterconfig (Bug #10109, Bug #11329) + + * added manpage (fixes Bug #) + + * magicfilterconfig calls /etc/init.d/lpr stop, /etc/init.d/lpr start resp. + /etc/init.d/lprng stop, /etc/init.d/lprng start to let the lpd resp. + lprngd reload the /etc/printcap file (needed for lprng) (fixes Bug #11259) + + * Added 'Press return to continue' when $DISPLAY is set (Bug #10428). + + * added ...|lprng in the Recommends: line + + * added md5sum'ming + + -- David Frey Sat, 13 Sep 1997 17:28:58 +0200 + +magicfilter (1.2-11) unstable; urgency=low + + * Added color stylus scripts, donated from + Dirk Ritter _and_ changed filters/Makefile.in + to really ship them. + + -- David Frey Thu, 1 May 1997 22:33:14 +0200 + +magicfilter (1.2-10) frozen unstable; urgency=low + + * Fixed bug #8735: wrong checksum, typo in dependency + + -- David Frey Sat, 19 Apr 1997 17:25:55 +0159 + +magicfilter (1.2-9) frozen unstable; urgency=low + + * magicfilter recommends now lpr; it doesn't depend on it anymore + (closes Bug #8216) + + * added ftp site where to find magicfilter (Bug #7452) + + -- David Frey Sat, 29 Mar 1997 17:24:32 +0100 + +magicfilter (1.2-8) unstable; urgency=low + + * made all the filters conffiles. + * gzipped manpage + * strenghtened magicfilterconfig by putting a "strict" into it. + + -- David Frey Sat, 1 Feb 1997 15:27:14 +0100 + +magicfilter (1.2-7) unstable; urgency=low + + * Updated to new distribution format. + * Fixed Bug #4733: link from /usr/bin/X11 to /usr/bin/X11R6 removed + and recompiled + + -- David Frey Sun, 13 Oct 1996 22:59:22 +0200 + +Tue Aug 13 23:13:16 1996 David Frey + + * Bug #4063: + - Fixed path to executable magicfilter: should read /usr/sbin/... + - magicfilterconfig checks /etc/papersize or asks for it and + adjust the :pl#: entry accordingly. + - Suggests netpbm in addition to pbmplus. + - deletes the extracted filters upon removal. + +Wed Jul 3 20:30:31 1996 David Frey + + * Changed ``Recommends:' into ``Suggests:'' (fixes Bug #3254) + + * the postinst scripts runs now magicfilterconfig, + instead only to tell the user to do so (fixes Bug #3452) + +Tue Jun 4 23:19:59 1996 David Frey + + * added Architecture and Section field. + + * The path for the pbmplus binaries is now /usr/bin/pbmplus + (to remain backward compability with the old setup). + +Wed May 8 22:53:20 1996 David Frey + + * magicfilter uses now dpkg-name to determine its package name + + * Added "Press ENTER to continue" in debian.postinst. + +Wed May 1 15:53:58 1996 David Frey + + * Changed architecture field. + +Sun Apr 14 23:28:19 1996 David Frey + + * Chgrps spool directory to lp group (the lp group is fetched + from /etc/passwd). + * magicfilterconfig: Filters in /usr/sbin/ are called *-filter, + not just filter + * magicfilterconfig: --force-switch added. + +Tue Mar 26 22:42:49 1996 David Frey + + * added various suggestions from Rob (osiris@cs.utexas.edu), + e.g af and lp entries. + + * Corrected me that the spool directory is under /var/spool/lpd. + +Sun Mar 24 21:48:37 1996 David Frey + + * Bug#2558: HP-4m handling not robust enough for shared + environment + (from Raul Miller ) + + Can't change this bug in Magicfilter 1.2 due to the + inclusion mechanism in the filter subdirectory. + +------------------------------------------------------------- Magicfilter 1.1b + +Mon Mar 18 20:01:13 1996 David Frey + + * Bug#2558: HP-4m handling not robust enough for shared + environment + (from Raul Miller ) + + I've changed the HP Laserjet 4 entries according to his + suggestion (don't have the ESC codes for the others). + + * Bug#????: A lot of suggestions from Erick Branderhorst + implemented: + - debian.postinst renamed to magicfilterconfig + - take example values as default + - filter in /usr/doc/magicfilter/filters/* tarred and gzipped. + - added comment that /etc/printcap is autoconfigurated. + - 'Depends: lpr' added. + - ... + +Sat Mar 16 17:45:40 1996 David Frey + + * recompiled for ELF. + + * moved example filters into /usr/doc/exaples/magicfilter/... + +Wed Jan 24 22:53:53 1996 David Frey + + * magicfilter's path changed from /usr/bin/magicfilter to + /usr/sbin/magicfilter (in the filters) + + * gzip'ing the README, QuickInst and the filters + (from Erick Branderhorst + + * Recommending gs instead of gs_x + (from Erick Branderhorst ) + +Mon Jan 22 23:24:54 1996 David Frey + + * Filters have now pbmplus support compiled in. + + * Fixed an very stupid backquoting bug. + + --- magicfilter-1.2.orig/debian/control +++ magicfilter-1.2/debian/control @@ -0,0 +1,17 @@ +Source: magicfilter +Build-Depends: dvips, netpbm, libjpeg-progs|libjpeg-gif, libtiff-tools, groff, tetex-bin, transfig, recode, djtools, gs, enscript, bzip2, gzip (>= 1.2.4-33), xpdf-utils +Section: text +Priority: optional +Maintainer: David Frey +Standards-Version: 3.5.5 + +Package: magicfilter +Architecture: any +Depends: ${shlibs:Depends}, libpaperg, enscript +Recommends: lpr|lprng, gs, bzip2, gzip (>= 1.2.4-33), xpdf-utils +Suggests: dvips, netpbm, libjpeg-progs|libjpeg-gif, libtiff-tools, groff, tetex-bin, transfig, recode, djtools +Conflicts: apsfilter, printfilters-ppd +Description: automatic printer filter + Magicfilter is a customizable, extensible automatic printer filter. + It uses its own magic database (a la file(1)) to decide how to print + out a given print job. --- magicfilter-1.2.orig/debian/copyright +++ magicfilter-1.2/debian/copyright @@ -0,0 +1,31 @@ +This is Debian GNU/Linux's prepackaged version of magicfilter, +a customizable, extensible automatic printer filter. +It was written by H. Peter Anvin . + +I got it from a sunsite mirror (sunsite.cnlab-switch.ch) from the +directory /mirror/linux/sunsite/system/printing/magicfilter-1.2.tar.gz + +Packaged by David Frey + +Changes: + * added Debian GNU/Linux package maintenance system files + * Stylus Epson 800 filters added. + * Stylus Epson Color filters contributed by + Dirk Ritter added. + + 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., 59 Temple Place Suite 330, Boston, MA 02111-1307 USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- magicfilter-1.2.orig/debian/menu +++ magicfilter-1.2/debian/menu @@ -0,0 +1,7 @@ +?package(magicfilter):needs="text" section="Apps/System/Admin" \ + title="Magicfilter-config" \ + longtitle="Configure automatic printer filter (magicfilter)"\ + description="Configure Magicfilter, a customizable, extensible\ + automatic printer filter. It uses its own magic database \ + (a la file(1)) to decide how to print out an given entry."\ + command="/usr/sbin/su-to-root -p root -c /usr/sbin/magicfilterconfig" --- magicfilter-1.2.orig/debian/postinst +++ magicfilter-1.2/debian/postinst @@ -0,0 +1,11 @@ +#!/bin/sh -e +# -*- shell-script -*- + +if test -x /usr/bin/update-menus; then + update-menus +fi + +cat<&2 <<-EOI + The following input filters are installed at the moment: +EOI + echo $FILTERS|tr ' ' '\n' 1>&2 + cat 1>&2 <<-EOI + + If any of these filters were input filters from the magicfilter + package, you have now inoperable input filters and cannot print + on some or all printer queues. +EOI + fi +fi + +if test -x /usr/bin/update-menus; then + update-menus +fi + +if [ "$1" = purge -a -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi + +exit 0 --- magicfilter-1.2.orig/debian/prerm +++ magicfilter-1.2/debian/prerm @@ -0,0 +1,6 @@ +#!/bin/sh -e +# -*- shell-script -*- + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/magicfilter ]; then + rm -f /usr/doc/magicfilter +fi --- magicfilter-1.2.orig/debian/rules +++ magicfilter-1.2/debian/rules @@ -0,0 +1,77 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# The name of the package +package := $(shell sed -n -e 's/Package: *\([a-z]\)/\1/p' debian/control) +doc := usr/share/doc/$(package) +man := usr/share/man/man8 +menu := usr/lib/menu +tmp := debian/tmp + +CFLAGS = -O2 -Wall +LDFLAGS= + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +else + LDFLAGS += -Wl,-s +endif + +build: + ./configure --prefix=/usr --infodir=/usr/share/info \ + --mandir=/usr/share/man --bindir=/usr/sbin &&\ + make CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" bindir=/usr/sbin && \ + touch build + +clean: + -rm -f build + -$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean + -rm -rf *~ filters/*~ $(tmp) debian/*~ debian/files* + -rm -rf debian/tmp + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build + -rm -rf $(tmp) + install -d $(tmp) + cd $(tmp) &&\ + install -d usr/sbin $(doc) $(man) $(menu) etc/magicfilter + $(MAKE) install prefix=$(tmp)/usr\ + bindir=$(tmp)/usr/sbin infodir=$(tmp)/$(info) mandir=$(tmp)/$(man) +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + strip --remove-section=.comment --remove-section=.note --strip-unneeded $(tmp)/usr/sbin/magicfilter +endif + install -p -m 755 magicfilterconfig $(tmp)/usr/sbin/magicfilterconfig + install -m 644 filters/README* $(tmp)/$(doc)/ + install -m 644 debian/menu $(tmp)/$(menu)/$(package) + cd filters && install -p -m 755 *-filter ../$(tmp)/etc/magicfilter + install -p -m 644 debian/changelog $(tmp)/$(doc)/changelog.Debian + cd $(tmp)/$(doc) && gzip -9f changelog.Debian README* + install -p -m 644 debian/copyright $(tmp)/$(doc) + install -p -m 644 magicfilterconfig.8 $(tmp)/$(man) + gzip -9f $(tmp)/$(man)/* + dpkg-shlibdeps $(tmp)/usr/sbin/$(package) + install -d $(tmp)/DEBIAN + cd $(tmp) &&\ + md5sum `find * -name DEBIAN -prune -o -type f -print`\ + > DEBIAN/md5sums + dpkg-gencontrol -isp + install -m 755 debian/prerm debian/postrm debian/postinst $(tmp)/DEBIAN + cd filters && ls -1 *-filter|sed -e 's,^,/etc/magicfilter/,'\ + > ../$(tmp)/DEBIAN/conffiles + chmod 644 $(tmp)/DEBIAN/conffiles + chown -R root.root $(tmp) + chmod -R g-ws,og=rX $(tmp) + dpkg --build $(tmp) .. + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +.PHONY: binary binary-arch binary-indep clean --- magicfilter-1.2.orig/debian/substvars +++ magicfilter-1.2/debian/substvars @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.3.2.ds1-4) --- magicfilter-1.2.orig/filters/ibmpro-filter.x +++ magicfilter-1.2/filters/ibmpro-filter.x @@ -22,7 +22,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120x72 -sDEVICE=ibmpro -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120x72 -sDEVICE=ibmpro -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120x72 -sDEVICE=ibmpro -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/StylusColor-600@1440dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-600@1440dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color 600 printer operating +# at 1440 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 1440 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc600ih.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc600ih.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/pjxl-filter.x +++ magicfilter-1.2/filters/pjxl-filter.x @@ -18,7 +18,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=pjxl -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=pjxl -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=pjxl -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/dj500-filter.x +++ magicfilter-1.2/filters/dj500-filter.x @@ -17,7 +17,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=djet500 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=djet500 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=djet500 -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL @@ -35,4 +36,7 @@ 0 \033 HANDLE_PCL # Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# default HANDLE_TEXT --- magicfilter-1.2.orig/filters/psonly600-filter.x +++ magicfilter-1.2/filters/psonly600-filter.x @@ -1,2 +1,3 @@ %define DPI 600 +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r600 -sDEVICE=pswrite -sOutputFile=- $FILE -c quit %include --- magicfilter-1.2.orig/filters/StylusColor-500@720dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-500@720dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color 500 printer operating +# at 720 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 720 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc500ph.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc500ph.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/StylusColor-II@720dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-II@720dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color II printer operating +# at 720 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 720 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc2_h.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc2_h.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/stylus800-filter.x +++ magicfilter-1.2/filters/stylus800-filter.x @@ -0,0 +1,44 @@ +%include +# +# Magic filter setup file for Epson Stylus series printers +# THIS FILE IS UNTESTED! +# +# This file is in the public domain. +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 360 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=st800 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=st800 -sOutputFile=- $FILE -c quit +%endif + +/* + * Text + */ +%define HANDLE_TEXT text +/* + * Native here to override PCL magic + */ +# wild guess: native control codes start with +0 \033 cat + +%include + +# Default entry -- for normal (text) files. MUST BE LAST. +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/dj670c-low-filter.x +++ magicfilter-1.2/filters/dj670c-low-filter.x @@ -0,0 +1,49 @@ +%include +# +# Magic filter setup file for HP DeskJet 690 C color printer. +# +# Initially based on dj500-filter +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright 2000 Christian Marillat +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 300 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj670 -sColourModel=CMYK -sPrintQuality=draft -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj670 -sColourModel=CMYK -sPrintQuality=draft -sOutputFile=- $FILE -c quit +%endif +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +/* + * Text + */ +%define HANDLE_TEXT cat \eE\e&k2G\e(0N \eE +%define LATIN1_OK 1 + +%include + +# wild guess: PCL control codes start with +0 \033 HANDLE_PCL + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/deskjet-filter.x +++ magicfilter-1.2/filters/deskjet-filter.x @@ -16,7 +16,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=deskjet -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=deskjet -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=deskjet -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/ljetpluslo-filter.x +++ magicfilter-1.2/filters/ljetpluslo-filter.x @@ -16,7 +16,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r150 -sDEVICE=ljetplus -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r150 -sDEVICE=ljetplus -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r150 -sDEVICE=ljetplus -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/tek4696-filter.x +++ magicfilter-1.2/filters/tek4696-filter.x @@ -20,7 +20,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120 -sDEVICE=t4696 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120 -sDEVICE=t4696 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120 -sDEVICE=t4696 -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/jetp3852-filter.x +++ magicfilter-1.2/filters/jetp3852-filter.x @@ -19,7 +19,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r84 -sDEVICE=jetp3852 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r84 -sDEVICE=jetp3852 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r84 -sDEVICE=jetp3852 -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/ps600-filter.x +++ magicfilter-1.2/filters/ps600-filter.x @@ -1,3 +1,4 @@ %define DPI 600 %define NATIVE_TEXT 1 +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r600 -sDEVICE=pswrite -sOutputFile=- $FILE -c quit %include --- magicfilter-1.2.orig/filters/filters2.h.in +++ magicfilter-1.2/filters/filters2.h.in @@ -1,4 +1,6 @@ /* filters2.h.in: This file was automatically generated by mkfilterhin */ +#undef HAVE_RECODE +#undef PATH_RECODE #undef HAVE_GHOSTSCRIPT #undef PATH_GHOSTSCRIPT #undef HAVE_GROG @@ -15,6 +17,8 @@ #undef PATH_GROTTY #undef HAVE_GROLJ4 #undef PATH_GROLJ4 +#undef HAVE_BZIP2 +#undef PATH_BZIP2 #undef HAVE_GZIP #undef PATH_GZIP #undef HAVE_ZCAT @@ -25,6 +29,8 @@ #undef PATH_DVIPS #undef HAVE_PNMTOPS #undef PATH_PNMTOPS +#undef HAVE_PNGTOPNM +#undef PATH_PNGTOPNM #undef HAVE_GIFTOPPM #undef PATH_GIFTOPPM #undef HAVE_DJPEG @@ -35,6 +41,8 @@ #undef PATH_TOPS #undef HAVE_SGITOPS #undef PATH_SGITOPS +#undef HAVE_TIFFTOPS +#undef PATH_TIFFTOPS #undef HAVE_TIFFTOPNM #undef PATH_TIFFTOPNM #undef HAVE_BMPTOPPM @@ -48,4 +56,6 @@ #undef HAVE_A2PS #undef PATH_A2PS #undef HAVE_FIG2DEV -#undef PATH_FIG2DEV +#undef PATH_FIG2DEV +#undef HAVE_PDFTOPS +#undef PATH_PDFTOPS --- magicfilter-1.2.orig/filters/StylusColor-II-IIs@360dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-II-IIs@360dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color II and IIs printers +# operating at 360 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 360 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc2.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc2.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/ps300-filter.x +++ magicfilter-1.2/filters/ps300-filter.x @@ -1,3 +1,4 @@ %define DPI 300 %define NATIVE_TEXT 1 +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pswrite -sOutputFile=- $FILE -c quit %include --- magicfilter-1.2.orig/filters/dj630c-filter.x +++ magicfilter-1.2/filters/dj630c-filter.x @@ -0,0 +1,49 @@ +%include +# +# Magic filter setup file for HP DeskJet 690 C color printer. +# +# Initially based on dj500-filter +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright 2000 Christian Marillat +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 300 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -sDuplex=0 -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceMode="DESKJET 630C" -sDEVICE=DJ630 -sIjsParams="Quality=2,ColorMode=2,MediaType=0,PenSet=2" -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -sDuplex=0 -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceMode="DESKJET 630C" -sDEVICE=DJ630 -sIjsParams="Quality=2,ColorMode=2,MediaType=0,PenSet=2" -sOutputFile=- $FILE -c quit +%endif +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +/* + * Text + */ +%define HANDLE_TEXT cat \eE\e&k2G\e(0N \eE +%define LATIN1_OK 1 + +%include + +# wild guess: PCL control codes start with +0 \033 HANDLE_PCL + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/dj550c-filter.x +++ magicfilter-1.2/filters/dj550c-filter.x @@ -18,7 +18,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj550 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT @cdj550.upp -q -dSAFER -dNOPAUSE -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @cdj550.upp -q -dSAFER -dNOPAUSE -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/dj690c-filter.x +++ magicfilter-1.2/filters/dj690c-filter.x @@ -0,0 +1,49 @@ +%include +# +# Magic filter setup file for HP DeskJet 690 C color printer. +# +# Initially based on dj500-filter +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright 2000 Christian Marillat +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 300 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=DJ6xx -sSubdevice=hpdj690c -sColourModel=CMYK -sPrintQuality=normal -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pcl3 -sSubdevice=hpdj690c -sColourModel=CMYK -sPrintQuality=normal -sOutputFile=- $FILE -c quit +%endif +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +/* + * Text + */ +%define HANDLE_TEXT cat \eE\e&k2G\e(0N \eE +%define LATIN1_OK 1 + +%include + +# wild guess: PCL control codes start with +0 \033 HANDLE_PCL + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/StylusColor-800@1440dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-800@1440dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color 800 printer operating +# at 1440 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 1440 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc800ih.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc800ih.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/bj600_draft-filter.x +++ magicfilter-1.2/filters/bj600_draft-filter.x @@ -0,0 +1,40 @@ +%include +# +# Magic filter setup file for Canon BubbleJet 600 +# THIS FILE IS UNTESTED! +# +# This file is in the public domain. +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 360 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bjc600 -sPrintQuality=Draft -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bjc600 -sPrintQuality=Draft -sOutputFile=- $FILE -c quit +%endif + +/* + * Text + */ +%define HANDLE_TEXT pipe PATH_NENSCRIPT -q -e -E -Z -G -U2 -p - -t "$LPJOB" + +/* + * Native here to override PCL magic + */ +# wild guess: native control codes start with +0 \033 cat + +%include + +# Default entry -- for normal (text) files. MUST BE LAST. +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/ln03-filter.x +++ magicfilter-1.2/filters/ln03-filter.x @@ -19,7 +19,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ln03 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ln03 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ln03 -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/epson9c-filter.x +++ magicfilter-1.2/filters/epson9c-filter.x @@ -22,7 +22,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120x72 -sDEVICE=epsonc -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120x72 -sDEVICE=epsonc -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120x72 -sDEVICE=epsonc -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/ljet2plo-filter.x +++ magicfilter-1.2/filters/ljet2plo-filter.x @@ -16,7 +16,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r150 -sDEVICE=ljet2p -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r150 -sDEVICE=ljet2p -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r150 -sDEVICE=ljet2p -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/m8510-filter.x +++ magicfilter-1.2/filters/m8510-filter.x @@ -22,7 +22,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r160x144 -sDEVICE=epson -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r160x144 -sDEVICE=epson -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r160x144 -sDEVICE=epson -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/oki182-filter.x +++ magicfilter-1.2/filters/oki182-filter.x @@ -19,7 +19,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r144 -sDEVICE=oki182 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r144 -sDEVICE=oki182 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r144 -sDEVICE=oki182 -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/StylusColor-800@720dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-800@720dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color 800 printer operating +# at 720 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 720 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc800p.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc800p.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/bj200-filter.x +++ magicfilter-1.2/filters/bj200-filter.x @@ -19,8 +19,10 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bj200 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bj200 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bj200 -sOutputFile=- $FILE -c quit %endif + /* * Text */ --- magicfilter-1.2.orig/filters/ljet4-filter.x +++ magicfilter-1.2/filters/ljet4-filter.x @@ -17,7 +17,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ljet4 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ljet4 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ljet4 -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/pcl3-filter.x +++ magicfilter-1.2/filters/pcl3-filter.x @@ -0,0 +1,38 @@ +%include +# +# Magic filter setup file for HP DeskJet PCL3 printers (completely untested) +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 300 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pcl3 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pcl3 -sOutputFile=- $FILE -c quit +%endif +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +/* + * Text + */ +%define HANDLE_TEXT cat \eE\e&k2G\e(0N \eE +%define LATIN1_OK 1 + +%include + +# wild guess: PCL control codes start with +0 \033 HANDLE_PCL + +# Default entry -- for normal (text) files. MUST BE LAST. +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/StylusColor-600@720dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-600@720dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color 600 printer operating +# at 720 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 720 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc600p.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc600p.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/bj800-filter.x +++ magicfilter-1.2/filters/bj800-filter.x @@ -0,0 +1,40 @@ +%include +# +# Magic filter setup file for Canon BubbleJet 600 +# THIS FILE IS UNTESTED! +# +# This file is in the public domain. +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 360 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bjc800 -dMonochromePrint=true -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bjc800 -dMonochromePrint=true -sOutputFile=- $FILE -c quit +%endif + +/* + * Text + */ +%define HANDLE_TEXT pipe PATH_NENSCRIPT -q -e -E -Z -G -U2 -p - -t "$LPJOB" + +/* + * Native here to override PCL magic + */ +# wild guess: native control codes start with +0 \033 cat + +%include + +# Default entry -- for normal (text) files. MUST BE LAST. +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/laserjet-filter.x +++ magicfilter-1.2/filters/laserjet-filter.x @@ -16,7 +16,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=laserjet -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=laserjet -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=laserjet -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/ps400-filter.x +++ magicfilter-1.2/filters/ps400-filter.x @@ -1,3 +1,4 @@ %define DPI 400 %define NATIVE_TEXT 1 +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r400 -sDEVICE=pswrite -sOutputFile=- $FILE -c quit %include --- magicfilter-1.2.orig/filters/StylusColor-600@360dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-600@360dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color 600 printer operating +# at 360 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 360 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc600pl.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc600pl.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/tek4693-filter.x +++ magicfilter-1.2/filters/tek4693-filter.x @@ -20,7 +20,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r100 -sDEVICE=t4693d8 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r100 -sDEVICE=t4693d8 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r100 -sDEVICE=t4693d8 -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/lbp8-filter.x +++ magicfilter-1.2/filters/lbp8-filter.x @@ -19,7 +19,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=lbp8 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=lbp8 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=lbp8 -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/laserjetlo-filter.x +++ magicfilter-1.2/filters/laserjetlo-filter.x @@ -16,7 +16,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r150 -sDEVICE=laserjet -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r150 -sDEVICE=laserjet -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r150 -sDEVICE=laserjet -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/dj500c-filter.x +++ magicfilter-1.2/filters/dj500c-filter.x @@ -18,7 +18,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj500 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj500 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj500 -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL @@ -36,4 +37,7 @@ 0 \033 HANDLE_PCL # Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# default HANDLE_TEXT --- magicfilter-1.2.orig/filters/ljetplus-filter.x +++ magicfilter-1.2/filters/ljetplus-filter.x @@ -16,7 +16,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljetplus -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljetplus -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljetplus -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/dj670c-best-filter.x +++ magicfilter-1.2/filters/dj670c-best-filter.x @@ -0,0 +1,49 @@ +%include +# +# Magic filter setup file for HP DeskJet 690 C color printer. +# +# Initially based on dj500-filter +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright 2000 Christian Marillat +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 300 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj670 -sColourModel=CMYK -sPrintQuality=best -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj670 -sColourModel=CMYK -sPrintQuality=best -sOutputFile=- $FILE -c quit +%endif +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +/* + * Text + */ +%define HANDLE_TEXT cat \eE\e&k2G\e(0N \eE +%define LATIN1_OK 1 + +%include + +# wild guess: PCL control codes start with +0 \033 HANDLE_PCL + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/README-StylusColor +++ magicfilter-1.2/filters/README-StylusColor @@ -0,0 +1,120 @@ +This file describes the filters for the EPSON Stylus Color family of printers. +They are all initially based on `epsonlqc-filter.x'. Most of this is completely +untested since I (Dirk Ritter ) only have the original +Stylus Color, so there is no warranty for anything whatsoever! + + +Choosing the right printer model +-------------------------------- +These days there are a whole lot of EPSON Stylus Color printers out there: + + +----------------------------------------------------+ + | Stylus Color | Filter name(s) | + +====================================================+ + |original + 'PRO' | StylusColor@360dpi-filter | + | | StylusColor@720dpi-filter | + +----------------------------------------------------+ + | II | StylusColor-II-IIs@360dpi-filter | + | | StylusColor-II@720dpi-filter | + +----------------------------------------------------+ + | 1500 |*StylusColor-II-IIs@360dpi-filter | + | |*StylusColor-II@720dpi-filter | + +----------------------------------------------------+ + | IIs | StylusColor-II-IIs@360dpi-filter | + | | StylusColor-IIs@720dpi-filter | + +----------------------------------------------------+ + | 500 | StylusColor-500@360dpi-filter | + | | StylusColor-500@720dpi-filter | + +----------------------------------------------------+ + | | StylusColor-600@360dpi-filter | + | 600 | StylusColor-600@720dpi-filter | + | | StylusColor-600@1440dpi-filter | + +----------------------------------------------------+ + | | StylusColor-800@360dpi-filter | + | 800 | StylusColor-800@720dpi-filter | + | | StylusColor-800@1440dpi-filter | + +----------------------------------------------------+ + | |*StylusColor-800@360dpi-filter | + | 1520 |*StylusColor-800@720dpi-filter | + | | StylusColor-1520@1440dpi-filter | + +----------------------------------------------------+ + +* Filters marked with a star in front of them may or may not be applicable, so + please do not try them out carelessly. At least - please do not complain + too loud about a wrecked printer if you do. + +You may wonder if it is worth trying the original model or the 'II' model if +you have a Stylus Color 400. The short answer is 'no'. There is no support +for hardware that uses proprietary interfaces among developers of free software +and there would be no interest to support hardware that is as expensive - after +all - you got a printer that has next to no internal data processing abilities +but you paid nearly as much as you would have paid for a 'smart' printer who +does have this important feature. Enough said. Buy a real printer. + +If you have a Stylus Color Photo series printer you may be aware of the fact +that it uses more colors. This does not (yet) seem to be supported by Gunther +Hess's driver `uniprint' so you are out of luck. However, you may still hope +for support to emerge in later versions of `uniprint' since the printers seem +to support ESC/P2. + +If you have some other new model that supports ESC/P2 you may try the simple +filter `StylusColor-generic-filter'. It supports color with 360 dpi but +offers no thrills. You may at your own risk try to choose an older model that +has similar capabilities, but please consult your printer documentation and the +documentation that ships with GhostScript first - especially `Devices.htm' is +heartily recommended for reading. + +Last but not least - `magicfilterconfig' as shipped with Debian let's you +choose the printer and it is recommended that you install all filters that +match your printer. Just give different names to them such as `360', `720' +and `1440', but always choose the same device, eg. `/dev/lp0'. +You would then issue the command `lpr -P 1440 Letter.ps' if you wanted to +print out some important letter on ink jet paper with special coating and +`lpr -P 360 shopping_list.ps' if you just wanted to get your shopping list +on some piece of cheap recycling paper. + + +Tweaking GhostScript for fun and profit +--------------------------------------- +Originally I tried to keep track of ever changing GhostScript driver options. +If you have the first Stylus Color printer, a Stylus Color Pro, or a +Stylus Color 500 then you may still prefer the good old `stcolor' driver. +However, as Gunther Hess ditched the thing in favor of his +`uniprint' driver I use that as well. Since I expect further option changes +I also took the chance and did weasel out of the option tweaking business. +Surely one could just pass any options to GhostScript like before, but I +consider the `*.upp'-files to be a good thing just because further changes of +options may not break the filters I cooked. So - feel free to either tweak +the filters or tweak your Unified Printer Parameter files, but do not try +tweaking both at once. +Support for the Portable Document Format is included, but you will need a +recent Aladdin GhostScript version in order to actually get this right. +For the time beeing I would just recommend against it. + + +Tweaking Magicfilter for fun and profit +--------------------------------------- +There is not much you can do here since it already offers ultimate flexibility. +However, if you want new conversion rules like some standard character set +conversion with recode for normal text you definitely should go to the trouble +and do it properly. Hard-coded paths are surely out of question - edit the +file `./configure.in' instead, run autoconf and make conditional use of the +variables configure spits out. (Besides - don't forget to update the file +`./filters/filters2.h.in' by running `./filters/mkfilterhin' - otherwise the +newly introduced variables simply would not find their way into the build +environment.) + +Character set conversion +------------------------ +The Debian folks introduced the feature to preprocess regular text with GNU +recode in order to get extended characters right. Currently this leads to +the expectation that you feed Latin-1 (ISO-8859-1) encoded text to a printer +configured for an IBM code-page 437 (IBM-PC). You can easily tweak this to +your little heart's content if you change recode's options at the bottom of +the filters or in the middle of the source files. + + +Thank you for listening. + +/bye +Dirk --- magicfilter-1.2.orig/filters/necp6-filter.x +++ magicfilter-1.2/filters/necp6-filter.x @@ -19,12 +19,18 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=necp6 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT @necp2x.upp -q -dSAFER -dNOPAUSE -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @necp2x.upp -q -dSAFER -dNOPAUSE -sOutputFile=- $FILE -c quit %endif /* * Text */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE %define HANDLE_TEXT text +%endif /* * Native here to override PCL magic */ @@ -34,4 +40,9 @@ %include # Default entry -- for normal (text) files. MUST BE LAST. +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif default HANDLE_TEXT --- magicfilter-1.2.orig/filters/bj610-filter.x +++ magicfilter-1.2/filters/bj610-filter.x @@ -0,0 +1,40 @@ +%include +# +# Magic filter setup file for Canon BubbleJet 600 +# THIS FILE IS UNTESTED! +# +# This file is in the public domain. +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 360 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @bjc610a0.upp -q -dSAFER -dNOPAUSE -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @bjc610a0.upp -q -dSAFER -dNOPAUSE -sOutputFile=- $FILE -c quit +%endif + +/* + * Text + */ +%define HANDLE_TEXT pipe PATH_NENSCRIPT -q -e -E -Z -G -U2 -p - -t "$LPJOB" + +/* + * Native here to override PCL magic + */ +# wild guess: native control codes start with +0 \033 cat + +%include + +# Default entry -- for normal (text) files. MUST BE LAST. +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/ljet4l-filter.x +++ magicfilter-1.2/filters/ljet4l-filter.x @@ -17,7 +17,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljet4 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljet4 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljet4 -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/bj600-filter.x +++ magicfilter-1.2/filters/bj600-filter.x @@ -0,0 +1,40 @@ +%include +# +# Magic filter setup file for Canon BubbleJet 600 +# THIS FILE IS UNTESTED! +# +# This file is in the public domain. +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 360 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bjc600 -dMonochromePrint=true -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bjc600 -dMonochromePrint=true -sOutputFile=- $FILE -c quit +%endif + +/* + * Text + */ +%define HANDLE_TEXT pipe PATH_NENSCRIPT -q -e -E -Z -G -U2 -p - -t "$LPJOB" + +/* + * Native here to override PCL magic + */ +# wild guess: native control codes start with +0 \033 cat + +%include + +# Default entry -- for normal (text) files. MUST BE LAST. +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/ljet3-filter.x +++ magicfilter-1.2/filters/ljet3-filter.x @@ -16,7 +16,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljet3 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljet3 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljet3 -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/genericps.xh +++ magicfilter-1.2/filters/genericps.xh @@ -24,6 +24,8 @@ */ %ifdef NATIVE_TEXT %define HANDLE_TEXT text +%else +%define HANDLE_TEXT filter PATH_NENSCRIPT -q -e -E -Z -G -U2 -p - -t "$LPJOB" %endif %include --- magicfilter-1.2.orig/filters/epsonlqc-filter.x +++ magicfilter-1.2/filters/epsonlqc-filter.x @@ -20,7 +20,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=epsonc -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=epsonc -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=epsonc -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/dj670c-filter.x +++ magicfilter-1.2/filters/dj670c-filter.x @@ -0,0 +1,49 @@ +%include +# +# Magic filter setup file for HP DeskJet 690 C color printer. +# +# Initially based on dj500-filter +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright 2000 Christian Marillat +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 300 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj670 -sColourModel=CMYK -sPrintQuality=normal -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj670 -sColourModel=CMYK -sPrintQuality=normal -sOutputFile=- $FILE -c quit +%endif +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +/* + * Text + */ +%define HANDLE_TEXT cat \eE\e&k2G\e(0N \eE +%define LATIN1_OK 1 + +%include + +# wild guess: PCL control codes start with +0 \033 HANDLE_PCL + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/StylusColor-generic-filter.x +++ magicfilter-1.2/filters/StylusColor-generic-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for generic EPSON printers supporting ESC/P2 +# at 360 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and partially +# tested together with the original Stylus Color, GhostScript versions 3.33, +# 4.03 and 5.10 by Dirk Ritter . +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 360 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stcany.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stcany.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/gdi-filter.x +++ magicfilter-1.2/filters/gdi-filter.x @@ -0,0 +1,35 @@ +%include +# +# Magic filter setup file for some GDI printers (completely untested) +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 300 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=gdi -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=gdi -sOutputFile=- $FILE -c quit +%endif +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +/* + * Text + */ +%include + +# wild guess: PCL control codes start with +0 \033 HANDLE_PCL + +# Default entry -- for normal (text) files. MUST BE LAST. +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/StylusColor-500@360dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-500@360dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color 500 printer operating +# at 360 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 360 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc500p.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc500p.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/r4081-filter.x +++ magicfilter-1.2/filters/r4081-filter.x @@ -19,7 +19,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=r4081 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=r4081 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=r4081 -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/psonly300-filter.x +++ magicfilter-1.2/filters/psonly300-filter.x @@ -1,2 +1,3 @@ %define DPI 300 +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pswrite -sOutputFile=- $FILE -c quit %include --- magicfilter-1.2.orig/filters/e312-filter.x +++ magicfilter-1.2/filters/e312-filter.x @@ -0,0 +1,10 @@ +%define DPI 600 +%define NATIVE_TEXT 1 +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r600 -sDEVICE=pswrite -sOutputFile=- $FILE -c quit +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +%define HANDLE_PJL cat + +%include --- magicfilter-1.2.orig/filters/pjxl300-filter.x +++ magicfilter-1.2/filters/pjxl300-filter.x @@ -18,7 +18,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pjxl300 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pjxl300 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pjxl300 -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/pj-filter.x +++ magicfilter-1.2/filters/pj-filter.x @@ -18,7 +18,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=pj -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=pj -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=pj -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/StylusColor-800@360dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-800@360dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color 800 printer operating +# at 360 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 360 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc800pl.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc800pl.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/ljet4ml-filter.x +++ magicfilter-1.2/filters/ljet4ml-filter.x @@ -13,22 +13,15 @@ * PostScript */ %define NATIVE_PS 1 -/* - * PCL, PJL - */ -%define HANDLE_PCL5E cat -%define HANDLE_PCL cat -%define HANDLE_PJL cat +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe pdf2ps $FILE - +%endif /* * Text */ -%define HANDLE_TEXT cat \eE\e&k2G\e(0N \eE %define LATIN1_OK %include -# wild guess: PCL control codes start with -0 \033 HANDLE_PCL - # Default entry -- for normal (text) files. MUST BE LAST. default HANDLE_TEXT --- magicfilter-1.2.orig/filters/StylusColor@360dpi-filter.x +++ magicfilter-1.2/filters/StylusColor@360dpi-filter.x @@ -0,0 +1,83 @@ +%include +# +# Magic filter setup file for the original EPSON Stylus Color printer operating +# at 360 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and partially +# tested together with the original Stylus Color, GhostScript versions 3.33, +# 4.03 and 5.10 by Dirk Ritter . +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 360 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 3.33 options, driver 'stcolor' (version < 1.16): +# ----------------------------------------------------------------------- +# -sDEVICE=stcolor -r360 -q -dSAFER -dNOPAUSE -dSpotSize='{2.6 2.4 2.6 2}' \ +# -sOutputFile=- - +# +# GhostScript version >= 3.50 options, driver 'stcolor' (version > 1.16): +# ----------------------------------------------------------------------- +# -sDEVICE=stcolor -r360 -q -dSAFER -dNOPAUSE -sOutputFile=- stcolor.ps - +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/epsonlq-filter.x +++ magicfilter-1.2/filters/epsonlq-filter.x @@ -19,7 +19,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=epson -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=epson -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=epson -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/la50-filter.x +++ magicfilter-1.2/filters/la50-filter.x @@ -22,7 +22,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r144x72 -sDEVICE=la50 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r144x72 -sDEVICE=la50 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r144x72 -sDEVICE=la50 -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/ljet4050-filter.x +++ magicfilter-1.2/filters/ljet4050-filter.x @@ -0,0 +1,32 @@ +%include +# +# Magic filter setup file for 1200 DPI LaserJet 4050 series with PostScript +# +# This file has been automatically adapted to your system. +# +/* + * Printer resolution + */ +%define DPI 1200 +/* + * PostScript + */ +%define NATIVE_PS 1 +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe pdf2ps $FILE - +%endif +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +%define HANDLE_PJL cat + +/* + * Text + */ +%define LATIN1_OK + +%include + +# Default entry -- for normal (text) files. MUST BE LAST. +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/bj800_draft-filter.x +++ magicfilter-1.2/filters/bj800_draft-filter.x @@ -0,0 +1,40 @@ +%include +# +# Magic filter setup file for Canon BubbleJet 600 +# THIS FILE IS UNTESTED! +# +# This file is in the public domain. +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 360 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bjc800 -sPrintQuality=Draft -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bjc800 -sPrintQuality=Draft -sOutputFile=- $FILE -c quit +%endif + +/* + * Text + */ +%define HANDLE_TEXT pipe PATH_NENSCRIPT -q -e -E -Z -G -U2 -p - -t "$LPJOB" + +/* + * Native here to override PCL magic + */ +# wild guess: native control codes start with +0 \033 cat + +%include + +# Default entry -- for normal (text) files. MUST BE LAST. +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/StylusColor-1520@1440dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-1520@1440dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color 1520 printer operating +# at 1440 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 1440 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc1520h.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc1520h.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/StylusColor-IIs@720dpi-filter.x +++ magicfilter-1.2/filters/StylusColor-IIs@720dpi-filter.x @@ -0,0 +1,74 @@ +%include +# +# Magic filter setup file for the EPSON Stylus Color IIs printer operating +# at 720 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and completely +# untested since I (Dirk Ritter ) only have the original +# Stylus Color. +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 720 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc2s_h.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc2s_h.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/ljet2p-filter.x +++ magicfilter-1.2/filters/ljet2p-filter.x @@ -16,7 +16,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljet2p -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljet2p -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=ljet2p -sOutputFile=- $FILE -c quit %endif /* * PCL, PJL --- magicfilter-1.2.orig/filters/la75-filter.x +++ magicfilter-1.2/filters/la75-filter.x @@ -22,7 +22,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r144x72 -sDEVICE=la75 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r144x72 -sDEVICE=la75 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r144x72 -sDEVICE=la75 -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/stdconv.xh +++ magicfilter-1.2/filters/stdconv.xh @@ -8,7 +8,7 @@ %define FPSACT fpipe %else %ifdef NATIVE_PS -%define HANDLE_PS postscript +%define HANDLE_PS text %define PS_OK 1 %define PSACT filter %define FPSACT ffilter @@ -18,6 +18,20 @@ %endif 0 %! HANDLE_PS 0 \004%! HANDLE_PS + +# Wind/U postscript driver. This one creates broken postscript, so we have to +# put in a special case to convert it to PCL first +65 "%%Creator: Wind/U" HANDLE_PS + +# PDF +/* PDF */ +%ifdef HANDLE_PDF +%define HANDLE_PDF fpipe PATH_PDFTOPS $FILE - +%else +%define HANDLE_PDF reject Cannot print PDF on this printer. +%endif +0 %PDF HANDLE_PDF + /* Check out a couple of common data types; if we can't handle them, see if we can find something that can; also define _OK entries and appropriate rejects. */ @@ -118,6 +132,10 @@ %define HANDLE_TROFF reject Cannot print troff files on this printer. %endif +%ifdef HAVE_BZIP2 +%define BZCAT PATH_BZIP2 -cdq +%endif + # TeX DVI 0 \367\002 HANDLE_DVI @@ -141,8 +159,15 @@ 0 \037\240 reject Cannot print SCO LZH files on this printer. %endif +%ifdef BZCAT +0 BZh pipe BZCAT +%else +0 BZh reject Cannot print bzip files on this printer. +%endif + # troff documents 0 .\?\?\040 HANDLE_TROFF +0 .\?\?\012 HANDLE_TROFF 0 .\\\" HANDLE_TROFF 0 '\\\" HANDLE_TROFF 0 '.\\\" HANDLE_TROFF @@ -190,6 +215,13 @@ 0 P5\n HANDLE_PNM 0 P6\n HANDLE_PNM +# PNG - Portable network graphics +%if defined(HAVE_PNGTOPNM) && defined(PNM_OK) +0 \x89PNG pipe PATH_PNGTOPNM +%else +0 \x89PNG reject Cannot print PNG images on this printer. +%endif + # HP Printer Control Language (PCL) -- assume start with reset code 0 \033E\033 HANDLE_PCL @@ -212,14 +244,25 @@ # JFIF (JPEG) files %if defined(HAVE_DJPEG) && defined(PNM_OK) 0 \377\330\377\340\?\?JFIF\0 pipe PATH_DJPEG -pnm +# Bug 40599 +0 \377\330\377\341\?\?Exif\0 pipe PATH_DJPEG -pnm +6 JFIF pipe PATH_DJPEG -pnm %else 0 \377\330\377\340\?\?JFIF\0 reject Cannot print JPEG images \ on this printer. +0 \377\330\377\341\?\?Exif\0 reject Cannot print JPEG images \ + on this printer. +6 JFIF reject Cannot print JPEG images \ + on this printer. %endif # TIFF files (the last two bytes of the "magic" is really a version number; # but the magic is really lame and as far as I have understood the version # number has never changed and never will, so we include it.) +%if defined(HAVE_TIFFTOPS) +0 MM\0\x2a fpipe PATH_TIFFTOPS -a $FILE +0 II\x2a\0 fpipe PATH_TIFFTOPS -a $FILE +%else %if defined(HAVE_TIFFTOPNM) && defined(PNM_OK) 0 MM\0\x2a pipe PATH_TIFFTOPNM 2>/dev/null 0 II\x2a\0 pipe PATH_TIFFTOPNM 2>/dev/null @@ -227,6 +270,7 @@ 0 MM\0\x2a pipe Cannot print TIFF images on this printer. 0 II\x2a\0 pipe Cannot print TIFF images on this printer. %endif +%endif # BMP files (even lousier magic -- Microsoft strikes again!) %if defined(HAVE_BMPTOPPM) && defined(PNM_OK) @@ -245,6 +289,13 @@ Cannot print BMP files on this printer. %endif +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + # Sun rasterfiles %if defined(HAVE_RASTTOPNM) && defined(PNM_OK) 0 \x59\xa6\x6a\x95 pipe PATH_RASTTOPNM 2>/dev/null @@ -282,8 +333,10 @@ %include %ifdef TROFF_OK +%if 0 # optimistic troff magic 0 . HANDLE_TROFF +%endif # wacko troff magic 0 ''' HANDLE_TROFF %endif --- magicfilter-1.2.orig/filters/ljet4m-filter.x +++ magicfilter-1.2/filters/ljet4m-filter.x @@ -14,22 +14,15 @@ * PostScript */ %define NATIVE_PS 1 -/* - * PCL, PJL - */ -%define HANDLE_PCL5E cat -%define HANDLE_PCL cat -%define HANDLE_PJL cat +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe pdf2ps $FILE - +%endif /* * Text */ -%define HANDLE_TEXT cat \eE\e&k2G\e(0N \eE %define LATIN1_OK %include -# wild guess: PCL control codes start with -0 \033 HANDLE_PCL - # Default entry -- for normal (text) files. MUST BE LAST. default HANDLE_TEXT --- magicfilter-1.2.orig/filters/Makefile.in +++ magicfilter-1.2/filters/Makefile.in @@ -32,7 +32,30 @@ la75-filter ln03-filter \ psonly300-filter psonly400-filter psonly600-filter \ cps300-filter cps400-filter cps600-filter \ - cpsonly300-filter cpsonly400-filter cpsonly600-filter + cpsonly300-filter cpsonly400-filter cpsonly600-filter \ + bj600-filter bj600_draft-filter bj610-filter \ + bj800-filter bj800_draft-filter \ + dj690c-filter dj690c-best-filter dj690c-low-filter \ + stylus800-filter \ + ljet4050-filter \ + StylusColor@360dpi-filter \ + StylusColor@720dpi-filter \ + StylusColor-II-IIs@360dpi-filter \ + StylusColor-II@720dpi-filter \ + StylusColor-IIs@720dpi-filter \ + StylusColor-500@360dpi-filter \ + StylusColor-500@720dpi-filter \ + StylusColor-600@360dpi-filter \ + StylusColor-600@720dpi-filter \ + StylusColor-600@1440dpi-filter \ + StylusColor-800@360dpi-filter \ + StylusColor-800@720dpi-filter \ + StylusColor-800@1440dpi-filter \ + StylusColor-1520@1440dpi-filter \ + StylusColor-generic-filter \ + e312-filter pcl3-filter gdi-filter \ + dj630c-filter \ + dj670c-filter dj670c-best-filter dj670c-low-filter .SUFFIXES: .SUFFIXES: .x .xc .h .xh .mh .xt @@ -40,12 +63,12 @@ .x.xc: ${SED} -e 's/~/~~SQU~~/g' -e "s/'/~~APO~~/g" -e 's/"/~~QUO~~/g' \ -e 's/\\/~~BSL~~/g' -e 's/^#/~~~/' -e 's/^%/#/' \ - -e 's/^[ ]*$$/~~BLANK~~/' < $< > $*.xc + -e 's/^[ ]*$$/~~BLANK~~/' < $< > $*.xc .xh.mh: ${SED} -e 's/~/~~SQU~~/g' -e "s/'/~~APO~~/g" -e 's/"/~~QUO~~/g' \ -e 's/\\/~~BSL~~/g' -e 's/^#/~~~/' -e 's/^%/#/' \ - -e 's/^[ ]*$$/~~BLANK~~/' < $< > $*.mh + -e 's/^[ ]*$$/~~BLANK~~/' < $< > $*.mh .xc.xt: -${RM} $*.c @@ -82,7 +105,7 @@ echo $${xfile}c: *.xh | sed -e 's/\.xh/.mh/g' \ >> Makefile.tmp; \ done - mv Makefile.tmp Makefile + mv Makefile.tmp Makefile idepend: head -n `grep -n '^# DEPENDENCIES' Makefile.in | cut -d':' -f1 ` \ @@ -91,11 +114,16 @@ echo $${xfile}c: *.xh | sed -e 's/\.xh/.mh/g' \ >> Makefile.in.tmp; \ done - mv Makefile.in.tmp Makefile.in + mv Makefile.in.tmp Makefile.in # DEPENDENCIES -- do not delete this line -- bj10e-filter.xc: genericps.mh stdconv.mh stdrejects.mh bj200-filter.xc: genericps.mh stdconv.mh stdrejects.mh +bj600-filter.xc: genericps.mh stdconv.mh stdrejects.mh +bj600_draft-filter.xc: genericps.mh stdconv.mh stdrejects.mh +bj610-filter.xc: genericps.mh stdconv.mh stdrejects.mh +bj800-filter.xc: genericps.mh stdconv.mh stdrejects.mh +bj800_draft-filter.xc: genericps.mh stdconv.mh stdrejects.mh cps300-filter.xc: genericps.mh stdconv.mh stdrejects.mh cps400-filter.xc: genericps.mh stdconv.mh stdrejects.mh cps600-filter.xc: genericps.mh stdconv.mh stdrejects.mh @@ -106,6 +134,12 @@ dj500-filter.xc: genericps.mh stdconv.mh stdrejects.mh dj500c-filter.xc: genericps.mh stdconv.mh stdrejects.mh dj550c-filter.xc: genericps.mh stdconv.mh stdrejects.mh +dj690c-filter.xc: genericps.mh stdconv.mh stdrejects.mh +dj690c-best-filter.xc: genericps.mh stdconv.mh stdrejects.mh +dj690c-low-filter.xc: genericps.mh stdconv.mh stdrejects.mh +dj670c-filter.xc: genericps.mh stdconv.mh stdrejects.mh +dj670c-best-filter.xc: genericps.mh stdconv.mh stdrejects.mh +dj670c-low-filter.xc: genericps.mh stdconv.mh stdrejects.mh epson9-filter.xc: genericps.mh stdconv.mh stdrejects.mh epson9c-filter.xc: genericps.mh stdconv.mh stdrejects.mh epsonlq-filter.xc: genericps.mh stdconv.mh stdrejects.mh @@ -125,6 +159,7 @@ ljet4l-filter.xc: genericps.mh stdconv.mh stdrejects.mh ljet4m-filter.xc: genericps.mh stdconv.mh stdrejects.mh ljet4ml-filter.xc: genericps.mh stdconv.mh stdrejects.mh +ljet4050-filter.xc: genericps.mh stdconv.mh stdrejects.mh ljetplus-filter.xc: genericps.mh stdconv.mh stdrejects.mh ljetpluslo-filter.xc: genericps.mh stdconv.mh stdrejects.mh ln03-filter.xc: genericps.mh stdconv.mh stdrejects.mh @@ -143,3 +178,21 @@ r4081-filter.xc: genericps.mh stdconv.mh stdrejects.mh tek4693-filter.xc: genericps.mh stdconv.mh stdrejects.mh tek4696-filter.xc: genericps.mh stdconv.mh stdrejects.mh +stylus800-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor@360dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor@720dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-II-IIs@360dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-II@720dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-IIs@720dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-500@360dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-500@720dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-600@360dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-600@720dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-600@1440dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-800@360dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-800@720dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-800@1440dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-1520@1440dpi-filter.xc: genericps.mh stdconv.mh stdrejects.mh +StylusColor-generic-filter.xc: genericps.mh stdconv.mh stdrejects.mh +pcl3-filter.xc: genericps.mh stdconv.mh stdrejects.mh +gdi-filter.xc: genericps.mh stdconv.mh stdrejects.mh --- magicfilter-1.2.orig/filters/epson9-filter.x +++ magicfilter-1.2/filters/epson9-filter.x @@ -22,7 +22,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120x72 -sDEVICE=epson -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120x72 -sDEVICE=epson -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r120x72 -sDEVICE=epson -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/StylusColor@720dpi-filter.x +++ magicfilter-1.2/filters/StylusColor@720dpi-filter.x @@ -0,0 +1,83 @@ +%include +# +# Magic filter setup file for the original EPSON Stylus Color printer operating +# at 720 dpi, late 20th century edition. +# +# Initially based on `epsonlqc-filter.x'. Heavily modified and partially +# tested together with the original Stylus Color, GhostScript versions 3.33, +# 4.03 and 5.10 by Dirk Ritter . +# +# There is no warranty for anything whatsoever! +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright © 1999 Dirk Ritter +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you did not have GhostScript installed, most entries +# are going to be rejects. +%endif +%define DPI 720 /* printer resolution */ +%define IS_COLOR 1 /* color capability */ +/* + * PostScript: + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT @stc_h.upp -q -sOutputFile=- - -c quit +%endif +/* + * Portable Document Format (input needs to be seekable): + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT @stc_h.upp -q -sOutputFile=- $FILE -c quit +%endif +/* + * Text: + */ +%ifdef HAVE_RECODE +%define HANDLE_TEXT filter PATH_RECODE --silent latin1..ibmpc +%endif +%ifndef HAVE_RECODE +%define HANDLE_TEXT text +%endif + +/* + * Native control codes are used here to override PCL magic: + */ +# Native printer control codes start with , so we pass everything that +# starts with `\033' directly to the printer, cross our fingers and hope for +# the best: +0 \033 cat + +%ifdef HAVE_GHOSTSCRIPT +# See `Devices.htm' for a description of the GhostScript options. They are +# needed and are not documented in the GhostScript manual page since they are +# specific to the GhostScript device drivers. +# +# GhostScript version >= 3.33 options, driver 'stcolor' (version < 1.16): +# ----------------------------------------------------------------------- +# -sDEVICE=stcolor -r720 -q -dSAFER -dNOPAUSE -dSpotSize='{2.6 2.4 2.6 2}' \ +# -sOutputFile=- - +# +# GhostScript version >= 3.50 options, driver 'stcolor' (version > 1.16): +# ----------------------------------------------------------------------- +# -sDEVICE=stcolor -r720 -q -dSAFER -dNOPAUSE -sOutputFile=- stcolor.ps - +# +# GhostScript version >= 5.00 options, driver 'uniprint': +# ------------------------------------------------------- +# The options currently used should work with GhostScript version >= 5.00 +# if the uniprint driver got included during compilation: +%endif +%include + +# Default entry for normal (text) files. This must be the last entry! +# ===================================================================== +%ifdef HAVE_RECODE +# Please adjust recode's codepage conversion manually according to your +# local needs. We apologize for the inconveniences... +# +%endif +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/dj690c-low-filter.x +++ magicfilter-1.2/filters/dj690c-low-filter.x @@ -0,0 +1,49 @@ +%include +# +# Magic filter setup file for HP DeskJet 690 C color printer. +# +# Initially based on dj500-filter +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright 2000 Christian Marillat +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 300 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pcl3 -sSubdevice=hpdj690c -sColourModel=CMYK -sPrintQuality=draft -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pcl3 -sSubdevice=hpdj690c -sColourModel=CMYK -sPrintQuality=draft -sOutputFile=- $FILE -c quit +%endif +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +/* + * Text + */ +%define HANDLE_TEXT cat \eE\e&k2G\e(0N \eE +%define LATIN1_OK 1 + +%include + +# wild guess: PCL control codes start with +0 \033 HANDLE_PCL + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default HANDLE_TEXT --- magicfilter-1.2.orig/filters/bj10e-filter.x +++ magicfilter-1.2/filters/bj10e-filter.x @@ -19,7 +19,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bj10e -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bj10e -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r360 -sDEVICE=bj10e -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/psonly400-filter.x +++ magicfilter-1.2/filters/psonly400-filter.x @@ -1,2 +1,3 @@ %define DPI 400 +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r400 -sDEVICE=pswrite -sOutputFile=- $FILE -c quit %include --- magicfilter-1.2.orig/filters/lj250-filter.x +++ magicfilter-1.2/filters/lj250-filter.x @@ -19,7 +19,8 @@ * PostScript */ %ifdef HAVE_GHOSTSCRIPT -%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=lj250 -sOutputFile=- - +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=lj250 -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r180 -sDEVICE=lj250 -sOutputFile=- $FILE -c quit %endif /* * Text --- magicfilter-1.2.orig/filters/dj690c-best-filter.x +++ magicfilter-1.2/filters/dj690c-best-filter.x @@ -0,0 +1,49 @@ +%include +# +# Magic filter setup file for HP DeskJet 690 C color printer. +# +# Initially based on dj500-filter +# +# This file is covered by the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# Copyright 2000 Christian Marillat +# +# This file has been automatically adapted to your system. +%ifndef HAVE_GHOSTSCRIPT +# However, since you didn't have GhostScript installed, most entries +# are going to be rejects. +%endif +# +/* + * Printer resolution + */ +%define DPI 300 +/* + * PostScript + */ +%ifdef HAVE_GHOSTSCRIPT +%define HANDLE_PS filter PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pcl3 -sSubdevice=hpdj690c -sColourModel=CMYK -sPrintQuality=best -sOutputFile=- - -c quit +%define HANDLE_PDF fpipe PATH_GHOSTSCRIPT -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pcl3 -sSubdevice=hpdj690c -sColourMode=CMYK -sPrintQuality=best -sOutputFile=- $FILE -c quit +%endif +/* + * PCL, PJL + */ +%define HANDLE_PCL cat +/* + * Text + */ +%define HANDLE_TEXT cat \eE\e&k2G\e(0N \eE +%define LATIN1_OK 1 + +%include + +# wild guess: PCL control codes start with +0 \033 HANDLE_PCL + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default HANDLE_TEXT --- magicfilter-1.2.orig/Makefile.in +++ magicfilter-1.2/Makefile.in @@ -6,7 +6,7 @@ # # Define the following to suit your taste -# +# srcdir = @srcdir@ VPATH = @srcdir@ @@ -35,7 +35,7 @@ # valid mail address (for example, if you can submit print jobs from # non-mailer machines without MX records). If so, define -DNOMAIL. # -# -DNOMAIL Disable sending of rejection mail notices +# -DNOMAIL Disable sending of rejection mail notices # -DSENDMAIL="path" Where is your mail transport agent? # -DBANG_ADDRESS To send to "host!user" instead of "user@host" # --- magicfilter-1.2.orig/magicfilter.c +++ magicfilter-1.2/magicfilter.c @@ -8,6 +8,8 @@ * */ +/* LPUSERNAME-support copyright 1998 David Frey */ + #include "magicfilter.h" #include #include @@ -20,9 +22,11 @@ #endif #include #include +#include #ifdef HAVE_SYS_WAIT_H #include #endif +#include char *inblock; /* Block read */ int inblock_size; /* Bytes reserved for the inblock */ @@ -59,10 +63,10 @@ /* Header of mail message */ #ifndef NOMAIL const char *mailheader = /* Header of complaint message */ -"To: %s\n\ -Subject: Rejected print job\n\ - -Your print job was automatically rejected as an invalid data type.\n\n"; +"To: %s\n" +"Subject: Rejected print job\n" +"\n" +"Your print job was automatically rejected as an invalid data type.\n\n"; #endif /* ------------------------------------------------------------------------- * @@ -97,6 +101,7 @@ #endif +#if 0 #ifdef HAVE_TMPNAM /* If we don't have L_tmpnam, we can't use the provided tmpnam */ #ifndef L_tmpnam @@ -124,6 +129,9 @@ } #endif +#endif + + /* ------------------------------------------------------------------------- * * run(command) * @@ -482,7 +490,7 @@ { close(fildes[1]); dup2(fildes[0],fileno(stdin)); /* Redirect stdin */ - run(command); + run(command); } else /* Parent process */ { @@ -496,6 +504,7 @@ if ( status ) { fprintf(stderr, "%s: %s failed\n", ERR_NAME, command); + exit(255); } } @@ -511,16 +520,19 @@ void act_ffilter(char *command) { - static char tmpbuf[L_tmpnam+6] = "FILE="; + static char tmpbuf[] = "FILE=/tmp/mfilter.NNNNNNN.XXXXXX"; FILE *out; /* Output file pointer */ int outfd; /* Output file descriptor */ pid_t pid; /* Child process ID */ int status; - + int fd; + if ( debug_flag ) fprintf(stderr, "ffilter %s\n", command); - if ( !tmpnam(tmpbuf+5) || !(out = fopen(tmpbuf+5, "wb")) ) + sprintf(tmpbuf, "FILE=/tmp/mfilter.%d.XXXXXX", (int) getpid()); + + if ( (fd = mkstemp(tmpbuf+5)) == -1 || !(out = fdopen(fd, "wb")) ) { perror(ERR_NAME); exit(1); @@ -553,6 +565,9 @@ } unlink(tmpbuf+5); /* Remove temp file */ + + if ( status ) + exit(255); } done = 1; @@ -574,7 +589,7 @@ int inpipefd[2]; /* File descriptors for input pipe */ int outpipefd[2]; /* File descriptors for output pipe */ FILE *out; /* Output file pointer */ - pid_t pid, xpid, wpid; + pid_t pid, xpid; int null; /* /dev/null */ int status; /* Process exit status */ @@ -630,6 +645,8 @@ /* If status > 0 we should probably do something, but it is difficult to know what we can do at this stage */ + if (status > 0) + exit(255); exit(0); } @@ -671,18 +688,21 @@ void act_fpipe(char *command) { - static char tmpbuf[L_tmpnam+6] = "FILE="; + static char tmpbuf[] = "FILE=/tmp/mfilter.NNNNNNN.XXXXXX"; int outpipefd[2]; /* File descriptors for output pipe */ FILE *out; /* Output file pointer */ int outfd; /* Output file descriptor */ - pid_t pid, xpid, wpid; + pid_t pid, xpid; int null; /* /dev/null */ int status; /* Exit status */ - + int fd; + if ( debug_flag ) fprintf(stderr, "fpipe %s\n", command); - if ( !tmpnam(tmpbuf+5) || !(out = fopen(tmpbuf+5,"w+b")) || pipe(outpipefd) ) + sprintf(tmpbuf, "FILE=/tmp/mfilter.%d.XXXXXX", (int) getpid()); + + if ((fd = mkstemp(tmpbuf+5)) == -1 || !(out = fdopen(fd, "w+b")) || pipe(outpipefd)) { #if DEBUG > 2 fprintf(stderr, "TMPBUF: %s\n", tmpbuf); @@ -733,7 +753,11 @@ difficult to know what we can do at this stage */ unlink(tmpbuf+5); - exit(0); + + if ( status ) + exit(255); + else + exit(0); } } else @@ -835,16 +859,16 @@ * Analyze the input data and choose an appropriate way to handle it. * ------------------------------------------------------------------------- */ -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { - int do_cat = 0; /* True if -c option */ + int do_cat = 0; /* True if -c option */ int i; - const struct datatype *dtab; /* Data type table */ - const struct datatype *dt; /* Data type searched */ - char *user = "unknown"; /* User name */ - char *host = "unknown"; /* Host name */ + const struct datatype *dtab=NULL; /* Data type table */ + const struct datatype *dt=NULL; /* Data type searched */ + char *user = "unknown"; /* User name */ + char *host = "unknown"; /* Host name */ - program = argv[0]; /* Make available for error messages */ + program = argv[0]; /* Make available for error messages */ if ( argc < 2 ) { @@ -857,6 +881,7 @@ #ifdef HAVE_UNSETENV unsetenv("LPUSER"); + unsetenv("LPUSERNAME"); unsetenv("LPHOST"); unsetenv("LPJOB"); unsetenv("FILE"); @@ -870,6 +895,7 @@ unsetenv("BANNERNAME"); #else putenv("LPUSER="); + putenv("LPUSERNAME="); putenv("LPHOST="); putenv("LPJOB="); putenv("FILE="); @@ -892,8 +918,29 @@ do_cat = 1; else if ( strncmp(argv[i],"-n",2) == 0 ) { + struct passwd *pwptr; + user = (argv[i][2] || i == argc-1) ? argv[i]+2 : argv[++i]; envset("LPUSER", user); + + pwptr = getpwnam(user); + if (pwptr != NULL) + { + char *realname; + + /* we have found a GCOS entry, split it up. */ + realname = strtok(pwptr->pw_gecos,",["); + + if (realname != NULL) + { + size_t l; + + l = strlen(realname)-1; + while (realname[l] == ' ') { realname[l] = '\0'; l--; } + + envset("LPUSERNAME", realname); + } + } } else if ( strncmp(argv[i],"-h",2) == 0 ) { --- magicfilter-1.2.orig/TODO +++ magicfilter-1.2/TODO @@ -0,0 +1 @@ +- Integration of Dirk Ritter's Stylus color magic filter scripts. --- magicfilter-1.2.orig/config.guess +++ magicfilter-1.2/config.guess @@ -0,0 +1,1368 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-03-30' + +# This file 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. + +# Written by Per Bothner . +# Please send patches to . +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break + fi + done + rm -f $dummy.c $dummy.o $dummy.rel + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; + esac + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + cat >$dummy.c < /* for printf() prototype */ +int main (int argc, char *argv[]) { +#else +int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __MIPSEB__ + printf ("%s-unknown-linux-gnu\n", argv[1]); +#endif +#ifdef __MIPSEL__ + printf ("%sel-unknown-linux-gnu\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + ;; + ppc:Linux:*:*) + # Determine Lib Version + cat >$dummy.c < +#if defined(__GLIBC__) +extern char __libc_version[]; +extern char __libc_release[]; +#endif +main(argc, argv) + int argc; + char *argv[]; +{ +#if defined(__GLIBC__) + printf("%s %s\n", __libc_version, __libc_release); +#else + printf("unknown\n"); +#endif + return 0; +} +EOF + LIBC="" + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy | grep 1\.99 > /dev/null + if test "$?" = 0 ; then LIBC="libc1" ; fi + fi + rm -f $dummy.c $dummy + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 ;; + alpha:Linux:*:*) + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + LIBC="" + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; + 1-0) UNAME_MACHINE="alphaev5" ;; + 1-1) UNAME_MACHINE="alphaev56" ;; + 1-101) UNAME_MACHINE="alphapca56" ;; + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) UNAME_MACHINE="alphaev67" ;; + esac + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i?86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_emulations=`cd /; ld --help 2>&1 \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + elf_i?86) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + i?86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + esac + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c < +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i?86:*:5:7*) + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i?86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:* | i?86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i?86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: --- magicfilter-1.2.orig/config.sub +++ magicfilter-1.2/config.sub @@ -0,0 +1,1360 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-03-30' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file 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. + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ + | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ + | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp10 | pdp11 \ + | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ + | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ + | pj | pjl | h8500) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[234567]86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ + | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ + | [cjt]90-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [cjt]90) + basic_machine=${basic_machine}-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4) + basic_machine=sh-unknown + ;; + sparc | sparcv9) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i[34567]86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: --- magicfilter-1.2.orig/configure +++ magicfilter-1.2/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.7 -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -49,6 +49,9 @@ # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 ac_prev= for ac_option @@ -330,7 +333,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.7" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -432,11 +435,14 @@ done # NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h @@ -495,13 +501,13 @@ ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='echo $CPP $CPPFLAGS 1>&5; -$CPP $CPPFLAGS' -ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; -${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' -ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; -${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -521,14 +527,16 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:531: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -536,7 +544,6 @@ fi done IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" fi fi CC="$ac_cv_prog_CC" @@ -546,8 +553,141 @@ echo "$ac_t""no" 1>&6 fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:561: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:612: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:644: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 655 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:691: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -556,7 +696,7 @@ yes; #endif EOF -if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -564,36 +704,50 @@ fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + if test $ac_cv_prog_gcc = yes; then GCC=yes - if test "${CFLAGS+set}" != set; then - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:719: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_gcc_g=yes + ac_cv_prog_cc_g=yes else - ac_cv_prog_gcc_g=no + ac_cv_prog_cc_g=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:751: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -608,37 +762,62 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -647,23 +826,27 @@ fi echo "$ac_t""$CPP" 1>&6 -ac_safe=`echo "minix/config.h" | tr './\055' '___'` +ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 +echo "configure:832: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -693,8 +876,9 @@ fi echo $ac_n "checking for AIX""... $ac_c" 1>&6 +echo "configure:880: checking for AIX" >&5 cat > conftest.$ac_ext <&6 +echo "configure:904: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -762,27 +947,30 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:956: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -793,7 +981,7 @@ ;; esac done - IFS="$ac_save_ifs" + IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then @@ -812,9 +1000,12 @@ # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1009: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -835,6 +1026,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1030: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -849,37 +1041,62 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -889,11 +1106,62 @@ echo "$ac_t""$CPP" 1>&6 +for ac_prog in recode +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1115: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_RECODE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$RECODE" in + /*) + ac_cv_path_RECODE="$RECODE" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_RECODE="$RECODE" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_RECODE="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +RECODE="$ac_cv_path_RECODE" +if test -n "$RECODE"; then + echo "$ac_t""$RECODE" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$RECODE" && break +done + +if test -n "$RECODE"; then + cat >> confdefs.h <<\EOF +#define HAVE_RECODE 1 +EOF + + cat >> confdefs.h <&6 +echo "configure:1165: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GHOSTSCRIPT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -901,9 +1169,13 @@ /*) ac_cv_path_GHOSTSCRIPT="$GHOSTSCRIPT" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GHOSTSCRIPT="$GHOSTSCRIPT" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GHOSTSCRIPT="$ac_dir/$ac_word" @@ -939,6 +1211,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1215: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GROG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -946,9 +1219,13 @@ /*) ac_cv_path_GROG="$GROG" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GROG="$GROG" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GROG="$ac_dir/$ac_word" @@ -984,6 +1261,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1265: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -991,9 +1269,13 @@ /*) ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GROFF="$GROFF" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GROFF="$ac_dir/$ac_word" @@ -1029,6 +1311,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1315: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DITROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1036,9 +1319,13 @@ /*) ac_cv_path_DITROFF="$DITROFF" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_DITROFF="$DITROFF" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_DITROFF="$ac_dir/$ac_word" @@ -1074,6 +1361,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1365: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GROPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1081,9 +1369,13 @@ /*) ac_cv_path_GROPS="$GROPS" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GROPS="$GROPS" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GROPS="$ac_dir/$ac_word" @@ -1119,6 +1411,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1415: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GRODVI'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1126,9 +1419,13 @@ /*) ac_cv_path_GRODVI="$GRODVI" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GRODVI="$GRODVI" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GRODVI="$ac_dir/$ac_word" @@ -1164,6 +1461,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1465: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GROTTY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1171,9 +1469,13 @@ /*) ac_cv_path_GROTTY="$GROTTY" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GROTTY="$GROTTY" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GROTTY="$ac_dir/$ac_word" @@ -1209,6 +1511,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1515: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GROLJ4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1216,9 +1519,13 @@ /*) ac_cv_path_GROLJ4="$GROLJ4" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GROLJ4="$GROLJ4" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GROLJ4="$ac_dir/$ac_word" @@ -1249,11 +1556,62 @@ EOF fi +for ac_prog in bzip2 bunzip2 bzcat +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1565: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_BZIP2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$BZIP2" in + /*) + ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_BZIP2="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +BZIP2="$ac_cv_path_BZIP2" +if test -n "$BZIP2"; then + echo "$ac_t""$BZIP2" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$BZIP2" && break +done + +if test -n "$BZIP2"; then + cat >> confdefs.h <<\EOF +#define HAVE_BZIP2 1 +EOF + + cat >> confdefs.h <&6 +echo "configure:1615: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1261,9 +1619,13 @@ /*) ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GZIP="$GZIP" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GZIP="$ac_dir/$ac_word" @@ -1299,6 +1661,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1665: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ZCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1306,9 +1669,13 @@ /*) ac_cv_path_ZCAT="$ZCAT" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_ZCAT="$ZCAT" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_ZCAT="$ac_dir/$ac_word" @@ -1344,6 +1711,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1715: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_UNCOMPRESS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1351,9 +1719,13 @@ /*) ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_UNCOMPRESS="$ac_dir/$ac_word" @@ -1389,6 +1761,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1765: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DVIPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1396,9 +1769,13 @@ /*) ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_DVIPS="$ac_dir/$ac_word" @@ -1434,6 +1811,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1815: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PNMTOPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1441,9 +1819,13 @@ /*) ac_cv_path_PNMTOPS="$PNMTOPS" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_PNMTOPS="$PNMTOPS" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_PNMTOPS="$ac_dir/$ac_word" @@ -1474,11 +1856,62 @@ EOF fi +for ac_prog in pngtopnm +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1865: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PNGTOPNM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PNGTOPNM" in + /*) + ac_cv_path_PNGTOPNM="$PNGTOPNM" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PNGTOPNM="$PNGTOPNM" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PNGTOPNM="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +PNGTOPNM="$ac_cv_path_PNGTOPNM" +if test -n "$PNGTOPNM"; then + echo "$ac_t""$PNGTOPNM" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$PNGTOPNM" && break +done + +if test -n "$PNGTOPNM"; then + cat >> confdefs.h <<\EOF +#define HAVE_PNGTOPNM 1 +EOF + + cat >> confdefs.h <&6 +echo "configure:1915: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GIFTOPPM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1486,9 +1919,13 @@ /*) ac_cv_path_GIFTOPPM="$GIFTOPPM" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GIFTOPPM="$GIFTOPPM" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GIFTOPPM="$ac_dir/$ac_word" @@ -1524,6 +1961,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1965: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DJPEG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1531,9 +1969,13 @@ /*) ac_cv_path_DJPEG="$DJPEG" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_DJPEG="$DJPEG" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_DJPEG="$ac_dir/$ac_word" @@ -1569,6 +2011,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2015: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SGITOPNM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1576,9 +2019,13 @@ /*) ac_cv_path_SGITOPNM="$SGITOPNM" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_SGITOPNM="$SGITOPNM" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_SGITOPNM="$ac_dir/$ac_word" @@ -1614,6 +2061,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2065: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TOPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1621,9 +2069,13 @@ /*) ac_cv_path_TOPS="$TOPS" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_TOPS="$TOPS" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_TOPS="$ac_dir/$ac_word" @@ -1659,6 +2111,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2115: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SGITOPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1666,9 +2119,13 @@ /*) ac_cv_path_SGITOPS="$SGITOPS" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_SGITOPS="$SGITOPS" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_SGITOPS="$ac_dir/$ac_word" @@ -1699,11 +2156,62 @@ EOF fi +for ac_prog in tiff2ps +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2165: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_TIFFTOPS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$TIFFTOPS" in + /*) + ac_cv_path_TIFFTOPS="$TIFFTOPS" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_TIFFTOPS="$TIFFTOPS" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_TIFFTOPS="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +TIFFTOPS="$ac_cv_path_TIFFTOPS" +if test -n "$TIFFTOPS"; then + echo "$ac_t""$TIFFTOPS" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$TIFFTOPS" && break +done + +if test -n "$TIFFTOPS"; then + cat >> confdefs.h <<\EOF +#define HAVE_TIFFTOPS 1 +EOF + + cat >> confdefs.h <&6 +echo "configure:2215: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TIFFTOPNM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1711,9 +2219,13 @@ /*) ac_cv_path_TIFFTOPNM="$TIFFTOPNM" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_TIFFTOPNM="$TIFFTOPNM" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_TIFFTOPNM="$ac_dir/$ac_word" @@ -1749,6 +2261,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2265: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BMPTOPPM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1756,9 +2269,13 @@ /*) ac_cv_path_BMPTOPPM="$BMPTOPPM" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_BMPTOPPM="$BMPTOPPM" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_BMPTOPPM="$ac_dir/$ac_word" @@ -1794,6 +2311,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2315: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RASTTOPNM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1801,9 +2319,13 @@ /*) ac_cv_path_RASTTOPNM="$RASTTOPNM" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_RASTTOPNM="$RASTTOPNM" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_RASTTOPNM="$ac_dir/$ac_word" @@ -1839,6 +2361,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2365: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_NENSCRIPT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1846,9 +2369,13 @@ /*) ac_cv_path_NENSCRIPT="$NENSCRIPT" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_NENSCRIPT="$NENSCRIPT" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_NENSCRIPT="$ac_dir/$ac_word" @@ -1884,6 +2411,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2415: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_A2X'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1891,9 +2419,13 @@ /*) ac_cv_path_A2X="$A2X" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_A2X="$A2X" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_A2X="$ac_dir/$ac_word" @@ -1929,6 +2461,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2465: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_A2PS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1936,9 +2469,13 @@ /*) ac_cv_path_A2PS="$A2PS" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_A2PS="$A2PS" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_A2PS="$ac_dir/$ac_word" @@ -1974,6 +2511,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2515: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FIG2DEV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1981,9 +2519,13 @@ /*) ac_cv_path_FIG2DEV="$FIG2DEV" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_FIG2DEV="$FIG2DEV" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_FIG2DEV="$ac_dir/$ac_word" @@ -2014,8 +2556,59 @@ EOF fi +for ac_prog in pdftops +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2565: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PDFTOPS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PDFTOPS" in + /*) + ac_cv_path_PDFTOPS="$PDFTOPS" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PDFTOPS="$PDFTOPS" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PDFTOPS="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +PDFTOPS="$ac_cv_path_PDFTOPS" +if test -n "$PDFTOPS"; then + echo "$ac_t""$PDFTOPS" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$PDFTOPS" && break +done + +if test -n "$PDFTOPS"; then + cat >> confdefs.h <<\EOF +#define HAVE_PDFTOPS 1 +EOF + + cat >> confdefs.h <&6 +echo "configure:2612: checking whether zcat is really gzip" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_zcat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2041,6 +2634,7 @@ echo $ac_n "checking whether ditroff works""... $ac_c" 1>&6 +echo "configure:2638: checking whether ditroff works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ditroff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2079,6 +2673,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2677: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2086,9 +2681,13 @@ /*) ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_SENDMAIL="$ac_dir/$ac_word" @@ -2123,23 +2722,27 @@ for ac_hdr in memory.h do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2728: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -2147,7 +2750,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 +echo "configure:2768: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -2183,7 +2790,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 +echo "configure:2808: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -2219,7 +2830,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 +echo "configure:2848: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -2255,7 +2870,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 +echo "configure:2885: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2280,22 +2896,22 @@ #ifndef WIFEXITED #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif -int main() { return 0; } -int t() { +int main() { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if eval $ac_compile; then +if { (eval echo configure:2906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_sys_wait_h=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 @@ -2308,15 +2924,15 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:2928: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* - fi echo "$ac_t""$ac_cv_c_const" 1>&6 @@ -2381,51 +2998,29 @@ fi -# If we cannot run a trivial program, we must be cross compiling. -echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes -else -cat > conftest.$ac_ext </dev/null; then - ac_cv_c_cross=no -else - ac_cv_c_cross=yes -fi -fi -rm -fr conftest* -fi - -echo "$ac_t""$ac_cv_c_cross" 1>&6 -cross_compiling=$ac_cv_c_cross - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:3003: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi @@ -2434,7 +3029,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2452,7 +3047,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2472,8 +3067,8 @@ if test "$cross_compiling" = yes; then : else -cat > conftest.$ac_ext < conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2484,15 +3079,19 @@ exit (0); } EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then : else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_header_stdc=no fi -fi rm -fr conftest* fi + +fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 @@ -2504,19 +3103,21 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:3107: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include +#include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else @@ -2537,20 +3138,22 @@ for ac_func in dup2 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3142: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func(); -int main() { return 0; } -int t() { +int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -2563,16 +3166,73 @@ ; return 0; } EOF -if eval $ac_link; then +if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 fi +done + +for ac_func in mktemp +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3197: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -2588,20 +3248,22 @@ for ac_func in tmpnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3252: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func(); -int main() { return 0; } -int t() { +int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -2614,16 +3276,18 @@ ; return 0; } EOF -if eval $ac_link; then +if { (eval echo configure:3280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -2639,20 +3303,22 @@ for ac_func in waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3307: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func(); -int main() { return 0; } -int t() { +int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -2665,16 +3331,18 @@ ; return 0; } EOF -if eval $ac_link; then +if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -2690,20 +3358,22 @@ for ac_func in wait4 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3362: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func(); -int main() { return 0; } -int t() { +int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -2716,16 +3386,18 @@ ; return 0; } EOF -if eval $ac_link; then +if { (eval echo configure:3390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -2741,20 +3413,22 @@ for ac_func in unsetenv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3417: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func(); -int main() { return 0; } -int t() { +int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -2767,16 +3441,18 @@ ; return 0; } EOF -if eval $ac_link; then +if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -2807,11 +3483,25 @@ # --recheck option to rerun configure. # EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache if cmp -s $cache_file confcache; then : else @@ -2866,7 +3556,7 @@ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.7" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2886,9 +3576,11 @@ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -2910,8 +3602,10 @@ s%@CC@%$CC%g s%@CPP@%$CPP%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@LN_S@%$LN_S%g +s%@RECODE@%$RECODE%g s%@GHOSTSCRIPT@%$GHOSTSCRIPT%g s%@GROG@%$GROG%g s%@GROFF@%$GROFF%g @@ -2920,16 +3614,19 @@ s%@GRODVI@%$GRODVI%g s%@GROTTY@%$GROTTY%g s%@GROLJ4@%$GROLJ4%g +s%@BZIP2@%$BZIP2%g s%@GZIP@%$GZIP%g s%@ZCAT@%$ZCAT%g s%@UNCOMPRESS@%$UNCOMPRESS%g s%@DVIPS@%$DVIPS%g s%@PNMTOPS@%$PNMTOPS%g +s%@PNGTOPNM@%$PNGTOPNM%g s%@GIFTOPPM@%$GIFTOPPM%g s%@DJPEG@%$DJPEG%g s%@SGITOPNM@%$SGITOPNM%g s%@TOPS@%$TOPS%g s%@SGITOPS@%$SGITOPS%g +s%@TIFFTOPS@%$TIFFTOPS%g s%@TIFFTOPNM@%$TIFFTOPNM%g s%@BMPTOPPM@%$BMPTOPPM%g s%@RASTTOPNM@%$RASTTOPNM%g @@ -2937,24 +3634,61 @@ s%@A2X@%$A2X%g s%@A2PS@%$A2PS%g s%@FIG2DEV@%$FIG2DEV%g +s%@PDFTOPS@%$PDFTOPS%g s%@SENDMAIL@%$SENDMAIL%g CEOF EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac - # Adjust relative srcdir, etc. for subdirectories. + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` @@ -2982,6 +3716,7 @@ [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac + echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." @@ -2990,14 +3725,16 @@ # $configure_input" ;; *) ac_comsub= ;; esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done -rm -f conftest.subs +rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. @@ -3018,11 +3755,17 @@ ac_eC=' ' ac_eD='%g' -CONFIG_HEADERS=${CONFIG_HEADERS-"config.h filters/filters.h filters/filters2.h"} +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac @@ -3030,7 +3773,8 @@ echo creating $ac_file rm -f conftest.frag conftest.in conftest.out - cp $ac_given_srcdir/$ac_file_in conftest.in + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in EOF @@ -3042,7 +3786,7 @@ cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF @@ -3058,8 +3802,6 @@ # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. -# Maximum number of lines to put in a single here document. -ac_max_here_lines=12 rm -f conftest.tail while : @@ -3090,12 +3832,22 @@ echo "$ac_file is unchanged" rm -f conftest.h else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi rm -f $ac_file mv conftest.h $ac_file fi fi; done +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF --- magicfilter-1.2.orig/configure.in +++ magicfilter-1.2/configure.in @@ -15,6 +15,7 @@ AC_PROG_CPP dnl Check for programs used in filters +AC_PATH_INCLUDE(RECODE, recode) AC_PATH_INCLUDE(GHOSTSCRIPT, gs) AC_PATH_INCLUDE(GROG, grog) AC_PATH_INCLUDE(GROFF, groff) @@ -23,16 +24,19 @@ AC_PATH_INCLUDE(GRODVI, grodvi) AC_PATH_INCLUDE(GROTTY, grotty) AC_PATH_INCLUDE(GROLJ4, grolj4) +AC_PATH_INCLUDE(BZIP2, bzip2 bunzip2 bzcat) AC_PATH_INCLUDE(GZIP, gzip gunzip gzcat) AC_PATH_INCLUDE(ZCAT, zcat) AC_PATH_INCLUDE(UNCOMPRESS, uncompress) AC_PATH_INCLUDE(DVIPS, dvips) AC_PATH_INCLUDE(PNMTOPS, pnmtops) +AC_PATH_INCLUDE(PNGTOPNM, pngtopnm) AC_PATH_INCLUDE(GIFTOPPM, giftopnm giftoppm) AC_PATH_INCLUDE(DJPEG, djpeg) AC_PATH_INCLUDE(SGITOPNM, sgitopnm) AC_PATH_INCLUDE(TOPS, tops) AC_PATH_INCLUDE(SGITOPS, sgitops) +AC_PATH_INCLUDE(TIFFTOPS, tiff2ps) AC_PATH_INCLUDE(TIFFTOPNM, tifftopnm) AC_PATH_INCLUDE(BMPTOPPM, bmptopnm bmptoppm) AC_PATH_INCLUDE(RASTTOPNM, rasttopnm) @@ -40,6 +44,7 @@ AC_PATH_INCLUDE(A2X, a2x) AC_PATH_INCLUDE(A2PS, a2ps) AC_PATH_INCLUDE(FIG2DEV, fig2dev) +AC_PATH_INCLUDE(PDFTOPS, pdftops) dnl Check to see if zcat is gzip AC_PROG_GNU_ZCAT($ZCAT) @@ -64,6 +69,7 @@ AC_C_CONST AC_TYPE_PID_T AC_CHECK_FUNCS(dup2) +AC_CHECK_FUNCS(mktemp) AC_CHECK_FUNCS(tmpnam) AC_CHECK_FUNCS(waitpid) AC_CHECK_FUNCS(wait4) --- magicfilter-1.2.orig/loadconfig.c +++ magicfilter-1.2/loadconfig.c @@ -106,7 +106,6 @@ struct datatype *new; char *line, *p; int lineno = 0; - int max_line = 0; int bytes_needed = 0; int offset; int i; --- magicfilter-1.2.orig/magicfilter.man.in +++ magicfilter-1.2/magicfilter.man.in @@ -47,6 +47,8 @@ The login name of the user who submitted the job. Available to subfilters as .BR $LPUSER . +If the user has an associated GECOS entry it will be available as +.BR $LPUSERNAME . .TP .I "\-hhost, \-h host" The host on which the job was submitted. Available to subfilters as --- magicfilter-1.2.orig/magicfilterconfig +++ magicfilter-1.2/magicfilterconfig @@ -0,0 +1,305 @@ +#!/usr/bin/perl -w +# -*- cperl -*- + +# Public Domain. +# David Frey + +use strict; +no strict "vars"; + +my $printcap="/etc/printcap"; +my $filterdir="/etc/magicfilter"; +my $force=0; +my $m=0; + +if ($#ARGV >= 0) { + $force=($ARGV[0] eq "--force"); if ($force) { $m++; } +} + +if ($m <= $#ARGV) { $printcap=$ARGV[$m]; } + +sub input() +{ + my($message)=$_[0]; + my($defanswer)=$_[1]; + my($reply); + + printf "%-45s [%-15s]: ",$message,$defanswer; + $reply=; chop($reply); if ($reply eq "") { $reply=$defanswer; } + + return $reply; +} + +sub yninput() +{ + my($message)=$_[0]; + my($defanswer)=$_[1]; + my($reply); + + printf "%s? (y/n) [%s]: ",$message,$defanswer; + $reply=; chop($reply); if ($reply eq "") { $reply=$defanswer; } + + return $reply; +} + +sub readfilters() +{ + my($i); + + if ( ! -e $filterdir ) { + print<) { + chop; + s/$filterdir\/(.*)-filter/$1/g; + $filters[$i]=$_; $i++; + } + close(FILTERS); + + foreach $entry (@filters) { $entry =~ s/-filter//g; } + return sort(@filters); +} + +@filters=&readfilters; + +$ok="no"; $m=-1; $d=0; +while ($ok !~ /y(es)?/) { + print< 72-length($filter)) { print "\n"; $l=0; } + print "$filter "; + } + print "\n\n"; + + $ifilter[$p]=&input("The input filter to be used", $ifilter[$p]); + + if ($dev[$p] !~ /\/dev\//) { + $remflags[$p]=":rm=$dev[$p]:rp=$short[$p]:lpr_bounce"; $dev[$p]=""; + } elsif ($dev[$p] =~ /\/dev\/ttyS/) { + $serflags[$p]=":bf=2400:fc=0:fs=1"; + } else { + $lpflags[$p]="lp=$dev[$p]:"; + } + + $spooldir[$p]="/var/spool/lpd/$short[$p]"; + + print "\n"; + } + } + } while ($full[$p] !~ /done\s*/); + + if ($p > 0) { + if ($p == 1) { $d=0; } + do { + format top= + + Printer configuration + +Default printer (alias `lp') is marked with an asterisk. + +Printer name Short name Spool dir Device Input filter +------------------------------------------------------------------------------- +. + + format STDOUT= +@<<<<<<<<<<<< @<<<<<<<<< @<<<<<<<<<<<<<<<<<<< @<<<<<<<<< @<<<<<<<<<<<<<<<<<<@<< +$full, $short, $spooldir, $dev, $ifilter, $a +. + + for($i=0;$i<$p;$i++) { + $full=$full[$i]; $short=$short[$i]; + $spooldir=$spooldir[$i]; $dev=$dev[$i]; $ifilter=$ifilter[$i]; + $a= ($remflags[$i] ne "") ? "R" : ""; + $a= $a . (($i == $d) ? "*" : ""); + + write; + } + $ans="n"; $-=0; + + print "\n"; + if ($p > 1) { + $ans=&yninput("Do you want to change the default printer","n"); + if ($ans =~ /y(es)?/) { + $def=&input("New default printer (type its short name)",""); + $d=0; + while (($d < $p) && ($short[$d] !~ /$def/)) { $d++; } + if ($d == $p) { $d = 0; } + $short[$d]=$def; + } + } + } while ($ans =~ /y(es)?/); + $ok=&yninput("Is this ok","y"); + } else { + $ok="yes"; + } +} + +print "\n"; +if ($p > 0) { + if ( -x "/usr/bin/paperconf" ) { + open(PAPERSIZE, "/usr/bin/paperconf -N|"); + $papersize=; chop($papersize); + close(PAPERSIZE); + } + + $pagelength=66; + if ($papersize =~ /A4/) { $pagelength=72; } + print "Paper size is $papersize, page length is $pagelength lines.\n"; + + system("/etc/init.d/lpd stop || /etc/init.d/lprng stop"); + + my $printcaporig="$printcap.orig"; + if ( -r "$printcaporig" ) { + unlink($printcaporig); + } + if ( -r "$printcap" ) { + rename $printcap,$printcaporig; + + print "Renamed original $printcap to $printcaporig.\n"; + } + + open(PRINTCAP,">$printcap") || die "Can't write $printcap: $!"; + print PRINTCAP < to continue."; $dummy=; +} + +exit 0; --- magicfilter-1.2.orig/magicfilterconfig.8 +++ magicfilter-1.2/magicfilterconfig.8 @@ -0,0 +1,34 @@ +.\" Taken from deb-make and expanded with Winfried Truemper's ideas. +.\" David Frey , July 1997 +.TH MAGICFILTERCONFIG 8 "February 2002" "Debian" \" -*- nroff -*- +.SH NAME +magicfilterconfig \- writes interactively a printcap file. +.SH SYNOPSIS +.B magicfilterconfig +.I "[--force]" +.I " [printcap]" +.SH DESCRIPTION +.B magicfilterconfig +interactively writes a printcap file; either the one given as argument or +.I /etc/printcap +otherwise. +.PP +.B magicfilterconfig +does not overwrite an existing printcap file, unless the +.I --force +switch was given (it assumes that the existing file was handcrafted +and is therefore correct). +.SH OPTIONS +.TP +.B \-\-force +overwrite an existing printcap file. +.SH FILES +/etc/printcap +.br +/etc/printcap.orig +.SH "SEE ALSO" +.BR printcap "(5), " lpd "(8), " lpc "(8), " papersize "(5), " +.IR "Printing-HOWTO" "printer manual" . +.SH AUTHOR +This manual page was written by David Frey , +for the Debian GNU/Linux system. --- magicfilter-1.2.orig/parseconfig.c +++ magicfilter-1.2/parseconfig.c @@ -146,6 +146,8 @@ { state = st_done; } + case st_done: + break; } } @@ -177,7 +179,7 @@ { int count = 0; /* Count of bytes */ int quote = 0; /* Quoted? */ - int ch; + int ch='\0'; int wildcards = 1; /* Wildcards allowed by default */ enum { st_def, st_backsl, st_oct, st_hex, st_done } state = st_def; @@ -347,6 +349,8 @@ state = st_def; /* Do not advance p */ } break; + case st_done: + break; } }