# Re: Unixware patch

From: Wolfgang Rapp (wolfgang@rapp-informatik.de)
Date: Mon Jan 31 2000 - 13:11:33 PST

- Next message: Andreas: "Re: Nikon coolscan LS-2000"
  - Previous message: Oliver Rauch: "Re: Umax Astra 2200"
  - In reply to: Petter Reinholdtsen: "Unixware patch"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  Petter Reinholdtsen wrote:

  > [Wolfgang Rapp]
  > > --- config.sub.org Fri Jan 7 10:33:57 2000
  > > +++ config.sub Fri Jan 7 10:47:37 2000
  >
  > This change is not in the latest config.sub version from FSF,
  > available from CVS
  > :pserver:anoncvs@anoncvs.gnu.org:/gd/gnu/anoncvsroot
  > (/gd/gnu/anoncvsroot/common). Did you send this change to FSF? If it
  > isn't there, it will disappear when we upgrade config.sub the next
  > time.

  No not yet. Don't know if I need this reallyi it seems to work anywhere..

  >
  > > Configuration of Sane on UW is easy now if we use the newest libtool
  > > 1.3.4 because the libtool maintainers now put in my patches to
  > > create shared libs on Unixware to this version.
  >
  > Oliver Rauch has some patches to our libtool 1.3.3 which will need to
  > be moved into 1.3.4 as well before we upgrade. Is the new libtool
  > version required to compile on Unixware?

  Required - libtool-1.3.4 is the first version with will build shared libs
  for UW.
  To build the developement snapshots I nromally copy ltconfig and
  ltmain.sh
  FROM LIBTOOL-1.3.4 .to the Sane directory and say configure

  I have a README.unixware2 file to describe how to build sane on UW2.

  > Your patch is now in CVS, and will be included in the next snapshot.
  > Please test and make sure I did not break anything.
  > --
  >

  Jan 20 2000 Wolfgang Rapp wolfgang@rapp-informatik.de

  UNIXWARE PORT of SANE - HOWTO build and what you need to run

  You need a sane SCSI driver to run SANE on Unixware 2.x. There is at
  least one such driver: the sane driver by R=I+S.

  The Unixware sane driver is a binary loadable module driver for UW2.x.
  Please send Email to wolfgang@rapp-informatik.de to receive.

  What you need to build xane on Unixware 2.x
  - libtool 1.3.4 Now they put in my extensions (copy ltconfig and ltmain.sh)
  - gnu make
  - rev binary rev programm for make install.
  without rev the libs are named wrong.

  You dont't need gcc. All is build with the standard Unixware cc and libs!!

  You need libs to build xscanimage and xsane, like libgtk libgimp and
  the image libs for jpeg, tiff and png to build the frontends.
  It is also good to have gettext with libintl installed.
  Most of the libs are available on the Skunkware CD's from SCO in pkgadd format.
  If you build the frontends with this libs gimp plugin is also supported by
  xscanimage and xsane. Latest xsane version tested was 0.48.

  With the following configure should run an build shared libs with libtool 1.3.4

  LD_RUN_PATH=/usr/local/lib CPPFLAGS="-I/usr/local/include -I/isr/X/include" CFLAGS="-I/usr/local/include -I/usr/X/include -I/usr/ucbinclude -L/usr/local/lib -L/usr/ucblib -l ucb" LIBS="-lsocket -lnsl -lgen -I/opt/include -L/usr/ucblib -lucb" ./configure

  After running configure you have to edit the generated file libtool

  Append to the line
  archive_cmds="\$LD -G -o \$lib \$libobjs \$deplibs \$linkopts

  so that it looks like this.
  archive_cmds="\$LD -G -o \$lib \$libobjs \$deplibs \$linkopts -B bind_now -L/usr/local/lib -lintl -L/usr/ucblib -lucb -lm"

  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 .
  Not doing this will bring runtime errors like missimg usleep or pow function.

  ATTENTION:!!! libucb.a of Unixware 2.x has a buggy readdir function so it is
  recommanded to remove readdir.o from libucb.a with ar -d readdir.o libucb.a
  Often used and neded functions from libucb.a are strncasecmp or getpagesize.

  If you use -I/usr/ucbinclude it is also a good idea to move
  /usr/ucbinlcude/unistd.h to another file, because it will be included first and
  some sources will not compile.

  Then you can run make with GNU make.

  After this say su and then ist good to say
  LD_RUN_PATH=/usr/local/lib export LD_RUN_PATH

  after this you can install with
  make install
  but remenber to have rev binary or the libs will be named in a wrong way

  Tested on Unixware 2.0.x with Umax Astra 1220S and HP C5100A with sane-1.0.1.
  With Microtek backend earlier on sane-0.74.

  If you use the net backend you do not need the Unixware sanedrv.

  The driver is a shareware product.

  The driver is supplied binary in pkgadd(1m) format and is tested from UW2.0x.
  Please send Email to wolfgang@rapp-informatik.de to get the driver in
  binary pkgadd package.

  To install it on a Unixware do:

  cd /tmp
  get sanedrv.pkg.tgz
  gunzip sanedrv.pkg.tgz
  tar xvf sanedrv.pkg.tar
  as root:
  pkgadd -d /tmp/sanedrv

  Once the driver is installed, there should be a device nodes /dev/sane
  and /dev/scanner
  /dev/scanner1 for the second, and so on...)

  The scanner my be connected to any SCSI controller in the system, also if you
  have additional devices like disks or cdroms on the same controller.
  The UW2.x sane driver do not block the controller. The scanner must be switched
  on to be recognized by UW, if the low level driver p.e. adsl is loaded.

  To configure an UMAX scanner, configuration file
  /usr/local/etc/sane.d/umax.conf might contain:

  /dev/scanner

  The driver is configured to recognice all scsi scanners with ID SCANNER and
  all HP Scsi scanners with ID Processor and Inquiry string starting with
  "HP" string. For details have a look to /etc/conf/pack.d/sane/space.c.

  If you change this then you must unload the sane driver modadmin -U sane,
  build the new module by /etc/conf/bin/idbuild -M sane
  and the install the driver with modadmin -l sane.

  If you have questions or problems with the Unixware support in SANE,
  send mail to:

  wolfgang@rapp-informatik.de

  If you don't have rev here is the source.

  ------------ cut here -------------------------------------------------------
  /*-
  * Copyright (c) 1987, 1992, 1993
  * The Regents of the University of California. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
  * notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  * notice, this list of conditions and the following disclaimer in the
  * documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software
  * must display the following acknowledgement:
  * This product includes software developed by the University of
  * California, Berkeley and its contributors.
  * 4. Neither the name of the University nor the names of its contributors
  * may be used to endorse or promote products derived from this software
  * without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */

  #ifndef lint
  static char copyright[] =
  "@(#) Copyright (c) 1987, 1992, 1993\n\
  The Regents of the University of California. All rights reserved.\n";
  #endif /* not lint */

  #ifndef lint
  static char sccsid[] = "@(#)rev.c 8.3 (Berkeley) 5/4/95";
  #endif /* not lint */

  #include <sys/types.h>

  #include <errno.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include <unistd.h>

  void usage (void);

  int
  main(argc, argv)
  int argc;
  char *argv[];
  {
  register char *filename, *p, *t;
  FILE *fp;
  char line[BUFSIZ];
  size_t len;
  int ch, rval;

  while ((ch = getopt(argc, argv, "")) != -1)
  switch(ch) {
  case '?':
  default:
  usage();
  }

  argc -= optind;
  argv += optind;

  fp = stdin;
  filename = "stdin";
  rval = 0;
  do {
  if (*argv) {
  if ((fp = fopen(*argv, "r")) == NULL) {
  perror(*argv);
  rval = 1;
  ++argv;
  continue;
  }
  filename = *argv++;
  }
  while ((p = fgets(line,BUFSIZ,fp)) != NULL) {
  len = strlen(line);
  if (p[len - 1] == '\n')
  --len;
  t = p + len - 1;
  for (t = p + len - 1; t >= p; --t)
  putchar(*t);
  putchar('\n');
  }
  if (ferror(fp)) {
  perror(filename);
  rval = 1;
  }
  (void)fclose(fp);
  } while(*argv);
  exit(rval);
  }

  void
  usage()
  {
  (void)fprintf(stderr, "usage: rev [file ...]\n");
  exit(1);
  }

      --
      Source code, list archive, and docs: http://www.mostang.com/sane/
      To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

  - Next message: Andreas: "Re: Nikon coolscan LS-2000"
  - Previous message: Oliver Rauch: "Re: Umax Astra 2200"
  - In reply to: Petter Reinholdtsen: "Unixware patch"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 11:06:53 PST