snapshot 20000206 working on Unixware2

From: Wolfgang Rapp (wolfgang@rapp-informatik.de)
Date: Sun Feb 13 2000 - 11:22:33 PST

  • Next message: Johan Bengtsson: "Umax 1220s + transparency adapter bugs"

    Hello,

    I test 20000206 snapshot on UW2 After make the code GCC clean for HP
    it also compiles and installs
    without errors with the UW cc.

    For documentation how to build please add the README.unixware2 file as
    documentation to the source

    Bye Wolfgang

    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
    



    This archive was generated by hypermail 2b29 : Sun Feb 13 2000 - 09:24:15 PST