sane-project-website/old-archive/2000-01/0328.html

482 wiersze
19 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: Unixware patch</TITLE>
<META NAME="Author" CONTENT="Wolfgang Rapp (wolfgang@rapp-informatik.de)">
<META NAME="Subject" CONTENT="Re: Unixware patch">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: Unixware patch</H1>
<!-- received="Mon Jan 31 11:05:04 2000" -->
<!-- isoreceived="20000131190504" -->
<!-- sent="Mon, 31 Jan 2000 22:11:33 +0100" -->
<!-- isosent="20000131211133" -->
<!-- name="Wolfgang Rapp" -->
<!-- email="wolfgang@rapp-informatik.de" -->
<!-- subject="Re: Unixware patch" -->
<!-- id="3895FA85.8818832B@rapp-informatik.de" -->
<!-- inreplyto="200001300553.NAA18481@minerva.ee.uwa.edu.au" -->
<STRONG>From:</STRONG> Wolfgang Rapp (<A HREF="mailto:wolfgang@rapp-informatik.de?Subject=Re:%20Unixware%20patch&In-Reply-To=&lt;3895FA85.8818832B@rapp-informatik.de&gt;"><EM>wolfgang@rapp-informatik.de</EM></A>)<BR>
<STRONG>Date:</STRONG> Mon Jan 31 2000 - 13:11:33 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0329.html">Andreas: "Re: Nikon coolscan LS-2000"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0327.html">Oliver Rauch: "Re: Umax Astra 2200"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0286.html">Petter Reinholdtsen: "Unixware patch"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#328">[ date ]</A>
<A HREF="index.html#328">[ thread ]</A>
<A HREF="subject.html#328">[ subject ]</A>
<A HREF="author.html#328">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Petter Reinholdtsen wrote:
<BR>
<P><EM>&gt; [Wolfgang Rapp]
</EM><BR>
<EM>&gt; &gt; --- config.sub.org Fri Jan 7 10:33:57 2000
</EM><BR>
<EM>&gt; &gt; +++ config.sub Fri Jan 7 10:47:37 2000
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; This change is not in the latest config.sub version from FSF,
</EM><BR>
<EM>&gt; available from CVS
</EM><BR>
<EM>&gt; :pserver:<A HREF="mailto:anoncvs@anoncvs.gnu.org?Subject=Re:%20Unixware%20patch&In-Reply-To=&lt;3895FA85.8818832B@rapp-informatik.de&gt;">anoncvs@anoncvs.gnu.org</A>:/gd/gnu/anoncvsroot
</EM><BR>
<EM>&gt; (/gd/gnu/anoncvsroot/common). Did you send this change to FSF? If it
</EM><BR>
<EM>&gt; isn't there, it will disappear when we upgrade config.sub the next
</EM><BR>
<EM>&gt; time.
</EM><BR>
<P>No not yet. Don't know if I need this reallyi it seems to work anywhere..
<BR>
<P><EM>&gt;
</EM><BR>
<EM>&gt; &gt; Configuration of Sane on UW is easy now if we use the newest libtool
</EM><BR>
<EM>&gt; &gt; 1.3.4 because the libtool maintainers now put in my patches to
</EM><BR>
<EM>&gt; &gt; create shared libs on Unixware to this version.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Oliver Rauch has some patches to our libtool 1.3.3 which will need to
</EM><BR>
<EM>&gt; be moved into 1.3.4 as well before we upgrade. Is the new libtool
</EM><BR>
<EM>&gt; version required to compile on Unixware?
</EM><BR>
<P>Required - libtool-1.3.4 is the first version with will build shared libs
<BR>
for UW.
<BR>
To build the developement snapshots I nromally copy ltconfig and
<BR>
ltmain.sh
<BR>
FROM LIBTOOL-1.3.4 .to the Sane directory and say configure
<BR>
<P>I have a README.unixware2 file to describe how to build sane on UW2.
<BR>
<P><EM>&gt; Your patch is now in CVS, and will be included in the next snapshot.
</EM><BR>
<EM>&gt; Please test and make sure I did not break anything.
</EM><BR>
<EM>&gt; --
</EM><BR>
<EM>&gt;
</EM><BR>
<P>
<P>
Jan 20 2000 Wolfgang Rapp <A HREF="mailto:wolfgang@rapp-informatik.de?Subject=Re:%20Unixware%20patch&In-Reply-To=&lt;3895FA85.8818832B@rapp-informatik.de&gt;">wolfgang@rapp-informatik.de</A>
<BR>
<P>UNIXWARE PORT of SANE - HOWTO build and what you need to run
<BR>
<P>You need a sane SCSI driver to run SANE on Unixware 2.x. There is at
<BR>
least one such driver: the sane driver by R=I+S.
<BR>
<P>The Unixware sane driver is a binary loadable module driver for UW2.x.
<BR>
Please send Email to <A HREF="mailto:wolfgang@rapp-informatik.de?Subject=Re:%20Unixware%20patch&In-Reply-To=&lt;3895FA85.8818832B@rapp-informatik.de&gt;">wolfgang@rapp-informatik.de</A> to receive.
<BR>
<P>What you need to build xane on Unixware 2.x
<BR>
- libtool 1.3.4 Now they put in my extensions (copy ltconfig and ltmain.sh)
<BR>
- gnu make
<BR>
- rev binary rev programm for make install.
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;without rev the libs are named wrong.
<BR>
<P>You dont't need gcc. All is build with the standard Unixware cc and libs!!
<BR>
<P>You need libs to build xscanimage and xsane, like libgtk libgimp and
<BR>
the image libs for jpeg, tiff and png to build the frontends.
<BR>
It is also good to have gettext with libintl installed.
<BR>
Most of the libs are available on the Skunkware CD's from SCO in pkgadd format.
<BR>
If you build the frontends with this libs gimp plugin is also supported by
<BR>
xscanimage and xsane. Latest xsane version tested was 0.48.
<BR>
<P><P>With the following configure should run an build shared libs with libtool 1.3.4
<BR>
<P>LD_RUN_PATH=/usr/local/lib CPPFLAGS=&quot;-I/usr/local/include -I/isr/X/include&quot; CFLAGS=&quot;-I/usr/local/include -I/usr/X/include -I/usr/ucbinclude -L/usr/local/lib -L/usr/ucblib -l ucb&quot; LIBS=&quot;-lsocket -lnsl -lgen -I/opt/include -L/usr/ucblib -lucb&quot; ./configure
<BR>
<P>After running configure you have to edit the generated file libtool
<BR>
<P>Append to the line
<BR>
archive_cmds=&quot;\$LD -G -o \$lib \$libobjs \$deplibs \$linkopts
<BR>
<P>so that it looks like this.
<BR>
archive_cmds=&quot;\$LD -G -o \$lib \$libobjs \$deplibs \$linkopts -B bind_now -L/usr/local/lib -lintl -L/usr/ucblib -lucb -lm&quot;
<BR>
<P>This is a must to link the libucb.a , libintl.a in when the sane libs are build.It's also necessary for mathematic lib -lm .
<BR>
Not doing this will bring runtime errors like missimg usleep or pow function.
<BR>
<P>ATTENTION:!!! libucb.a of Unixware 2.x has a buggy readdir function so it is
<BR>
recommanded to remove readdir.o from libucb.a with ar -d readdir.o libucb.a
<BR>
Often used and neded functions from libucb.a are strncasecmp or getpagesize.
<BR>
<P>If you use -I/usr/ucbinclude it is also a good idea to move
<BR>
/usr/ucbinlcude/unistd.h to another file, because it will be included first and
<BR>
some sources will not compile.
<BR>
<P>Then you can run make with GNU make.
<BR>
<P>After this say su and then ist good to say
<BR>
LD_RUN_PATH=/usr/local/lib export LD_RUN_PATH
<BR>
<P>after this you can install with
<BR>
make install
<BR>
&nbsp;&nbsp;&nbsp;but remenber to have rev binary or the libs will be named in a wrong way
<BR>
<P><P>Tested on Unixware 2.0.x with Umax Astra 1220S and HP C5100A with sane-1.0.1.
<BR>
With Microtek backend earlier on sane-0.74.
<BR>
<P>If you use the net backend you do not need the Unixware sanedrv.
<BR>
<P>The driver is a shareware product.
<BR>
<P>The driver is supplied binary in pkgadd(1m) format and is tested from UW2.0x.
<BR>
Please send Email to <A HREF="mailto:wolfgang@rapp-informatik.de?Subject=Re:%20Unixware%20patch&In-Reply-To=&lt;3895FA85.8818832B@rapp-informatik.de&gt;">wolfgang@rapp-informatik.de</A> to get the driver in
<BR>
binary pkgadd package.
<BR>
<P><P>To install it on a Unixware do:
<BR>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd /tmp
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get sanedrv.pkg.tgz
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gunzip sanedrv.pkg.tgz
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tar xvf sanedrv.pkg.tar
<BR>
as root:
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pkgadd -d /tmp/sanedrv
<BR>
<P><P>Once the driver is installed, there should be a device nodes /dev/sane
<BR>
and /dev/scanner
<BR>
/dev/scanner1 for the second, and so on...)
<BR>
<P>The scanner my be connected to any SCSI controller in the system, also if you
<BR>
have additional devices like disks or cdroms on the same controller.
<BR>
The UW2.x sane driver do not block the controller. The scanner must be switched
<BR>
on to be recognized by UW, if the low level driver p.e. adsl is loaded.
<BR>
<P>To configure an UMAX scanner, configuration file
<BR>
/usr/local/etc/sane.d/umax.conf might contain:
<BR>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/dev/scanner
<BR>
<P>The driver is configured to recognice all scsi scanners with ID SCANNER and
<BR>
all HP Scsi scanners with ID Processor and Inquiry string starting with
<BR>
&quot;HP&quot; string. For details have a look to /etc/conf/pack.d/sane/space.c.
<BR>
<P>If you change this then you must unload the sane driver modadmin -U sane,
<BR>
build the new module by /etc/conf/bin/idbuild -M sane
<BR>
and the install the driver with modadmin -l sane.
<BR>
<P>If you have questions or problems with the Unixware support in SANE,
<BR>
send mail to:
<BR>
<P><A HREF="mailto:wolfgang@rapp-informatik.de?Subject=Re:%20Unixware%20patch&In-Reply-To=&lt;3895FA85.8818832B@rapp-informatik.de&gt;">wolfgang@rapp-informatik.de</A>
<BR>
<P><P>If you don't have rev here is the source.
<BR>
<P>------------ cut here -------------------------------------------------------
<BR>
/*-
<BR>
&nbsp;* Copyright (c) 1987, 1992, 1993
<BR>
&nbsp;* The Regents of the University of California. All rights reserved.
<BR>
&nbsp;*
<BR>
&nbsp;* Redistribution and use in source and binary forms, with or without
<BR>
&nbsp;* modification, are permitted provided that the following conditions
<BR>
&nbsp;* are met:
<BR>
&nbsp;* 1. Redistributions of source code must retain the above copyright
<BR>
&nbsp;* notice, this list of conditions and the following disclaimer.
<BR>
&nbsp;* 2. Redistributions in binary form must reproduce the above copyright
<BR>
&nbsp;* notice, this list of conditions and the following disclaimer in the
<BR>
&nbsp;* documentation and/or other materials provided with the distribution.
<BR>
&nbsp;* 3. All advertising materials mentioning features or use of this software
<BR>
&nbsp;* must display the following acknowledgement:
<BR>
&nbsp;* This product includes software developed by the University of
<BR>
&nbsp;* California, Berkeley and its contributors.
<BR>
&nbsp;* 4. Neither the name of the University nor the names of its contributors
<BR>
&nbsp;* may be used to endorse or promote products derived from this software
<BR>
&nbsp;* without specific prior written permission.
<BR>
&nbsp;*
<BR>
&nbsp;* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
<BR>
&nbsp;* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<BR>
&nbsp;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
<BR>
&nbsp;* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
<BR>
&nbsp;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<BR>
&nbsp;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
<BR>
&nbsp;* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
<BR>
&nbsp;* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
<BR>
&nbsp;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
<BR>
&nbsp;* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
<BR>
&nbsp;* SUCH DAMAGE.
<BR>
&nbsp;*/
<BR>
<P>#ifndef lint
<BR>
static char copyright[] =
<BR>
&quot;@(#) Copyright (c) 1987, 1992, 1993\n\
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Regents of the University of California. All rights reserved.\n&quot;;
<BR>
#endif /* not lint */
<BR>
<P>#ifndef lint
<BR>
static char sccsid[] = &quot;@(#)rev.c 8.3 (Berkeley) 5/4/95&quot;;
<BR>
#endif /* not lint */
<BR>
<P>#include &lt;sys/types.h&gt;
<BR>
<P>#include &lt;errno.h&gt;
<BR>
#include &lt;stdio.h&gt;
<BR>
#include &lt;stdlib.h&gt;
<BR>
#include &lt;string.h&gt;
<BR>
#include &lt;unistd.h&gt;
<BR>
<P>void usage (void);
<BR>
<P>int
<BR>
main(argc, argv)
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int argc;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char *argv[];
<BR>
{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;register char *filename, *p, *t;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FILE *fp;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char line[BUFSIZ];
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;size_t len;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int ch, rval;
<BR>
<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ferror(fp)) {
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;perror(filename);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rval = 1;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(void)fclose(fp);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} while(*argv);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(rval);
<BR>
}
<BR>
<P>void
<BR>
usage()
<BR>
{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(void)fprintf(stderr, &quot;usage: rev [file ...]\n&quot;);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit(1);
<BR>
}
<BR>
<P><P><P><PRE>
--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Unixware%20patch&In-Reply-To=&lt;3895FA85.8818832B@rapp-informatik.de&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0329.html">Andreas: "Re: Nikon coolscan LS-2000"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0327.html">Oliver Rauch: "Re: Umax Astra 2200"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0286.html">Petter Reinholdtsen: "Unixware patch"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#328">[ date ]</A>
<A HREF="index.html#328">[ thread ]</A>
<A HREF="subject.html#328">[ subject ]</A>
<A HREF="author.html#328">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Mon Jan 31 2000 - 11:06:53 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>