Commit c5d7106e authored by Bernd Zeimetz's avatar Bernd Zeimetz

Imported Upstream version 0.7+dfsg

This diff is collapsed.
This diff is collapsed.
if you're hacking at ZBar, PLEASE send patches against the latest SVN!
if you haven't already, get ZBar from SVN by running:
svn co zbar
cd zbar
autoreconf --install
this will generate configure and all that other foo you usually get with
a release. you will need to have some basic "developer tools" installed
in order for this to work (particularly GNU autotools)
when you're done hacking and want to make your patch, run:
svn diff > hacked.patch
from the toplevel directory, and go post this file in the patches
section off the project page:
finally, some interesting reading if you want to increase your chances
of patch acceptance:
Basic Installation
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `' is used to create `configure' by a program
called `autoconf'. You only need `' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
Installation Names
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/' if it exists, then
`PREFIX/etc/' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
`configure' recognizes the following options to control how it
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
Print a summary of the options to `configure', and exit.
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
AM_CPPFLAGS = -I$(srcdir)/include
check_PROGRAMS =
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = zbar.pc
include $(srcdir)/include/
include $(srcdir)/zbar/
include $(srcdir)/zbarimg/
include $(srcdir)/zbarcam/
include $(srcdir)/python/
include $(srcdir)/gtk/
pkgconfig_DATA += zbar-gtk.pc
include $(srcdir)/pygtk/
include $(srcdir)/qt/
pkgconfig_DATA += zbar-qt.pc
include $(srcdir)/plugin/
include $(srcdir)/test/
include $(srcdir)/doc/
EXTRA_DIST += zbar.spec
EXTRA_DIST += examples/ examples/ examples/ \
examples/barcode.png examples/ examples/ \
examples/scan_image.c examples/scan_image.cpp examples/ \
EXTRA_DIST += perl/MANIFEST perl/README perl/Changes perl/COPYING.LIB \
perl/Makefile.PL perl/typemap perl/ZBar.xs perl/ppport.h \
perl/ perl/inc/Devel/ perl/ZBar/Image.pod \
perl/ZBar/ImageScanner.pod perl/ZBar/Processor.pod perl/ZBar/Symbol.pod \
perl/examples/ perl/examples/ \
perl/examples/ \
perl/t/barcode.png perl/t/ZBar.t perl/t/Decoder.t perl/t/Image.t \
perl/t/Processor.t perl/t/Scanner.t perl/t/pod.t perl/t/pod-coverage.t
This source diff could not be displayed because it is too large. You can view the blob instead.
ZBar Barcode Reader
version 0.7 (2009-04-21):
Welcome to ZBar! In addition to finalizing the project name change,
this release adds new bindings for Python and fixes a few bugs with
the Perl interface. The decoder also has several new features and
addresses missing checks that will improve reliability with
excessively noisy images.
version 0.6 (2009-02-28):
This release fixes many bugs and adds several improvements suggested
by users: support for decoding UPC-E is finished. zebraimg is
now able to scan all pages of a document (such as PDF or TIFF) and
the new XML output includes the page where each barcode is found.
Camera support has been significantly improved, including the
addition of JPEG image formats. Perl bindings make it even easier
to write a document or video scanning application. Finally, we are
now able to offer initial support for building the base library for
version 0.5 (2008-07-25):
Introducing zebra widgets! Prioritized by popular demand, this
release includes fully functional barcode scanning widgets for GTK,
PyGTK, and Qt. Application developers may now seamlessly integrate
barcode reader support with their user interface.
This release also fixes many bugs; existing users are encouraged to
version 0.4 (2008-05-31):
new support for EAN-8, Code 39 and Interleaved 2 of 5!
this release also introduces the long awaited decoder configuration
options and fixes several bugs
version 0.3 (2008-02-25):
this is a beta release of the enhanced internal architecture.
support has been added for version 2 of the video4linux API and many
more image formats. several other feature enhancements and bug
fixes are also included. image scanning is slightly improved for
some images, but the base scan/decode function is relatively
untouched. significant new code is represented in this release
- all bug reports are welcome and will be addressed promptly!
version 0.2 (2007-05-16):
this release introduces significant enhancements, bug fixes and new
features! basic EAN-13/UPC-A reading has been improved and should
now be much more reliable. by popular request, new support has been
added for decoding Code 128. additionally, the build process was
improved and there is even basic documentation for the application
version 0.1 (2007-03-24):
first official Zebra release!
supports basic scanning and decoding of EAN-13 and UPC-A symbols
using a webcam (zebracam) or from stored image files (zebraimg).
still need to add support for addons and EAN-8/UPC-E
The ZBar Bar Code Reader is a library for scanning and decoding bar
codes from various sources such as video streams, image files or raw
intensity sensors. It supports EAN/UPC, Code 128, Code 39 and
Interleaved 2 of 5. Included with the library are basic applications
for decoding captured bar code images and using a video device (eg,
webcam) as a bar code scanner. The flexible, layered architecture
features a fast, streaming interface with a minimal memory footprint.
Check the zbar home page for the latest release, mailing lists, etc.
License information can be found in 'COPYING.LIB'.
See 'INSTALL' for generic configuration and build instructions.
The scanner/decoder library itself only requires a few standard
library functions which should be avilable almost anywhere.
The zbarcam program uses the video4linux API (v4l1 or v4l2) to access
the video device. This interface is part of the linux kernel, a 2.6
kernel is recommended for full support. More information is available
pkg-config is used to locate installed libraries. You should have
installed pkg-config if you need any of the remaining components.
pkg-config may be obtained from
The zbarimg program uses ImageMagick to read image files in many
different formats. You will need at least ImageMagick version 6.2.6
and the Magick++ development interface to ImageMagick if you want to
scan image files. ImageMagick may be obtained from
The Qt widget requires Qt4. You will need Qt4 if you would like to
develop a Qt GUI application with an integrated bar code scanning
widget. Qt4 may be obtained from
The GTK+ widget requires GTK+-2.x. You will need GTK+ if you would
like to develop a GTK+ GUI application with an integrated bar code
scanning widget. GTK+ may be obtained from
The PyGTK wrapper for the GTK+ widget requires Python and PyGTK. You
will need both if you would like to develop a PyGTK GUI application
with an integrated bar code scanning widget. Python and PyGTK may
respectively be obtained from
The Perl bindings require Perl (version?). You will need Perl if you
would like to scan images or video directly using Perl. Perl is
available from
If required libraries are not available you may disable building for
the corresponding component using configure (see configure --help).
The Perl bindings must be built separately after installing the
library. see
'make install' will install the library and application programs. Run
'zbarcam' to start the video scanner. use 'zbarimg barcode.jpg' to
decode a saved image file. Check the manual to find specific options
for each program.
Bugs can be reported on the sourceforge project page
Please include the ZBar version number and a detailed description of
the problem. You'll probably have better luck if you're also familiar
with the concepts from:
* cleanup symbol leaks
* finish error handling
* handle video destroyed w/images outstanding
* dbg_scan background image stretched (still...)
* profile and weed out obvious oversights
* windows port
* fix processor layer and/or add more appropriate windows interface
* example using SANE to scan symbol(s)
* build API docs for zbargtk, zbarpygtk
* is zbargtk/QZBar BGR4 alpha swapped?
* widget config APIs
* drag-and-drop for widgets (configurable...)
* Perl build support integration?
* Perl object lifetime problems? (eg Symbol)
* base library python bindings
* start w/enum wrappers
* GTK and Qt perl bindings
* C++ global wrappers
* PDF417
* extract/resolve symbol matrix parameters (NB multiple symbols)
* error detection/correction
* high-level decode
* Code 39, i25 optional features (check digit and ASCII escapes)
* handle Code 128 function characters (FNC1-4)
* Code 128 trailing quiet zone checks
* finish addon decoding
* support for binary symbol data (PDF417, Code 128)
* start/stop/abort and location detail APIs (PDF417, OMR)
* more configuration options
* disable for at least UPC-E (maybe UPC-A?)
* Code-39/i25 check digit (after implementation)
* Code-39 full ASCII (after implementation)
* standard symbology identifiers (which standard?)
* set consistency requirements
* set scanner filter params
* fix min/max length check during decode
* revisit noise and resolution independence
* support for a "confidence" metric
image scanner:
* extract and track symbol polygons
* dynamic scan density (PDF417, OMR)
* add multi-sample array interface to linear scanner
image formats:
* fix image data inheritance
* de-interlacing
* add color support to conversions (also jpeg)
* add support for scanline pad throughout
* factor conversion redundancy
* add XShm support
* X protocol error handling
* API to query used interface (video, window?) (/format?)
* mode to preserve aspect ratio (default?)
* simple image manipulations scale(xv?)/mirror
* maintain aspect ratio
* overlay doesn't resize w/window
* more overlay details
* decoded result(?)
* stats
* zbarimg multi-frame duplicate suppression
* stats/fps at zbarcam exit
* decode hook (program/script)? (also zbarimg?)
This diff is collapsed.
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <>.
# 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
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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.
# This file is maintained in Automake, please report
# bugs to <> or send patches to
# <>.
case $1 in
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <>.
exit $?
-v | --v*)
echo "compile $scriptversion"
exit $?
for arg
if test -n "$eat"; then
case $1 in
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
case $2 in
*.o | *.obj)
set x "$@" -o "$2"
set x "$@" "$1"
set x "$@" "$1"
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
sleep 1
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
if test -f "$cofile"; then
mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# ltversion.m4 -- version numbers -*- Autoconf -*-
# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# Generated from
# serial 3012 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.2.6])
m4_define([LT_PACKAGE_REVISION], [1.3012])
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 4 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
# So we provide this file, which has a silly filename so it's always
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
# we give up compatibility with versions before 1.7, at which point
# we need to keep only those names which we still refer to.
# This is to help aclocal find these macros, as it can't see m4_define.